<?php
ob_start();
if($_SERVER['HTTP_APPVERSION']){
include "./saesiteinfo.php";
}else{
 if(!file_exists("./install/install.lock")){
header('location:./install');
exit;
 }else{
include "./siteinfo.php";
 }
}
//连接数据库
$localhost=mysql_connect($sqlhost,$sqluser,$sqlpass)or die("无法连接服务器");
mysql_select_db($sqldata,$localhost);
?>
<html>
<head>
<meta content="width=device-width,user-scalable=no" name="viewport">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content="3;url=index.php">
<title>挂Q小提示 - <?php echo $sitename; ?></title>
<script src="js/jquery-1.8.0.min.js" type="text/javascript" ></script>
<link rel="stylesheet" type="text/css" href="css/register.css"/>
</head>
<body>
<div class='signup_container'>

    <h1 class='signup_title'><?php echo $sitename; ?>小提示!</h1>
<p><font size="4">
<?php
$user=$_POST['user'];
$pass=$_POST['pass'];
$mysql=mysql_query("SELECT * FROM user WHERE user='$user'");
$sql=mysql_fetch_array($mysql);
if ($user!=$sql['user']){
echo "该账号不存在，请先<a href='reg.php'>注册</a>";
}elseif($user==""){
echo "账号不能为空";
}elseif($pass==""){
echo "密码不能为空";
}elseif($pass!=$sql['pass']){
echo "密码错误";
}else{
echo "登陆成功";
setcookie("SHANIUUSER", "$user");
setcookie("SHANIUPASS", "$pass");
}
?><br />3秒后跳转页面</font></p></div>
</body>
</html>