📄 modifypwd.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">
<title>密码修改</title>
<link href="Style.css" rel="stylesheet" type="text/css">
</head>
<body>
<!--#include file="inc\adovbs.asp"-->
<!--#include file="Inc/Conn.asp"-->
<!--#include file="Inc\Check.asp"-->
<!--#include file="inc\MD5.asp"-->
<!--#include file="inc\SQLCHK.asp"-->
<%
if Request.QueryString("Action")="OK" then
dim username
username=Session("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("Password")=MD5(Request.Form("OldPassword")) Then
RS("Password")=MD5(Request.Form("Password"))
RS.Update
RS.Close
RS=nothing
Response.write "<script language='javascript'>" &Chr(13)
Response.write "alert('密码更新成功!');" &Chr(13)
Response.write "window.document.location.replace('Expert.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
ConnClose()
%>
<!--#include file="Inc/Head.asp"-->
<table width="772" height="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="11" background="Image/LeftMargin.gif"></td>
<td width="750" background="Image/BGBlock.gif">
<br>
<script LANGUAGE="JavaScript" SRC="CheckForm.js"></script>
<form name="ModifyPwd" method="post" action="ModifyPwd.asp?Action=OK" onSubmit="return CheckForm(this)">
<table width="600" border="0" ALIGN="center" cellpadding=5 cellspacing=1 class="TableInfo">
<tr>
<td height="50" colspan="2" align="center"><span class="TextTitle">密码修改</span></td>
</tr>
<tr>
<td width="197"> 旧密码:</td>
<td width="378"><INPUT NAME="OldPassword" TYPE="Password" ID="OldPassword" SIZE="30" maxLength="12" check="\S{8,}" warning="旧密码八位以上" class="Input">
</td>
</tr>
<tr>
<td width="197"> 新密码:</td>
<td width="378"><INPUT NAME="Password" TYPE="Password" ID="Password" SIZE="30" maxLength="12" check="\S{8,}" warning="新密码八位以上" class="Input">
</td>
</tr>
<tr>
<td width="197"> 新密码确认:</td>
<td width="378"><INPUT NAME="PwdConfirm" TYPE="Password" ID="PwdConfirm" size="30" maxLength="12" accord="Password" warning="两次输入的密码不一致" class="Input">
</td>
</tr>
<tr><td colspan="2" align="center"><INPUT NAME="Modify" type=submit ID="Modify" VALUE=" 修 改 " class="Input"></td></tr>
</table>
</form>
<br>
</td>
<td width="11" background="Image/RightMargin.gif"></td>
</tr>
</table>
<!--#include file="Inc/Trail.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -