membergetpass.asp
来自「生成html的ASP企业站点,可以进行二次开发的」· ASP 代码 · 共 158 行
ASP
158 行
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="../Include/Const.asp" -->
<!--#include file="../Include/NoHackSql.Asp" -->
<!--#include file="../Include/ConnSiteData.asp" -->
<%call SiteInfo
headid=2
Seotitle="找回密码"
%>
<!--#include file="Head.Asp" -->
<div class="clear"></div>
<div id="contant">
<div class="cleft">
<div class="news">
<div class="title">
<b>会员中心</b>
</div>
<div>
<ul>
<%=WebMenu()%>
</ul>
</div>
</div>
<div class="news">
<div class="title">
<b>热门产品</b>
</div>
<div>
<ul>
<%=Producthot(10)%>
</ul>
</div>
</div>
</div>
<div class="cright">
<div class="crightb">
<div class="crightbtitle">
<div class="crightbtitlel">
当前位置:
</div>
<div class="crightbtitler">
<%=WebLocation()%>
</div>
</div>
<div class="crightbcontent"><%=WebContent()%></div>
</div>
</div>
</div>
<!--#include file="Foot.Asp"-->
<%
Function WebMenu()
If session("MemName")="" Or session("GroupID")="" Or session("MemLogin")<>"Succeed" Then
response.write "<Li> <img src=""images/Tx_Ar3.gif"" style=""margin-left:5px;"" /> <a href=""MemberRegister.asp"">注册会员</a></li>"
Else
response.write "<Li> <img src=""images/Tx_Ar3.gif"" style=""margin-left:5px;"" /> <a href=""MemberInfo.asp"">修改注册资料</a></li>"
response.write "<Li> <img src=""images/Tx_Ar3.gif"" style=""margin-left:5px;"" /> <a href=""MemberMessage.asp"">我的留言</a></li>"
response.write "<Li> <img src=""images/Tx_Ar3.gif"" style=""margin-left:5px;"" /> <a href=""MemberOrder.asp"">我的订单</a></li>"
response.write "<Li> <img src=""images/Tx_Ar3.gif"" style=""margin-left:5px;"" /> <a href=""MemberTalent.asp"">我的应聘</a></li>"
response.write "<Li> <img src=""images/Tx_Ar3.gif"" style=""margin-left:5px;"" /> <a href=""MemberLogin.asp?Action=Out"">退出登录</a></li>"
End If
End Function
function WebLocation()
WebLocation=" 当前位置:<a href=""index.asp"" class=""agray"">首页</a> - <a href=""MemberCenter.asp"" class=""agray"">会员中心</a> - 密码找回"&VbCrLf
end Function
function MemGroup(GroupID)
dim rs,sql
set rs = server.createobject("adodb.recordset")
sql="select * from LiangJingCMS_MemGroup where GroupID='"&GroupID&"'"
rs.open sql,conn,1,1
MemGroup=rs("GroupName"&Language)
rs.close
set rs=nothing
end function
function WebContent()
dim rs,sql,NewPassword
if request.QueryString("Step")="" then
%>
<table width="95%" border="0" align="center" cellpadding="3" cellspacing="5">
<form action="MemberGetPass.asp?Step=EnterNameMail" method="post" name="form" id="form">
<tr>
<td width="200" align="right">会员名:</td>
<td><input name="MemName" type="text" id="MemName" size="30" maxlength="16" /></td>
</tr>
<tr>
<td align="right">电子信箱:</td>
<td><input name="Email" type="text" id="Email" size="30" maxlength="50" /></td>
</tr>
<tr>
<td> </td>
<td><input name="Next2" type="submit" value="下一步" /></td>
</tr>
</form>
</table>
<%
elseif request.QueryString("Step")="EnterNameMail" then
set rs = server.createobject("adodb.recordset")
sql="select * from LiangJingCMS_Members where MemName='"&request.form("MemName")&"' and Email='"&request.form("Email")&"'"
rs.open sql,conn,1,1
if rs.eof then
WriteMsg("会员名或电子信箱地址错误!")
exit function
end if
%>
<table width="95%" border="0" align="center" cellpadding="3" cellspacing="5">
<form action="MemberGetPass.asp?Step=EnterAnswer&ID=<%=rs("ID")%>" method="post" name="form" id="form">
<tr>
<td width="200" align="right">会员名:</td>
<td><%=rs("MemName")%></td>
</tr>
<tr>
<td align="right">电子信箱:</td>
<td><%=rs("Email")%></td>
</tr>
<tr>
<td align="right">密码保护问题:</td>
<td><%=rs("Question")%></td>
</tr>
<tr>
<td align="right">密码保护答案:</td>
<td><input name="Answer" type="text" size="30" maxlength="100" /></td>
</tr>
<tr>
<td> </td>
<td><input name="Next" type="submit" value="下一步" /></td>
</tr>
</form>
</table>
<%
elseif request.QueryString("Step")="EnterAnswer" Then
If trim(request("Answer"))="" Then
WriteMsg("请填写密码保护答案!")
exit function
End If
set rs = server.createobject("adodb.recordset")
sql="select * from LiangJingCMS_Members where ID="&request.QueryString("ID")
rs.open sql,conn,1,3
if rs.eof then
WriteMsg("参数错误!")
exit function
end if
if rs("Answer")<>MD5(trim(request("Answer"))) then
WriteMsg("密码保护答案错误!")
exit function
end if
randomize timer
NewPassword=Int(899999*Rnd() +100000)
rs("Password")=MD5(NewPassword)
rs.update
rs.close
set rs=nothing
Response.Write "<script language=javascript>alert('恭喜!您的密码找回成功!\n新密码为:"&NewPassword&"\n请登录后修改为新的密码!');window.location.href='Index.asp';</script>"
exit function
end if
end function
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?