📄 ad_mmgx.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file ="session.asp"-->
<!--#include file ="conn.asp"-->
<!--#include file ="md5.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>后台管理</title>
<style type="text/css">
<!--
td { font-family: "Arial", "Helvetica", "sans-serif"; font-size: 12px; font-style: normal; line-height: 20px; font-weight: normal; font-variant: normal}
a:link {
font-family: Arial, Helvetica, sans-serif;
color: #336699;
}
a:visited {
font-family: Arial, Helvetica, sans-serif;
color: #336699;
}
a:hover {
font-family: Arial, Helvetica, sans-serif;
color: #FF6600;
text-decoration: underline;
}
-->
</style>
</head>
<body>
<div align="center">
<table width="750" height="29" border="0" cellpadding="0" cellspacing="1" bgcolor="#999999">
<tr>
<td width="566" height="27" align="center" valign="top" bgcolor="#FFFFFF">密码管理‖<a href="list.asp">返回</a>‖
</td>
</tr>
</table>
<table width="750" height="192" border="0" cellpadding="0" cellspacing="1" bgcolor="#999999">
<tr>
<td width="566" height="190" align="center" valign="top" bgcolor="#FFFFFF">
<script laguage="javascript">
<!--
function form1_onsubmit()
{
if (document.form1.rpws.value=="")
{
alert("密码不能为空!")
document.form1.rpws.focus()
return false
}
else if(document.form1.pws1.value=="")
{
alert("密码不能为空!")
document.form1.pws1.focus()
return false
}
else if(document.form1.pws2.value=="")
{
alert("密码不能为空!")
document.form1.pws2.focus()
return false
}
}
-->
</script>
<form name="form1" method="post" action="ad_mmgx.asp" onsubmit="return form1_onsubmit()">
<table width="400" height="171" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<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"))
rpws=md5(rpws)
pws1=trim(request.form("pws1"))
pws1=md5(pws1)
pws2=trim(request.form("pws2"))
pws2=md5(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 y_admin"
rs.open sql,conn,3,3
if rpws<>rs("y_password") then %>
<script language="JavaScript">
alert("旧密码不正确!")
history.go(-1)
</script>
<%else
rs("y_password")=pws1
rs.update
%><script language="JavaScript">
alert("密码更新成功!")
window.location.href("list.asp")
</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 + -