<?
require('../inc/conn.php');
$admin=$mysql->query("select * from `".$BIAOTOU."admin` where id=1");
$adminname=$admin[0][adminname];
$password=$admin[0][password];
if(md5($_POST['password'])==$password & $_POST['adminname']==$adminname){
	setcookie("y_Cookie", $password);
	setcookie("x_Cookie", $adminname);

	echo"<p align='center'>成功登录，2秒钟后转向管理主页！</p><script>location.href='admin.php';</script>";
	exit;
}else{
	echo"<script>alert('\u7528\u6237\u540d\u6216\u5bc6\u7801\u9519\u8bef\u0021\u0021\u0021');location.href='index.php';</script>";
}
?>
