Файл: ferma/inc/smsbill/auth.php
Строк: 43
<?
if(isset($_POST['nick']) && isset($_POST['password']))
{
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_user` WHERE `nick` = '".my_esc($_POST['nick'])."' AND `password` = '".md5($_POST['password'])."' LIMIT 1"),0)==0)err_game("Неверный ник или пароль");
else
{
$_SESSION['id_user']=mysql_result
(mysql_query("SELECT `id` FROM `kolhoz_user`
WHERE `nick` = '".my_esc($_POST['nick'])."' AND
`password` = '".md5($_POST['password'])."'
LIMIT 1"),0);
header("Location:/?menu");
exit;
}
}
?>
<font color='000000' style='text-align:center;'>
<div class="event">
</div>
<form method="post"><ul>
<li>
<label>Ник:<br>
<input type="text" value="" name="nick">
</label>
</li>
<li class="pt">
<label>Пароль:<br>
<input type="password" value="" name="password">
</label>
</li>
<li class="pt">
<input type="submit" class="sb" value="Войти">
</li>
</ul>
</form>
<ul>
</b>
</ul>
<font size='2'>
<div></div><div style='text-align:center;'
class='pt small minor'>
<font size='2'>
<div class="stat">
<div class="aa">
<div class="bb">
<span class="menu">Для гостей</span>
</div>
</div>
</font>
<table border=0 background=dot.gif width=100% height=2 cellspacing=0 cellpadding=0>
<td align="center">
<a href="?pass"><img src="i/pass.png" height="40" onclick="changeSizeImage(this)" />
<br />
<b>Забыли пароль ?</b>
</td>
</a>
<?
echo '<td align="center">
<a href="?reg_new_igrok_id_kod_4793257953389434446783278"><img src="i/reg.png" height="40" onclick="changeSizeImage(this)" />
<br />
<b>Регистрация </a><li></b>
</td> ';
echo " <span class='title'> Фермеров
".mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_user`"), 0)."</span></div>";
exit;
?>