"
.ShowTable"修改成功",Content
Session(CacheName & "MyInfo") = Empty
End with
End Sub
Sub MyPassword
Dim S
BBS.Head "","","修改密码"
MyManager()
S=""
BBS.ShowTable "修改密码",S
End Sub
Sub SaveMyPassword
Dim Password,NewPassword,RePassword,Caption,Content,Clue,Answer
BBS.CheckMake'禁止外部提交
BBS.Head"","","修改密码"
MyManager()
Password=BBS.Fun.GetStr("Password")
NewPassword=BBS.Fun.GetStr("NewPassword")
RePassword=BBS.Fun.GetStr("RePassword")
Clue=BBS.Fun.GetStr("clue")
Answer=BBS.Fun.GetStr("answer")
If Password="" or Repassword="" or NewPassword="" Then BBS.GoToErr(36)
If Repassword<>NewPassword Then BBS.GoToErr(41)
If Not BBS.Fun.CheckPassword(Password) Or Not BBS.Fun.CheckPassword(NewPassword) Then BBS.GoToErr(37)
If BBS.Fun.StrLength(NewPassword)>14 Then BBS.GoToErr(38)
If md5(Password)<>BBS.MyPassword Then BBS.GoToErr(56)
IF instr("|12345|123456|1234567|12345678|123456789|1234567890|0123456789|111111|222222|333333|888888|aaaaaa|","|"& Password &"|")>0 or len(Password)<5 Then BBS.GoToErr(40)
If Clue<>"" or Answer<>"" Then
If Len(Clue)<3 or Len(Answer)<3 Then BBS.GoToErr(43)
If not BBS.Fun.CheckIn(Clue) or not BBS.Fun.CheckIn(Answer) Then BBS.GoToErr(44)
BBS.execute("update [user] set [Clue]='"&Clue&"',Answer='"&MD5(Answer)&"' where ID="&BBS.MyID)
End IF
NewPassword=Md5(Newpassword)
BBS.execute("update [user] set [password]='"&Newpassword&"' where ID="&BBS.MyID)
BBS.LetMemor "","MyPassword",NewPassword
Session(CacheName & "MyInfo") = Empty
Content="
"
BBS.ShowTable "修改成功",Content
End Sub
Sub ForgetPassword
Dim UserName,rs,S
BBS.Head"","","找回密码"
UserName=BBS.Fun.GetStr("UserName")
If UserName="" Then
S=""
Else
BBS.CheckMake'禁止外部提交
If BBS.SafeBuckler(UserName,BBS.MyIP,0) Then BBS.Alert"BBS安全盾已启动!\n\n对不起,你尝试找回密码错误超过3次,今天不能再找回密码了。\n你的信息已被系统记录!","Index.asp"
set rs=BBS.Execute("select clue from [User] where name='"&UserName&"'")
S=""
End If
BBS.ShowTable"找回密码",S
End Sub
Sub GetPassword
Dim UserName,Clue,Answer,NewPassword,Content
BBS.Head"","","找回密码"
UserName=BBS.Fun.GetStr("UserName")
If BBS.SafeBuckler(UserName,BBS.MyIP,0) Then BBS.Alert"BBS安全盾已启动!\n\n对不起,你尝试找回密码错误超过3次,今天不能再找回密码了。\n你的信息已被系统记录!","Index.asp"
Answer=BBS.Fun.GetStr("Answer")
If UserName="" or Answer="" Then BBS.GoToErr(36)
If Not BBS.Fun.CheckName(UserName) Then BBS.GoToErr(37)
If not BBS.Fun.CheckIn(Answer) Then BBS.GoToErr(44)
IF BBS.execute("select name from [User] where name='"&UserName&"' And Answer='"&Md5(Answer)&"'").eof Then
BBS.SafeBuckler UserName,BBS.MyIP,1
BBS.GoToErr(57)
Else
Randomize
NewPassword=int(900000*rnd)+100000
BBS.execute("update [user] set [password]='"&Md5(NewPassword)&"' where name='"&UserName&"'")
BBS.execute("update [Admin] set [password]='"&Md5(NewPassword)&"' where name='"&UserName&"'")
Content="
您成功的通过密码保护的检验!
用户名称:"&UserName&" 获得新密码:"&NewPassword&"
先记住新密码,请您马上登陆论坛,尽快修改密码!
"
BBS.ShowTable "成功通过验证",Content
End If
End Sub
%>