Размер файла: 2.58Kb
<?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>Вход</title></head>";
echo "<body>";
echo "<small>";
echo "<p mode='nowrap'>";
echo "Введите свой id участника и пароль";
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='Войти'/>";
echo "</form>";
echo "</small>";
echo "</body></html>";
exit;
}
$id=$_GET['uid'];
$pass=$_GET['p'];
if ($id <= 0){
echo "<title>Ошибка</title>";
echo '<meta http-equiv="refresh" content="1;url=admin.php"/>';
echo "</head>";
echo "<body>";
echo "<small>";
echo "Вы ввели неверный 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>Ошибка</title>";
echo '<meta http-equiv="refresh" content="1;url=admin.php"/>';
echo "</head>";
echo "<body>";
echo "<small>";
echo "Вы ввели неверный id";
echo "</small>";
echo "</body></html>";
exit;
}
$tpass=$row[0];
if($tpass != $pass){
echo "<title>Ошибка</title>";
echo '<meta http-equiv="refresh" content="1;url=admin.php"/>';
echo "</head>";
echo "<body>";
echo "<small>";
echo "Вы ввели неверный пароль";
echo "</small>";
echo "</body></html>";
exit;
}
echo "<title>Админ панель</title>";
echo "</head>";
echo "<body>";
echo "<small>";
echo "Приветствую Вас!";
echo "<p mode='nowrap'>";
echo "<a href='graphic_7.php?uid=$id&p=$pass'>Настройки</a><br/>";
echo "<a href='top.php?act=view&uid=$id'>Статистика</a><br/>";
echo "<a href='top.php'>Смотреть ТОП</a><br/>";
echo "<a href='help/help.wml'>Помощь</a><br/>";
echo "</p>";
echo "</small>";
?>
</body>
</html>