?? rereg.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 + -