Skocz do zawartości

lion

Użytkownicy
  • Postów

    291
  • Dołączył

  • Ostatnia wizyta

Odpowiedzi opublikowane przez lion

  1. Buhahaha ale przeróba gmclanu ;dd

    Nie noo rozwaliłeś mnie...

     

    Jaka przeróba, co tu jest sklonowane?

    By BeWuO.

     

    @BeWuO: Załóż okulary, to będziesz wiedział

    By Ranmus

  2. config.php

    <?
    ob_start(); 
    $conn = mysql_connect("localhost","root","krasnal");
    mysql_select_db(cms) or die(mysql_error());
    $logged = MYSQL_QUERY("SELECT * from users WHERE id='$_COOKIE[id]' AND password = '$_COOKIE[pass]'");
    $logged = mysql_fetch_array($logged);
    ?>

  3. Emano.

    Mam problem ze skryptem, oto on:

     

    <?
    ob_start();
    include("config.php");
    if($logged[username] && $logged[level] ==5)
    {
    if($_GET[user])
    {
    if (!$_POST[update])
    {
    $user = mysql_query("SELECT * from users where username = '$_GET[user]'");
    $user = mysql_fetch_array($user);
    echo("
    <div align=\"center\"><form method=\"POST\">
    <table width=\"100%\">
    <tr>
    <td align=\"right\" width=\"25%\">
    User Level 
    </td>
    <td align=\"left\">
    <input type=\"text\" size=\"25\" maxlength=\"25\" name=\"level\"
    value=\"$user[level]\"></td>
    </tr>
    <tr>
    <td align=\"right\" width=\"25%\">
    Location 
    </td>
    <td align=\"left\">
    <input type=\"text\" size=\"25\" maxlength=\"25\" name=\"locate\"
    value=\"$user[location]\"></td>
    </tr>
    <tr>
    <td align=\"right\" width=\"25%\">
    MSN Messenger 
    </td>
    <td align=\"left\">
    <input size=\"25\" name=\"msn\" value=\"$user[msn]\"></td>
    </tr>
    <tr>
    <td align=\"right\" width=\"25%\">
    AOL Messenger</td>
    <td align=\"left\">
    <input size=\"25\" name=\"aim\"  value=\"$user[aim]\"></td>
    </tr>
    <tr>
    <td align=\"right\" width=\"25%\">
    Email Address</td>
    <td align=\"left\">
    <input size=\"25\"  name=\"email\" value=\"$user[email]\"></td>
    </tr>
    <tr>
    <td align=\"center\">
    </td>
    <td align=\"left\">
    <input type=\"submit\" name=\"update\" value=\"Update\"></td>
    </tr>
    </table>
    </form>
    </div>");
    }
    else
    {
    $email = htmlspecialchars($_POST[email]);
    $aim = htmlspecialchars($_POST[aim]);
    $msn = htmlspecialchars($_POST[msn]);
    $locate = htmlspecialchars($_POST[locate]);
    $level = htmlspecialchars($_POST[level]);
    echo ("$_GET[user]'s profile has been updated.");
    $update = mysql_query("Update users set email = '$email',
    msn = '$msn', aim = '$aim',
    location = '$locate', level = '$level' where username = '$_GET[user]'");
    }
    }
    else
    {
    $getusers = mysql_query("Select * from users order by username asc");
    while($users = mysql_fetch_array($getusers))
    {
    echo("<a href=\"admin.php?user=$users[username]\">$users[username]</a><br />");
    }
    }
    }
    else
    {
    echo("Sorry, but you are not allowed to view this page!");
    }
    ?>

     

    Noo i kurna nie dziala mi. Bo gdy sie loguje i probuje wejsc na stronke z tym skrypcikiem to wywala mi "Sorry, but you are not allowed to view this page!", a mam ustawiony level 5 dla swojego konta. Wiecie może ocb?

     

    BTW. Dawno nie byłem na gmclanie to postanowiłem sobie coś tutaj szrajbnąć ; dd

  4. El0 ziąs!

    Mam problem z baza danych MySQL i PHP i prosze o pomoc .

    Mam przykladowe tabele:

    pierwsza

    pierwsza_a

    pierwsza_b

    pierwsza_c

    druga

    druga_a

    druga_b

    Chce wykonac na nich kilka operacji, np. zmienic wszedzie czlon \'pierwsza\' (oraz nazwe tabeli \'pierwsza\') na \'trzecia\' oraz wszystkie zawierajace \'druga\' w nazwie (wraz z tabela \'druga\') usunac. Wszystko to chce wykonac w formie skryptu PHP.

    Nie mam zadnego pomyslu, jak by to zrobic w PHP... Prosze o pomoc

×
×
  • Dodaj nową pozycję...