%@language=vbscript codepage=936 %>
<%
option explicit
response.buffer=true
Const PurviewLevel=2
Const CheckChannelID=0
Const PurviewLevel_Others="ModifyPwd"
'response.write "此功能被WEBBOY暂时禁止了!"
'response.end
%>
<%
dim Action,FoundErr,ErrMsg
dim rs,sql
Action=trim(request("Action"))
sql="Select * from Admin where UserName='" & AdminName & "'"
Set rs=Server.CreateObject("Adodb.RecordSet")
rs.Open sql,conn,1,3
if rs.Bof and rs.EOF then
FoundErr=True
ErrMsg=ErrMsg & "
不存在此用户!
"
else
if Action="Modify" then
call ModifyPwd()
else
call main()
end if
end if
rs.close
set rs=nothing
if FoundErr=True then
call WriteErrMsg()
end if
call CloseConn()
sub ModifyPwd()
dim password,PwdConfirm
password=trim(Request("Password"))
PwdConfirm=trim(request("PwdConfirm"))
if password="" then
FoundErr=True
ErrMsg=ErrMsg & "
新密码不能为空!
"
end if
if PwdConfirm<>Password then
FoundErr=True
ErrMsg=ErrMsg & "
确认密码必须与新密码相同!
"
exit sub
end if
UserName=rs("UserName")
if Password<>"" then
rs("password")=md5(password)
end if
rs.update
call WriteSuccessMsg("修改密码成功!下次登录时记得换用新密码哦!")
end sub
sub main()
%>
修改管理员信息
<%
end sub
%>