📄 getpwd3.asp
字号:
<%response.buffer="True"%>
<!--#include file="conn.asp"-->
<!--#include file="../include/config.asp"-->
<!--#include file="../include/md5.asp"-->
<!--#include file="char.inc"-->
<%
dim rs,sql
dim username,fullname,answer
answer=md5(trim(request.form("answer")))
fullname=checkstr(request.form("fullname"))
username=checkstr(request("username"))
if username="" or fullname="" or answer="" then
%>
<script language="javascript">
alert("请不要尝试非法操作!!")
location.href="javascript:history.back()"
</script>
<%
Response.End
end if
set rs=Server.CreateObject("Adodb.Recordset")
sql="select username,passwd,answer,fullname from admin where username='"&username&"'"
rs.open sql,conn,1,1
If rs.eof Then
%>
<script language="javascript">
alert("这个用户还没有注册呢,请到首页注册吧!")
location.href="javascript:history.back()"
</script>
<%
Response.End
End If
If rs("answer")<>answer Then
Response.redirect"getpwderr.asp?content=答案"
Response.End
End If
If rs("fullname")<>fullname Then
Response.redirect"getpwderr.asp?content=真实姓名"
Response.End
End If
session("sessionanswer")=answer 'session
session("sessionfullname")=fullname 'session
%>
<html>
<head>
<title>取回密码</title>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="style.css">
<script language="javascript">
<!--
if (parent.frames.length > 0) {
parent.location.href = location.href;
}
// --></script>
<script LANGUAGE="javascript">
<!--
function FrmAddLink_onsubmit() {
if (document.FrmAddLink.passwd.value=="")
{
alert("对不起,请您输入密码!")
document.FrmAddLink.passwd.focus()
return false
}
else if (document.FrmAddLink.passwd.value.length < 4)
{
alert("为了安全,您的密码应该长一点!")
document.FrmAddLink.passwd.focus()
return false
}
else if (document.FrmAddLink.passwd.value.length > 16)
{
alert("您的密码太长了吧!")
document.FrmAddLink.passwd.focus()
return false
}
else if (document.FrmAddLink.passwd2.value=="")
{
alert("对不起,请您输入验证密码!")
document.FrmAddLink.passwd2.focus()
return false
}
else if (document.FrmAddLink.passwd2.value !== document.FrmAddLink.passwd.value)
{
alert("对不起,您两次输入的密码不一致!")
document.FrmAddLink.passwd2.focus()
return false
}
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF" topmargin="11" leftmargin="0" oncontextmenu="self.event.returnValue=false">
<div align="center"><br><br>
<center>
<form method="POST" name="FrmAddLink" language="javascript" onsubmit="return FrmAddLink_onsubmit()" action="getpwd4.asp?username=<%=username%>">
<table border="1" cellpadding="0" cellspacing="0" width="326" bgcolor="#FFFFFF" height="184" bordercolor="<%=border%>" style="border-collapse: collapse">
<tr>
<td height="127" valign="top" width="324"></center>
<div align="center">
<center>
<table border="0" cellpadding="5" width="99%" cellspacing="4" height="49">
<tr>
<td width="100%" height="1">
<p align="center">第三步:重新设置密码。</td>
</tr>
<tr>
<td width="100%" height="1">
<p align="center">新 密 码:<input type="text" name="passwd" size="32" maxlenght=16 style="font-family: 宋体; font-size: 9pt;></td>
</tr>
<tr>
<td width="100%" height="1">
<p align="center">验证密码:<input type="text" name="passwd2" size="32" maxlenght=16 style="font-family: 宋体; font-size: 9pt;></td>
</tr>
<tr>
<td width="100%" height="27">
<p align="center"><input type="submit" value=" 设置密码 " name="submit" style="font-family: 宋体; font-size: 9pt;></td>
</tr>
</table>
</center>
</div>
</td>
</tr>
<tr>
<td height="14" width="324">
<p align="center"><a href="javascript:window.close()" class="1">关闭窗口</a></td>
</tr>
</table>
</form>
</div>
</body>
</html><%
conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -