MAIN.jsp 8.42 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 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261
<!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.menu.Menu" %>
<%@ page import="com.csc.library.menu.GlobalMenu" %>
<%@ page import="com.csc.library.utilities.CscCalendar" %>
<%@ page import="com.csc.library.utilities.UProfile" %>
<%@ page import="org.apache.commons.lang.StringUtils" %>
<%@ include file="CHECKPROFILE.jsp" %>
<%//=screen.getRecord().getViewUrl("picture") %>
<%

	Menu menu = new GlobalMenu(uprofile);
	//menu.setUseCache(false);
	String menuHtml = menu.getMenu();

	String csdate="";
	String cstime="";
	String swapsource = (String)uprofile.get("swapsource");
	String login_status = (String)uprofile.get("swipetime");
	CscCalendar cs = new CscCalendar();
	
	if( "ENG".equalsIgnoreCase((String)uprofile.get("lang"))) {
	    csdate = cs.getEngFull(); 
	}else{
	    csdate = cs.getThaiFull();
	}
	cstime = cs.getHHMM();
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Main</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<!-- Begin CSS Links -->
<!--<link rel="stylesheet" type="text/css" href="CSS/DDMENU.css" />
<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_ONE.css" />
<link rel="stylesheet" type="text/css" href="CSS/EMV_TEXT.css" />-->
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/CSS/metro.css"/>
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/CSS/metro-icons.css"/>
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/CSS/MENU_BACKEND.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/AC_RunActiveContent.js"></script>
<script language="JavaScript"  type="text/javascript"src="JS/SCREEN.js"></script>
<script type="text/javascript" language="JavaScript" src="<%=request.getContextPath()%>/JS/std.menu.config.js"></script>
<script src="<%=request.getContextPath()%>/JS/jquery-2.1.3.min.js"></script>
<script language="javascript">
	var Gol_status=2;

	setLang("<%=uprofile.get("lang")%>");
	var str = "<%=login_status%>";
	var swap = "<%=swapsource%>";
	var chk_login = "<%//=chk_login%>";
    
	function openNewwin() {
		if (str==1 && chk_login==1) {
		      open("TALOGIN.jsp?__logStatus=in","Login","width=600,height=180,toolbar=no,status=yes,scrollbars=no,resizeable=no");
		}
	}

		function CheckSession(){
			/*$.ajax
			({
				type: "POST",
				url: "CHECKPROFILE.jsp",
				cache: false,
				success : function(result){
					if (result!=""){
						Gol_status=1;
						window.top.location.href ="LOGINERROR.jsp";
					}
					else
					{
						Gol_status=2;
					}
				},
				async: false
			});*/
		}


	function linkModule(jsppage){
		CheckSession();

		if (Gol_status!=1){

			with(document.cscform){
				action = "CHECKMODULE.jsp";
				modulename.value=jsppage.substring(0, jsppage.lastIndexOf("/"));
				modulepath.value=modulename.value;
				linkaction.value=jsppage;
				if (str==1 && swap==1 && jsppage=="LOGOUT.jsp") {
					open("TALOGIN.jsp?__logStatus=out","Logout","width=600,height=180,toolbar=no,status=yes,scrollbars=no");
				} else {
					submit();
				}
			}
		}
	 }

	function logout(){
		open("/hr/TALOGIN.jsp?__logStatus=out","Logout","width=600,height=180,toolbar=no,status=yes,scrollbars=no");
	}
	function logoutSystem(){
		window.location.href ="/hr/LOGOUT.jsp";
	}
	/*function setTime() {
		now = new Date();
		hour = now.getHours();
		min = now.getMinutes();
		sec = now.getSeconds();
		if (min <10) {
			min = "0" + min; 
		}
		if (sec <10) {
			sec = "0" + sec; 
		}
		if (hour < 10) {
			hour = "0" + hour; 
		}
		document.getElementById("showtime").innerHTML = hour + ":" + min;
		setTimeout("setTime()", 60000); 
	}*/
	/*function show() {
		now = new Date();
		hour = now.getHours();
		min = now.getMinutes();
		sec = now.getSeconds();
		if (min <10) {
			min = "0" + min; 
		}
		if (sec <10) {
			sec = "0" + sec; 
		}
		if (hour < 10) {
			hour = "0" + hour; 
		}
		document.getElementById("showtime").innerHTML = hour + ":" + min;
		setTimeout("setTime()", (60-sec)*1000); 
	}*/

	/*function RemoveHover(){
		var color_bg =$(".main-body").css("background-color"); 
		$(".bg-hover-myhr").css("background-color",color_bg);
		$(".set_control").removeClass("bg-hover-myhr");
	}

	$(document).ready(function(){

		$(".set_control").hover(function(){
			$(this).addClass("bg-hover-myhr");
			var color_bg=$(".main-body").css("background-color");
			$(".mif-switch").css("color","red");

		},function(){
			RemoveHover();
		});
	});*/
    </script>
