<%--
    Document   : MenuHead_SHG
    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 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");

%>

<head/><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;">
        <script data-pagespeed-no-defer>//<![CDATA[
(function(){for(var g="function"==typeof Object.defineProperties?Object.defineProperty:function(b,c,a){if(a.get||a.set)throw new TypeError("ES3 does not support getters and setters.");b!=Array.prototype&&b!=Object.prototype&&(b[c]=a.value)},h="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this,k=["String","prototype","repeat"],l=0;l<k.length-1;l++){var m=k[l];m in h||(h[m]={});h=h[m]}var n=k[k.length-1],p=h[n],q=p?p:function(b){var c;if(null==this)throw new TypeError("The 'this' value for String.prototype.repeat must not be null or undefined");c=this+"";if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var a="";b;)if(b&1&&(a+=c),b>>>=1)c+=c;return a};q!=p&&null!=q&&g(h,n,{configurable:!0,writable:!0,value:q});var t=this;function u(b,c){var a=b.split("."),d=t;a[0]in d||!d.execScript||d.execScript("var "+a[0]);for(var e;a.length&&(e=a.shift());)a.length||void 0===c?d[e]?d=d[e]:d=d[e]={}:d[e]=c};function v(b){var c=b.length;if(0<c){for(var a=Array(c),d=0;d<c;d++)a[d]=b[d];return a}return[]};function w(b){var c=window;if(c.addEventListener)c.addEventListener("load",b,!1);else if(c.attachEvent)c.attachEvent("onload",b);else{var a=c.onload;c.onload=function(){b.call(this);a&&a.call(this)}}};var x;function y(b,c,a,d,e){this.h=b;this.j=c;this.l=a;this.f=e;this.g={height:window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,width:window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth};this.i=d;this.b={};this.a=[];this.c={}}function z(b,c){var a,d,e=c.getAttribute("data-pagespeed-url-hash");if(a=e&&!(e in b.c))if(0>=c.offsetWidth&&0>=c.offsetHeight)a=!1;else{d=c.getBoundingClientRect();var f=document.body;a=d.top+("pageYOffset"in window?window.pageYOffset:(document.documentElement||f.parentNode||f).scrollTop);d=d.left+("pageXOffset"in window?window.pageXOffset:(document.documentElement||f.parentNode||f).scrollLeft);f=a.toString()+","+d;b.b.hasOwnProperty(f)?a=!1:(b.b[f]=!0,a=a<=b.g.height&&d<=b.g.width)}a&&(b.a.push(e),b.c[e]=!0)}y.prototype.checkImageForCriticality=function(b){b.getBoundingClientRect&&z(this,b)};u("pagespeed.CriticalImages.checkImageForCriticality",function(b){x.checkImageForCriticality(b)});u("pagespeed.CriticalImages.checkCriticalImages",function(){A(x)});function A(b){b.b={};for(var c=["IMG","INPUT"],a=[],d=0;d<c.length;++d)a=a.concat(v(document.getElementsByTagName(c[d])));if(a.length&&a[0].getBoundingClientRect){for(d=0;c=a[d];++d)z(b,c);a="oh="+b.l;b.f&&(a+="&n="+b.f);if(c=!!b.a.length)for(a+="&ci="+encodeURIComponent(b.a[0]),d=1;d<b.a.length;++d){var e=","+encodeURIComponent(b.a[d]);131072>=a.length+e.length&&(a+=e)}b.i&&(e="&rd="+encodeURIComponent(JSON.stringify(B())),131072>=a.length+e.length&&(a+=e),c=!0);C=a;if(c){d=b.h;b=b.j;var f;if(window.XMLHttpRequest)f=new XMLHttpRequest;else if(window.ActiveXObject)try{f=new ActiveXObject("Msxml2.XMLHTTP")}catch(r){try{f=new ActiveXObject("Microsoft.XMLHTTP")}catch(D){}}f&&(f.open("POST",d+(-1==d.indexOf("?")?"?":"&")+"url="+encodeURIComponent(b)),f.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),f.send(a))}}}function B(){var b={},c;c=document.getElementsByTagName("IMG");if(!c.length)return{};var a=c[0];if(!("naturalWidth"in a&&"naturalHeight"in a))return{};for(var d=0;a=c[d];++d){var e=a.getAttribute("data-pagespeed-url-hash");e&&(!(e in b)&&0<a.width&&0<a.height&&0<a.naturalWidth&&0<a.naturalHeight||e in b&&a.width>=b[e].o&&a.height>=b[e].m)&&(b[e]={rw:a.width,rh:a.height,ow:a.naturalWidth,oh:a.naturalHeight})}return b}var C="";u("pagespeed.CriticalImages.getBeaconData",function(){return C});u("pagespeed.CriticalImages.Run",function(b,c,a,d,e,f){var r=new y(b,c,a,e,f);x=r;d&&w(function(){window.setTimeout(function(){A(r)},0)})});})();pagespeed.CriticalImages.Run('/mod_pagespeed_beacon','http://www.ipkssupport.net/file_download.php?file_id=5840&type=bug','8Xxa2XQLv9',true,false,'LzcKrfBeU_w');
//]]></script><img src="/PacsApplication/img/PACS.jpg" width="100%" height="65px" alt="Image - PACS" data-pagespeed-url-hash="3389013925" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/>
    </div>
<!--  changed on 6/5/24
    <div id="cssmenu" style="border-bottom:0px; border-color: black; color: white; background-color: rgb(0, 120, 0); ">-->
    <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; border-radius: 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:</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 6/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("SpecialBothShg")){%>
                     <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>

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

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

            <ul>
                <li><a href="/PacsApplication/Shg_JSP/BasicInformation.jsp"><span>Basic Information</span></a></li>
                <li><a href="/PacsApplication/Shg_JSP/AddressDetails.jsp"><span>Address Details</span></a></li>
                <li><a href="/PacsApplication/Shg_JSP/ShgActivities.jsp"><span>Shg Activities</span></a></li>
                <li><a href="/PacsApplication/Shg_JSP/MemberDetails.jsp"><span>Member Details</span></a></li>
                <li><a href="/PacsApplication/Shg_JSP/AccountDetails.jsp"><span>Account Details</span></a></li>
            </ul>
        </li>
        <%}%>

        <%if (userRole.equalsIgnoreCase("201603000004022") || (userRole.equalsIgnoreCase("201606000004041")) 
                || (userRole.equalsIgnoreCase("201603000008020"))) {%>
        <li class='active has-sub'><a href="#"><span>Reports</span></a>
            <ul>
                <li><a href="/PacsApplication/Shg_JSP/shg_reports.jsp"><span>SHG Reports</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>

