📄 changepass.asp
字号:
<!--#include file="top.asp"-->
<!--#include file="md5.asp"-->
<div align="center"><table width=980 border=0 cellpadding=0 cellspacing=0 bgcolor="#FFFFFF" height="100">
<tr><td width=181 align="center" valign="top"><!--#include file="log.asp"--> <!--#include file="insort.asp"--></td>
<td valign="top" align="center"><PRE> </PRE>
<%if Request.Cookies("venshop")("user_name")="" then%>
<table border="0" cellpadding="0" cellspacing="5" width="630" bgcolor="#EEEEEE"><tr><td align="center" bgcolor="#EEEEEE">
<table border="0" cellpadding="0" cellspacing="0" width="100%" background="img/pattern.gif" style="border: 1px solid #C0C0C0">
<form method="POST" name="form1" action="login.asp?action=login">
<tr><td colspan="4" height="45" valign="bottom"><p style="margin-left: 35px"><b>用户登录: </b>您还没有登录或登录超时,请重新登录</td></tr>
<tr><td align="center" colspan="4"><hr color="#C0C0C0" size="1" width="90%"></td></tr>
<tr><td align="right" height="45">用 户 名:</td>
<td height="45"><input name="user_name" type="text" class=input style="FONT-SIZE: 12px; WIDTH: 110px"></td>
<td rowspan="2"><input name="comurl" type="hidden" value="changepass.asp"><input type=image src="img/button_login.gif" name="login"></td>
<td height="45"><A href="reg.asp"><IMG src="img/loginreg.gif" border=0></A></td></tr>
<tr><td align="right" height="45">用户密码:</td><td height="45"><input style="FONT-SIZE: 12px; WIDTH: 110px" type="password" name="user_pass" class=input size="12"></td>
<td height="45"><a href="repass.asp"><IMG src="img/repass.gif" border=0></a></td></tr>
<tr><td colspan="4" align="center" height="45"></td></tr></form></table></td></tr></table>
<%elseif request("action")="modify" then%>
<table border="0" cellpadding="0" cellspacing="5" width="630" bgcolor="#EEEEEE"><tr><td align="center" bgcolor="#EEEEEE">
<table border="0" cellpadding="0" cellspacing="0" width="100%" background="img/pattern.gif" style="border: 1px solid #C0C0C0"><tr><td align=center height=100>
<%user_name=Request.Cookies("venshop")("user_name")
oldpass=request("oldpass")
pass1=request("pass1")
pass2=request("pass2")
if pass1="" or pass2="" or oldpass="" then
response.write "新密码和原密码不得为空,<a href=# onClick=history.go(-1)><font color=#ff0000>返回</font></a> "
elseif pass1<>pass2 then
response.write "新密码和确认密码不一致,<a href=# onClick=history.go(-1)><font color=#ff0000>返回</font></a> "
else
oldpass=md5(oldpass)
pass1=md5(pass1)
sql="select * from [user] where username='"&user_name&"' and userpass='"&oldpass&"'"
rs.open sql,conn,1,3
if rs.eof then
response.write "原密码输入错误,请确认,<a href=# onClick=history.go(-1)><font color=#ff0000>返回</font></a> "
else
rs("userpass")=pass1
rs("question")=request("question")
rs("answer")=request("answer")
rs.update
response.write "用户密码更改完毕,请记牢你的新密码,<a href=# onClick=history.go(-1)><font color=#ff0000>返回</font></a> "
end if
rs.close
end if%></td></tr></table></td></tr></table>
<%else%><table border="0" cellpadding="0" cellspacing="5" width="630" bgcolor="#EEEEEE"><tr><td align="center" bgcolor="#EEEEEE">
<table border="0" cellpadding="0" cellspacing="0" width="100%" background="img/pattern.gif" style="border: 1px solid #C0C0C0">
<%user_name=Request.Cookies("venshop")("user_name")
sql="select * from [user] where username='"&user_name&"'"
rs.open sql,conn,1,1
if rs.eof then%>
<tr><td align="center" height="100" colspan="2">未发现用户资料,请<a href="login.asp" target=_blank>重新登录</a>,如果没有注册请<a href="reg.asp" target=_blank>注册用户</a></td></tr>
<%else%><form method="POST" action="changepass.asp?action=modify">
<tr><td width="100%" height="30" colspan="2" align="center"><b> <%=rs7("sitename")%>用户管理中心 - 用户密码修改:</b></td></tr>
<tr><td width="100" height="30" align="right">用户名:</td><td width="525" height="30"> <%=rs("username")%></td></tr>
<tr><td width="100" height="30" align="right">原密码:</td><td width="525" height="30"> <input type="password" name="oldpass" size="30" class=input></td></tr>
<tr><td width="100" height="30" align="right">新密码:</td><td width="525" height="30"> <input type="password" name="pass1" size="30" class=input></td></tr>
<tr><td width="100" height="30" align="right">新密码确认:</td><td width="525" height="30"> <input type="password" name="pass2" size="30" class=input></td></tr>
<tr><td width="100" height="30" align="right">密码保护问题:</td><td width="525" height="30"> <input name="question" size="30" class=input value="<%=rs("question")%>"></td></tr>
<tr><td width="100" height="30" align="right">密码保护答案:</td><td width="525" height="30"> <input name="answer" size="30" class=input value="<%=rs("answer")%>"></td></tr>
<tr><td width="100" height="30" align="right"></td><td width="525" height="30"><input type=submit name=submit value=修改></td></tr></form><%end if
rs.close%></table></td></tr></table><%end if%></td></tr></table></div><!--#include file="copy.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -