<?php include("includes/header.php"); ?>
<!DOCTYPE html>
<html>
<head>
  <title><?php echo $sitename; ?> | Forget Password.</title>
  	<link rel="stylesheet" href="bootstrap/css/bootstrap.css">
  	<meta name="viewport" content="width=device-width, initial-scale=1">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
    <script src="bootstrap/js/jquery.min.js"></script>
    <script src="bootstrap/js/bootstrap.min.js"></script>
    <!----------------------------------------------------------------------->
    <link rel="icon" href="images/fav-icon.ico" type="image/x-icon" />
    <link rel="shortcut icon" href="images/fav-icon.ico" type="image/x-icon" />

    <!-- Font Awesome -->
    <link rel="stylesheet" href="font-awesome/css/font-awesome.min.css">
    
    </head>
    <style>
    body{
      background-image: url(images/signup-bg.jpg);
      background-attachment: fixed;
    }
          .login-button{
            padding: 10px 20px;
            background-color: #db0011;
            color:white;
            text-decoration: none;
          }
          .login-button:hover{
            padding: 10px 20px;
            background-color:darkred;
            color:white;
            text-decoration: none;
          }
          .input-danger{
            border:1px solid darkred;
            color:darkred;
          }
          .input-danger::placeholder{
            opacity: 0.6;
            color:darkred;
          }
        </style>

    <body>
      <?php include("includes/navbar.php"); ?>


              <br><br><br>
      <div class="container" style="margin-top: 100px;">
        <div class="row">
          <div class="col-sm-1"></div>
          <div class="col-sm-10">

            <div class="panel panel-default" id="panel-one">
              <div class="panel-body">

                <div class="progress">
                  <div class="progress-bar progress-bar-primary progress-bar-striped" role="progressbar" aria-valuenow="30"
                  aria-valuemin="0" aria-valuemax="100" style="width:30%">
                    STEP 1 OF 3
                  </div>
                </div>

                <div class="row" style="margin-top: -15px;">
                  <div class="col-md-4 col-xs-4" align="left" style="color:#337ab7; font-size: 16px;"><b>Identify</b></div>
                  <div class="col-md-4 col-xs-4" align="center" style="font-size: 16px;"><b>Verify</b></div>
                  <div class="col-md-4 col-xs-4" align="right" style="font-size: 16px;"><b>Complete</b></div>
                </div>

                <br>

                <h2 style="color: #0c2074; font-weight: bold;">How should we look for your profile?</h2>
                <p>
                  Changed your contact info within the last 3 days? If so, please search by account number.
                </p>
                <div class="list-group">
                  <a href="#" id="email-click" class="list-group-item"><i class="fa fa fa-arrow-circle-right" style="color:#d43f3a; padding:5px 5px; font-size: 18px;"></i>&nbsp; Email Address</a>
                  <a href="#" id="account_number-click" class="list-group-item"><i class="fa fa fa-arrow-circle-right" style="color:#d43f3a; padding:5px 5px; font-size: 18px;"></i>&nbsp; Account Number</a>
                </div>
              </div>
            </div>
            
            <!--================================================================================================================================-->

            <div class="panel panel-default" id="panel-two">
              <div class="panel-body">

                <div class="progress">
                  <div class="progress-bar progress-bar-primary progress-bar-striped" role="progressbar" aria-valuenow="60"
                  aria-valuemin="0" aria-valuemax="100" style="width:60%">
                    STEP 2 OF 3
                  </div>
                </div>

                <div class="row" style="margin-top: -15px;">
                  <div class="col-md-4 col-xs-4" align="left" style="font-size: 16px;"><b>Identify</b></div>
                  <div class="col-md-4 col-xs-4" align="center" style="color:#337ab7; font-size: 16px;"><b>Verify</b></div>
                  <div class="col-md-4 col-xs-4" align="right" style="font-size: 16px;"><b>Complete</b></div>
                </div>

                <br>
                <span id="output"></span>
                <br>

                <h2 style="color: #0c2074; font-weight: bold;">Tell us more about you.</h2>
                <p>
                  Fill in the forms details below
                </p>
                <div class="row">
                  <div class="col-md-4">
                    <input type="email" id="email" class="form-control input-lg" style="border:2px solid black; border-radius: 0px;" placeholder="Email" style="border-radius: 0px;">

                  </div>
                  <div class="col-md-4">
                    <button class="btn btn-danger btn-lg" id="emailsubmitbtn" style="border-radius:0px;"><i id="hide-fa" class="fa  fa-spinner fa-spin"></i> Continue</button>
                  </div>
                  <div class="col-md-4">
                  </div>
                </div>
              </div>
            </div>

            <!--================================================================================================================================-->

            <div class="panel panel-default" id="panel-three">
              <div class="panel-body">

                <div class="progress">
                  <div class="progress-bar progress-bar-primary progress-bar-striped" role="progressbar" aria-valuenow="60"
                  aria-valuemin="0" aria-valuemax="100" style="width:60%">
                    STEP 2 OF 3
                  </div>
                </div>

                <div class="row" style="margin-top: -15px;">
                  <div class="col-md-4 col-xs-4" align="left" style="font-size: 16px;"><b>Identify</b></div>
                  <div class="col-md-4 col-xs-4" align="center" style="color:#337ab7; font-size: 16px;"><b>Verify</b></div>
                  <div class="col-md-4 col-xs-4" align="right" style="font-size: 16px;"><b>Complete</b></div>
                </div>

                <br>
                <span id="output2"></span>

                <h2 style="color: #0c2074; font-weight: bold;">Tell us more about you.</h2>
                <p>
                  Fill in the forms details below
                </p>
                <div class="row">
                  <div class="col-md-4">
                    <input type="text" class="form-control input-lg" id="account_number" style="border:2px solid black; border-radius: 0px;" placeholder="Account Number" style="border-radius: 0px;">
                  </div>
                  <div class="col-md-4">
                    <button class="btn btn-danger btn-lg" id="accountnumbsubmitbtn" style="border-radius:0px;"><i id="hide-faa" class="fa  fa-spinner fa-spin"></i> Continue</button>
                  </div>
                  <div class="col-md-4">
                  </div>
                </div>
              </div>
            </div>


            <!--================================================================================================================================-->

            <div class="panel panel-default" id="panel-last">
              <div class="panel-body">

                <div class="progress">
                  <div class="progress-bar progress-bar-primary progress-bar-striped" role="progressbar" aria-valuenow="100"
                  aria-valuemin="0" aria-valuemax="100" style="width:100%">
                    STEP 3 OF 3
                  </div>
                </div>

                <div class="row" style="margin-top: -15px;">
                  <div class="col-md-4 col-xs-4" align="left" style="font-size: 16px;"><b>Identify</b></div>
                  <div class="col-md-4 col-xs-4" align="center" style="font-size: 16px;"><b>Verify</b></div>
                  <div class="col-md-4 col-xs-4" align="right" style="color:#337ab7; font-size: 16px;"><b>Complete</b></div>
                </div>

                <br>
                
                <div align="center"><i class="fa fa-check" style="color:darkgreen; font-size: 40px; padding: 20px 20px; border-radius: 100%; border: 5px solid darkgreen; "></i>
                <h3 style="color: #0c2074; font-weight: bold;">Password Reset Successfully.</h3>
                <p>
                 Your password has been successfully reset and your new password has been sent to your email account.
                </p>
              </div>
              </div>
            </div>


            <script>
              $(document).ready(function(){
                $("#hide-fa").hide();
                $("#hide-faa").hide();


                $("#panel-one").show();
                $("#panel-two").hide();
                $("#panel-three").hide();
                $("#panel-last").hide();

                $("#email-click").click(function(){
                  $("#panel-one").hide();
                  $("#panel-two").show();
                  $("#panel-three").hide();
                  $("#panel-last").hide();
                });


                $("#account_number-click").click(function(){
                  $("#panel-one").hide();
                  $("#panel-two").hide();
                  $("#panel-three").show();
                  $("#panel-last").hide();
                });

                $("#emailsubmitbtn").click(function(){

                  var email = $("#email").val();

                  if(email == ""){
                     $("#email").removeClass('form-control').addClass('form-control input-danger');
                   }else{
                    $("#email").removeClass('form-control input-danger').addClass('form-control');
                  }

                  if(email != ""){
                    $("#hide-fa").show();

                        $.ajax({
                    url:"email-forget-password.php",
                    method:"post", 
                    data:{email:email},
                    dataType: "text",
                    success: function(data) {
                      $("#output").html(data);
                    }
                    });

                  }else{

                  }

                  

                });

                $("#accountnumbsubmitbtn").click(function(){

                  var account_number = $("#account_number").val();

                  if(account_number == ""){
                     $("#account_number").removeClass('form-control').addClass('form-control input-danger');
                   }else{
                    $("#account_number").removeClass('form-control input-danger').addClass('form-control');
                  }

                  if(account_number != ""){
                    $("#hide-faa").show();

                        $.ajax({
                    url:"account_number-forget-password.php",
                    method:"post", 
                    data:{account_number:account_number},
                    dataType: "text",
                    success: function(data) {
                      $("#output2").html(data);
                    }
                    });

                  }else{

                  }
                });


              })
            </script>

          </div>
          <div class="col-sm-1"></div>
        </div>
      </div>
      <br><br><br>
      <?php // include("footer.php"); ?>
    </body>
    </html>