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

📄 rereg.asp

📁 本系统适用于选择题(单选和多选)的练习和考试.主要有七大模块:学习信息、经验交流、学生练习、学生考试、试卷管理、题库操作、身份 资料、成绩查询、系统帮助。超级管理员还可进行系统设置
💻 ASP
字号:
<!--#include file="open.asp" -->
<!--#include file="inc/md5.inc" -->
<%self_name="index.asp"%>
  

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><!--#include file="inc/css.css" -->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>忘记密码操作</title>
</head>

<body topmargin="1">
<!--#include file="top.asp" -->
<!--#include file="menu.asp" -->
<%doing=request.querystring("doing")
  if doing="input_id" then
     user_id=trim(request.form("user_id"))
	 str="select * from user_student where 学籍号='"&user_id&"'"
	 set rs=conn.execute(str)
	 if not rs.eof then
	      input_id="ok"
	 else
          msg="学籍号错误,没有此学籍号"
     end if
  end if
%>  
<table width="770" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#ff99cc" bgcolor="#edebdb">
  <tr>
    <td valign="top">
<table width="500" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td class="unnamed10"> </td>
        </tr>
      </table>
<%if input_id<>"ok" then%>     
  <%if doing<>"hd" then%>
      <table width="600" border="1" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="40"> 
            <form name="form1" method="post" action=rereg.asp?doing=input_id>
              <div align="center"><span class="unnamed14">你的学籍号: 
                <input name="user_id" type="text" id="user_id" value="<%=id_disp%>" size="20">
                <input type="submit" name="Submit" value=" 下一步 ">
                </span> </div>
            </td></form>
        </tr>
      </table> <% if msg<>"" then response.write msg end if%>
  <%end if%>
<%else%>
      <table width="650" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td><form name="form2" method="post" action="rereg.asp?doing=hd&user_id=<%=user_id%>">
              <table width="600" border="1" align="center" cellpadding="0" cellspacing="0">
                <tr class="unnamed14"> 
                  <td width="150" height="30"><div align="right">你的提示问题是:</div></td>
                  <td>  <%=rs("问题")%></td>
                </tr>
                <tr class="unnamed14"> 
                  <td width="150" height="30"><div align="right">此问题的答案是:</div></td>
                  <td>  <input name="an" type="text" id="an" size="40"></td>
                </tr>
                <tr class="unnamed14"> 
                  <td height="30" colspan="2"> <div align="center">
                      <input type="submit" name="Submit2" value=" 提 交 ">
                          
                      <input type="reset" name="Submit3" value=" 重 填 ">
                    </div></td>
                </tr>
              </table>
            </td></form>
        </tr>
      </table>
      <div align="center">
        <%input_id=""
  end if%>
        <%'写入新密码
if doing="hd" then
    user_id=request.querystring("user_id")
	an=trim(request.form("an"))
    Randomize
	pass_new=Int((999999-100000+1)*Rnd+100000)
	pass_wri=ucase(md5(pass_new))
    str="select 答案 from user_student where 学籍号='"&user_id&"'"
	set rs=conn.execute(str)
    if rs("答案")=an then
	str="update user_student set 密码='"&pass_wri&"' where 学籍号='"&user_id&"'"
	conn.execute(str)
%>
        <center><span class="unnamed14">你的密码已修改成:<%=pass_new%><font color="#FF0000">  请马上修改 !</font></span> </center>
        <%  else%>
        <span class="unnamed14"><center>你的答案不正确,不能得到密码。</center></span> 
        <%  end if
end if%>
      </div></td>
  </tr>
</table>
<!--#include file="inc/bottom.asp" -->
<%conn.close%>
</body>
</html>

⌨️ 快捷键说明

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