<%--
    Document   : NotificationReport
    Created on : Nov 13, 2020, 5:28:24 PM
    Author     : 1242938
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta charset="utf-8" />
        <title>Notification Reports</title>
        <link rel="shortcut icon" href="img/favicon.ico?pacs=<%=((new java.util.Date()).getTime())%>" type="image/x-icon" />
        <link rel="shortcut icon" href="/PacsApplication/img/favicon.ico?pacs=<%=((new java.util.Date()).getTime())%>" type="image/x-icon" />
        <script type="text/javascript">
            function noBack()
            {
                window.history.forward();
            }
        </script>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" type="text/css" href="/PacsApplication/css/styles.css?pacs=<%=((new java.util.Date()).getTime())%>"/>
        <link rel="stylesheet" type="text/css" href="/PacsApplication/css/ButtonAndText.css?pacs=<%=((new java.util.Date()).getTime())%>" />
        <link rel="stylesheet" type="text/css" href="/PacsApplication/css/info.css?pacs=<%=((new java.util.Date()).getTime())%>" />
        <link rel="stylesheet" type="text/css" href="/PacsApplication/css/wrapper.css?pacs=<%=((new java.util.Date()).getTime())%>"/>
        <link rel="stylesheet" type="text/css" href="/PacsApplication/bootstrap/css/bootstrap.min.css?pacs=<%=((new java.util.Date()).getTime())%>"/>
        <script type="text/javascript" src="${pageContext.request.contextPath}/jquery-ui-1.10.4.custom/development-bundle/jquery-1.10.2.js?pacs=<%=((new java.util.Date()).getTime())%>"></script>
        <script type="text/javascript" src="/PacsApplication/chromejs/chrome.js?pacs=<%=((new java.util.Date()).getTime())%>"></script>
        <script type="text/javascript" src="/PacsApplication/js/iFrame_killer.js"></script>
        <script type="text/javascript" src="/PacsApplication/js/jquery-migrate-1.0.0.js"></script>
        <%--    <script src="http://code.jquery.com/jquery-migrate-1.0.0.js"></script>--%>

        <style>
            /* The snackbar - position it at the bottom and in the middle of the screen */
#snackbar {
    visibility: hidden; /* Hidden by default. Visible on click */
    min-width: 200px; /* Set a default minimum width */
    margin-left: -125px; /* Divide value of min-width by 2 */
    background-color: #333; /* Black background color */
    color: #fff; /* White text color */
    text-align: center; /* Centered text */
    border-radius: 2px; /* Rounded borders */
    padding: 16px; /* Padding */
    position: fixed; /* Sit on top of the screen */
    z-index: 1; /* Add a z-index if needed */
    left: 89%; /* Center the snackbar */
    bottom: 100px; /* 30px from the bottom */
}

#snackbar2 {
    visibility: hidden; /* Hidden by default. Visible on click */
    min-width: 200px; /* Set a default minimum width */
    margin-left: -125px; /* Divide value of min-width by 2 */
    background-color: #333; /* Black background color */
    color: #fff; /* White text color */
    text-align: center; /* Centered text */
    border-radius: 2px; /* Rounded borders */
    padding: 16px; /* Padding */
    position: fixed; /* Sit on top of the screen */
    z-index: 1; /* Add a z-index if needed */
    left: 12%; /* Center the snackbar */
    bottom: 100px; /* 100px from the bottom */
}
#snackbar3 {
    visibility: hidden; /* Hidden by default. Visible on click */
    min-width: 200px; /* Set a default minimum width */
    margin-left: -125px; /* Divide value of min-width by 2 */
    background-color: #333; /* Black background color */
    color: #fff; /* White text color */
    text-align: center; /* Centered text */
    border-radius: 2px; /* Rounded borders */
    padding: 16px; /* Padding */
    position: fixed; /* Sit on top of the screen */
    z-index: 1; /* Add a z-index if needed */
    left: 12%; /* Center the snackbar */
    bottom: 100px; /* 100px from the bottom */
}
#notiButton {

    min-width: 100px; /* Set a default minimum width */
    margin-left: -125px; /* Divide value of min-width by 2 */
    background-color: #333; /* Black background color */
    color: #fff; /* White text color */
    text-align: center; /* Centered text */
    border-radius: 2px; /* Rounded borders */
    padding: 16px; /* Padding */
    position: fixed; /* Sit on top of the screen */
    z-index: 1; /* Add a z-index if needed */
    left: 95%; /* Center the snackbar */
    bottom: 30px; /* 30px from the bottom */
}

#dReport {

    min-width: 100px; /* Set a default minimum width */
    margin-left: -125px; /* Divide value of min-width by 2 */
    background-color: #333; /* Black background color */
    color: #fff; /* White text color */
    text-align: center; /* Centered text */
    border-radius: 2px; /* Rounded borders */
    padding: 16px; /* Padding */
    position: fixed; /* Sit on top of the screen */
    z-index: 1; /* Add a z-index if needed */
    left: 12%; /* Center the snackbar */
    bottom: 35px; /* 30px from the bottom */
}
#dReport2 {

    min-width: 100px; /* Set a default minimum width */
    margin-left: -125px; /* Divide value of min-width by 2 */
    background-color: #333; /* Black background color */
    color: #fff; /* White text color */
    text-align: center; /* Centered text */
    border-radius: 2px; /* Rounded borders */
    padding: 16px; /* Padding */
    position: fixed; /* Sit on top of the screen */
    z-index: 1; /* Add a z-index if needed */
    left: 28%; /* Center the snackbar */
    bottom: 35px; /* 30px from the bottom */
}
#footer {
        width:100%;
        height:100px;
        position:fixed;
        padding-top: 100px;
        left: 0;
        padding-bottom:100px;        
/*      position: fixed;
        padding: 10px 10px 0px 10px;
        bottom: 0;
        left: 0;
        right: 0;*/
        /*height: 40px; Height of the footer*/
        /* background: #8dce09; 57EE0B; #B5FF33*/    
}
/* Show the snackbar when clicking on a button (class added with JavaScript) */
#snackbar.show {
    visibility: visible; /* Show the snackbar */
    /* Add animation: Take 0.5 seconds to fade in and out the snackbar.
   However, delay the fade out process for 2.5 seconds */
   -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
   animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

#snackbar2.show {
    visibility: visible; /* Show the snackbar */
    /* Add animation: Take 0.5 seconds to fade in and out the snackbar.
   However, delay the fade out process for 2.5 seconds */
   -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
   animation: fadein 0.5s, fadeout 0.5s 2.5s;
}
#snackbar3.show {
    visibility: visible; /* Show the snackbar */
    /* Add animation: Take 0.5 seconds to fade in and out the snackbar.
   However, delay the fade out process for 2.5 seconds */
   -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
   animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

/* Animations to fade the snackbar in and out */
@-webkit-keyframes fadein {
    from {bottom: 60; opacity: 0;}
    to {bottom: 100px; opacity: 1;}
}

@keyframes fadein {
    from {bottom: 60; opacity: 0;}
    to {bottom: 100px; opacity: 1;}
}

@-webkit-keyframes fadeout {
    from {bottom: 100px; opacity: 1;}
    to {bottom: 60; opacity: 0;}
}

@keyframes fadeout {
    from {bottom: 100px; opacity: 1;}
    to {bottom: 60; opacity: 0;}
}
</style>
        <script>
             $(document).ready(function() {
                 
            $.ajax({
                url:'/PacsApplication/WelcomeServlet',
                data:{"temp":"search"},
                type:'post',
                cache:false,
                success:function(data){
                    
                    $("#pQ").text(data.pQue);
                    $("#aQ").text(data.aQue);
                    $("#rQ").text(data.rQue);
                    $("#cIn").text(data.cIn);
                    $("#cOt").text(data.cOut);
                    $("#cDf").text(data.cDf);
                    $("#iQ").text(data.iQ);
                    $("#cinH").text(data.cinH);
                    $("#iQ2").text(data.iQ2);

                },
                error:function(){
                    $("#pQ").text(0);
                    $("#aQ").text(0);
                    $("#rQ").text(0);
                    $("#cIn").text(0);
                    $("#cOt").text(0);
                    $("#cDf").text(0);
                    $("#iQ").text(0);
                    $("#cinH").text(0);
                    $("#iQ2").text(0);
                }
            }
             );         
        });         
//            $(function() {
//             $('marquee').mouseover(function() {
//                $(this).attr('scrollamount',0);
//                }).mouseout(function() {
//                $(this).attr('scrollamount',5);
//                });
//              });
//
//            $( document ).ready(function() {
//                $(document).on('click','.est_btn',function(event){
//                    if( $('.est_btn').index(this) == 0 ){
//                        document.location.href="/PacsApplication/KCCSevlet";
//                    }else if($('.est_btn').index(this) == 1){
//                        document.location.href="/PacsApplication/TradingSevlet";
//                    }else if($('.est_btn').index(this) == 2){
//                        document.location.href="/PacsApplication/AssetServlet";
//                    <%--}else if($('.est_btn').index(this) == 3){
                        document.location.href="/PacsApplication/PDSServlet";--%>//
//                    }else if($('.est_btn').index(this) == 4){
//                        document.location.href="/PacsApplication/SHGServlet";
//                   <%-- }else if($('.est_btn').index(this) == 5){
                        document.location.href="/PacsApplication/GPSServlet";--%>//
//                    }else if($('.est_btn').index(this) == 6){
//                        document.location.href="/PacsApplication/MISDashboardSevlet";
//                    }else if($('.est_btn').index(this) == 7){
//                        document.location.href="/PacsApplication/DepositServlet";
//                    }else if($('.est_btn').index(this) == 8){
//                        document.location.href="/PacsApplication/LoanServlet";
//                    }else if($('.est_btn').index(this) == 9){
//                        document.location.href="/PacsApplication/ShareServlet";
//                    <%--}else if($('.est_btn').index(this) == 10){
                        document.location.href="/PacsApplication/SODEODServlet";--%>//
//                    }
//                });
//            });
          
            $(function() {
               // if ($.browser.msie && $.browser.version.substr(0,1)<7)
               // {
                    $('li').has('ul').mouseover(function(){
                        $(this).children('ul').css('visibility','visible');
                    }).mouseout(function(){
                        $(this).children('ul').css('visibility','hidden');
                    })
                //}
            });

            var repeater;
            
    function myFunction() 
    {
    // Get the snackbar DIV
    var x = document.getElementById("snackbar");
    // Add the "show" class to DIV
    x.className = "show";
    // After 3 seconds, remove the show class from DIV
    setTimeout(function(){ x.className = x.className.replace("show", ""); }, 3000);
    }

 function myFunction2() {
    var y = document.getElementById("snackbar2");
    y.className = "show";
    setTimeout(function(){ y.className = y.className.replace("show", ""); }, 3000);
}

function myFunction3() {
    var y = document.getElementById("snackbar3");
    y.className = "show";
    setTimeout(function(){ y.className = y.className.replace("show", ""); }, 3000);
}

    function downloadReport()
    {
                        var formDownloadReport = document.getElementById("reportForm");
                        formDownloadReport.reportPath.value = "/Reports/investment_mat_report";
                        formDownloadReport.reportName.value = "investment_mat_report";
                        formDownloadReport.DOWNLOAD.value = "P";
                        formDownloadReport.action = '/PacsApplication/ExcelReportServlet';
                        formDownloadReport.submit();
    }
    function downloadReport2()
    {
                        var formDownloadReport = document.getElementById("reportForm3");
                        formDownloadReport.reportPath.value = "/Reports/nsckvp_exp_report";
                        formDownloadReport.reportName.value = "NSC_KVP_Exp_Report";
                        formDownloadReport.DOWNLOAD.value = "P";
                        formDownloadReport.action = '/PacsApplication/ExcelReportServlet';
                        formDownloadReport.submit();
    }
    
    // to restrict back button
            history.pushState(null, null, location.href);
            window.addEventListener('popstate', function(event) {
                history.pushState(null, null, location.href);
            });
    
    </script>
    </head>
    <body onload="noBack()">
        <%
                    String ModuleName = new String();

                    ModuleName = (String) session.getAttribute("moduleName");
                    String role = (String) session.getAttribute("userRole");
                    String pacsId = (String) session.getAttribute("pacsId");
                    String holidayList = (String) session.getAttribute("holidayList");
                    
        %>
        <% if (ModuleName.equalsIgnoreCase("KCC")) {%>
        <jsp:include page="/MenuHead.jsp" flush="true" /><%--
        <%} else if (ModuleName.equalsIgnoreCase("pds")) {%>
        <jsp:include page="/Pds_JSP/MenuHead_PDS.jsp" flush="true" />--%>
        <%} else if (ModuleName.equalsIgnoreCase("trading")) {%>
        <jsp:include page="/Trading_JSP/MenuHead_TRADING.jsp" flush="true" />
        <%} else if (ModuleName.equalsIgnoreCase("asset")) {%>
        <jsp:include page="/Asset_JSP/MenuHead_ASSET.jsp" flush="true" /><%--
        <%} else if (ModuleName.equalsIgnoreCase("governance")) {%>
        <jsp:include page="/GPS_JSP/MenuHead_GPS.jsp" flush="true" />--%>
        <%} else if (ModuleName.equalsIgnoreCase("dashboard")) {%>
        <jsp:include page="MenuHead_DASHBOARD.jsp" flush="true" />
        <%} else if (ModuleName.equalsIgnoreCase("shg")) {%>
        <jsp:include page="/Shg_JSP/MenuHead_SHG.jsp" flush="true" />
        <%} else if (ModuleName.equalsIgnoreCase("Deposit")) {%>
        <jsp:include page="/Deposit/MenuHead_Deposit.jsp" flush="true" />
        <%} else if (ModuleName.equalsIgnoreCase("Loan")) {%>
        <jsp:include page="/Loan/MenuHead_Loan.jsp" flush="true" /><%--
        <%} else if (ModuleName.equalsIgnoreCase("eod")) {%>
        <jsp:include page="MenuHead_EOD.jsp" flush="true" />--%> 
        <%} else if (ModuleName.equalsIgnoreCase("dds")) {%>
        <jsp:include page="/DDS/MenuHead_DDS.jsp" flush="true" />
        <%} else if (ModuleName.equalsIgnoreCase("share")) {%>
        <jsp:include page="/Share_Module/MenuHead_Share.jsp" flush="true" />
        <%}else if (ModuleName.equalsIgnoreCase("Special")) {%>
        <jsp:include page="/Deposit/MenuHead_Deposit.jsp" flush="true" />
        <%}else if (ModuleName.equalsIgnoreCase("SpecialKcc")) {%>
        <jsp:include page="/MenuHead.jsp" flush="true" />
        <%}else if (ModuleName.equalsIgnoreCase("SpecialBoth")) {%>
        <jsp:include page="/Deposit/MenuHead_Deposit.jsp" flush="true" />
        <%}else if (ModuleName.equalsIgnoreCase("SpecialBothKcc")) {%>
        <jsp:include page="/MenuHead.jsp" flush="true" />
        <%}else if (ModuleName.equalsIgnoreCase("SpecialBothDep")) {%>
        <jsp:include page="/Deposit/MenuHead_Deposit.jsp" flush="true" />
        <%}else {%>
        <jsp:include page="/MenuHead.jsp" flush="true" />
        <%}%>
        
                   
<% if(role.equalsIgnoreCase("201606000004041")) {     %>
            <!-- Use a button to open the snackbar -->
<button id="notiButton" onmouseover="repeater=setInterval(myFunction(), 100);" onmouseout="clearInterval(repeater);">Show Notification</button>

<% if(!ModuleName.equalsIgnoreCase("Special")) { %>
<button id="dReport" onmouseover="repeater=setInterval(myFunction2(), 100);" onmouseout="clearInterval(repeater);" onclick="downloadReport();">Download Investment Report</button>
<%} %>

<% if(!ModuleName.equalsIgnoreCase("Special")) { %>
<button id="dReport2" onmouseover="repeater=setInterval(myFunction3(), 100);" onmouseout="clearInterval(repeater);" onclick="downloadReport2();">NSC KVP LIC Certificate Expiry Report</button>
<%} %>

 <%} %>
<input type="hidden" name="roleId" id="roleId" value="<%=role%>"/>
<input type="hidden" name="pacsId" id="pacsId" value="<%=pacsId%>"/>
                  
<!-- The actual snackbar -->
<div id="snackbar">
     <table >
                            <tr>
                                <td style="text-align: left">Pending Queues: </td>
                                <td><span id="pQ"> </span></td>
                            </tr>
                            <tr>
                                <td style="text-align: left">Authorised Queues. </td>
                                <td><span id="aQ"> </span></td>
                            </tr>
                             <tr>
                                <td style="text-align: left">Rejected Queues. </td>
                                <td><span id="rQ"> </span></td>
                            </tr>
                             <tr>
                                <td style="text-align: left">Cash In </td>
                                <td><span id="cIn"> </span></td>
                            </tr>
                             <tr>
                                <td style="text-align: left">Cash Out </td>
                                <td><span id="cOt"> </span></td>
                            </tr>
                             <tr>
                                <td style="text-align: left">Cash In/Out Diff </td>
                                <td><span id="cDf">  </span></td>
                            </tr>
                            <tr>
                                <td style="text-align: left">Cash In hand </td>
                                <td><span id="cinH">  </span></td>
                            </tr>
                            
       </table>
</div>

<div id="snackbar2">
    <form name="reportForm" method="post" action="" id="reportForm">
     <table>
               <tr>
                  <td style="text-align: left">Investments to be matured within 15 days: </td>
                  <td><span id="iQ"> </span></td>
                </tr>
    </table>
           <input type="hidden" name="reportPath" value=""/>
           <input type="hidden" name="reportName" value=""/>
           <input type="hidden" name="DOWNLOAD" value=""/>
    </form>
</div>

<div id="snackbar3">
    <form name="reportForm3" method="post" action="" id="reportForm3">
     <table>
               <tr>
                   <td style="text-align: left">NSC KVP Certificate to be expired within 15 days: </td>
                   <td><span id="iQ2"> </span></td>
               </tr>
    </table>
           <input type="hidden" name="reportPath" value=""/>
           <input type="hidden" name="reportName" value=""/>
           <input type="hidden" name="DOWNLOAD" value=""/>
    </form>
</div>
           
</body>

</html>
