<%--
    Document   : MenuHead_Loan
    Created on : Sep 19, 2016, 8:00:29 PM
    Author     : 590685
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="LoginDb.DbHandler"%>
<%@page import="java.sql.Statement"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="java.io.*"%>
<%@page import="java.util.*"%>
<%@page import="java.sql.*"%>


<% try {
%>
<%
     String userName = new String();
     String pacsName = new String();
     String userRole = new String();
     String RoleName = new String();
     String sysDt = new String();

     Connection connection = null;
     ResultSet rs = null;
     Statement statement = null;
     connection = DbHandler.getDBConnection();
     try {
         statement = connection.createStatement();
         rs = statement.executeQuery("select to_char(SYSTEM_DATE,'Month DD, YYYY') from system_date");
         while (rs.next()) {
             sysDt = rs.getString(1);
         }
        // statement.close();
        // connection.close();
     } catch (Exception e) {
         System.out.println("Error occurred during processing.");
     } finally {
                try {
                    if(statement !=null)
                        statement.close();
                    if (connection != null)
                    connection.close();

            } catch (Exception e) {               
               System.out.println("Error Occurred during connection close.");
            }

            }


     userName = (String) session.getAttribute("UserName");
     userName = userName.toUpperCase();
     pacsName = (String) session.getAttribute("pacsName");
     userRole = (String) session.getAttribute("userRole");
     RoleName = (String) session.getAttribute("RoleName");


String moduleName = new String();
            moduleName = (String) session.getAttribute("moduleName");


%>

<div style="width: 100%; height: auto; top: 0; left: 0; margin-bottom: 0 auto;">

    <div id="IPKSimage" style=" top: 0; left: 0; border-bottom:0px;">
        <img src="/PacsApplication/img/PACS.jpg"  width="100%" height="65px" alt="Image - PACS"/>
    </div>
    <!--changed on 16/5/24-->

    <div id="cssmenu" style="padding-bottom:10px;border-bottom:0px; border-color: black; color: rgb(0,140,69); background-color: rgb(177,224,178); ">
        <div style="width: 20%;float: left; text-align: left;padding: 5px 1px 1px 28px; border-radius: 5px;"><b>User Name:</b><br><font face="Trebuchet MS" size="2.5"> <%=userName%></font></div>
        <div id="sysdt" style="width: 15%;float: right; text-align: left;padding: 5px 5px 1px 1px; border-radius: 5px;"><b>Date:</b><br><font face="Trebuchet MS" size="2.5"> <%=sysDt%></font></div>
        <div style="width: 15%;float: left; text-align: left;padding: 5px; border-radius: 5px;"><b>PACS Name:</b><br><font face="Trebuchet MS" size="2.5"> <%=pacsName%></font></div>

        <div style="width: 20%;float: left; margin-right: 20px;text-align: center;padding: 5px; border-radius: 5px;"><b>User Type:</b><br><font face="Trebuchet MS" size="2.5"> <%=RoleName%></font></div>
        <div style="width: 20%;float: left; margin-right: 20px;text-align: center;padding: 5px; border-radius: 5px;"><b>Module Name:</b><br><font face="Trebuchet MS" size="2.5"> <%=moduleName.toUpperCase()%></font></div>

    </div>
    
   <!--added on 15/5/24-->
  <div style="display: flex; justify-content: center;background-color: rgb(177,224,178)"><div style="background: #fff; height: 2px; width: 90%"></div></div>     
    <ul id="menu">
        <li><a href='/PacsApplication/welcome.jsp'><span>Home</span></a></li>
        <li><a href="#" id="modules"><span>Module List</span></a>
            <ul>
                 <%if ((userRole.equalsIgnoreCase(
                     "201603000005020"))) {%>
                     <li class="est_btn"><a href="/PacsApplication/DepositServlet"><span id="dep">Deposit</span></a></li>
                     <%}else if((userRole.equalsIgnoreCase(
                     "201603000007020")) || (userRole.equalsIgnoreCase(
                     "201603000008020")) || moduleName.equalsIgnoreCase("SpecialBothLoan")){%>
                     <li class="est_btn"><a href="/PacsApplication/KCCSevlet"><span id="kcc">KCC</span></a></li>
                     <li class="est_btn"><a href="/PacsApplication/DepositServlet"><span id="dep">Deposit</span></a></li>
                     <li class="est_btn"><a href="/PacsApplication/ShareServlet"><span id="share">Share</span></a></li>
                     <li class="est_btn"><a href="/PacsApplication/SHGServlet"><span id="shg">Self Help Group</span></a></li>
                     <li class="est_btn"><a href="/PacsApplication/LoanServlet"><span id="ln">Loan</span></a></li>
                      <%}else{%>
                <li class="est_btn"><a href="/PacsApplication/KCCSevlet"><span id="kcc">KCC</span></a></li>
                <li class="est_btn"><a href="/PacsApplication/TradingSevlet"><span id="trading">Trading</span></a></li>
                <li class="est_btn"><a href="/PacsApplication/AssetServlet"><span id="asset">Asset</span></a></li>
                <%--<li class="est_btn"><a href="/PacsApplication/PDSServlet"><span id="pds">Public Distribution System</span></a></li>--%>
                <li class="est_btn"><a href="/PacsApplication/SHGServlet"><span id="shg">Self Help Group</span></a></li>
                <%--<li class="est_btn"><a href="/PacsApplication/GPSServlet"><span id="gps">Government Procurement</span></a></li>--%>
                <%--<li class="est_btn"><a href="/PacsApplication/MISDashboardSevlet"><span id="dashboard">MIS & Dashboard</span></a></li>--%>
                <li class="est_btn"><a href="/PacsApplication/DepositServlet"><span id="dep">Deposit</span></a></li>
                <li class="est_btn"><a href="/PacsApplication/LoanServlet"><span id="ln">Loan</span></a></li>
                <li class="est_btn"><a href="/PacsApplication/ShareServlet"><span id="share">Share</span></a></li>
                <%--<li class="est_btn"><a href="/PacsApplication/SODEODServlet"><span id="eod">SOD/EOD</span></a></li>--%>
                 <%}%>
            </ul>
        </li>
        <%--    <%if (userRole.equalsIgnoreCase("201603000004021")) {%>
        <li class='active has-sub'><a href="#" ><span>Parameter</span></a>
            <ul>

                <li><a href="/PacsApplication/Loan/LoanProductCreation.jsp"><span>Loan Product Creation</span></a></li>


            </ul>
        </li>
        <%}%> --%>

        <%if ((userRole.equalsIgnoreCase("201603000004022")) || (userRole.equalsIgnoreCase("201606000004041"))) {%>
        <li class='active has-sub'><a href="#" ><span>Enquiry</span></a>
            <ul>

                <li><a href="/PacsApplication/Loan/LoanInquiry.jsp"><span>Loan Account Enquiry</span></a></li>
                <li><a href="/PacsApplication/Loan/LoanTransactionEnquiry.jsp"><span>Loan Transaction Enquiry</span></a></li>                
                <li><a href="/PacsApplication/glAccountEnquiry.jsp"><span>GL Account Enquiry</span></a></li>
                <li class='last'><a href="/PacsApplication/glTransactionEnquiry.jsp"><span>GL Transaction Enquiry</span></a></li>
                <li><a href="/PacsApplication/Deposit/DepositKYCInquiry.jsp"><span>Customer Basic Details</span></a></li>
                <li><a href="/PacsApplication/investment_creation.jsp"><span>Investment Of Pacs</span></a></li>
                <li><a href="/PacsApplication/borrowing_creation.jsp"><span>Borrowing Of Pacs</span></a></li>

            </ul>
        </li>
        <%}%>

        <%if (userRole.equalsIgnoreCase("201603000004022")) {%>
        <li class='active has-sub'><a href="#" ><span>Loan Operation</span></a>
            <ul>
                <li><a href="/PacsApplication/Deposit/DepositKYCCreation.jsp"><span>KYC Creation</span></a></li>
                <li><a href="/PacsApplication/Loan/LoanAccountCreation.jsp"><span>Loan Account Creation</span></a></li>

                <li><a href="/PacsApplication/Loan/LoanDisbursement.jsp"><span>Loan Disbursement Schedule</span></a></li>
                <li><a href="/PacsApplication/Loan/LoanRepayment.jsp"><span>Loan Repayment Schedule</span></a></li>
                <li><a href="/PacsApplication/Loan/RepayLoan.jsp"><span>Loan Repayment</span></a></li>
                <li><a href="/PacsApplication/Loan/LoanTransactionOperation.jsp"><span>Loan Disbursement</span></a></li>                
                <li class='last'><a href="/PacsApplication/Loan/mark_unmark_npa_loan.jsp"><span>Mark/Unmark NPA</span></a></li>
                <li><a href="/PacsApplication/Loan/ForceDebitCapitalisation.jsp"><span>Force Debit Capitalisation</span></a></li>
                <li><a href="/PacsApplication/Loan/RemoveLien.jsp"><span>Remove Lien</span></a></li>
            </ul>
        </li>
        <%}%>

        <%if (userRole.equalsIgnoreCase("201603000004022") || 
                     (userRole.equalsIgnoreCase("201606000004041")))   {%>
        <li><a href="#" ><span>Reports</span></a>
            <ul>
                <%--    <%if ((userRole.equalsIgnoreCase("201603000008020"))) {%>
                    <li class='last'><a href="/PacsApplication/Loan/Loan_Report.jsp"><span>Loan Reports</span></a></li>                
                <%} else {%> --%>
                <li><a href="/PacsApplication/trial_balance_report_generation.jsp"><span>Trial Balance Reports</span></a></li>
                <%--<li><a href="/PacsApplication/Report_gen_monthly.jsp"><span>Deposit Return Reports</span></a></li>--%>
                <li class='last'><a href="/PacsApplication/Loan/Loan_Report.jsp"><span>Loan Reports</span></a></li>                
                <%-- <% }  %> --%>
            </ul>
        </li>
        <%}%>
        <%if (userRole.equalsIgnoreCase("201603000004022")) {%>
        <li><a href="#" ><span>Cash Operation</span></a>
            <ul>


                <li><a href="/PacsApplication/Deposit/CashDrawerEnquiryTeller.jsp"><span>Cash Drawer Enquiry</span></a></li>
            </ul>
        </li>
        <%}%>

        <%if (userRole.equalsIgnoreCase("201603000004024")) {%>
        <li><a href="#" ><span>Cash Operation</span></a>
            <ul>
                <li><a href="/PacsApplication/Deposit/AssignToCashDrawer.jsp"><span>Assign To Cash Drawer</span></a></li>
                <!--   <li><a href="/PacsApplication/Deposit/DepositKYCDocumentUpload.jsp"><span>KYC Document Upload</span></a></li> -->

                <li><a href="/PacsApplication/Deposit/CashReserveEnquiry.jsp"><span>Cash Reserve Enquiry</span></a></li>
                <li><a href="/PacsApplication/Deposit/CashDrawerEnquiry.jsp"><span>Cash Drawer Enquiry</span></a></li>


            </ul>
        </li>
        <%}%>

        <%if ((userRole.equalsIgnoreCase("201606000004041"))) {%>
        <li><a href="#" ><span>Operation</span></a>
            <ul>
                <li class='last'><a href="/PacsApplication/StandingInstructionCreation.jsp"><span>Standing Instruction Operation</span></a></li>
                <li class='last'><a href="/PacsApplication/Loan/LoanPrincipalAdjustment.jsp"><span>Loan Principal Adjustment</span></a></li>
                <li><a href="/PacsApplication/Loan/LoanModify.jsp"><span>Modify Account Interest Rate</span></a></li>
                <li><a href="/PacsApplication/Loan/amendInterest.jsp"><span>Update Interest</span></a></li>
            </ul>
        </li>
        <%}%>
        <%if ((userRole.equalsIgnoreCase("201606000004041")) || (userRole.equalsIgnoreCase("201603000004022"))) {%>
        <li class='active has-sub'><a href="#" ><span>Worklist</span></a>
            <ul>
                <%if ((userRole.equalsIgnoreCase("201606000004041"))) {%>
                <li><a href="/PacsApplication/TransactionAuthorization.jsp"><span>My Queue</span></a><li>
                    <%}%>

                <li class='last'><a href="/PacsApplication/MyIntimation.jsp"><span>My Intimation</span></a><li>

            </ul>
        </li>
        <%}%>
         <%if (!userRole.equalsIgnoreCase(
                     "201603000004020")) {%>
        <li class='active has-sub'><a href="#" ><span>User Management</span></a>
            <ul>
                <li><a href="/PacsApplication/ResetLogin.jsp"><span>Reset Logged In status </span></a><li>
                    <li><a href="/PacsApplication/changePassword.jsp"><span>Change Password </span></a><li>
            </ul>
        </li>
          <%}%>
        <li><a href="/PacsApplication/LogoutServlet" onclick="return confirm('Do you want to logout?')" >LogOut</a></li>
    </ul>
</div>

<% 	} catch (Exception e) {
                System.out.println("EX in " + e);
            }
%>

