<!--#include file="../common/conn.asp"-->
<%
'检查用户权限
call checkuser("管理员管理")
%>
<%
if GetVariable("id") <>"" then
	
	userids=trim(GetVariable("id"))
	userids="(" & userids & ")"
	sqlst="delete from web_admin where id in " & userids
	conn.execute sqlst,0,1
end if
%>

<%

currpage=GetVariable("page")
if currpage="" then
	currpage=1
else
	currpage=int(currpage)
end if
sqlst="select * from web_admin Where m_id=" & WebUserID
rs.open sqlst,conn,1,1
usercount=rs.recordcount
pgsize=8
rs.pagesize=pgsize
pgcount=rs.pagecount
if usercount>0 then
	rs.absolutepage=currpage
end if
%>

<html>
<SCRIPT language=JavaScript>
<!-- Hide
function killErrors() {
return true;
}
window.onerror = killErrors;
//容错
// -->
</SCRIPT>
<head>
<script language="javascript" src="../common/Rclick.js">
</script>


<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="refresh" content="180">
<LINK href="../common/css.css" type=text/css rel=stylesheet>
<script>
<!--
function check(form){

	var flag=true;
	for(i=1;i<15;i++){
		eval("var temp_ckbox=form.ckbox"+i);
		if(temp_ckbox==undefined) break;
		if(temp_ckbox.checked){
			flag=false;
		}
	}
	if(flag){
		alert("错误提示：\n\n您没有选择任何管理员　");
		return false;
	}
	
  if (!confirm('确定要删除这些用户吗？　 '))
      return false;
}

function selectall(Obj){
	for(i=1;i<15;i++){
		eval("var temp_ckbox=document.myform.ckbox"+i);
		if(temp_ckbox==undefined) break;
		temp_ckbox.checked=Obj.checked
	}
}

function deleteuser(ids,names){
	if(!confirm('确定删除吗？'))
		;
	else
		window.location="deleuser.asp?id="+ids+"&loginname="+names;
}


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>
<style type="text/css">
<!--
.selecss {
	background-color: #D9D9D7;
	width: 150px;
}
td{font-size:9pt;line-height:140%}
-->
</style>
<title>网站管理员</title></head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
  <form action="?" method=post name="myform">
  <tr>
      <td align="center" valign="top" height="100%"> 
        <table width="100%" height="100" border="0" cellpadding="5" cellspacing="1" bgcolor="#336600">
          <tr> 
            <td width="100%" height="25" bgcolor="#669900"><strong><font color="#FFFFFF">网站管理员</font></strong></td>
          </tr>
          <tr> 
            <td height="26" bgcolor="F5F5F5"> 　 
              <input name="Submit22" type="button" onClick="MM_openBrWindow('edit.asp','','toolbar=yes,status=yes,resizable=yes,width=500,height=350')" value="添加管理员">
              <input type="submit" name="Submit3" value="选择删除">
              <input name="allcheck" type="checkbox" id="allcheck" value="checkbox" onClick="selectall(this)">
              全选 </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td align="center"> <table width="98%" height="0%" border="0" cellpadding="3" cellspacing="1">
                <tr bgcolor="#669900"> 
                  <td width="8%" height="30%" align="center"><font color="#FFFFFF"><b>序号</b></font></td>
                  <td width="16%" align="center"><font color="#FFFFFF"><b>姓　名</b></font></td>
                  <td width="14%" align="center" bgcolor="#669900"><font color="#FFFFFF"><b>登陆账号</b></font></td>
                  <td width="40%" align="center"><font color="#FFFFFF"><b>权　限</b></font></td>
                  <td width="22%" align="center"><font color="#FFFFFF"><b>　</b></font></td>
                </tr>
                <%
				for i=1 to pgsize
					if rs.eof then exit for
					if i mod 2=0 then
						strColor="#FFFFFF"
					else
						strColor="#F9F9F9"
					end if
				%>
                <tr bgcolor="<%=strColor%>"> 
                  <td width="8%" height="35%" align="center"><%=i%></td>
                  <td width="16%" height="35%"> 
                    <input name="id" type="checkbox" id="id" value="<%=rs("id")%>"> 
                    <%=rs("realname")%></td>
                  <td width="14%" height="35%" align="center"><%=rs("loginname")%></td>
                  <td width="40%"><%=trim(rs("limit"))%> </td>
                  <td width="22%" height="35%" align="center"> <img src="../images/delenews.gif" hspace="5" align="absmiddle"><a href="?id=<%=rs("id")%>">删除</a> 
                    <img src="../images/setuser.gif" hspace="5" align="absmiddle"><a href="javascript:;"  onClick="MM_openBrWindow('edit.asp?id=<%=rs("id")%>','','toolbar=yes,status=yes,resizable=yes,width=500,height=350')">修改</a> 
                  </td>
                </tr>
                <%
					rs.movenext
					next
					rs.close
				%>
                <tr bgcolor="#D9D9D7"> 
                  <td height="35%" colspan="5" align="right" bgcolor="#669900"><font color="#FFFFFF">共有 
                    <%=usercount%> 位管理员　 分页： 
                    <%
				  for j=1 to pgcount
				  	if j=currpage then
				  %>
                    [<strong><%=j%></strong>] 
                    <%
				  else
				  %>
                    <a href="?page=<%=j%>">[<strong><%=j%></strong>]</a> 
                    <%
				  end if
				  next
				  %>
                    </font></td>
                </tr>
              </table></td>
          </tr>
        </table>  </td>
  </tr>
 </form> 
</table>
 </body>
</html>
