📄 default.asp
字号:
<%response.expires=0%>
<!--#include file="../inc/conn.asp"-->
<%
userid=Session("userid")
userlevel=Session("userlevel")
if userid="" or userlevel="" then
call msgbox("请重新登陆!",3)
end if
if not isnumeric(userid) or not isnumeric(userlevel) then
call msgbox("请重新登陆!",3)
end if
userid=CCur(userid)
userlevel=CCur(userlevel)
if not userlevel=1 then
call msgbox("您的级别不够!",0)
end if
%>
<!--#include file="../inc/head.asp"-->
<table width="300" border="0" align="center" cellpadding="2" cellspacing="1" bordercolor="#FFFFFF">
<form name="form" method="post" action="../admin/add.asp">
<tr class="menutitle"><th colspan="2">添加新用户</th></tr>
<tr bgcolor="#ffffff"><td>用户名</td><td><input class="text" type="text" name="username"></td></tr>
<tr bgcolor="#f0f0f0"><td>口令 </td><td><input class="text" type="text" name="userpass"></td></tr>
<tr bgcolor="#ffffff"><td>权限 </td><td>
<select name="userlevel">
<option value="1">管理员</option>
<option value="2">添加者</option>
</select>
</td></tr>
<tr bgcolor="#f0f0f0"><th colspan="2">
<input class="button" type="submit" name="Submit" value="提 交">
<input class="button" type="reset" name="reset" value="取 消">
</th></tr>
</form>
</table>
<br><br>
<%
sql="select userid,username,userlevel from admin"
rs.open sql,conn,1,1
if rs.eof then
response.write "<p align=""center"">现在尚无注册用户~</p>"
else
admin=rs.getrows
end if
rs.close
Set rs=nothing
Set conn=nothing
%>
<table border="0" align="center" width="300" cellpadding="2" cellspacing="1">
<tr class="menutitle"><th>用户名</th><th>权限</th><th colspan="2">进行操作</td></tr>
<%
if isarray(admin) then
for i=0 to ubound(admin,2)
%>
<tr bgcolor="#FFFFFF">
<td><%=admin(1,i)%></td>
<%
select case CCur(admin(2,i))
case 1:level="管理员"
case 2:level="添加者"
case 3:level="审核者"
end select
%>
<td><%=level%></td>
<td><a href="../admin/chg.asp?userid=<%=admin(0,i)%>">修改</a></td>
<td><a href="../admin/del.asp?userid=<%=admin(0,i)%>">删除</a></td>
</tr>
<%
next
Set admin=nothing
end if
%>
</table>
<!--#include file="../inc/foot.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -