📄 getpwd.php
字号:
<?php
include ("config.php");
include ("function.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=gb2312" />
<link href="./_res/css/style.css" rel="stylesheet" type="text/css" />
<title>锐虎数据保护系统</title>
<script language="javascript" src="../js/PB.js"></script>
</head>
<body>
<?php
if($_POST['submit']){
$Code=$_POST['Code'];
$PwdQuestion=$_POST['PwdQuestion'];
$PwdAnswer=$_POST['PwdAnswer'];
if($Code==''){
die("<script language=javascript>alert('用户帐号不为空!');window.location='getpwd.php';</script>");
}
$exec="select * from sys_User where Code='".$Code."'";
$result=mysql_query($exec);
if($rs=mysql_fetch_object($result)){
if ($rs->Code!=$Code){
die("<script language=javascript>alert('用户名不存在!');window.location='getpwd.php';</script>");
}elseif($rs->PwdQuestion!=$PwdQuestion){
die("<script language=javascript>alert('提示问题不正确');window.location='getpwd.php';</script>");
}elseif($rs->PwdAnswer!=$PwdAnswer){
die("<script language=javascript>alert('提示答案不正确');window.location='getpwd.php';</script>");
}else{
$Pwd=md5(123456);
$exec1="update sys_User set Pwd='".$Pwd."' where Code='".$Code."'";
if($result1=mysql_query($exec1)){
$MAC=$_SESSION['MAC'];
$Table = "密码";
Do_Operate($Code,$Table,2,$MAC);
$rii=mysql_query($sql);
die("<script language=javascript>alert('密码重置成功,重置后的密码为“123456”!');window.location='getpwd.php';</script>");
}else{
die("<script language=javascript>alert('密码重置失败!');window.location='getpwd.php';</script>");
}
}
}else{
die("<script language=javascript>alert('用户名不存在!');window.location='getpwd.php';</script>");
}
}
?>
<form name="form1" id="form1" method="post" action="">
<input type="hidden" name="submit" value="1" />
<table width="490" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="50"> </td>
</tr>
<tr>
<td><table width="490" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="25" background="./_res/images/jp_center.gif"><img src="./_res/images/jp_left.gif" width="20" height="55" /></td>
<td align="left" background="./_res/images/jp_center.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
<td align="right"><table width="18%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
<td> </td>
</tr>
</table></td>
</tr>
</table></td>
<td width="20"><img src="./_res/images/jp_right.gif" width="22" height="55" /></td>
</tr>
</table></td>
</tr>
<tr>
<td background="./_res/images/jp_back.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="35" align="center" class="nr_xu"><span class="STYLE14"> 重置密码</span></td>
</tr>
<tr>
<td height="170" align="left" class="menu_xu"><table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="29%" height="30" align="right" nowrap="nowrap">用户帐号:</td>
<td width="71%" colspan="2"><input name="Code" type="text" class="index_input" size="23" /></td>
</tr>
<tr>
<td height="30" align="right" nowrap="nowrap">提示问题:</td>
<td colspan="2"><select name="PwdQuestion" class="index_input">
<option value="0" selected="selected">无安全提问</option>
<option value="1">母亲的名字</option>
<option value="2">爷爷的名字</option>
<option value="3">父亲出生的城市</option>
<option value="4">您其中一位老师的名字</option>
<option value="5">您个人计算机的型号</option>
<option value="6">您最喜欢的餐馆名称</option>
<option value="7">驾驶执照的最后四位数字</option>
<option></option>
</select></td>
</tr>
<tr>
<td height="30" align="right" nowrap="nowrap">提示答案:</td>
<td colspan="2"><input name="PwdAnswer" type="text" class="index_input" id="PwdAnswer" size="23" /></td>
</tr>
<tr>
<td height="30" colspan="2" align="right"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="10"></td>
</tr>
<tr>
<td align="center"><table width="100%" border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td width="260" align="right"><input name="image" type="image" src="./_res/images/OK.gif" width="78" height="22" /></td>
<td width="103" align="right"><a href="index.php"><img src="./_res/images/ce.gif" width="78" height="22" border="0"/></a></td>
</tr>
</table></td>
</tr>
<tr>
<td height="10"></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td><img src="./_res/images/jp_bottom.gif" width="490" height="14" /></td>
</tr>
</table></td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -