?? passsave.asp
字號(hào):
<!--#include file="conn.asp"-->
<!--#include file="md5.asp"-->
<%
if request.form("ppass")="" then
response.write"<script language=javascript>alert('請(qǐng)您填寫(xiě)以前的密碼');this.location.href='javascript:history.go(-1)';</script>"
response.end
end if
if request.form("pass1")="" then
response.write"<script language=javascript>alert('請(qǐng)您填寫(xiě)您的新密碼');this.location.href='javascript:history.go(-1)';</script>"
response.end
end if
if request.form("pass2")="" then
response.write"<script language=javascript>alert('請(qǐng)您確認(rèn)您的新密碼');this.location.href='javascript:history.go(-1)';</script>"
response.end
end if
if trim(request.form("pass1"))<>trim(request.form("pass2")) then
response.write"<script language=javascript>alert('您的新密碼和確認(rèn)密碼不一致');this.location.href='javascript:history.go(-1)';</script>"
response.end
end if
ppass=trim(request.form("ppass"))
pass1=trim(request.form("pass1"))
pass2=trim(request.form("pass2"))
username=trim(request.form("user"))
set rs=server.createobject("adodb.recordset")
sql="select * from member where cname='"&username&"'"
rs.open sql,conn,3,3
if rs.eof then
response.write"<script language=javascript>alert('此用戶(hù)已經(jīng)被刪除');this.location.href='javascript:history.go(-1)';</script>"
else
password=rs("password")
if password<>md5(ppass) then
response.write"<script language=javascript>alert('您的舊密碼錯(cuò)誤');this.location.href='javascript:history.go(-1)';</script>"
response.end
end if
rs("password")=md5(pass2)
rs.update
response.write"<script language=javascript>alert('用戶(hù)密碼修改成功');this.location.href='javascript:history.go(-1)';</script>"
end if
rs.close
set rs=nothing
%>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -