?? retakepwd.asp
字號:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="Style.css" rel="stylesheet" type="text/css">
<title>重設密碼</title>
</head>
<style type="text/css">
<!--
body {
background-color: #636363;
}
-->
</style>
<!--#include file="inc/adovbs.asp"-->
<!--#include file="Inc/Conn.asp"-->
<!--#include file="inc/SQLCHK.asp"-->
<!--#include file="inc/MD5.asp"-->
<%
If Request.QueryString("Action")="OK" Then
Dim username
username=Request.Form("UserName")
Dim RS
set RS=Server.CreateObject("ADODB.RecordSet")
RS.ActiveConnection=Conn
RS.Source = "Select * From [User] Where [UserName]='"&username&"'"
RS.CursorType = adOpenKeyset
RS.CursorLocation = adUseServer
RS.LockType = adLockOptimistic
RS.Open
If RS.Eof or RS.Bof Then
Response.write "<script language='javascript'>" &Chr(13)
Response.write "alert('用戶名不存在!');" &Chr(13)
Response.write "javascript:history.go(-1);"&Chr(13)
Response.write "</script>" &Chr(13)
Response.End
Else
If RS("Question")=Request.Form("Question") And RS("Answer")=Request.Form("Answer") Then
RS("Password")=MD5(Request.Form("Password"))
RS.Update
Response.write "<script language='javascript'>" &Chr(13)
Response.write "alert('密碼更新成功!');" &Chr(13)
Response.write "window.document.location.href='Login.asp';"&Chr(13)
Response.write "</script>" &Chr(13)
Response.End
Else
Response.write "<script language='javascript'>" &Chr(13)
Response.write "alert('問題或回答錯誤!');" &Chr(13)
Response.write "javascript:history.go(-1);"&Chr(13)
Response.write "</script>" &Chr(13)
Response.End
End If
End if
End if
ConnClose()
%>
<body><br><br>
<script LANGUAGE="JavaScript" SRC="CheckForm.js"></script>
<table width="600" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="11" background="Image/LeftMargin.gif"></td>
<td class="TableInfo2">
<form name="FormReTakePwd" method="post" action="ReTakePwd.asp?Action=OK" onSubmit="return CheckForm(this)">
<table width="491" height="307" ALIGN="center">
<tr >
<td height="39" class="TextTitle"> 重設密碼</td>
<td height="39" class="TextTitle"> </td>
</tr>
<tr>
<td colspan="2" align="center" class="TextTitle"><hr width="92%" color="#BBBBBB" size="1"></td>
</tr>
<tr>
<td width="185" height="30"> 用戶名:</td>
<td width="294"><Input NAME="UserName" ID="UserName" SIZE="30" maxLength="14" check="^\S+$" warning="賬號不能為空,且不能含有空格" class="Input"></td>
</tr>
<tr>
<td width="185" height="30"> 密碼提示問題:</td>
<td width="294"><INPUT NAME="Question" type=text maxLength="50" size="30" check="\S{1,}" warning="密碼提示問題不能為空" class="Input"></td>
</tr>
<tr>
<td width="185" height="30"> 問題答案:</td>
<td width="294"><INPUT NAME="Answer" type=text maxLength="20" size="30" check="\S{1,}" warning="問題答案不能為空" class="Input"></td>
</tr>
<tr>
<td height="30"> 新密碼:</td>
<td><INPUT NAME="Password" TYPE="Password" ID="Password" SIZE="20" maxLength="12" check="\S{8,}" warning="密碼八位以上" class="Input"></td>
</tr>
<tr>
<td height="30"> 新密碼確認:</td>
<td><INPUT NAME="PwdConfirm" TYPE="Password" ID="PwdConfirm" size="20" maxLength="12" accord="Password" warning="兩次輸入的密碼不一致" class="Input"></td>
</tr>
<tr>
<td height="40" colspan="2" align="center" valign="middle"><INPUT NAME="ReTake" type=submit ID="ReTake" VALUE=" 重 設 " class="Input"> <INPUT NAME="Reset" type=reset ID="Reset" VALUE=" 清 除 " class="Input"></td>
</tr>
</table>
</form>
</td>
<td width="11" background="Image/RightMargin.gif"></td>
</tr>
</table>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -