<%-- 
    Document   : ResetPassword
    Created on : Jun 19, 2018, 5:18:08 PM
    Author     : 1242938
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<html>
    <head>
        <title>Reset Password</title>
         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script src="${pageContext.request.contextPath}/js/Calendar.js?pacs=<%=((new java.util.Date()).getTime())%>"></script>
        <link rel="stylesheet" type="text/css" href="/PacsApplication/css/TableCSSCode.css?pacs=<%=((new java.util.Date()).getTime())%>" />
        <link rel="shortcut icon" href="${pageContext.request.contextPath}/img/favicon.ico?pacs=<%=((new java.util.Date()).getTime())%>" type="image/x-icon" />
        <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())%>" />
        <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>
         <%
             String error_msg = "";
             Object error = request.getAttribute("error");
             if (error != null) {
                 error_msg = error.toString();%>

            <% }

        %>

         <script type="text/javascript">
            function noBack()
            {
                window.history.forward();
            }
            function ShowParent()
            {
                document.forms[0].action = "${pageContext.request.contextPath}/Deposit/ResetPassword.jsp";
                document.forms[0].submit();
            }
            function submitform()
            {
                if (document.getElementById("userId").value=="") {
                    alert('User Id cannot be blank.');
                    document.getElementById("userId").focus();
                    return false;
                }
                    document.ResetPassword.action = '/PacsApplication/resetPasswordServlet';
                    document.ResetPassword.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 >
        <%
                    String ModuleName = new String();

                    ModuleName = (String) session.getAttribute("moduleName");
                    String role = (String) session.getAttribute("userRole");
                    String pacsId = (String) session.getAttribute("pacsId");
                    
        %>
        <% 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" />
        <%}%>
        <br>

        <center>
            <div id="resetLoginId" style="display:block;">
            <fieldset style="border-color: black; background-image: url('/PacsApplication/img/download.jpg'); border-width: 3px">
                <legend style="padding: 8px; border-radius: 20px; background-color: #006600; color: white">Reset To Default Password</legend>
                
            <div><p><font face="Trebuchet MS" color="Green" size="5">Use this feature to reset password of the user.</font></p></div>
            <br>
            <form name="ResetPassword" id="ResetPassword" method="post" action="">
                <table border="0" cellspacing="1" cellpadding="2">
                    <tbody>

                        <tr>
                            <td align="left">User Id:</td>
                            <td align="left"><input type="text" name="userId" id="userId" placeholder="Enter User Id"/></td>
                        </tr>                       
                        <tr>
                            <td>&nbsp;</td>
                            <td>&nbsp;</td>
                        </tr>
                        <tr>
                            <td colspan="2" align="right">
                                <input type="button" value="Submit" id="Submit" onclick="submitform();" />
                                <input type="button" value="Reset" id="Reset" onclick="ShowParent();" />                               
                            </td>                           
                        </tr>
                    </tbody>
                </table>
                <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="Blue" ><b><%= error_msg%> </b></font><br>
            </form>
            </fieldset>
           </div>
        </center>
    </body>
</html>
