USERONLINE.jsp 5.16 KB
Newer Older
Thitichaipun Wutthisak committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ page import="com.csc.library.system.*,com.csc.library.utilities.*,com.csc.library.cscimport.*,java.util.*"%>
<%@ page import="com.csc.library.entry.*,com.csc.library.database.*,com.csc.library.session.*"  %>
<jsp:useBean id="useronline" class="com.csc.library.system.Task" scope="page"/>
<%
    useronline.setChannel(request, response);
	useronline.checkProfile();	
	if (useronline.getUProfile() == null ) {
		return;
	}
	String lang = useronline.getUProfile().get("lang");
%>
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/template-emv-main.dwt.jsp" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Employee View</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=TIS620" />
<!-- InstanceBeginEditable name="head" -->
<!-- Begin CSS Links -->
<link rel="stylesheet" type="text/css" href="../CSS/EMV_DEFAULT.css" />
<link rel="stylesheet" type="text/css" href="../CSS/EMV_LAYOUT.css" />
<link rel="stylesheet" type="text/css" href="../CSS/EMV_LAYOUT_TWO.css" />
<link rel="stylesheet" type="text/css" href="../CSS/EMV_TEXT.css" />
<link rel="stylesheet" type="text/css" href="../CSS/DDMENU.css" />

<!-- End CSS Links -->
<!-- Begin Scripts -->
<script language="JavaScript"  type="text/javascript"src="../JS/EVENTS.js"></script>
<script language="JavaScript"  type="text/javascript" src="../JS/UTILITIES.js"></script>
<script language="JavaScript"  type="text/javascript"src="../JS/ACTIVE_OBJECT.js"></script>
<!-- Begin script for Dropdown Menu -->
<!-- DO NOT EDIT -->
<script language="JavaScript"  type="text/javascript" src="../JS/DDMENU.js"></script>
<!--[if lt IE 7]><script language="JavaScript" type="text/javascript" src="../JS/IEHOVER-FIX.js"></script><![endif]-->
<!-- DO NOT EDIT -->
<!-- End script for Dropdown Menu -->
<script language="JavaScript"  type="text/javascript"src="../JS/SCREEN.js"></script>
<script src="../JS/VIEWCALENDAR.js"></script>
<script language="javascript">
 setLang('<%=lang%>');
</script>
<style type="text/css">
#header {
 	background: #FFFFFF ;
}
</style>
<!-- End Scripts -->
<!-- Begin Head -->

<!-- End Head -->
<!-- InstanceEndEditable -->
</head>
<body onload="MM_preloadImages('../IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif')">
<div id="wrapper">
  <div id="header"><!-- InstanceBeginEditable name="header" -->
    <jsp:include page="EMV_HEADER.jsp" flush="true" />
   <!-- InstanceEndEditable -->  </div>
  <div id="topnav"><!-- InstanceBeginEditable name="top_navigation" -->
  	<jsp:include page="EMV_TOPMENU.jsp" flush="true" />
    <!-- InstanceEndEditable -->  </div>
  <div id="container">
    <div id="sidebar"><!-- InstanceBeginEditable name="side_bar" -->
    <jsp:include page="EMV_SIDEBAR.jsp" flush="true" />
      <!-- InstanceEndEditable -->    </div>
    <div id="content"><!-- InstanceBeginEditable name="main_content" -->
     <jsp:include page="EMV_HELPBAR.jsp" flush="true" />
	 <!-- Begin Main Content -->
      <div class="content">
<%

		HashMap conMap=StaticProperties.employeeOnline;
		 if(request.getParameter("__employeeid")!=null && request.getParameter("__employeeid").length()>0){
			conMap.remove(request.getParameter("__employeeid"));			
		 }
		Iterator it=conMap.keySet().iterator();
		UProfile u=useronline.getUProfile();
		DbRecord rec=new InitialRecord(u).getDbRecord("memployee", false);
		rec.setColumn("employeeid,fname,lname,emp_prefix,efname,elname,companyid");
%>

<form name="cscform" action="USERONLINE.jsp">
	<input type="hidden" name="__employeeid" value="">
  
<div class="content-box1">
      <div class="content-header">
        <h2> <script language="javascript">swapLang('User online');</script></h2>
      </div>
      <table width="100%" border="0" cellpadding="0" cellspacing="1" class="table-content-list">
        <tr>
          <td width="80" class="column-header" nowrap>No</td>
          <td class="column-header" nowrap>Employee</td>
          <td width="200" class="column-header" nowrap>Login</td>
        </tr>
        <%
		  CscCalendar cs=null;
		  int runno=0;
		  String employee="";
		  while(it.hasNext()){	
			runno++;
			employee =(String)it.next();		
			cs=new CscCalendar(((Long)conMap.get(employee)).longValue());	
			rec.set("employeeid",employee);
			rec.set("companyid",(String)u.get("companyid"));
			rec.search();
  %>	  
        <tr>
          <td class="column-text"><%=runno%></td>
          <td class="column-text"><%=employee%>&nbsp;<%=rec.getString("fullname")%></td>
          <td class="column-text-center"  ><%=cs.getDDMMYYYYHHMMSS()%></td>
        </tr> 
	<% } %>
		    
      </table>
      <div class="content-footer"><img src="../IMAGES/SPACER.gif" width="3" height="3" /></div>
    </div>  
  </form>
	  
	  </div>
      <!-- End Main Content -->
      <!-- InstanceEndEditable -->    </div>
  </div>
  <div id="footer"><!-- InstanceBeginEditable name="footer" -->
  <jsp:include page="EMV_FOOTER.jsp" flush="true" />
  <!-- InstanceEndEditable -->  </div>
</div>
</body>
<!-- InstanceEnd --></html>