用户管理中心
Dim Step:Step=ACTCMS.S("Step")
IF Step="" Then Step=1
IF Step=2 Then
Dim RS,TableName,RsUser,ModeID
Dim UserName:UserName=ACTCMS.RSQL(ACTCMS.S("UserName"))
ModeID=ACTCMS.ChkNumeric(request("ModeID"))
If modeid="" Or modeid="0" Then modeid=1
Set RsUser=ACTCMS.actexe("select ModeTable from ModeUser_Act where ModeID ="&ModeID&"")
If Not rsuser.eof Then
TableName=RsUser(0)
Else
Response.Write("alert('错误!');history.back();")
Response.End
End If
If UserName = "" Then
Response.Write("alert('请输入用户名!');history.back();")
Response.End
End IF
Set RS=Server.CreateObject("Adodb.RecordSet")
RS.Open "Select Question From "&TableName&" Where UserName='" & UserName & "'",Conn,1,1
IF RS.Eof And RS.Bof Then
Response.Write("alert('对不起,您输入的用户名不存在!');history.back();")
Response.End
Else
%>
function CheckForm()
{
if (document.myform.Answer.value=="")
{
alert("请输入问题答案!");
document.myform.Answer.focus();
return false;
}
if (document.myform.Code.value=="")
{
alert("请输入验证码!");
document.myform.Code.focus();
return false;
}
return true;
}
取回密码第二步 回答密码问题
密码问题:
您的答案:
验证码:
ElseIF Step=3 Then
Dim Code:Code= ACTCMS.RSQL(ACTCMS.S("Code"))
UserName=ACTCMS.RSQL(ACTCMS.S("UserName"))
Dim Answer:Answer=ACTCMS.RSQL(ACTCMS.S("Answer"))
IF Trim(Code)Cstr(Session("GetCode")) then
Response.Write("alert('验证码有误,请重新输入!');history.back();")
Response.End
End If
ModeID=ACTCMS.ChkNumeric(request("ModeID"))
If modeid="" Or modeid="0" Then modeid=1
Set RsUser=ACTCMS.actexe("select ModeTable from ModeUser_Act where ModeID ="&ModeID&"")
If Not rsuser.eof Then
TableName=RsUser(0)
Else
Response.Write("alert('错误!');history.back();")
Response.End
End If
If UserName = "" Then
Response.Write("alert('请输入用户名!');history.back();")
Response.End
End IF
Dim RSC
Set RSC=ACTCMS.ACTEXE("Select Answer From "&TableName&" Where UserName='" & UserName & "' and Answer='" & Answer & "'")
IF RSC.EOF AND RSC.Bof Then
Response.Write("alert('对不起,您输入的答案不正确!');history.back();")
Response.End
Else
%>
function CheckForm()
{
if (document.myform.PassWord.value=="")
{
alert("请输入新密码!");
document.myform.PassWord.focus();
return false;
}
if (document.myform.RePassWord.value=="")
{
alert("请输入确认密码!");
document.myform.RePassWord.focus();
return false;
}
if (document.myform.PassWord.value!=document.myform.RePassWord.value)
{
alert("两次输入的密码不一致!");
document.myform.PassWord.focus();
return false;
}
return true;
}
取回密码第三步 设置新密码
用户名:
新密码:
确认密码:
ElseIF Step=4 Then
UserName=ACTCMS.RSQL(ACTCMS.S("UserName"))
Dim PassWord:PassWord=ACTCMS.RSQL(ACTCMS.S("PassWord"))
Dim RePassWord:RePassWord=ACTCMS.S("RePassWord")
answer=ACTCMS.RSQL(Request("Answer"))
If PassWord = "" Then
Response.Write("alert('请输入登录密码!');history.back();")
Response.End
ElseIF RePassWord="" Then
Response.Write("alert('请输入确认密码');history.back();")
Response.End
ElseIF PassWordRePassWord Then
Response.Write("alert('两次输入的密码不一致');history.back();")
Response.End
End If
ModeID=ACTCMS.ChkNumeric(request("ModeID"))
If modeid="" Or modeid="0" Then modeid=1
Set RsUser=ACTCMS.actexe("select ModeTable from ModeUser_Act where ModeID ="&ModeID&"")
If Not rsuser.eof Then
TableName=RsUser(0)
Else
Response.Write("alert('错误!');history.back();")
Response.End
End If
If UserName = "" Then
Response.Write("alert('请输入用户名!');history.back();")
Response.End
End IF
Set RS=Server.CreateObject("Adodb.RecordSet")
RS.Open "Select PassWord From "&TableName&" Where UserName='" & UserName & "' and answer='" & answer &"'",Conn,1,3
If Not rs.eof Then
RS(0)=MD5(PassWord)
RS.Update
Else
response.write "非法提交"
response.end
End If
RS.Close
Set RS=Nothing
%>
取回密码成功
恭喜你,密码取回成功!您的新密码是:,请用新密码登录。
Else
%>
function CheckForm()
{
if (document.myform.UserName.value=="")
{
alert("请输入用户名!");
document.myform.UserName.focus();
return false;
}
return true;
}
取回密码第一步 输入用户名
您的用户名:
Dim rsu
Set RsU=ACTCMS.ACTEXE("Select ModeID, ModeName From ModeUser_Act order by ModeID asc")
response.write ""
response.write "请选择用户组"
IF not Rsu.eof then
Do while Not Rsu.eof
response.write" "&rsu("ModeName")&""
Rsu.movenext
loop
response.write" "
Else
response.write "未定义操作"
response.end
End if
%>