?? update_user_pw_sav.asp
字號:
<%@LANGUAGE="VBSCRIPT"%>
<html>
<head>
<!--#include file="../common/conn.asp"-->
<!--#include file="../common/md5.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>無標題文檔</title>
<%if session("user_name")="" then%>
您還沒有登錄,五秒鐘后自動返回登錄,如果您的瀏覽器沒有自動返回,請<a href="index.html">點擊登錄</a>。
<meta http-equiv="refresh" content="5;url=index.html">
<% else %>
</head>
<% dim rs,sql,oldpw,newpw,newpw1,newpw2
oldpw=lcase(trim(request("oldpw")))
set rs=server.createobject("adodb.recordset")
sql="select user_password from scott.user_info where user_id='"&request.querystring("userid")&"'"
rs.open sql,connstr,3,3
if md5(oldpw) <> rs("user_password") then
errmsg=errmsg+"<br>"+"<li>原密碼輸入不正確"
founderr=true
else if trim(request("newpw1"))="" or trim(request("newpw2"))="" then
errmsg=errmsg+"<br>"+"<li>輸入密碼或確認密碼不能為空"
founderr=true
else
pw=md5(lcase(trim(request("newpw1"))))
pw2=md5(lcase(trim(request("newpw2"))))
if pw <> pw2 then
errmsg=errmsg+"<br>"+"<li>輸入密碼與確認密碼不同"
founderr=true
else if len(trim(request("newpw1")))<6 then
errmsg=errmsg+"<br>"+"<li>您輸入的密碼少于6位"
founderr=true
end if
end if
end if
end if
%>
<body>
<div align="left">
<!-- #include file="pagetop.asp" -->
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<%
if founderr=false then
rs("user_password")=pw
rs.update
%>
<tr>
<td height="70"></td>
</tr>
<tr><td align="center"><font color="#0000FF" size="-1">用戶密碼修改成功,請您牢記您的密碼</font></td></tr>
<tr><td height="20" bgcolor="#FFFFFF"></td></tr>
<tr><meta http-equiv="refresh" content="3;url=index.asp">
<td height="20" colspan="2" align="center"><font color="#0000FF" size="-1">三秒鐘后自動返回,如果您的瀏覽器沒有返回,請<a href="index.asp" target="_self">單擊此處</a>返回首頁</font></td>
</tr>
<tr>
<td height="70"></td>
</tr>
<% else %>
<tr>
<td height="70"></td>
</tr>
<tr><td align="center"><font color="#0000FF" size="-1"> <%=errmsg%> </font></td></tr>
<tr><td height="20" bgcolor="#FFFFFF"></td></tr>
<tr><meta http-equiv="refresh" content="3;url=javascript:history.go(-1)">
<td height="20" colspan="2" align="center"><font color="#0000FF" size="-1">三秒鐘后自動返回,如果您的瀏覽器沒有返回,請<a href="javascript:history.go(-1)" target="_self">單擊此處</a>返回</font></td>
</tr>
<tr>
<td height="70"></td>
</tr>
<%
rs.close
set rs=nothing
end if
%>
</table>
<!-- #include file="pagefooter.html" -->
</body>
<%end if%>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -