?? update.asp
字號:
<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<%
cardnum=request("cardnum")
password=request("oldpassword")
newpassword=request("newpassword")
set check=server.CreateObject ("eprojm.epro")
password=check.epropassword (cardnum,password)
checkstr=check.eprocmp(cardnum)
set connbj=server.CreateObject ("adodb.connection")
connbj.Open "DSN=Web ORA;UID=zj;PWD=zj;"
'Response.Write cardnum
'檢驗用戶
set rs=server.CreateObject ("adodb.recordset")
rs.Open "select * from tbaccount where cardnum='" + cardnum + "'",connbj,1,3
if rs.RecordCount <>1 then
Response.Write "您所輸入的賬號不存在,請您查實后再輸!"
set check=nothing
rs.Close
set rs=nothing
connbj.Close
set connbj=nothing
Response.End
else
'Response.Write checkstr
'Response.Write "<br>"
'Response.Write rs("checkstr")
'Response.End
if rs("checkstr")<>checkstr then
Response.Write "您所輸入的賬號有誤,請您查實后再輸!"
set check=nothing
rs.Close
set rs=nothing
connbj.Close
set connbj=nothing
Response.End
else
'檢驗口令
if password<>rs("password") then
Response.Write "您所輸入的密碼有誤,請您查實后再輸!"
set check=nothing
rs.Close
set rs=nothing
connbj.Close
set connbj=nothing
Response.End
else
'檢驗死戶
if rs("state")<>0 then
Response.Write "您的賬戶先被凍結,請您與郵儲部門聯系!"
set check=nothing
rs.Close
set rs=nothing
connbj.Close
set connbj=nothing
Response.End
else
'檢驗待扣額
'Response.Write check.eprorecremains(rs("cardnum"),rs("remains"))
'Response.End
remains=clng(check.eprorecremains(rs("cardnum"),rs("remains")))
'Response.Write check.eprorecremains(rs("cardnum"),rs("remains"))
'Response.End
total=clng(rs("recoup"))+remains
if (clng(rs("recoup"))<0) or (remain<0) or (total<>20000) then
Response.Write "您的賬戶有問題,請您去郵儲部門查實!"
set check=nothing
rs.Close
set rs=nothing
connbj.Close
set connbj=nothing
Response.End
else
newpassword=cstr(check.epropassword(cardnum,newpassword))
if newpassword="-1" then
Response.Write "您的新密碼不符合要求!"
set check=nothing
rs.Close
set rs=nothing
connbj.Close
set connbj=nothing
Response.End
else
sql="update tbaccount set password='" + newpassword + "' where cardnum='" + cardnum + "'"
connbj.Execute sql
end if
end if
end if
end if
end if
end if
set check=nothing
rs.Close
set rs=nothing
connbj.Close
set connbj=nothing
Response.Write "您已經成功的修改了密碼!"
%>
</BODY>
</HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -