<!--#include file="Admin.asp" -->
<!--#include file="cf.asp" -->
<!--#include file="adminconn.asp" -->
<!--#include file="../include/safe.asp"-->
<%




%>
<html>
<head>
<title>新闻发布管理系统</title>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../include/css.css" type="text/css">
</head>
<body text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="50" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table>
      <table width="90%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
        <tr align="center" bgcolor="#cccccc"> 
          <td width="15%" height="24"> id</td>
          <td width="15%">用户</td>
          <td width="20%">密码(<font color="#666666">加密</font>)</td>
          <td width="20%">权限</td>
          <td width="15%">修改</td>
          <td width="15%">删除</td>
        </tr>
        <%
set rs=server.createobject("adodb.recordset")
if session("aleave")="super" and session("userkey")=10 then
sql="select * from admin order by id" 
elseif session("aleave")="super" and session("userkey")<10 then
sql="select * from admin where userkey<10 order by id" 
else
sql="select * from admin where admin='"&session("adminuser")&"' order by id" 
end if
rs.open sql,conn,1,1 
while not rs.eof
if rs("aleave")="super" then aleave="超级管理员" end if
if rs("aleave")="check" then aleave="普通管理员" end if
%>
        <tr align="center" bgcolor="#ffffff"> 
          <td height="22"><%=rs("id")%></td>
          <td><%=rs("admin")%></td>
          <td>&nbsp;</td>
          <td><%=aleave%></td>
          <td><a href="admin_adminmodify.asp?id=<%=rs("id")%>&username=<%=rs("admin")%>">修改</a></td>
          <td><a href="admin_admindel.asp?id=<%=rs("id")%>">删除</a></td>
        </tr>
        <%
rs.movenext
wend
rs.close
set rs=nothing
%>
      </table> 
<%if session("aleave")="super" then%>
      <br>
<table width="90%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#000000">
        <tr bgcolor="#cccccc"> 
          <td colspan="2">添加管理员：</td> 
        </tr>
        <form name="add" method="post" action="admin_adminsave.asp?acction=add">
          <tr bgcolor="#ffffff"> 
            <td width="19%" height="22" align="right">管理帐号：</td>
            <td width="81%"> 
            <input name="admin" type="text" class="input" size="35" maxlength="20"> </td>
          </tr>
          <tr bgcolor="#ffffff"> 
            <td align="right">管理权限：</td> 
            <td> 
              <select name="aleave" class="input">
<option value=super selected>超级管理员</option> 
<option value=check>普通管理员</option>  
</select></td>
</tr>
          <tr bgcolor="#ffffff"> 
            <td align="right" height="22">管理密码：</td>
            <td><input name="password" type="password" class="input" size="35" maxlength="20"></td>
          </tr><!--
<%if session("aleave")="super"then%>
<tr bgcolor="#cccccc" id="userpriv">
    <td align="right" bgcolor="#FFFFFF">栏目权限：</td>
    <td align="left" bgcolor="#FFFFFF"><div style="padding-left:5px;">
<script language="javascript">

	function CheckAll(form)  {
    for (var i=0;i<form.elements.length;i++)    {
    var e = form.elements[i];
    if (e.name != 'chkall')       e.checked = form.chkall.checked; 
   }
  }
</script> 
<%
set rsgetbigclassid=server.createobject("adodb.recordset") 
sql="select * from bigclass where urlok=0 order by bigclassid"
rsgetbigclassid.open sql,conn,1,1
if not rsgetbigclassid.eof then
do while not rsgetbigclassid.eof
%><br />
<input   type="checkbox"   name="bigclassauthorize"  value="<%=rsgetbigclassid("bigclassid")%>" > <font class="s01"><%=rsgetbigclassid("bigclassname")%></font><br />
<%
set rsgetsmallclassid=server.createobject("adodb.recordset") 
sql="select * from smallclass where bigclassname='"&rsgetbigclassid("bigclassname")&"'"
rsgetsmallclassid.open sql,conn,1,1
if not rsgetsmallclassid.eof then
do while not rsgetsmallclassid.eof
%>

<input   type="checkbox"   name="smallclassauthorize"   value="<%=rsgetsmallclassid("smallclassid")%>" > <%=rsgetsmallclassid("smallclassname")%>
<%
rsgetsmallclassid.movenext
loop
end if
rsgetsmallclassid.close
%><br />
<% 
rsgetbigclassid.movenext 
loop 
end if 
rsgetbigclassid.close 
%><br />
<input type='checkbox' name=chkall onclick='CheckAll(this.form)'> <font color=red>全部栏目权限</font>
</div></td>
</tr><%end if%>
          <tr bgcolor="#cccccc"> 
            <td colspan="2" align="center"> 
              <input type="submit" name="submit" value="确 定"> 
              <input type="hidden" name="act" value="add">            </td>
          </tr>
        </form>
      </table>
      <br>
<%end if%>
    </td>
  </tr>-->
</table>
</body>
</html>


                                                              
                                                              
                                                              