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

📄 forgetpassword.asp

📁 程序名称:酷虎网校友录 V1.0 (商业版)*(修改版) * 本软体为商业软件
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="inc/md5.asp"-->
<%
IF Request.Form.Count<>0 Then
Suc=True
Name=Trim(Request.Form("Name"))
PasswordQuestion=Trim(Request.Form("PasswordQuestion"))
PasswordAnswer=Trim(Request.Form("PasswordAnswer"))
NewPassword=Trim(Request.Form("newpassword"))
ConfirmPassword=Trim(Request.Form("confirmpassword"))
SQL="Select * From 注册信息 Where 姓名='"& Name &"' And 密码提示问题='"& PasswordQuestion &"' And 密码提示答案='"& Md5(PasswordAnswer) &"'"
Set RS=Server.CreateObject("ADODB.Recordset")
RS.Open SQL,Connstr,3,2
IF RS.EOF Then
Suc=False
ErrInfo="对不起,您输入的注册信息出错,取回密码失败,请返回上页重新填写!"
Else
'把密码发到邮箱
	IF NewPassword="" Then
	ErrInfo=ErrInfo & "·请填写新密码!<BR>"
	End IF
	
	IF Len(NewPassword) < 6 Then
	ErrInfo=ErrInfo & "·您的密码不得少于六位!<BR>"
	End IF
	IF NewPassword <> ConfirmPassword Then
	ErrInfo=ErrInfo & "·密码与确认密码不符,请更改!<BR>"
	End IF
	ForgetPassword=Name
	IF ErrInfo="" Then
	RS("密码")=md5(NewPassword)
	RS.Update
	ForgetPassword=""
	End IF
