<?php
error_reporting(0);
  if(!file_exists("../sql.php")){header("location:../../install/index.php");exit;} 
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
	<title>诗龙分享传播推广系统后台</title>
<script charset="utf-8" src="../jquery.js"></script>
<style>
body{
    background: #000;
}
a{
    text-decoration: none;
    color:#FFC360;
}
#main{
    width: 1280px;
    height: 700px;
    background:url("image/admin.jpg") no-repeat;
    margin: 0 auto ;
}
.denglu{
    text-align: center;
    width:400px;
    height:320px;
    background:#2A81BE;
    color:#fff;
    position: absolute;
    top:230px;
    left:900px;

}
</style>

</head>
<body>
<div id="main">
<div class="denglu">
<p style="color: #fff;text-align: center;font-size:25px;">管理员后台</p>
<p id="erro" style="color:red;height:15px;"></p>
<form action="adminzx.php" method="post">
<input style="font-size:20px;width:250px;height:30px;" type="text" onblur="if( this.value.replace(/[ ]/g,'') == '')value='用户名';this.style.color='#999';"
 onclick="if( this.value == '用户名')value='';this.style.color='#000';" name="username" value="用户名"/>
<br/>
<br/>
<input style="font-size:20px;width:250px;height:30px;" type="password" onblur="if( this.value.replace(/[ ]/g,'') == '')value='登录密码';this.style.color='#999';"
 onclick="if( this.value == '登录密码')value='';this.style.color='#000';" name="psd" value="登录密码"/>
<br/>
<br/>
</form>
<button id="btn" style="font-size:20px;width:260px;height:40px;margin-right: 3px;" onkeydown="">登录</button>
<p><a href="zhpassword.php">忘记密码？</a></p>
</div>
</div>
</body>
<script>
$(window).keydown(function(event){
  if(event.keyCode==13){$("#btn").click();}
});
$("#btn").click(function(){
    var formstr=$("form").serialize();
    $.post("adminzx.php",formstr,function(data){
        var shuju=data;      
        if(shuju=='error'){$("#erro").html("密码有误");}else if(shuju=='error3'){
            $("#erro").html("密码输错3次，请10秒后再试。");}else if(shuju=='error2'){$("#erro").html("用户名有误");}else{$("form").submit();}
       })
           
});
</script>
</html>