📄 admin_mm.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file ="session.asp"-->
<!--#include file ="conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body oncontextmenu="return false" onselectstart="return false" >
<div align="center">
<table width="598" height="268" border="0" cellpadding="0" cellspacing="1" bgcolor="#0033FF">
<tr>
<td align="center" valign="top" bgcolor="#FFFFFF">
<script laguage="javascript">
<!--
function form1_onsubmit()
{
if (document.form1.rpws.value=="")
{
alert("密码不能为空!")
document.form1.admin.focus()
return false
}
else if(document.form1.pws1.value=="")
{
alert("密码不能为空!")
document.form1.pws.focus()
return false
}
else if(document.form1.pws2.value=="")
{
alert("密码不能为空!")
document.form1.pws.focus()
return false
}
}
-->
</script>
<form name="form1" method="post" action="admin_mm.asp" onsubmit="return form1_onsubmit()">
<table width="400" height="171" border="0" cellpadding="0" cellspacing="1" bgcolor="#00CCFF">
<tr align="center" bgcolor="#FFFFFF">
<td height="34" colspan="2"><font color="#FF0000">密码更新</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="134" align="right">旧密码:</td>
<td width="263"><input name="rpws" type="text" id="rpws" size="20"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td align="right">新密码:</td>
<td><input name="pws1" type="text" id="pws1" size="20"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td align="right">新密码:</td>
<td><input name="pws2" type="text" id="pws2" size="20"></td>
</tr>
<tr align="center" bgcolor="#FFFFFF">
<td colspan="2"><input type="submit" name="submit" value="提交">
<input type="reset" name="submit2" value="重置"></td>
</tr>
</table>
</form></td>
</tr>
</table>
<% if request.form("submit")="提交" then
rpws=trim(request.form("rpws"))
pws1=trim(request.form("pws1"))
pws2=trim(request.form("pws2"))
if rpws="" or pws1="" or pws2="" then
response.Write("密码不能为空")
end if
if pws1<>pws2 then
response.Write("两次新密码不一样")
else
set rs=server.CreateObject("adodb.recordset")
sql="select * from dy_admin"
rs.open sql,conn,3,3
if rpws<>rs("pws") then %>
<script language="JavaScript">
alert("旧密码不正确!")
history.go(-1)
</script>
<%else
rs("pws")=pws1
rs.update
%><script language="JavaScript">
alert("密码更新成功!")
window.location.href("main.htm")
</script>
<% end if
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
end if
%>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -