<%@ 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"/> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> <META http-equiv="Content-Style-Type" content="text/css"> <TITLE>TEST.jsp</TITLE> <link href="CSS/MYNOTE.css" rel="stylesheet" type="text/css"> <script language="javascript"> function logOut(empid){ with(document.cscform){ __employeeid.value=empid; submit(); } } </script> </HEAD> <BODY> <% HashMap conMap=StaticProperties.employeeOnline; if(request.getParameter("__employeeid")!=null && request.getParameter("__employeeid").length()>0){ conMap.remove(request.getParameter("__employeeid")); } useronline.setChannel(request,response); useronline.checkProfile(); if(useronline.getUProfile()==null){ %> <script language="javascript">window.location=INDEX.jsp;</script> <% }else{ 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"); CscCalendar nowCs=new CscCalendar(); out.println("Start Time :"+nowCs.getHHMMSSFULL()); %> <form name="cscform" action="USERONLINE.jsp"> <input type="hidden" name="__employeeid" value=""> <table width="50%" border="0" align="center" cellpadding="1" cellspacing="0" bgcolor="#000000"> <tr> <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#000000"> <tr> <td width="92" class="title1"><div align="center">No</div></td> <td width="396" class="title1"><div align="center">EMPLOYEE</div></td> <td width="396" class="title1"><div align="center">LOGINTIME</div></td> <!--td width="396" class="title1"><div align="center">LOGOUT</div></td--> </tr> <% CscCalendar cs=null; nowCs =nowCs.decHour(); int runno=0; String employee=""; while(it.hasNext()){ 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(); if(cs.afterEquals(nowCs)){ runno++; %> <tr> <td align="right" bgcolor="#FFFFFF"><%=runno%> </td> <td bgcolor="#FFFFFF" class="desc2"><%=employee%> <%=rec.getString("fullname")%></td> <td bgcolor="#FFFFFF" class="desc2"><%=cs.getDDMMYYYYHHMMSS()%></td> <!--td bgcolor="#FFFFFF" class="desc2"><input type="button" value=" logout " onClick="javascript:logOut('<%=employee%>')"></td--> </tr> <%} } %> </table></td> </tr> </table> </form> <% nowCs=new CscCalendar(); out.println("End Time :"+nowCs.getHHMMSSFULL()); } %> </BODY> </HTML>