End IF
End IF
%>
<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<!--#include file="inc/css.asp"-->
<title><%=WebsiteName%></title>
</head>
<body topmargin="0" background="images/bg.gif">
<!--#include file="top.asp"-->
<div align="center">
  <center>
  <table border="0" width="755" cellspacing="0" cellpadding="0">
    <tr>
      <td width="189" style="background-color: #FFFFFF; border-left: 1 solid #000000; border-top: 1 solid #000000; border-bottom: 1 solid #000000" valign="top"> 
		<!--#include file="left.asp"-->
      </td>
      <td width="562" style="background-color: #FFFFFF; border: 1 solid #000000" valign="top">
        <table border="0" width="100%" cellspacing="0" cellpadding="0">
		<!--#include file="navigation.asp"-->
          <tr>
            <td width="100%" valign="top" height="20">
            </td>
          </tr>
          <%IF Request.Form.Count=0 Or ForgetPassword<>"" Then%>
          <tr>
            <td width="100%" valign="top">
            <div align="center">
              <center>
              <table border="0" width="90%" cellspacing="0" cellpadding="0" style="border: 1 solid #000000">
                <tr>
                  <td height="22" background="images/bg2.gif" width="500" colspan="2">
                    <p align="center"><b><font color="#FF0000">取回密码</font></b></p>
                  </td>
                </tr>
                <form action="" method="post">
                <tr>
                  <td width="500" colspan="2" height="10">
                    <p></td>
                </tr>
                <tr>
                  <td width="144" align="right" valign="bottom">您 的 姓 
                    名:</td>
                  <td width="354"><input type=text name="Name" value="<%IF ForgetPassword<>"" Then Response.Write Name%>" <%IF ForgetPassword<>"" Then Response.Write "readonly"%> size=12 maxlength=12 style="background-attachment: scroll; background-repeat: repeat; font-size: 9pt; height: 18; width: 85; background-color: #FFFFFF; border: 1 solid #000000; background-position: none 0%">&nbsp;<font color="#FF0000">*</font><font color="#FF0000"> 
                    </font>你注册的姓名</td>
                </tr>
                <tr>
                  <td width="144" align="right" valign="bottom">密 码 提 
                    问:</td>
                  <td width="354"><input type=text name="PasswordQuestion" value="<%IF ForgetPassword<>"" Then Response.Write PasswordQuestion%>" <%IF ForgetPassword<>"" Then Response.Write "readonly"%> size=12 maxlength=12 style="background-attachment: scroll; background-repeat: repeat; font-size: 9pt; height: 18; width: 85; background-color: #FFFFFF; border: 1 solid #000000; background-position: none 0%"> 
                    <font color="red">*</font><font color="red"> </font>如:我的生日是多少?</td>                        
                </tr>
                <tr>
                  <td width="144" align="right" valign="bottom">回 答 提 
                    问:</td>
                  <td width="354"><input type=text name="PasswordAnswer" value="<%IF ForgetPassword<>"" Then Response.Write PasswordAnswer%>" <%IF ForgetPassword<>"" Then Response.Write "readonly"%> size=12 maxlength=12 style="background-attachment: scroll; background-repeat: repeat; font-size: 9pt; height: 18; width: 85; background-color: #FFFFFF; border: 1 solid #000000; background-position: none 0%"> 
                    <font color="red">*</font><font color="red"> </font>如:三月二十七日</td>                        
                </tr>
                <%IF ForgetPassword<>"" Then%>
                <tr>
                  <td width="144" align="right" valign="bottom">新&nbsp;&nbsp; 密&nbsp;         
                    码:</td>
                  <td width="354"><input type=password name="newpassword" size=12 maxlength=16 style="background-attachment: scroll; background-repeat: repeat; font-size: 9pt; height: 18; width: 85; background-color: #FFFFFF; border: 1 solid #000000; background-position: none 0%"> 
                    <font color="#FF0000">*&nbsp;</font></td>        
                </tr>                
                <tr>
                  <td width="144" align="right" valign="bottom">确 认 密         
                    码:</td>
                  <td width="354"><input type=password name="confirmpassword" size=12 maxlength=16 style="background-attachment: scroll; background-repeat: repeat; font-size: 9pt; height: 18; width: 85; background-color: #FFFFFF; border: 1 solid #000000; background-position: none 0%">&nbsp;<font color="#FF0000">*</font><font color="#FF0000"> 
                    </font></td>
                </tr>  
                <%End IF%>              
                <tr>
                  <td width="500" colspan="2" height="10"></td>
                </tr>
                <tr>
                  <td width="502" height="22" bgcolor="#EDEDED" style="border-top: 1 solid #000000" colspan="2">
                    <p align="center" style="margin-top: 5; margin-bottom: 5"><INPUT type=submit value=' 提 交 ' name=Submit style="background-color: #DDDDDD; background-repeat: repeat; background-attachment: scroll; font-size: 9pt; height: 20; width: 85; border: 1px groove #000000; background-position: 0% 50%">&nbsp;&nbsp;&nbsp;         
                    <INPUT type=reset value=' 取 消 ' name=Submit style="background-color: #DDDDDD; background-repeat: repeat; background-attachment: scroll; font-size: 9pt; height: 20; width: 85; border: 1px groove #000000; background-position: 0% 50%"></td>
                </tr>
                </form>
              </table>
              </center>
            </div>
            </td>
          </tr>
          <%Else%>
          <%IF Suc=False Then%>
          <tr>
            <td width="100%" valign="top">
            <div align="center">
              <center>
              <table border="0" width="90%" cellspacing="0" cellpadding="0" style="border: 1 solid #000000">
                <tr>
                  <td width="100%" background="images/bg2.gif" height="22" colspan="2">
                    <p align="center"><font color="#FF0000"><b>密码信息出错</b></font></td>
                </tr>
              </center>
              <tr>
                  <td width="100%" height="40" colspan="2">
                    <p style="line-height: 150%; margin-left: 50; margin-top: 3; margin-bottom: 3"><font color="#FF0000"><%=ErrInfo%></font></td>
              </tr>
              <tr>
                <td width="40%" height="22" background="images/bg3.GIF" valign="bottom">
                  <p align="right"><img border="0" src="images/go.gif" width="15" height="15"></td>
                <center>
                <td width="60%" height="22" background="images/bg3.GIF" valign="bottom"><a href="javascript:history.back()">返回上一页重新填写</a></td>
                </tr>
              </table>
            </div>
            </center>
            </td>
          </tr>
          <%Else%>
          <tr>
            <td width="100%" valign="top">
            <div align="center">
              <center>
              <table border="0" width="90%" cellspacing="0" cellpadding="0" style="border: 1 solid #000000">
                <tr>
                  <td width="100%" background="images/bg2.gif" height="22">
                    <p align="center"><font color="#FF0000"><b>取回密码成功</b></font></td>
                </tr>
              </center>
                <tr>
                  <td width="100%" height="40">
                    <p style="line-height: 150%; margin-left: 50; margin-top: 3; margin-bottom: 3"><font color="#FF0000">恭喜您,您已成功的取回密码,请记住您的新密码!</font></td>
                </tr>
              </table>
            </div>
            </td>
          </tr>
          <%End IF%>
          <%End IF%>
          <tr>
            <td width="100%" valign="top">
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
</div>
<!--#include file="bottom.asp"-->
</body>

</html>

⌨️ 快捷键说明

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