EMV_ALLMENU.jsp 1.6 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
<%@ page contentType="text/html; charset=UTF-8" language="java" %>
<%@ page import="com.csc.library.menu.*" %>
<%@ page import="com.csc.library.utilities.*"%>
<%@ page import="com.csc.library.database.*" %>
<%@ page import="com.csc.library.entry.*" %>
<%@ page import="com.csc.library.session.*" %>

<%
	UProfile up=null;

	if (session !=null){
		up = (UProfile)session.getAttribute("userprofile");
	}else if (up==null){
		return;
	}

	Menu mymenu= new EmpviewIndexMenu(up);
%>
<%=mymenu.getMenu()%>
<%
	DbInquiry db=new InitialInquiry(up).getDbInquiry("mempviewindex");
	db.setColumn("*");
	db.setFilter("branchid ='"+up.get("branch")+"' AND companyid = '"+up.get("companyid")+"'");
	db.refresh();

	if (db.recCount()>0){
		db.setFilter("branchid ='"+up.get("branch")+"' AND empview_menu like '%Event%' AND companyid = '"+up.get("companyid")+"'");
		db.refresh();
		if (db.recCount()>0){
%>
			<jsp:include page="EMV_EVENT.jsp" flush="true" />
<%
		}

		db.setFilter("branchid ='"+up.get("branch")+"' AND empview_menu like '%News%' AND companyid = '"+up.get("companyid")+"'");
		db.refresh();
		if (db.recCount()>0){
%>
			<jsp:include page="EMV_ANNOUNCEMENT.jsp" flush="true" />
<%
		}
	}else{
		db.setFilter("branchid ='All' AND empview_menu like '%Event%' AND companyid = '"+up.get("companyid")+"'");
		db.refresh();

		if (db.recCount()>0){
%>
			<jsp:include page="EMV_EVENT.jsp" flush="true" />
<%
		}

		db.setFilter("branchid ='All' AND empview_menu like '%News%' AND companyid = '"+up.get("companyid")+"'");
		db.refresh();
		if (db.recCount()>0){
%>
			<jsp:include page="EMV_ANNOUNCEMENT.jsp" flush="true" />
<%
		}
	}
%>