<!-- #include file="../conn.asp" -->
<!-- #include file="../const.asp" -->
<%
call chksunzom()
if instr(quanxs,"x7t")<=0 then call sunzomqx()
%>
<html>
<head>
<title><%=dianming%> - 员工登陆账号管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../images/sunzom.css" rel="stylesheet" type="text/css">

<script>
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>
</HEAD>
<BODY>
<%
nowid_zu=request("zuid")
%>
<table width="100%" border="0" cellpadding="0" cellspacing="2" align="center">
<form name="form2">
  <tr> 
    <td width="25%" height="30">　</td>
	<td width="75%" align="right">
	  请选择部门：<%=zuxuan(nowid_zu,"onChange=""form2.submit()""")%>&nbsp;</td>
  </tr>
</form>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#C4D8ED">
<tr>
<td><img src="../images/r_1.gif" alt="" /></td>
<td width="100%" background="../images/r_0.gif">
  <table cellpadding="0" cellspacing="0" width="100%">
    <tr>
      <td>&nbsp;员工/登陆账号管理 (目前有账号：<%=usershu%>个，系统注册数：<%=sunzs(3)%>个)</td>
	  <td align="right"><%if instr(quanxs,"zxtj")>0 then%><input type="button" value="添加账号" onClick="window.location.href='user_add.asp'" class="button"><%end if%>&nbsp;</td>
    </tr>
  </table>
</td>
<td><img src="../images/r_2.gif" alt="" /></td>
</tr>
<tr>
<td></td>
<td>
<form name="form1" action="user_del.asp">
<table align="center" cellpadding="4" cellspacing="1" class="toptable grid" border="1">
  <tr align="center">
    <td height="30" class="category">姓名(login|bianhao)</td>
	<td class="category">编号(login|username)</td>
	<td class="category">性别</td>
    <td class="category">电话</td>
	<td class="category">所属部门|职位</td>
    <%if instr(quanxs,"xxtg")>0 then%>
	<td width="8%" class="category">修改</td>
	<%end if%>
	<%if instr(quanxs,"sxtc")>0 then%>
    <td width="5%" class="category">删除</td>
	<%end if%>
  </tr>
  <%
  if nowuserid=1 then cxtj="" else cxtj="and id>1"
  
  if nowid_zu="" then
    sql="select * from login where 1=1 "&cxtj&" order by id_zu,id"
  else
    sql="select * from login where id_zu="&nowid_zu&" "&cxtj&" order by id"
  end if
  set rs_login=conn.execute(sql)
  do while rs_login.eof=false
  %>
  <tr onMouseOver="this.className='highlight'" onMouseOut="this.className=''">
    <td align="center" height="25"><%=rs_login("bianhao")%></td>
	<td align="center"><%=rs_login("username")%></td>
    <td align="center"><%=rs_login("xinbie")%></td>
	<td align="center"><%=rs_login("tel")%></td>
	<td align="center">
	  <%set rs_zu=conn.execute("select * from zu_login where id="&rs_login("id_zu"))%>
	  <%if rs_zu.eof then%>未分配<%else%><%=rs_zu("zu")%><%end if%>|<%=rs_login("zuzw")%>
	</td>
	<%if instr(quanxs,"xxtg")>0 then%>
    <td align="center"><a href="user_modi.asp?id=<%=rs_login("id")%>"><img src="../images/res.gif" border="0" hspace="2" align="absmiddle">修改</a></td>
	<%end if%>
	<%if instr(quanxs,"sxtc")>0 then%>
    <td align="center"><%if rs_login("id")="1" then%>--<%else%><input type="checkbox" name="ID" value="<%=rs_login("id")%>" style="border:0"><%end if%></td>
	<%end if%>
  </tr>
  <%
    rs_login.movenext
  loop
  %>
  <tr>
    <td colspan="7" height="30" class="category">
	<table cellpadding=0 cellspacing=0 width="100%">
	<tr>
	<td align="left" style="color:#FF0000;">　</td>  
	<td align="right">
    <%if instr(quanxs,"xxtg")>0 then%>
	<input name="chkall" type="checkbox" id="chkall" value="select" onClick="CheckAll(this.form)" style="border:0"> 全选
	<input type="submit" value="删 除" class="button" onClick="return confirm('此操作无法恢复！！！请慎重！！！\n\n确定要删除员工吗？')">
	<%end if%>
  </td>
  </tr></table></td></tr>  
</table>
</form>
</td>
<td></td>
</tr>
<tr>
<td><img src="../images/r_4.gif" alt="" /></td>
<td></td>
<td><img src="../images/r_3.gif" alt="" /></td>
</tr>
</table>
</body>
</html>