<%@ page contentType="text/html; charset=GBK"%>
<%@ page import = "zr.zrpower.common.util.SysPreperty"%>
<%@ page import = "zr.zrpower.entity.sys.SessionUser"%>
<%@ page import = "zr.zrpower.ejb.sys.UserService" %>
<%@ page import = "zr.zrpower.ejb.sys.UnitService" %>
<%@ page import = "zr.zrpower.ejb.sys.UIService"%>

<%@ page import = "zr.zrpower.entity.sys.BPIP_USER"%>
<%@ page import = "zr.zrpower.common.util.DateWork"%>
<%@ page import = "java.lang.Object"%>
<%
   SessionUser user =(SessionUser)session.getAttribute("userinfo");
   UIService userUI =new UIService();
   UserService userMgr = new UserService();
   UnitService depMgr = new UnitService();
   String currentPage = request.getParameter("page");

   if (currentPage==null){currentPage="1";}
%>
<html>
<head>
<title>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<link REL="stylesheet" type="text/css" href="../zrsysmanage/css/<%=user.getUserCSS()%>">
</head>
<%
   int PageSize = 12;
   int Page = Integer.parseInt(currentPage);
   int iline=0;

   BPIP_USER[] users = userMgr.GetLoginUserList(PageSize,Page);
   DateWork dateBean = new DateWork();
%>
<BODY class="BodyMain">
<form name="recordfrm" action="online.jsp">
<input type="hidden" name="page">

<!--HTML Head表单头显示[显示内容,图标文件,用户肤色的图片文件夹]-->
<%=userUI.ShowHeadHtml("在线用户","IcoTitle.gif",user.getUserImage())%>
<%=userUI.ShowBodyStartHtml()%>
<DIV id="divMessage" style='padding-left:0;padding-top:0;width:100%;height:98%;overflow:auto'>
<table width="100%" height="100%"   border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top">

    <%
    if(users!=null &&users.length>0){
    %>
      <table width="100%" border="0" align="center" cellpadding="4" cellspacing="5">
    <%
         for (int i=0;i<users.length;i++)
         {
           if (iline==0){

           %>
             <tr>
           <%
           }
           %>
          <td width="240">

           <table width="240"  height="170" border="0" cellpadding="0" cellspacing="0" background="<%=SysPreperty.getProperty().AppUrl%>zrsysmanage/images/<%=user.getUserImage()%>/zxback1.gif">
              <tr><td align="center" valign="middle">
               <table width="230"  height="160" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                  <td  rowspan="3"><img src="../showuserphoto.do?Act=photo&userid=<%=users[i].getUSERID()%>" border="1" width="85" height="120"></td>
                  <td >真实姓名：</td>
                  <td ><span class="style2"><%=users[i].getNAME()%></span></td>
               </tr>
               <tr>
                 <td>登录名：</td>
                 <td><%=users[i].getLOGINID()%></td>
               </tr>


               <tr>
                 <td colspan="3">用户部门：&nbsp;<%=depMgr.GetUnitName(users[i].getUNITID())%></td>
               </tr>
              </table>
           </td></tr>
          </table><br>

          </td>
         <%
         iline++;
         if (iline==4){iline=0;
         %>
         </tr>
         <%
         }
       }%>
       <%if (iline==1){%>
       <td width="220"></td><td width="220"></td><td width="220"></td>
       <%}%>
       <%if (iline==2){%>
       <td width="220"></td><td width="220"></td>
       <%}%>
       <%if (iline==3){%>
       <td width="220"></td>
       <%}%>

</table>
<%}%>


  </td>
  </tr>
  <tr>
    <td height="50">
         <TABLE><TR><TD>
             <%
             try
             {
                out.print(userMgr.CreatePage(PageSize,Page));
             }catch(Exception ex)
             {
                out.print(ex.getMessage());
             }
             %>
         </TD></TR></TABLE>
   </td>
  </tr>
</table>
</div>

<!--HTML Foot显示表单尾-->
<%=userUI.ShowFootHtml()%>
</form>
<OBJECT WIDTH="1" HEIGHT="1" classid=clsid:5EEEA87D-160E-4A2D-8427-B6C333FEDA4D id=RTXAX></OBJECT>
</body>
</html>
<%
user = null;
userUI = null;
userMgr = null;
%>