</head>
<body class="main-body">
<form name="cscform" method="post">
  <input type="hidden" name="modulename" value="">
  <input type="hidden" name="modulepath" value="">
  <input type="hidden" name="linkaction" value="">
  <input type="hidden" name="__language" value="<%=uprofile.get("lang")%>">
	<div class="tile-area fg-white">
		<h1 class="tile-area-title">myHR</h1>
		<div class="tile-area-controls">
			<a class="image-button icon-right bg-transparents fg-white no-border">
				<span class="sub-header  text-light"><%=uprofile.get("fullname")%></span>
				<img class="pic-profile icon" src='<%=uprofile.get("picture_path")%>'/>
			</a>
			<a href="<%=request.getContextPath()%>/LOGOUT.jsp" class="set_control square-button bg-transparents fg-white no-border"><span class="mif-switch"></span></a>
		</div>
		<!--<div class="tile-group">
			<div class="tile-large bg-dark-orange fg-white" data-role="tile">
				<div class="tile-content iconic">
					<img src="<%=request.getContextPath()%>/IMAGES/ICON/Organ.png">
				</div>
				<span class="tile-label">Organization Information</span>
			</div>

			<div class="tile op-lightBlue fg-white" data-role="tile">
				<div class="tile-content iconic">
					<img src="<%=request.getContextPath()%>/IMAGES/ICON/Payroll.png">
				</div>
				<span class="tile-label">Payroll</span>
			</div>

			<div class="tile bg-orange fg-white" data-role="tile">
				<div class="tile-content iconic">
					<img src="<%=request.getContextPath()%>/IMAGES/ICON/Time.png">
				</div>
				<span class="tile-label">Time Attendance</span>
			</div>

			<div class="tile-wide bg-dark-green fg-white" data-role="tile">
				<div class="tile-content iconic">
					<img src="<%=request.getContextPath()%>/IMAGES/ICON/Employee_new.png">
				</div>
				<span class="tile-label-wide-normal">Employee View</span>
			</div>
			
			<div class="tile bg-light-green fg-white" data-role="tile">
				<div class="tile-content iconic">
					<img src="<%=request.getContextPath()%>/IMAGES/ICON/Train.png">
				</div>
				<span class="tile-label">Training</span>
			</div>

			<div class="tile-wide bg-crimson fg-white" data-role="tile">
				<div class="tile-content iconic">
					<img src="<%=request.getContextPath()%>/IMAGES/ICON/Personal_new.png">
				</div>
				<span class="tile-label">Personal Information</span>
			</div>

			 <div class="tile bg-purple fg-white" data-role="tile">
				<div class="tile-content iconic">
					<img src="<%=request.getContextPath()%>/IMAGES/ICON/Appraisal.png">
				</div>
				<span class="tile-label">Appraisal</span>
			</div>
			
			<div class="tile bg-dark-blue fg-white" data-role="tile">
				<div class="tile-content iconic">
					<img src="<%=request.getContextPath()%>/IMAGES/ICON/Welf.png">
				</div>
				<span class="tile-label">Welfare & Benefit</span>
			</div>

			<div class="tile-wide bg-pink-red fg-white" data-role="tile">
				<div class="tile-content iconic">
					<img src="<%=request.getContextPath()%>/IMAGES/ICON/Approve_new.png">
				</div>
				<span class="tile-label-wide-normal">Approve Document</span>
			</div>

			<div class="tile bg-blue fg-white" data-role="tile">
				<div class="tile-content iconic">
					<img src="<%=request.getContextPath()%>/IMAGES/ICON/recrui.png">
				</div>
				<span class="tile-label">Recruitment</span>
			</div>

			<div class="tile-wide bg-brown fg-white" data-role="tile">
				<div class="tile-content iconic">
					<img src="<%=request.getContextPath()%>/IMAGES/ICON/System.png">
				</div>
				<span class="tile-label-wide-normal">System Setting</span>
			</div>
		</div>-->
	<%=menuHtml %>
	</div>
</form>
</body>
</html>