<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="java.util.*" %>
<%@ page import="net.sz600.tool.SzConvert" %>
<%@ page import="net.sz600.system.SzPageHelp" %>
<%@ page import="net.sz600.system.SzOut" %>
<%@ page import="net.sz600.system.SzProperties" %>
<%@ page import="net.sz600.organize.*" %>
<%@ page import="net.sz600.system.SzLog" %>
<%@ page import="net.sz600.online.*" %>
<%@ include file="/sessionInfo.jsp"%>
<HTML>
<head>
<title></title>
<META http-equiv=Content-Type content="text/html; charset=UTF-8">
<link href="<%=strSkin_SESSION%>/css2007.css" rel="stylesheet" type="text/css">
<SCRIPT src="../share/js/ftiens4_tree.js"></SCRIPT>
</head>
<body>
<%
    //所有公司
  Map companyMap = SzUserHelp.getCompanyStaticMap();
	Iterator iterCompany = companyMap.keySet().iterator();
	
	Map userMap = OlUserSession.getInstance().getOnLineUser();
	Iterator iterUser = userMap.keySet().iterator();
	String sName = "";
	String sDLID = "";
    String sPicture = OlUserSession.getInstance().alertCountInfo(iDLID_SESSION);

%>
<table width=100% border="0" cellpadding=0 cellspacing=0 align="left">
  <tr>
    <td align="center" width="33"></td>
    <td width="751" colspan="2" align="left">    
      <!--名字，连接，定位的页面，图片---->
      <SCRIPT>
        USETEXTLINKS = 1
        level_0 = gFld("所有的在线人员", "","","images/skin1/menu/asset.gif")    
<%
    int i =0;
    int iDLID = 0;
    int iCompany = 0;
    sPicture = "" + OlMessageControl.IMAGE_PATH + "/online_i.gif";
    Integer intGSID = null;
    String sCompany_name = "";
    while (iterCompany.hasNext()) {
	    intGSID = (Integer)iterCompany.next();
	    //公司名称
	    sCompany_name = (String)SzUserHelp.getCompanyName(intGSID);
%>	   
        level_<%=intGSID%> = insFld(level_0, gFld("<b><%=sCompany_name%></b>", "","","images/skin1/menu/asset.gif"))
<%      
		iterUser = userMap.keySet().iterator();
		while (iterUser.hasNext()) {
     		sDLID = (String)iterUser.next();	
     		//判断是否同一公司
     		iDLID = SzConvert.toInt(sDLID);
     		iCompany = SzUserHelp.getCompanyID(iDLID);
     		//System.out.println(szCOMPANY_SESSION + " == " + iCompany);
     		if (iCompany != intGSID) {
    	 		continue;
     		}
     		//获得该用户的详细信息
     		sName = SzUserHelp.getLoginName(iDLID);
     		//输出本用户姓名
     		i ++;
%>
		    level_YG<%=i%> = insFld(level_<%=intGSID%>, gFld("<%=sName%>", "","","<%=sPicture%>"))
<%     
        }
    }
%>
      </SCRIPT>
<SCRIPT>
    initializeDocument();
    
    function SendMessageWin(vJSDLID) {
		var vUrl = "message/send.jsp?OPERATOR=send&JSDLID=" + vJSDLID;
    	window.open(vUrl,"","status=yes,height=500,width=600,top=100,left=100");    
  	}    
	//查看信息
    function ReceiveMessageWin(vJSID) {
    	var vUrl = "message/receive.jsp?refresh=true&OPERATOR=receive&KEY=" + vJSID;
	  	childWin = window.open(vUrl,"","status=yes,height=500,width=600,top=100,left=100");  
    }    	
</SCRIPT>
    </td>
  </tr>
</table>
</body>
</HTML> 
