<!--#include file="top_m.asp" -->
<!--#include file="include/menu.asp"-->
<!--#include file="checkuserflag.asp"-->
<%call CheckUserFlag("32")
Set ObjDCW = Server.CreateObject("dc_data100_v1_0.C_A_Config")

selAnnounce=request.form("selAnnounce")'删除记录
if not isempty(selAnnounce) then
   aaa=ObjDCW.del_record(DataPathFile,"A_Manage_Users","A_M_U_ID",selAnnounce)
end if

dim totalPut'总记录数
maxperpage=10'每页最大数
dim CurrentPage'当前页
dim i,j
if not isempty(request("page")) then
   currentPage=cint(request("page"))
else
   currentPage=1
end if

dim D_data

'department=ObjDCW.read_record(D_data,DataPathFile,"A_Manage_Users","A_M_U_ID,A_M_D_ID,A_M_U_User,A_M_U_Password,A_M_U_Power,A_M_U_Name,A_M_U_Moble,A_M_U_Tel,A_M_U_Email,A_M_U_Address,A_M_U_LoginTime,A_M_U_LoginIP"," order by A_M_U_ID")'读出记录,结果保存在D_data数组中
department=ObjDCW.read_record(D_data,DataPathFile,"A_Manage_Users","A_M_U_ID,A_M_D_ID,A_M_U_User,A_M_U_LoginTime,A_M_U_LoginIP"," where A_M_U_company_id=" & Session("DC_Manage_CompanyID") & " order by A_M_D_ID")'

if department=0 then 
   response.write "<p align='center'>对不起，没有您要查询的信息</p>" 
elseif department=1 then
	totalput = UBound(D_data)'总记录数
	aaa=ObjDCW.setpage(D_data,totalput,maxperpage,currentPage,Num_b,Num_o)'设置分页
	showContent totalput,MaxPerPage,currentPage,Num_b,Num_o
end if 

function showContent(totalput,MaxPerPage,currentPage_s,Num_b_s,Num_o_s)
%>
<br>
<Form name="search" method="POST" action="admin_list.asp">
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
 <tr height=25>
   <td align="left" class="f11">系统管理员管理(点击用户名进行相应操作)--</td>
   <td align="right"><a href="admin_user_ok.asp?action=add"><font color=#ff0000>添加管理员</font></a></td>
 </tr>
</table>
<table width="96%" border=0 align="center" cellPadding=4 cellSpacing=1>
  <tr height=28 bgcolor="#99ccff"> 
    <td width="9%" align="center" bgcolor="#99ccff">ID号</td>
    <td width="11%" align="center">用户名</td>
    <td width="18%" align="center">部门</td>
    <td width="18%" align="center">最后登录时间</td>
    <td width="21%" align="center">最后登录IP</td>
    <td width="7%" align="center"><input type='submit' value='删除' class=smallInput></td>
  </tr>
<%	for i=Num_b_s to Num_o_s step 1
		department_record=D_data(i)
		rs_record=split(department_record,",")
%>
  <tr height="28" bgcolor="#ffffff"> 
    <td width="9%"  align="center"><font face="Arial"><b><%=rs_record(0)%></b></font></td>
    <td width="11%" align="center"><a href="admin_user_ok.asp?id=<%=rs_record(0)%>"><%=rs_record(2)%></a></td>
    <td width="18%" align="center"><%
	'response.write DataPathFile
	if rs_record(1)<>"" then
		departM=ObjDCW.read_record(D_data_Dep,DataPathFile,"A_Manage_Department","A_M_D_Name"," where A_M_D_ID=" & rs_record(1))
		if departM=0 then
			response.write "-"
		else
			totalput = UBound(D_data_Dep)
			rs_dep=split(D_data_Dep(0),",")
			response.write rs_dep(0)
		end if
	end if
	%></td>
    <td width="18%" align="center"><%=rs_record(3)%></td>
    <td width="21%" align="center"><%=rs_record(4)%></td>
    <td width="7%" align="center"><input class=smallInput type='checkbox' name='selAnnounce' value='<%=cstr(rs_record(0))%>' <%if rs_record(1)=0 then response.write "disabled=true" end if%>></td>
  </tr>
 <%  next
 %>
<tr><td height="23" colspan="6" bgcolor="#e8f4ff"><%ObjDCW.showpage totalput,MaxPerPage,"admin_list.asp",currentPage_s%></td>
  </tr>
</table>
<%
end function
%>