File size: 713B
<?
include("modul/config.php"); include("modul/fun.php"); include("head.php");
echo "<div class=list>Вход в админку</div>";
if($act=="result"){
$pass=zamena($_POST['pass']); if(!empty($pass)) { $query=mysql_query('SELECT COUNT(*) FROM `admin` WHERE `pass`="'.$pass.'"'); $count=mysql_result($query,0);
if($count==0){ echo "Не верный пароль<br>"; } else { setcookie("pass",$pass,time()+3600*2); header("Location: admin.php"); }
} else { echo "Не верный пароль<br>"; }
} else { echo "<form action=auth.php?act=result method=post><div class=hre>Введите пароль: <br><input type=text name=pass><input type=submit value=Войти></div>"; }
include("foot.php");
?>