📄 modifypassword.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="Config.asp"-->
<!--#include file="Admin_Check.asp"-->
<!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><%= cfgTitle %></title>
<style type="text/css">
<!--
body {
background-color: #666688;
}
-->
</style>
<style type="text/css">
<!--
.style2 {font-weight: bold}
.style3 {
font-size: 14px;
font-weight: bold;
color: #FFFFFF;
}
-->
</style>
<link href="Style.css" rel="stylesheet" type="text/css">
<%
if request("action") = "save" then
call creaters(rs,"select * from users where username='" & request.Cookies("user")("username") & "'")
rs("password") = request.Form("newpassword1")
rs.update
call closers(rs)
response.Cookies("user")("password") = request.Form("newpassword1")
%>
<script language="javascript">
alert("密码修改成功!");
window.location = "Default.asp?user=<%= request("user") %>";
</script>
<%
end if
%>
</head>
<body>
<!--#include file="top.asp"-->
<link href="Style.css" rel="stylesheet" type="text/css">
<table width="614" border="0" align="center" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="614" height="15" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="614" height="15"></td>
</tr>
</table></td>
</tr>
<tr>
<td height="29" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="614" height="29" valign="middle" background="images/Main_01.gif"> <span class="style3">修改密码</span></td>
</tr>
</table></td>
</tr>
<tr>
<td height="80" valign="top"><table width="100%" border="0" cellpadding="10" cellspacing="0" background="images/Main_02.gif">
<!--DWLayoutTable-->
<tr>
<td width="614" height="80" align="left" valign="top"><table width="99%" height="94" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#C0E096">
<tr>
<td height="21" bgcolor="#FFFFFF"><a href="#" class="style2"> 请填写资料</a></td>
</tr>
<tr>
<td height="70" align="center" valign="middle" bgcolor="#F3F9EC">
<table width="85%" height="140" border="0" align="center" cellpadding="1">
<form action="ModifyPassword.asp?action=save&user=<%= request("user") %>" method="post" name="frmUnit">
<tr>
<td height="21" colspan="2"> </td>
</tr>
<tr>
<td width="40%" height="21"><div align="right">旧密码:</div></td>
<td width="60%" align="left"><input name="Password" type="password" class="InputBox" id="Password"></td>
</tr>
<tr>
<td height="21"><div align="right">新密码:</div></td>
<td height="21" align="left"><input name="newPassword1" type="password" class="InputBox" id="newPassword1"></td>
</tr>
<tr>
<td height="21"><div align="right">新密码确认:</div></td>
<td height="21" align="left"><input name="NewPassword2" type="password" class="InputBox" id="NewPassword2"></td>
</tr>
<tr>
<td height="21" colspan="2"><div align="center">
<input name="btnSubmit" type="button" class="InputBox" id="btnSubmit" value="提交">
<input name="Submit2" type="reset" class="InputBox" value="重置">
<input name="btnBack" type="button" class="InputBox" value="返回" onClick="history.back(1);"> </div></td>
</tr>
<tr>
<td height="21" colspan="2"> </td>
</tr>
</form>
</table>
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="25" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="614" height="25" valign="top"><img src="images/Main_03.gif" width="614" height="25"></td>
</tr>
</table></td>
</tr>
</table>
<!--#include file="down.asp"-->
</body>
</html>
<script language="vbscript">
sub btnSubmit_onclick()
if frmUnit.password.value <> "<%= request.Cookies("user")("password") %>" then
msgbox "对不起,您输入的旧密码有误!",VbCritical,"旧密码"
exit sub
end if
if frmUnit.newpassword1.value = ""then
msgbox "对不起,新密码不允许为空",VbCritical,"新密码不允许为空"
exit sub
end if
if frmUnit.newpassword1.value <> frmUnit.newpassword2.value then
msgbox "对不起,新密码两次输入不同!",VbCritical,"新密码"
exit sub
end if
frmUnit.submit
End sub
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -