?? editpwd.asp
字號(hào):
<!--#include file=conn.asp-->
<%
UserName=request.form("UserName")
passwd1=trim(request.form("oldpwd"))
passwd2=trim(request.form("newpwd"))
passwd3=trim(request.form("retype"))
if username="" then
response.Write("<script>alert('請(qǐng)輸入用戶名');history.go(-1);</script>")
end if
if passwd1="" then
response.Write("<script>alert('請(qǐng)輸入舊密碼');history.go(-1);</script>")
end if
if passwd2="" then
response.Write("<script>alert('請(qǐng)輸入新密碼');history.go(-1);</script>")
end if
if passwd3="" then
response.Write("<script>alert('請(qǐng)重輸入一次新密碼');history.go(-1);</script>")
end if
set rs=server.createobject("adodb.recordset")
sql="select * from rzuser where username='"&username&"'"
rs.open sql,conn,1,3
if rs.eof then
response.Write("<script>alert('用戶名不存在,請(qǐng)重新輸入');history.go(-1);</script>")
else if passwd1<>rs("passwd") then
response.write ("<script>alert('密碼錯(cuò)誤!');history.go(-1);</script>")
else if passwd2<>passwd3 then
response.write ("<script>alert('兩次輸入的新密碼不同,請(qǐng)重新輸入');history.go(-1);</script>")
else
rs("passwd")=passwd2
rs.update
response.write ("<script>alert('密碼修改成功,請(qǐng)登錄');window.location.href='index.asp';</script>")
end if
end if
end if
rs.close
%>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -