<%--
    Document   : MenuHead
    Created on : Apr 20, 2016, 3:19:56 PM
    Author     : 590685
--%>

<%@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.*"%>


<%

    String pacsName = new String();
    String userRole = new String();
    String RoleName = new String();
    String sysDt = new String();
    String userName = 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>

    <div id="cssmenu" style="padding-bottom:10px; 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 style="width: 15%;float: right; text-align: left;padding: 5px 5px 1px 1px;padding: 5px; 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/ Bank 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>
   <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(
                              "201603000006020")) || moduleName.equalsIgnoreCase("SpecialKcc")) {%>
                <li class="est_btn"><a href="/PacsApplication/KCCSevlet"><span id="kcc">KCC</span></a></li>
                <li class="est_btn"><a href="/PacsApplication/ShareServlet"><span id="share">Share</span></a></li>

                <%} else if ((userRole.equalsIgnoreCase(
                              "201603000007020")) || (userRole.equalsIgnoreCase(
                                      "201603000008020")) || moduleName.equalsIgnoreCase("SpecialBothKcc")) {%>                      
                <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 if ((userRole.equalsIgnoreCase(
                               "201603000006020")) || moduleName.equalsIgnoreCase("SpecialKCCShare")) {%>
                <li class="est_btn"><a href="/PacsApplication/KCCSevlet"><span id="kcc">KCC</span></a></li>
                <li class="est_btn"><a href="/PacsApplication/ShareServlet"><span id="share">Share</span></a></li>
                    <%} else if ((userRole.equalsIgnoreCase(
                               "201603000007020")) || moduleName.equalsIgnoreCase("SpecialBothShare")) {%>
                <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>

                <%} 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>User Maintenance</span></a>
            <ul>
                <li class='last'><a href="/PacsApplication/userMaintenance.jsp" ><span>User Maintenance</span></a></li>
            </ul>
        </li>
        <%}%> --%>

        <%if ((userRole.equalsIgnoreCase("201603000004022")) || (userRole.equalsIgnoreCase("201606000004041")) || (userRole.equalsIgnoreCase("201603000006020")) || (userRole.equalsIgnoreCase("201603000007020"))) {%>
        <li class='active has-sub'><a href="#" ><span>Enquiry</span></a>
            <ul>
                <li><a href="/PacsApplication/accountEnquiry.jsp"><span>KCC Account Enquiry</span></a></li>
                <li><a href="/PacsApplication/transactionEnquiry.jsp"><span>KCC Transaction Enquiry</span></a></li>
                <li><a href="/PacsApplication/glAccountEnquiry.jsp"><span>GL Account Enquiry</span></a></li>
                <li><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>Pacs Investment Details</span></a></li>--%>
                <li><a href="/PacsApplication/InsuranceAddition.jsp"><span>Insurance Addition</span></a></li>
                    <%--                <li class='last'><a href="/PacsApplication/Deposit/CashDrawerEnquiryTeller.jsp"><span>Cash Drawer Enquiry</span></a></li>--%>
                    <%if ((userRole.equalsIgnoreCase("201606000004041"))) {%>
                <li><a href="/PacsApplication/AccountRenewalBulk.jsp"><span>Account Renewal Bulk Upload</span></a></li>
                    <%}%>
            </ul>
        </li>
        <%}%>

        <%--    <%if (userRole.equalsIgnoreCase("201603000004021")) {%>
        <li class='active has-sub'><a href="#" ><span>Parameters</span></a>
            <ul>
                <li><a href="/PacsApplication/glProductOperation.jsp"><span>GL Product Operation</span></a></li>
                <li><a href="/PacsApplication/pacsProductOperation.jsp"><span>PACS Product Operation</span></a></li>
                <li class='last'><a href="/PacsApplication/pacsManagement.jsp"><span>PACS Management</span></a></li>
            </ul>
        </li>
        <%}%> --%>

        <%if ((userRole.equalsIgnoreCase("201603000004022")) || (userRole.equalsIgnoreCase("201603000006020")) || (userRole.equalsIgnoreCase("201603000007020"))
                    || (userRole.equalsIgnoreCase("201603000008020"))) {%>
        <li class='active has-sub'><a href="#" ><span>Operation</span></a>
            <ul>
                <%if ((userRole.equalsIgnoreCase("201603000008020"))) {%>
                <li><a href="/PacsApplication/AccountRenewalBulkSTB.jsp"><span>Account Renewal Bulk Upload</span></a></li>
                <li><a href="/PacsApplication/accountAmendSTB.jsp"><span>Account Limit Update</span></a><li>
                <li><a href="/PacsApplication/CropLoanDisbursementVidyasagar.jsp" target="_blank"><span>Crop Loan Disbursement Vidyasagar</span></a><li>

                    <%} else {%>
                <li><a href="/PacsApplication/accountCreation.jsp"><span>Account Creation</span></a><li>
                <li><a href="/PacsApplication/accountRenewal.jsp"><span>Account Renewal</span></a><li>
                <li><a href="/PacsApplication/accountAmend.jsp"><span>Account Limit Update</span></a><li>
                <li><a href="/PacsApplication/transactionOperation.jsp"><span>KCC Transaction</span></a><li>
                    <%--<li><a href="/PacsApplication/kycCreation.jsp"><span>KYC Creation</span></a><li>--%>
                <li><a href="/PacsApplication/Deposit/DepositKYCCreation.jsp"><span>KYC Creation</span></a><li>
                <li><a href="/PacsApplication/mark_unmark_NPA_Operations.jsp"><span>Mark/Unmark NPA</span></a></li>
                    <%--<li class='last'><a href="/PacsApplication/AdhocReport.jsp" ><span>Adhoc Reports Generation</span></a></li>--%>
                <li class='last'><a href="/PacsApplication/FarmerDetailsUpdation.jsp" ><span>Farmer Details Updation</span></a></li>                
                <li><a href="/PacsApplication/KCCForceCapitalisation.jsp"><span>KCC Force Capitalisation</span></a></li>
                    <%}%>
            </ul>
        </li>
        <%}%>

        <%-- <%if (userRole.equalsIgnoreCase("201603000004022") || (userRole.equalsIgnoreCase("201603000006020")) || (userRole.equalsIgnoreCase("201603000007020"))) {%>
         <li class='active has-sub'><a href="#" ><span>File Upload</span></a>
             <ul>
                 <li class='last'><a href="/PacsApplication/pacsFileUpload.jsp" ><span>Upload Pacs File</span></a></li>
             </ul>
         </li>
         <%}%>--%>

        <%if (userRole.equalsIgnoreCase("201603000004023")) {%>
        <li class='active has-sub'><a href="#" ><span>EOD And SOD Operation</span></a>
            <ul>
                <li><a href="./CBSKycPosting.jsp"><span>CBS KYC Data Upload</span></a><li>
                <li><a href="./CBSDataPosting.jsp"><span>CBS Transaction Data Upload</span></a><li>
                <li><a href="./EODinttComputation.jsp"><span>EOD Interest Computation</span></a><li>
                <li><a href="./P2P_I2I_Report.jsp"><span>SAL Generation For CBS</span></a><li>
                <li class='last'> <a href="./sod.jsp"><span>SOD Activity</span></a></li>
            </ul>
        </li>
        <%}%>

        <%if ((userRole.equalsIgnoreCase("201606000004041"))) {%>
        <li><a href="#" ><span>Operation</span></a>
            <ul>
                <li class='last'><a href="/PacsApplication/Loan/LoanPrincipalAdjustment.jsp"><span>Loan Principal Adjustment</span></a></li>                
                <li><a href="/PacsApplication/Loan/amendInterest.jsp"><span>Update Interest</span></a></li>
            </ul>
        </li>
        <%}%>

        <%if (userRole.equalsIgnoreCase("201603000004022") || (userRole.equalsIgnoreCase("201603000006020")) || (userRole.equalsIgnoreCase("201603000007020"))
                    || (userRole.equalsIgnoreCase("201603000008020")) || (userRole.equalsIgnoreCase("201606000004041"))) {%>
        <li class='active has-sub'><a href="#" ><span>Reports</span></a>
            <ul>
                <%if ((userRole.equalsIgnoreCase("201603000008020"))) {%>
                <li class='last'><a href="/PacsApplication/PACS_REPORT.jsp" ><span>KCC Reports</span></a></li>
                    <%} else {%>
                    <%-- <li><a href="/PacsApplication/loanSynopsis.jsp"><span>Summary Reports</span></a><li>--%>
                <li class='last'><a href="/PacsApplication/PACS_REPORT.jsp" ><span>KCC Reports</span></a></li>                
                    <% }  %>
            </ul>
        </li>
        <%}%>
        <%if (userRole.equalsIgnoreCase("201603000004022") || (userRole.equalsIgnoreCase("201603000006020")) || (userRole.equalsIgnoreCase("201603000007020"))) {%>
        <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")) || (userRole.equalsIgnoreCase("201603000004022")) || (userRole.equalsIgnoreCase("201603000006020")) || (userRole.equalsIgnoreCase("201603000007020"))) {%>
        <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>
