EMV_ONLINE.jsp 5.24 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 130 131 132 133 134 135 136
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" language="java" %>
<%@page import="com.csc.library.entry.EmvHelpEntry,com.csc.library.system.*,com.csc.library.utilities.*"%>
<%@ page import="com.csc.library.entry.*,com.csc.library.database.*,com.csc.library.session.*"  %>
<%@ include file="../CHECKPROFILE.jsp" %>
<% request.setCharacterEncoding("UTF-8"); %>
<jsp:useBean id="EMV" class="com.csc.library.system.Task" scope="page"/>
<jsp:setProperty name="EMV" property="appname" value="empview" />
<%
	EMV.setChannel(request, response);
	EmvHelpEntry screen = (EmvHelpEntry) EMV.process("EmvHelpEntry","EMV_ONLINE"); 
 
	screen.setMaxLine(15);
 
	String lang = screen.getUProfile().get("lang");
	CheckNull chk=new CheckNull();
	ThaiUtilities thail = new ThaiUtilities();  
	String screenName=thail.ASCII2Unicode(chk.chkNullString(request.getParameter("__screen")));     
	String userid=screen.getUProfile().get("user");     
	String whereCuz=" (logout_date is null or logout_date = '') ";
	whereCuz +=" and login_status = 'P' ";
	whereCuz +=" and module_name is not null ";  

	screen.getInquiry().setFilter(whereCuz);
	
	int beginRow=((Integer.parseInt(screen.goPage)-1)*screen.maxLine)+1;
    int endRow=(Integer.parseInt(screen.goPage))*screen.maxLine;
    screen.getInquiry().setBetween(beginRow, endRow);
    screen.getInquiry().clearOldCondition();
	
	screen.process();
	screen.totalRec=screen.getInquiry().recCount();     

%>
<html xmlns="http://www.w3.org/1999/xhtml" ng-app="myHR">
	<head>
		
		<title>Employee View</title>
		
		<meta http-equiv="Content-Type" content="text/html; charset=TIS620" />
		
	</head>
	<body onload="MM_preloadImages('../IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif')">
	
		<div class="bg-com"></div>	
		<jsp:include page="EMV_HEADMENU.jsp" flush="true" />

		<script>
			setLang("<%=screen.getUProfile().get("lang")%>");
			var swap = new swaplang();
            var titlename = swap.swap2String("SW011260");
			setPageTitle(titlename);

			function setSubmit(){
				//setFilter();
				with(document.cscform){ 
					submit();
				}
			} 
		</script>

		<section>
			<div class="container csc-content">
				<form name="cscform" class="form-horizontal" method="post" action="EMV_ONLINE.jsp">
					<input name="__screen" type="hidden" value="EMV_ONLINE">	
					<input name="__cmd" type="hidden" value="">
					<input type="hidden" name="__calendar">
					<script language="javascript">getInputFormatDate();</script>
					<input type="hidden" name="__language" value="<%=screen.getUProfile().get("lang")%>">
					<input type="hidden" name="__help" value="">
					<input type="hidden" name="__goPage" value="">
					<input type="hidden" name="__orderBy" value="">
					<input type="hidden" name="__helpReturn" value="">
					<input type="hidden" name="__helpName" value="">
					<input type="hidden" name="__pageCall" value="">
					<input type="hidden" name="__referPage" value="">
					<input type="hidden" name="__lockPage" value=""> 
					<input type="hidden" name="__companyid"  value="<%=screen.getUProfile().get("companyid")%>"> 

					<span class="detail-table">
						<span swlang code='SW001771'>Found Data</span> :&nbsp;&nbsp;<%= screen.getInquiry().recCount() %>&nbsp;
						<span swlang code='SW001780'>records</span> 
					</span>
					<span class="detail-table label-right">
						<span swlang code='SW001120'>Page</span> : <%=screen.getPageTagNew()%> 
					</span>

					<div class="table-responsive">
						<table class="table table-head table-hover table-bordered table-title-left">
							<thead>
								<tr>
									<th colspan=6 class="table-title">
										<%=((lang.equalsIgnoreCase("tha"))?"ข้อมูลผู้กำลังใช้งาน":"Online User")%> 
									</th>
								</tr>
								<tr>
									<th swlang code='SW001393'>No.</th>
									<th><%=((lang.equalsIgnoreCase("tha"))?"ชื่อผู้ใช้งาน":"Username")%></th>
									<th><%=((lang.equalsIgnoreCase("tha"))?"ชื่อ - นามสกุล":"Name - Surename")%></th>
									<th><%=((lang.equalsIgnoreCase("tha"))?"เครื่องที่ใช้งาน":"Client IP")%></th>
									<th><%=((lang.equalsIgnoreCase("tha"))?"เวลาที่เข้าใช้งาน":"Login Time")%></th>
									<th><%=((lang.equalsIgnoreCase("tha"))?"หน้าจอที่ใช้งาน":"On page")%></th>
								</tr>
							</thead>
							<tbody>
								<%
									int i =1;
									while (screen.nextRec()) { 
									if(screen.checkLinePage()){
								%>
								<tr>
									<td><center><%=(i++)%></center></td>
									<td><%=screen.getString("user_code")%></td>
									<td><%=screen.getString("memployee","fullname")%></td>
									<td><%=screen.getString("remote_ip")%></td>
									<td><%=screen.getString("login_date")+"   "+screen.getString("login_time")%></td>
									<td><%=screen.getString("current_page")%></td>
								</tr>
								<% 
										}
										 if(screen.outLinePage()){ break; }
									 }
								 %> 
							</tbody>
						</table>
					</div>
				</form>
			</div>
			<a href="#top" id="top-button">
				<i class="fa fa-angle-up"></i>
				<div class="top-word">Back to top</div>
			</a>
		</section>
		<jsp:include page="FOOTER.jsp" flush="true" />
	</body>
</html>