📄 r_changepassword1.asp
字号:
<!--#include file="connection.asp"-->
<%
if session("Ruserid") = "" then
Response.Redirect "R_login.htm"
end if
%>
<%
dim xoldpass,xnewpass,xconfirmpass
xoldpass = request("oldpass")
xnewpass = request("newpass")
xconfirmpass = request("confirmpass")
if xnewpass <> xconfirmpass then
Response.Redirect "R_changepassword.asp?flag=2"
end if
if len(xnewpass) <= 0 or len(xconfirmpass) <= 0 then
Response.Redirect "R_changepassword.asp?flag=3"
end if
if instr(1,xoldpass,"'") > 0 then
xoldpass = replace(xoldpass,"'","''")
end if
if instr(1,xnewpass,"'") > 0 then
xnewpass = replace(xnewpass,"'","''")
end if
if instr(1,xconfirmpass,"'") > 0 then
xconfirmpass = replace(xconfirmpass,"'","''")
end if
conn.open = connstring
set rs = Server.CreateObject("adodb.recordset")
rs.open "Select * from reportusers where userid = '" & session("Ruserid") & "'",conn
if not rs.EOF then
if xoldpass = rs.Fields("pass") then
set rs1 = Server.CreateObject("adodb.recordset")
rs1.Open "update reportusers set pass = '" & xnewpass & "' where userid = '" & session("Ruserid") & "'" ,conn
Response.Redirect "reportsmain.asp"
else
Response.Redirect "R_changepassword.asp?flag=1"
end if
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -