📄 manageadmin.asp
字号:
<!--#include file="conn.asp"-->
<%
if session("admin")="" or session("key")<>"1" then
response.Write("<script>alert('您好!没有权限,请联系管理员');window.location.href('center.asp')</script>")
response.end
end if
%>
<%
dim admin
admin=request.Form("admin")
set rss=server.createobject("adodb.recordset")
cmd="select * from admin where username like '%"&admin&"%'"
rss.open cmd,conn,1,1
if rss.eof then
response.Write("<script>alert('无此管理员!');window.location.href('Manageadmin.asp')</script>")
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
.style1 {font-size: 14px}
.style2 {font-size: 16px}
.style4 {font-size: 12px}
.style5 {color: #000000}
body {
background-color: #0099cc;
}
-->
</style>
</head>
<body>
<form name="form1" method="post" action="">
<table width="268" border="0" align="center" bgcolor="#D4D0C8">
<tr bgcolor="#A7B5CE">
<td colspan="5"><div align="center"><span class="style2">管理员查询</span></div></td>
</tr>
<tr>
<td width="54"><span class="style1">管理员:</span></td>
<td width="132"><input name="admin" type="text" id="admin" size="15"></td>
<td width="11"> </td>
<td width="42"><input type="submit" name="Submit" value="查询"></td>
<td width="7"> </td>
</tr>
</table>
<table width="268" border="0" align="center" bordercolor="#808080" bgcolor="#808080" id="ID">
<tr bgcolor="#B0BDD3">
<td><div align="center" class="style1">ID</div></td>
<td><div align="center" class="style1">管理员</div></td>
<td><div align="center" class="style1">管理权限</div></td>
<td colspan="2"><div align="center" class="style1">管理区域</div></td>
</tr>
<%
do while not rss.eof
%>
<tr bgcolor="#D4D0C8">
<td><div align="center" class="style4">
<% =rss("编号")%>
</div></td>
<td><div align="center" class="style4"><% =rss("username")%></div></td>
<td><div align="center" class="style4"><%
dim i
i=rss("key")
select case i
case "1"
response.write "管理员"
case "2"
response.write "教师"
end select
%></div></td>
<td><div align="center" class="style1"><a href="editadmin.asp?key=<%=rss("username")%>" class="style5">编辑</a></div></td>
<td><div align="center" class="style1"><a href="deladmin.asp?key=<%=rss("username")%>" class="style5">删除</a></div></td>
</tr>
<%
rss.movenext
loop
%>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -