⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 getpwd2.asp

📁 社区天地图文系统(核心:尘缘雅境图文系统) 版本: 1.0 本系统是ASP+ACCESS环境下开发成功
💻 ASP
字号:
<%
'要找回密码,除要一步一步的判断用户的信息回答是否正确外,
'关键还要判断用户的每一步是否完成,是否存在跳过的步骤,和外部提交,
'在此修改中运用了seesion判断用户每一步是否完成,
'最后判断session的存在和正确性,再消除session,
'**TUPUNCO--2003/12/9修改**
%>
<!--#include file="conn.asp"-->
<!--#include file="../include/config.asp"-->
<!--#include file="char.inc"-->
<%
dim rs,sql
dim username
username=checkstr(request.form("username"))
if username="" then
  %>
  <script language="javascript">
   alert("请不要尝试非法操作!!")
   location.href="javascript:history.back()"
  </script>
<%
Response.End
end if

set rs=Server.CreateObject("Adodb.Recordset")
sql="select username,question 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
session("sessionusername")=username  '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;
}
function form1_onsubmit() {
if (document.form1.name.value=="")
	{
	  alert("请输入您的用户名。")
	  document.form1.name.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="form1" language="javascript" onsubmit="return form1_onsubmit()" action="getpwd3.asp?username=<%=username%>">
<table border="1" cellpadding="0" cellspacing="0" width="313" bgcolor="#FFFFFF" height="229" bordercolor="<%=border%>" style="border-collapse: collapse">
<tr>
<td height="172" valign="top" width="311"></center>
<div align="center">
<center>
<table border="0" cellpadding="0" width="99%" cellspacing="0" height="1" style="border-collapse: collapse" bordercolor="#111111"><%if rs("question")<>"" then%>
<tr>
<td width="100%" height="1">
<p align="center">第二步:请回答下列问题。</td>
</tr>
<tr>
<td width="100%" height="1">
<p align="center">问题:<font color="red"><%=rs("question")%></font>
<%     
conn.close     
set conn=nothing     
%></td> 
</tr> 

<tr> 
<td width="100%" height="1">
<p align="center">答案:<input type="text" name="answer" size="32" style="font-family: 宋体; font-size: 9pt;></td>
</tr>
<tr>
<td width="100%" height="25">
<p align="center">您的真实姓名:<input type="text" name="fullname" size="23" 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><%else%>
<tr>
<td width="100%" height="107" align=center>您在个人资料中设置的提示问题为空,所以不能找回密码!如果您真的忘记了密码,请与<a href="mailto:<%=email%>">管理员</a>联系!</td>
</tr>
<%end if%>
<tr>
<td width="100%" height="107"></td>
</tr>
</table>
</center>
</div>
</td>
</tr>
<tr>
<td height="14" width="311">
<p align="center"><a href="javascript:window.close()" class="1">关闭窗口</a></td>
</tr>
</table>
</form>
</div>

</body>

</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -