<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@ page import="java.util.List" %> <%@ page import="java.util.ArrayList" %> <%@ page import="org.baraza.DB.BQuery" %> <%@ page import="org.baraza.web.*" %> <%@ page import="org.baraza.xml.BElement" %> <% ServletContext context = getServletContext(); String dbconfig = "java:/comp/env/jdbc/database"; String xmlcnf = request.getParameter("xml"); if(request.getParameter("logoff") == null) { if(xmlcnf == null) xmlcnf = (String)session.getAttribute("xmlcnf"); if(xmlcnf == null) xmlcnf = context.getInitParameter("init_xml"); if(xmlcnf == null) xmlcnf = context.getInitParameter("config_file"); if(xmlcnf != null) session.setAttribute("xmlcnf", xmlcnf); } else { session.removeAttribute("xmlcnf"); session.invalidate(); } List allowXml = new ArrayList(); allowXml.add("hr.xml"); String ps = System.getProperty("file.separator"); String xmlfile = context.getRealPath("WEB-INF") + ps + "configs" + ps + xmlcnf; String reportPath = context.getRealPath("reports") + ps; String projectDir = context.getInitParameter("projectDir"); if(projectDir != null) { xmlfile = projectDir + ps + "configs" + ps + xmlcnf; reportPath = projectDir + ps + "reports" + ps; } BWeb web = new BWeb(dbconfig, xmlfile, context); web.init(request); web.setMainPage(String.valueOf(pageContext.getAttribute("mainPage"))); String webLogos = web.getWebLogos(); String logoHeader = "./assets/logos" + webLogos + "/logo_header.png"; String entryformid = null; String action = request.getParameter("action"); String value = request.getParameter("value"); String post = request.getParameter("post"); String process = request.getParameter("process"); String actionprocess = request.getParameter("actionprocess"); if(actionprocess != null) process = "actionProcess"; String reportexport = request.getParameter("reportexport"); String excelexport = request.getParameter("excelexport"); String actionOp = null; String auditTable = null; String contentType = request.getContentType(); if(contentType != null) { if ((contentType.indexOf("multipart/form-data") >= 0)) { web.updateMultiPart(request, context, context.getRealPath("WEB-INF" + ps + "tmp")); } } String opResult = null; if(process != null) { if(process.equals("actionProcess")) { opResult = web.setOperation(actionprocess, request); } else if(process.equals("FormAction")) { String actionKey = request.getParameter("actionkey"); opResult = web.setOperation(actionKey, request); } else if(process.equals("Update")) { web.updateForm(request); } else if(process.equals("Delete")) { web.deleteForm(request); } else if(process.equals("Submit")) { web.submitGrid(request); } else if(process.equals("Check All")) { web.setSelectAll(); } else if(process.equals("Audit")) { auditTable = web.getAudit(); } } String fieldTitles = web.getFieldTitles(); if(excelexport != null) reportexport = excelexport; if(reportexport != null) { out.println(" "); } %> <%= pageContext.getServletContext().getInitParameter("web_title") %> <% if(web.isMaterial()) { %> <% } else { %> <% } %>
<% if(web.getViewType().equals("DASHBOARD")) { %> <%= web.getDashboard() %> <% if(web.hasDashboardItem("ATTENDANCE")) {%> <%@ include file="./assets/include/attendance.jsp" %> <% } %> <% if(web.hasDashboardItem("TASK")) {%> <%@ include file="./assets/include/task.jsp" %> <% } %> <% } else { %>
> <%= web.getHiddenValues() %>
<%= web.getTabs() %>
<% if(opResult != null) out.println("
" + opResult + "
"); %> <%= web.getSaveMsg() %>
<%= web.getViewName() %>
<%= web.getButtons() %>
<% if(web.hasExpired()) {%> <%@ include file="./assets/include/billing_expired.jsp" %> <%} else {%> <%= web.getBody(request, reportPath) %> <% } %>
<% actionOp = web.getOperations(); if(actionOp != null) { %>
<%= actionOp %>
<% } %> <% if(fieldTitles != null) { %>
<%= fieldTitles %> And Or <%=web.getFilterStatus()%>
<% } %>
<%= web.showFooter() %>
<%= web.getMenuMsg(xmlcnf) %>
<% if(web.isFileImport()) { %>
Add files...


<% } %>
<% } %>
<% String diaryJSON = ""; if(web.getViewType().equals("DIARY")) diaryJSON = web.getCalendar(); %> <%@ include file="./assets/include/calendar.jsp" %> <% if(web.hasPasswordChange()) { %> <%@ include file="./assets/include/password_change.jsp" %> <% } %> <% web.close(); %>