www.gusucode.com > 运动用品商城网站系统源代码程序 > changepass.asp
<!--#include file="conn.asp"--> <!--#include file="IncAsp/venshop_top.asp"--> <!--#include file="IncAsp/venshop_md5.asp"--> <div align="center"> <table cellpadding="0" cellspacing="0" class="all_t1"> <tr><td class="all_l_td" valign="top"> <!--#include file="IncAsp/venshop_log.asp"--><div class="d5"></div> </td> <td valign="top" class="all_c_td"> <table width="99%" border="0" cellpadding="0" cellspacing="0"> <tr><td class="sort"> <IMG src="Skin/<%=venshop_skin%>/home.gif" border=0 align="absmiddle"> 您的位置: <a href="index.asp">首页</a> >> 用户密码修改</td></tr> </table> <table border="0" cellpadding="0" cellspacing="0" class="useri"> <tr><td height="150"> <%if Request.Cookies("venshop")("user_name")="" then response.redirect "login.asp?comurl=changepass.asp" response.end elseif request("action")="modify" then%> <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td height="150" align=center> <%user_name=Request.Cookies("venshop")("user_name") chklogin(user_name) oldpass=DelStr(request("oldpass")) pass1=DelStr(request("pass1")) pass2=DelStr(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) set rs=server.createobject("adodb.recordset") sql="select * from venshop_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")=DelStr(request("question")) rs("answer")=DelStr(request("answer")) rs.update response.write "用户密码更改完毕,请记牢你的新密码,<a href=# onClick=history.go(-1)><font color=#ff0000>返回</font></a> " end if rs.close set rs=nothing end if%> </td></tr></table> <%else%> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <%user_name=Request.Cookies("venshop")("user_name") chklogin(user_name) set rs=server.createobject("adodb.recordset") sql="select * from venshop_user where username='"&user_name&"'" rs.open sql,conn,1,1 if rs.eof then response.redirect "login.asp?comurl=changepass.asp" response.end else%><form method="POST" action="changepass.asp?action=modify"> <tr class="cartshow1"><td width="100" height="30" align="right">用户名:</td><td width="525" height="30"> <%=rs("username")%></td></tr> <tr class="cartshow0"><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 class="cartshow1"><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 class="cartshow0"><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 class="cartshow1"><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 class="cartshow0"><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 class="cartshow1"><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 set rs=nothing%></table><%end if%> <div class="d10"></div> </td></tr></table> </td></tr></table></div><!--#include file="IncAsp/venshop_copy.asp"-->