<!--#include file="../siteconfig/conn.asp"-->
<!--#include file="../siteconfig/md5.asp"-->
<%
if session("adminlogin")<>sessionvar then
Response.Write("<script language=javascript>alert('你尚未登录，或者超时了！请重新登录');this.location.href='login.asp';</script>")
Response.End
End if
%>
<!--#include file="Admin_ManageFunction.asp"-->
<HTML>
<HEAD>
<TITLE>后台管理员</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"> 
<link href="./images/admincp/admincp.css" rel="stylesheet" type="text/css" />

</HEAD>

<script language="JavaScript" type="text/javascript" src="js.js"></script>
<BODY>

<h3>后台管理员</h3>
<%rs.open"select * from Admin",conn,1,3
dim ManageCount,Admin_Verity
ManageCount = int(rs.recordcount)
redim  ManageArray(ManageCount,6)
dim j,i
j=1
while not rs.eof and not rs.bof
   ManageArray(j,0)=rs("Admin_Id")
   ManageArray(j,1)=rs("Admin_UserName")
   ManageArray(j,2)=Md5(rs("Admin_UserPass"))
   ManageArray(j,3)=rs("Admin_LoginCount")
   ManageArray(j,4)=rs("Admin_LoginIp")
   ManageArray(j,5)=rs("Admin_LoginTime")
   ManageArray(j,6)=rs("Admin_Verity")
   j=j+1
rs.movenext
wend
rs.close%>
<table width="96%" border="0" cellspacing="1" cellpadding="8" align="center" class="tb tb2 fixpadding">
  <tr>
    <td class="vtop lineheight">ID</td>
    <td class="vtop lineheight">用户名</td>
    <td class="vtop lineheight">登录次数</td>
    <td class="vtop lineheight">最后登录IP</td>
    <td class="vtop lineheight">最后登录时间</td>
    <td class="vtop lineheight">用户级别</td>
    <td class="vtop lineheight">编辑</td>
    <td class="vtop lineheight">删除</td>
  </tr>
<%i=1
for i=i to ManageCount%>
  <tr>
    <td class="vtop lineheight"><%=ManageArray(i,0)%></td>
    <td class="vtop lineheight"><%=ManageArray(i,1)%></td>
    <td class="vtop lineheight"><%=ManageArray(i,3)%></td>
	<td class="vtop lineheight"><%=ManageArray(i,4)%></td>
	<td class="vtop lineheight"><%=ManageArray(i,5)%></td>
	<td class="vtop lineheight"><%if ManageArray(i,6)=1 then
	    Admin_Verity="超级管理员"
	else
	    Admin_Verity="内容管理员"
	end if
	Response.Write Admin_Verity%></td>
    <td class="vtop lineheight">
	<%if Session("Admin_UserName")="admin" then%>
	    <a href="#" onClick="javascript:DivOpenClose('Admin_ManageUp.asp?Admin_Id=<%=ManageArray(i,0)%>',1,450,300);return false">编辑</a>
	<%else
	     if ManageArray(i,1)="admin" then%>
	        <font color="#999999">编辑</font>
		<%else%>
		    <a href="#" onClick="javascript:DivOpenClose('Admin_ManageUp.asp?Admin_Id=<%=ManageArray(i,0)%>',1,450,300);return false">编辑</a>
		<%end if%>
	<%end if%></td>
    <td class="vtop lineheight"><%if ManageArray(i,1)="admin" then%>
	<font color="#999999">删除</font>
	<%else%>
	<a href="#" onClick="javascript:DivOpenClose('Admin_ManageDel.asp?Admin_Id=<%=ManageArray(i,0)%>',1,450,150);return false">删除</a>
	<%end if%></td>
    <%
next%>
</table>
<br /><div align="center"><a href="#" onClick="javascript:DivOpenClose('Admin_ManageAdd.asp',1,450,250);return false"><font color="#669900">添加管理员</font></a>
<div id="DivMenu" style="position:absolute; width:100%; height:100%; z-index:1; left: 0px; top: 0px; filter:Alpha(opacity=50); background-color: #E8E8E8; layer-background-color: #E8E8E8; border: 1px none #000000; visibility: hidden;"></div>
<div id="DivIframe" style="position:absolute; width:0; height:0px; z-index:1; visibility: hidden; overflow: visible; filter:Alpha(opacity=80);"><iframe id=OpenIframe name=OpenIframe src=londing.html width=100% height=100% frameborder=0 scrolling=no>管理员</iframe>
</div>
</BODY>
</HTML>

