?? 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 + -