⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pwlookup.asp

📁 这是ASP的OA
💻 ASP
字号:
<!-- #include file="const.asp" -->
<%
dim sql,rs,name,action1,question,answer,checkcode
action1=trim(request.Form("action1"))
if action1="DONE" then
	name=trim1(request.Form("name"))
	question=trim(request.Form("question"))
	answer=trim(request.Form("answer"))
	checkcode=trim(request.form("checkcode"))
	if name="" then
		call msg("请输入帐号名!")
	end if
	if question="" then
		call msg("请输入密码提示问题 !")
	end if
	if answer="" then
		call msg("请输入密码问题答案 !")
	end if	
	if checkcode="" then
		call msg("请输入验证码")
	end if
	if isnull(session("ImageCode")) or session("ImageCode")="" then
		call msg("你登录时间过长,请重新返回登录页面进行登录。")
	end if
	if checkcode<>CStr(session("ImageCode")) then
		call msg("您输入的验证码和系统产生的不一致,请重新输入。")
	end if
	session("ImageCode")=""
	call opendb()
	sql="select * from m3_users where name='"&name&"'"
	set rs = Server.CreateObject("ADODB.Recordset")
	rs.open sql,conn,1,3
	if rs.eof and rs.bof then
		rs.close
		set rs=nothing
		call closedb()
		response.Redirect("error.asp?id=6")
		response.End()
	else
		if rs("power")<>1 then
			rs.close
			set rs=nothing
			call closedb()
			response.Redirect("error.asp?id=7")
			response.End()
		else
			if rs("question")<>question then
				rs.close
				set rs=nothing
				call closedb()
				response.Redirect("error.asp?id=8")
				response.End()
			elseif rs("answer")<>answer then
				rs.close
				set rs=nothing
				call closedb()
				response.Redirect("error.asp?id=8")
				response.End()
			else
				rs("password")="4d38c62ae03515db"
				rs.update
			end if
		end if
	end if
	rs.close
	set rs=nothing
	call closedb()
	response.write("<br>验证通过! 密码成功找回</b>  <br><br><br><font color=red>说明: </font><br><br>帐号: <b>"&name&"</b><br><br>当前密码: <b>matrix3</b><br><br><br><font color=red size=3><b>请尽快登陆BBS,并修改密码!</b></font><br><br><a href=index.asp>BBS主页</a>")
	response.End()
else
	position "正在尝试使用论坛密码找回功能",0
%>
<html>
<head>
<title><%=sitename%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/css.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td height="10" align="center" valign="top"><!-- #include file="topbar.asp" --></td>
  </tr>
  <tr> 
    <td align="center" valign="top"><table width="100%" height="60%" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td width="10" align="center" valign="top" bgcolor="#ECE9D9"> </td>
          <td width="1" bgcolor="#E8BC3C"></td>
          <td width="10">&nbsp;</td>
          <td align="center" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="3">
              <tr> 
                <td width="100%" height="30" class=v8b><img src="images/btn_face.gif" width="10" height="7"> 
                  <b><font color="#990000">找回密码</font></b></td>
              </tr>
              <tr> 
                <td height="1" bgcolor="#ECE9D9"></td>
              </tr>
            </table>
            <br> <table width="96%" border="0" cellpadding="2" cellspacing="1" bgcolor="#E8BC3C">
              <tr background="images/bg4.gif"> 
                <td width="50%" background="images/bg4.gif">&nbsp;</td>
              </tr>
              <tr> 
                <td align="center" valign="top" bgcolor="#FFFFFF"> <br> <form action="" method="post" name="mform" onSubmit="javascript:chkField();return false;">
                    <table width="471" border="0" cellpadding="4" cellspacing="1" bgcolor="#E8E4D0">
                      <tr> 
                        <td bgcolor="#D9D3B4" colspan="2" height="1"></td>
                      </tr>
                      <tr align="center"> 
                        <td height="50" colspan="2" bgcolor="#FFFFFF"><b><font color="#990000">找回密码</font></b></td>
                      </tr>
                      <tr> 
                        <td width="177" align="right" bgcolor="#FFFFFF" class=v8b>帐号:</td>
                        <td width="274" bgcolor="#FFFFFF"> <input name="name" type="text" class="input1" id="name" size="16" maxlength="20"> 
                        </td>
                      </tr>
                      <tr> 
                        <td align="right" bgcolor="#FFFFFF" class=v8b>密码提示问题:</td>
                        <td bgcolor="#FFFFFF"> <input name="question" type="text" id="question" class="input1" size="30" maxlength="100"> 
                        </td>
                      </tr>
                      <tr> 
                        <td align="right" bgcolor="#FFFFFF" class=v8b>密码问题答案:</td>
                        <td bgcolor="#FFFFFF"> <input name="answer" type="text" class="input1" id="answer" size="30" maxlength="100"> 
                        </td>
                      </tr>
                      <tr> 
                        <td align="right" bgcolor="#FFFFFF" class=v8b>验证码:</td>
                        <td bgcolor="#FFFFFF"> <input name="checkcode2" type="text" class="input1" id="checkcode2" size="4" maxlength="4"> 
                          <img src="ImageCode.asp?nt=<%=now()%>" align="absmiddle"> 
                        </td>
                      </tr><tr> 
                        <td width="177" bgcolor="#FFFFFF">&nbsp;</td>
                        <td width="274" height="60" bgcolor="#FFFFFF"> <input name="action1" type="hidden" id="action1" value="DONE"> 
                          <input name="Submit1" type="submit" class="input" id="Submit1" value="确定"> 
                          <input name="cancel" type="button" id="cancel2" value="取消" class="input" onclick="history.go(-1)"> 
                        </td>
                      </tr>
                      <tr> 
                        <td colspan="2" bgcolor="#D9D3B4" height="1"></td>
                      </tr>
                      <tr> 
                        <td height="10" colspan="2" bgcolor="#FFFFFF"></td>
                      </tr>
                    </table>
                    <br>
                    <SCRIPT language=JavaScript>
function chkField()
{
		if (document.mform.name.value=="")
        {
            alert ('请输入帐号名 ! ');
            document.mform.name.focus();
            return false;
        }
        if (document.mform.question.value=="")
        {
            alert ('请输入密码提示问题 !');
            document.mform.question.focus();
            return false;
        }
		if (document.mform.answer.value=="")
        {
            alert ('请输入密码问题答案 !');
            document.mform.answer.focus();
            return false;
        }
       document.mform.submit();
	   document.mform.Submit1.disabled=true;
}
</script>
                  </form>
                  <br> </td>
              </tr>
            </table>
            <br> </td>
          <td width="10">&nbsp;</td>
          <td width="1" bgcolor="#E8BC3C"></td>
          <td width="100" bgcolor="#ECE9D9" valign="top">  
            <!-- #include file="right.asp" -->
          </td>
        </tr>
      </table></td>
  </tr>
  <tr> 
    <td height="10" align="center" valign="bottom"> 
      <!-- #include file="bottombar.asp" -->
    </td>
  </tr>
</table>
</body>
</html>
<%
end if
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -