⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 adminuser.asp

📁 不错的一个网站哦, 不错的一个网站哦
💻 ASP
字号:
<!--#include file="conn.asp"-->
<%
  if session("admin")="" then
  response.redirect "admin.asp"
  else
	if session("flag")>1 then
		response.write "<br><p align=center>您没有操作的权限</p>"
		response.end
	end if
  end if

dim rs, sql
%>
<html>
<head>
<title>用户管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<%
   Set rs=Server.CreateObject("Adodb.RecordSet")
   
   sql="select * from admin where flag>="&Session("flag")&" order by id"
   
   rs.Open sql,conn,1,1
%>
<body>
<center>
  <p>修改管理员信息 | <a href=adduser.asp>增加管理员</a></p>
  
  <table width="500" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
    <tr align="center" class="title"> 
      <td  width="120"><font color="#333333">用户名</font></td>
      <td  width="120"><font color="#333333">密码</font></td>
      <td  width="100"><font color="#333333">权限</font></td>
      <td  width="130"><font color="#333333">操作</font></td>
    </tr>
  </table>
  <table width="600" height="15" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr> 
      <td></td>
    </tr>
  </table>
  <%while not rs.EOF %>
  <%if (rs("flag")>Session("flag")) or (rs("username")=Session("admin")) then%>
    
  <table width="500" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
    <form method="post" action="saveuser.asp" style="margin:0">
      <tr align="center"> 
        <td width="120" height="30"> <font color="#333333"> 
          <input class="input" type="text" name="manager" value="<%=rs("username")%>" size="12">
          </font></td>
        <td width="120" height="30"> <font color="#333333"> 
          <input class="input" type="password" name="newpin" value="<%=rs("password")%>" size="12">
          </font></td>
        <td width="100" height="30"> <font color="#333333"> 
          <%if rs("flag")=1 then%>
          超级用户 
          <%end if%>
          <%if rs("flag")=2 then%>
          普通用户 
          <%end if%>
          <%if rs("flag")=3 then%>
          员工 
          <%end if%>
          </font></td>
        <td width="130" height="30"> <font color="#333333"> 
          <input class="button" type="submit" name="Submit" value="修改">
          <input class="button" type="submit" name="Submit" value="删除">
          <input type="hidden" name="oldmanager" value="<%=rs("username")%>">
          <input type="hidden" name="oldpin" value="<%=rs("password")%>">
          </font></td>
      </tr>
    </form>
  </table>
  <table width="600" height="5" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr> 
      <td></td>
    </tr>
  </table>
  <%else%>
  <table width="600" height="15" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr> 
      <td></td>
    </tr>
  </table>
  
  <table width="500" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
    <tr align="center" bgcolor="#EBEBEB"> 
      <td width="120" height="30"> <font color="#333333"><%=rs("username")%></font></td>
      <td width="120" height="30"><font color="#333333">******</font></td>
      <td width="100" height="30"> <font color="#333333"> 
        <%if rs("flag")=1 then%>
        超级用户 
        <%else%>
        普通用户 
        <%end if%>
        </font></td>
      <td width="130" height="30"><font color="#333333">&nbsp;</font></td>
    </tr>
  </table>
  <table width="600" height="15" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr> 
      <td></td>
    </tr>
  </table>
  <%
     end if
     
     rs.MoveNext
     
     Wend
  %>
<%
  rs.Close
  set rs=Nothing
  
  conn.Close
  set conn=Nothing
%>
超级用户可以进行所有功能的操作<br>普通用户没有用户管理和栏目管理权限,用户只有添加程序的权限。
</center>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -