📄 adminuser.asp
字号:
<!--#include file="security.asp"-->
<!--#include file="articleconn.asp"-->
<html>
<%if session("flag")>1 then
response.write "<script>alert('您的操作权限不够!');history.back();</script>"
response.end
end if
%>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>用户管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type=text/css>
body {
background:#336699;
margin:0px;
font:9pt 宋体;
background-color: #eeeeee;
}
table { border:0px; }
td { font:normal 12px 宋体; }
img { vertical-align:bottom; border:0px; }
a { font:normal 12px 宋体; color:#000000; text-decoration:none; }
a:hover { color:#000000;text-decoration:underline; }
.sec_menu { border-left:1px solid white; border-right:1px solid white; border-bottom:1px solid white; overflow:hidden; background:#D6DFF7; }
.menu_title { }
.menu_title span { position:relative; top:2px; left:8px; color:#215DC6; font-weight:bold; }
.menu_title2 { }
.menu_title2 span { position:relative; top:2px; left:8px; color:#428EFF; font-weight:bold; }
.样式1 {
color: #345b9c;
font-size: 9pt;
}
.样式2 {color: #345b9c}
.样式3 {
color: #000000;
font-size: 9pt;
}
.样式4 {font-size: 9pt}
</style>
<script language="javascript">
function check()
{
if(document.form1.username.value=="")
{
alert("请输入用户名!");
document.form1.username.focus();
return false;
}
if (document.form1.username.value.length < 4)
{
alert('用户名最少需要4位!');
document.form1.username.focus();
return false;
}
if (document.form1.username.value.length > 12)
{
alert('用户名不能大于10位!');
document.form1.username.focus();
return false;
}
if(document.form1.password.value=="")
{
alert("请输入密码!");
document.form1.password.focus();
return false;
}
if (document.form1.password.value.length < 5)
{
alert('密码最少需要5位!');
document.form1.password.focus();
return false;
}
if (document.form1.password2.value=="")
{
alert('请输入确认密码');
document.form1.password2.focus();
return false;
}
if (document.form1.password.value != document.form1.password2.value)
{
alert('你两次输入的密码不一样!');
document.form1.password2.focus();
return false;
}
}
</script>
</head>
<%
Set rs=Server.CreateObject("Adodb.RecordSet")
sql="select * from password order by id"
rs.Open sql,conn,1,1
%>
<body topmargin="1" leftmargin="2">
<p><br></p>
<div align="center">
<table width="500" border="0" cellpadding="4" cellspacing="1" bgcolor="#FFFFFF">
<tr bgcolor="#cccccc">
<td width="120" height="30" bgcolor="#CCCCCC" style="font-weight: bold; color: maroon; border-left-style: none; border-right-style: none; border-top-style: none; border-bottom: .75pt solid gray; background-color: silver">
<div align="center" class="样式1">
用户名</div> </td>
<td width="120" height="30" bgcolor="#CCCCCC" style="font-weight: bold; color: maroon; border-left-style: none; border-right-style: none; border-top-style: none; border-bottom: .75pt solid gray; background-color: silver">
<div align="center" class="样式2">
密码</div> </td>
<td width="100" height="30" bgcolor="#cccccc" style="font-weight: bold; color: maroon; border-left-style: none; border-right-style: none; border-top-style: none; border-bottom: .75pt solid gray; background-color: silver">
<div align="center" class="样式2">
权限</div> </td>
<td width="130" height="30" bgcolor="#cccccc" style="font-weight: bold; color: maroon; border-left-style: none; border-right-style: none; border-top-style: none; border-bottom: .75pt solid gray; background-color: silver">
<div align="center" class="样式2">
操作</div> </td>
</tr>
<%do while not rs.EOF %>
<form method="post" action="asaveuser.asp" style="margin:0">
<tr bgcolor="#145f74">
<td height="8" width="120" style="color: black; border-style: none" bgcolor="#eeeeee" align="center">
<input type="text" name="manager" value="<%=rs("name")%>" size="12">
<input type="hidden" name="id" value="<%=rs("id")%>" size="12"></td>
<td width="120" height="8" align="center" bgcolor="#eeeeee" style="font-weight: normal; color: black; border-style: none; background-color: #F0F0F0">
<input name="newpin" size="12"> </td>
<td width="100" height="8" align="center" bgcolor="#eeeeee" style="font-weight: normal; color: black; border-style: none; background-color: #F0F0F0">
<select size="1" name="flag">
<option <%if rs("flag")=3 then%> selected <%end if%> value="3">初级管理员
</option>
<option <%if rs("flag")=2 then%> selected <%end if%> value="2">高级管理员
</option>
<option <%if rs("flag")=1 then%> selected <%end if%> value="1">超级管理员
</option>
<option <%if rs("flag")=4 then%> selected <%end if%> value="4">无管理权限
</option>
</select> </td>
<td width="130" height="8" align="center" bgcolor="#eeeeee" style="font-weight: normal; color: black; border-style: none; background-color: #F0F0F0">
<input type="submit" name="Submit" value="修改">
<input type="submit" name="Submit" value="删除"> </td>
</tr>
</form>
<%
rs.MoveNext
loop
%>
</table>
<%
rs.Close
set rs=Nothing
conn.Close
set conn=Nothing
%><br>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="500" id="AutoNumber1">
<tr>
<td width="100%">
<p align="center"><span lang="zh-cn"><span class="样式3">为了安全后台管理员密码采用MD5加</span><span class="样式4"><font color="#FFffff"></font><font color="#FFffff"></font></span><font color="#FFffff">密</font></span></td>
</tr>
</table>
</center>
</div>
<br>
<div align="center">
<form method="post" action="saveuser1.asp" name="form1" onsubmit="javascript:return check();">
<center>
<table width="300" border="0" cellpadding="4" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#FFFFFF">
<tr bgcolor="#f3f3f3">
<td height="25" align="center" bgcolor="#eeeeee">
用 户 名</td><td align="center" bgcolor="#eeeeee"><input type="text" name="username" size="25"></td>
</tr>
<tr bgcolor="#f3f3f3">
<td height="25" align="center" bgcolor="#eeeeee">
初始密码</td><td align="center" bgcolor="#eeeeee"><input type="password" name="password" size="25"></td>
</tr>
<tr bgcolor="#f3f3f3">
<td height="25" align="center" bgcolor="#eeeeee">
确认密码</td><td align="center" bgcolor="#eeeeee"><input type="password" name="password2" size="25"></td>
</tr>
<tr bgcolor="#f3f3f3">
<td height="25" align="center" bgcolor="#eeeeee">
管理权限</td><td align="center" bgcolor="#eeeeee"><select size="1" name="flag">
<option selected value="4">====无管理权限====</option>
<option value="3">====初级管理员====</option>
<option value="2">====高级管理员====</option>
<option value="1">====超级管理员====</option>
</select></td>
</tr>
</table>
<table width="300" align="center" border="0" cellspacing="1" cellpadding="4">
<tr bgcolor="#f3f3f3">
<td height="25" align="center" bgcolor="#eeeeee">
<input type="submit" name="Submit" value="开始添加"> <input type="reset" name="Submit2" value="重新填写"></td>
</tr>
</table>
</center>
</form>
</div>
</div>
</body>
</html>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -