📄 user_pass.asp
字号:
<!--#include file="Conn.asp"-->
<!--#include file="Include/Md6.asp"-->
<%
If IsClose = true Then
Response.Write CloseInfo
Response.End
End If
If Session("UserName") = "" Then
Response.Write "<script>window.open('index1.asp','_parent');</script>"
Response.End
End If
server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
if mid(server_v1,8,len(server_v2))<>server_v2 then
response.write "<script>alert('警告!你正在从外部提交数据!!请立即终止!!');location.href='../index.htm';</script>"
Response.End
end If
action=Request("action")
password=SafeStr(Request.Form("newpin"))
If action = "save" Then
Call RegStr("^\s*[.A-Za-z0-9]{6,20}\s*$",password,"密码必须是数字或字母,长度为6-20个字符!")
Set Rs = Server.CreateObject("Adodb.Recordset")
Rs.Open "Select * From [User] Where UserName='" & Session("UserName") & "'",Conn,1,3
Rs("PassWord") = Md6(PassWord)
Rs.Update
Set Rs = Nothing
Response.Write "<script>alert('修改成功!');location.href='user_pass.asp';</script>"
End If
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<link href="images/text.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#C5E4F3">
<tr>
<td height="32" align="center" background="images/bj3.jpg" bgcolor="#E6F2FF">密码修改</td>
</tr>
<tr><form method="post" action="user_pass.asp?action=save" name="form1">
<td height="254" valign="top" bgcolor="#FFFFFF"><br>
<table width="500" border=1 align="center" cellPadding=7 cellSpacing=0 bordercolor="#999999" borderColorDark=#ffffff bgcolor="#F9F9F9">
<td width="18%" align="center" bgcolor="#FFFFFF">用户名称:</td>
<td width="82%" bgcolor="#FFFFFF"><%=Session("UserName")%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td align="center">登录密码:</td>
<td><INPUT name=newpin type=password class=inp1 maxlength="12"> <font color=red>(密码可使用英文、数字,长度为6-20个字符)</font></td>
</tr>
</table>
<p align="center"><input type="submit" value=" 提 交 " name="submit" class=btn> <input type="button" value=" 返 回 " onClick="javascript:window.history.go(-1);" class=btn></p><br><br></td>
</form>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -