Файл: vfermu.ru/vhod.php
Строк: 40
<?
if(isset($_GET['pass']))
{
include_once "sys/home/Forgot_password.php";
}
if(isset($_GET['registration']))
{
include_once "sys/home/registration.php";
}
if(isset($_GET['vhod']))
{
include_once "vhod.php";
}
if(isset($_GET['star']))
{
include_once "sys/home/start.php";
}
if(isset($_GET['forum']))
{
include_once "sys/home/forum.php";
}
if(isset($_GET['chat']))
{
include_once "sys/home/chat.php";
}
if(isset($_POST['nick']) && isset($_POST['password']))
{
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `farm_user` WHERE `nick` = '".my_esc($_POST['nick'])."' AND `password` = '".my_esc($_POST['password'])."' LIMIT 1"),0)==0)err_game("Неверный ник или пароль");
else
{
$_SESSION['id_user']=mysql_result(mysql_query("SELECT `id` FROM `farm_user` WHERE `nick` = '".my_esc($_POST['nick'])."' AND `password` = '$_POST[password]' LIMIT 1"),0);
$_SESSION['pass']=md5(my_esc($_POST['password']));
$adm = base64_encode($_SESSION['id_user']);
$passwd = base64_encode(md5(my_esc($_POST['password'])));
setcookie("log_id", $adm, time() + 3600 * 24 * 7);
setcookie("pass", $passwd, time() + 3600 * 24 * 7);
mysql_query("INSERT INTO `farm_aut` SET `data_last` = '$time', `ip` = '$_SERVER[REMOTE_ADDR]', `brauzer` = '$_SERVER[HTTP_USER_AGENT]', `id_user` = '$_SESSION[id_user]'");
header("Location: http://$_SERVER[HTTP_HOST]/myfarm");
}
}
echo '<title>Авторизация</title>';
echo'
<div class="content">
<center>
<div class="block">
<div>
<div class="block event">
<img src="/images/pomoo/CL-18_1_640x200.jpg" alt="Фермер" />
<ul class="pt">
';
echo '
<center>
<form method="post"><ul>
</br>
<ul class="minor">
<label>Имя:<br>
<input type="text" value="" name="nick">
</label>
</li>
<li class="pt">
<label>Пароль:<br>
<input type="password" value="" name="password">
</label>
<center>
<center>
<li class="pt">
<input type="submit" value="Войти">
</li>
</ul>
</form>
</ul>
';
echo'
<ul class="pt">
<div class="ac-title-bg"><div class="ac-title-l"><div class="ac-title-r">
<script type="text/javascript" src="http://mobtop.ru/c/106008.js"></script><noscript><a href="http://mobtop.ru/in/106008"><img src="http://mobtop.ru/106008.gif" alt="MobTop.Ru - Рейтинг и статистика мобильных сайтов"/></a></noscript>
';
exit;
?>