Просмотр файла top-elena/admin.php

Размер файла: 3.39Kb
<?php
header("Content-type: text/html; charset=UTF-8");
@include "config.php";
?>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html" charset="utf-8"/>
<meta http-equiv="Cache-Control" content="max-age=60" forua="true"/>
<?php
if (empty($_GET['uid']) or empty($_GET['p'])){
        echo "<title>&#x412;&#x445;&#x43E;&#x434;</title></head>";
        echo "<body>";
        echo "<small>";
        echo "<p mode='nowrap'>";
        echo "&#x412;&#x432;&#x435;&#x434;&#x438;&#x442;&#x435; &#x441;&#x432;&#x43E;&#x439; id &#x443;&#x447;&#x430;&#x441;&#x442;&#x43D;&#x438;&#x43A;&#x430; &#x438; &#x43F;&#x430;&#x440;&#x43E;&#x43B;&#x44C;";
        echo "</p>";
        echo "<form action='enter.php' method='get'>";
        echo "<input type='text' name='uid' id='uid' maxlength='3' format='NNN' emptyok='true' size='3'/><br/>";
        echo "<input type='password' name='p' id='p' size='10' maxlength='50'/><br/>";
        echo "<input type='submit' value='&#x412;&#x43E;&#x439;&#x442;&#x438;'/>";
        echo "</form>";
        echo "</small>";
        echo "</body></html>";
        exit;
}
$id=$_GET['uid'];
$pass=$_GET['p'];

if ($id <= 0){
        echo "<title>&#x41E;&#x448;&#x438;&#x431;&#x43A;&#x430;</title>";
        echo '<meta http-equiv="refresh" content="1;url=admin.php"/>';
        echo "</head>";
        echo "<body>";
        echo "<small>";
        echo "&#x412;&#x44B; &#x432;&#x432;&#x435;&#x43B;&#x438; &#x43D;&#x435;&#x432;&#x435;&#x440;&#x43D;&#x44B;&#x439; uid";
        echo "</small>";
        echo "</body></html>";
        exit;
}


$result = mysql_query("SELECT pass FROM users WHERE uid=$id");
$row=mysql_fetch_row($result);
if(empty($row[0])){
         echo "<title>&#x41E;&#x448;&#x438;&#x431;&#x43A;&#x430;</title>";
         echo '<meta http-equiv="refresh" content="1;url=admin.php"/>';
         echo "</head>";
         echo "<body>";
         echo "<small>";
         echo "&#x412;&#x44B; &#x432;&#x432;&#x435;&#x43B;&#x438; &#x43D;&#x435;&#x432;&#x435;&#x440;&#x43D;&#x44B;&#x439; id";
         echo "</small>";
         echo "</body></html>";
         exit;
}
$tpass=$row[0];

if($tpass != $pass){
         echo "<title>&#x41E;&#x448;&#x438;&#x431;&#x43A;&#x430;</title>";
         echo '<meta http-equiv="refresh" content="1;url=admin.php"/>';
         echo "</head>";
         echo "<body>";
         echo "<small>";
         echo "&#x412;&#x44B; &#x432;&#x432;&#x435;&#x43B;&#x438; &#x43D;&#x435;&#x432;&#x435;&#x440;&#x43D;&#x44B;&#x439; &#x43F;&#x430;&#x440;&#x43E;&#x43B;&#x44C;";
         echo "</small>";
         echo "</body></html>";
         exit;
}
echo "<title>&#x410;&#x434;&#x43C;&#x438;&#x43D; &#x43F;&#x430;&#x43D;&#x435;&#x43B;&#x44C;</title>";
echo "</head>";
echo "<body>";
echo "<small>";
echo "&#x41F;&#x440;&#x438;&#x432;&#x435;&#x442;&#x441;&#x442;&#x432;&#x443;&#x44E; &#x412;&#x430;&#x441;!";
echo "<p mode='nowrap'>";
echo "<a href='prof.php?uid=$id&p=$pass'>&#x41D;&#x430;&#x441;&#x442;&#x440;&#x43E;&#x439;&#x43A;&#x438;</a><br/>";
echo "<a href='top.php?act=view&uid=$id'>&#x421;&#x442;&#x430;&#x442;&#x438;&#x441;&#x442;&#x438;&#x43A;&#x430;</a><br/>";
echo "<a href='top.php'>&#x421;&#x43C;&#x43E;&#x442;&#x440;&#x435;&#x442;&#x44C; &#x422;&#x41E;&#x41F;</a><br/>";
echo "<a href='help/help.wml'>&#x41F;&#x43E;&#x43C;&#x43E;&#x449;&#x44C;</a><br/>";
echo "</p>";
echo "</small>";
?>
</body>

</html>