<?php include 'yanzheng.php';?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理中心</title>
<link href="css/css.css" rel="stylesheet" type="text/css" />
</head>
<body>

<?php require_once 'head.php';?>
<div class="box">

<table width="100%" height="30" border="0" cellpadding="10" cellspacing="0" class="bodernav">
  <tr>
    <td width="122" style="padding-left:10px;">管理员密码修改</td>  
  </tr>
</table>
<?php 
$row=query("select * from admin where id=1");
?>
<form action="" method="post"  enctype="multipart/form-data" autocomplete="off" >

		 <table width="100%" height="195" border="0" cellpadding="10" cellspacing="0" class="biaoge">
		 
		   <tr>
			<td width="10%" height="30">用户名</td>
			<td width="90%"><input name="aduser" type="text" value="<?=$row[user]?>"   /></td>
		  </tr>
		  
		  <tr>
			<td height="30">密码</td>
			<td><input name="pwd" type="password"  /></td>
		  </tr>	 
		  
		  <tr>
			<td height="30">密码</td>
			<td><input name="repwd" type="password"  /></td>
		  </tr>	 
		 
		   <tr>
			<td height="30"></td>
			<td><input name="submit" type="submit" class="reganniu" value="修改" /></td>
		   </tr>
		</table>

</form>

<?php
if(isset($_POST['submit'])){

		 $aduser=$_POST['aduser'];
		 $pwd=$_POST['pwd'];
		 $repwd=$_POST['repwd'];
		 
		 if(empty($aduser)){ msg('请输入用户名');}
		 if(empty($pwd)){ msg('请输入密码');}
		 
		 if($pwd != $repwd){ msg('两次密码不一致');}
		 
		
		 $ok="update admin set pwd='$pwd',user='$aduser' where id=1";
		 mysql_query($ok);
		 msg('修改成功',$onurl);
}
?>


</div>

<?php require_once 'foot.php';?>
</body>
</html>