📄 admin_edit.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="check.asp" -->
<!--#include file="tcconn.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Management System</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #FFFFFF;
}
-->
</style>
<link href="css/text1.css" rel="stylesheet" type="text/css">
<script LANGUAGE="javascript" src="js/common.js"></script>
<script language="javascript">
function CheckEdit(fromname){
if(trim(document.getElementById(fromname).oldpassword.value)== ""){
alert("旧密码不能为空!");
document.getElementById(fromname).oldpassword.focus();
return false;
}
if(trim(document.getElementById(fromname).pass.value)!=trim(document.getElementById(fromname).oldpassword.value)){
alert("旧密码不正确!");
document.getElementById(fromname).oldpassword.focus();
return false;
}
if(trim(document.getElementById(fromname).password.value)== ""){
alert("新密码不能为空!");
document.getElementById(fromname).password.focus();
return false;
}
if(trim(document.getElementById(fromname).cpassword.value)== ""){
alert("确认密码不能为空!");
document.getElementById(fromname).cpassword.focus();
return false;
}
if(trim(document.getElementById(fromname).password.value)!=trim(document.getElementById(fromname).cpassword.value)){
alert("新密码与确认密码不同!");
document.getElementById(fromname).cpassword.focus();
return false;
}
}
</script>
</head>
<body>
<div align="center">
<%
userid=session("userid")
sql = "select [id], [name], [password] from [dbo_manager] where ([id]="&userid&")"
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.Open sql,conn,1,1
%>
<table width="95%" border="0" cellpadding="0" cellspacing="0" class="text1">
<tr>
<td height="10"></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0" class="text_menu">
<tr>
<td height="5" bgcolor="#9CC6FF"></td>
</tr>
<tr>
<td bgcolor="#375C81">
更改密码 </td>
</tr>
<tr>
<td height="5" bgcolor="#9CC6FF"></td>
</tr>
</table></td>
</tr>
<tr>
<td height="10"></td>
</tr>
</table>
<form method="post" action="admin.asp" id="edit" onSubmit="return CheckEdit('edit')" >
<input type="hidden" name="id" id="id" value="<%=Rs("id")%>" />
<input type="hidden" name="action" id="action" value="updatepassword" />
<input type="hidden" name="pass" id="pass" value="<%=Rs("password")%>" />
<table class="text1">
<tbody>
<tr>
<th>用户名</th>
<td><input type="text" name="name" id="name" size="18"
value="<%=Rs("name")%>" readonly="readonly"/></td>
</tr>
<tr>
<th>旧密码<font color="#FF0099" size="2">*</font>:</th>
<td><input type="password" name="oldpassword" id="oldpassword" value="" size="20"/></td>
</tr>
<tr>
<th>新密码<font color="#FF0099" size="2">*</font>:</th>
<td><input type="password" name="password" id="password" value="" size="20"/></td>
</tr>
<tr>
<th>确认密码<font color="#FF0099" size="2">*</font>:</th>
<td><input type="password" name="cpassword" id="cpassword" value=""size="20"/></td>
</tr>
</tbody>
</table>
<hr width="90%" align="center" color="#999999" style="height:1px;">
<input type="submit" name="commit" value="保存" />
</form>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -