<?php
header("content-type:text/html;charset=utf-8");
error_reporting(0);
require "../sql.php";
if(isset($_POST['username'])){$username_login=$_POST['username'];}else{exit;}
$yzsql="select * from admin where admin='{$username_login}'";
$yzrst=mysql_query($yzsql);
$yzrow=mysql_fetch_assoc($yzrst);
if(mysql_num_rows($yzrst)){

?>
<!doctype html>
<html>
<head>
<style>
*{
    margin: 0px;
    padding:0px;
}
.main{
    height:700px;
    width:1300px;
    background: #009999;
    text-align:center;
    margin: 0 auto;
}
.top{
   width:1300px;
   height:100px;
   
}
.fdiv{
    width:600px;
    height:500px;
    margin:0 auto;
    background:#fff;
    border-top: 3px solid #FF8140; 
}
.biaoti{
    padding-top: 50px;
    font-size: 20px;
}
.ipt{
    width: 200px;
    height:30px;
}
</style>
<meta charset="utf-8">
	<title>找回密码</title>
</head>
<body>
<div class="main">
<div class="top">
<br>
<br>
<p style="color: #fff;font-size:25px;">诗龙分享传播推广系统</p>
</div>
<div class="fdiv">
<p class="biaoti">通过回答问题找回</p>
<br/>
<form action="yzwenti.php" method="post">
<input type="hidden" name="yzid" value="<?php echo $yzrow['id'];?>"/>
问题：<input class="ipt" type="text" name="username" value="<?php echo $yzrow['mimawenti']; ?>"/>
<br/>
<br/>
答案：<input class="ipt" type="text" name="daan"/>
<br/>
<br/>
<input style="width:200px;height:30px;margin-left: 50px;" type="submit" value="立即验证"/>
</form>
<br>
<br>
<br>
<br>
<p style="font-size:18px;color:#ccc;">请输入安装时填写的问题答案找回密码</p>
<?php 
}else{
    echo "<script>alert('用户名不存在')</script>";
    echo "<script>location='zhpassword.php'</script>";
    
}
?>

</div>
</div>
</body>
</html>