ASP源代码中,管理员帐号和密码是多少
//管理人员密码-修改保存subSave()UserName=my_request("UserName",0)passwordold=my_request("passwo...
//管理人员密码-修改保存
sub Save()
UserName = my_request("UserName",0)
passwordold = my_request("passwordold",0)
password = my_request("password",0)
confirmpassword = my_request("confirmpassword",0)
if session("njj_UserName")="" or UserName="" or passwordold="" or password="" or confirmpassword="" then
Response.write "<script>alert(""对不起,您的修改信息不完整,请重新填写。"");"
response.write"javascript:history.go(-1)</SCRIPT>"
Response.end
end if
if password<>confirmpassword then
response.write"<SCRIPT language=JavaScript>alert('两次新密码输入不一致!');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if
Set rs= Server.CreateObject("ADODB.Recordset")
sql="select top 1 * from njj_manage"
rs.open sql,conn,1,3
password11=rs("njj_password")
if password11<>md5(passwordold) then
response.write"<SCRIPT language=JavaScript>alert('旧密码输入有错误!');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
else
rs("njj_username")=username
rs("njj_password")=md5(password)
rs.update
session("njj_UserName")=rs("njj_UserName")
end if
rs.close
set rs=nothing
Response.write "<script>alert(""管理帐号已成功修改"");location.href=""Root_Admin_Set.asp"";</script>"
Response.end
end sub
%> 展开
sub Save()
UserName = my_request("UserName",0)
passwordold = my_request("passwordold",0)
password = my_request("password",0)
confirmpassword = my_request("confirmpassword",0)
if session("njj_UserName")="" or UserName="" or passwordold="" or password="" or confirmpassword="" then
Response.write "<script>alert(""对不起,您的修改信息不完整,请重新填写。"");"
response.write"javascript:history.go(-1)</SCRIPT>"
Response.end
end if
if password<>confirmpassword then
response.write"<SCRIPT language=JavaScript>alert('两次新密码输入不一致!');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if
Set rs= Server.CreateObject("ADODB.Recordset")
sql="select top 1 * from njj_manage"
rs.open sql,conn,1,3
password11=rs("njj_password")
if password11<>md5(passwordold) then
response.write"<SCRIPT language=JavaScript>alert('旧密码输入有错误!');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
else
rs("njj_username")=username
rs("njj_password")=md5(password)
rs.update
session("njj_UserName")=rs("njj_UserName")
end if
rs.close
set rs=nothing
Response.write "<script>alert(""管理帐号已成功修改"");location.href=""Root_Admin_Set.asp"";</script>"
Response.end
end sub
%> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询