
<!DOCTYPE html>
<html lang="en">
  <head>

    <title> <?php echo "Master Copy | Login";?></title>

    <!-- Bootstrap -->
    <link href="<?php echo base_url(); ?>assets/vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link href="<?php echo base_url(); ?>assets/vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <!-- Animate.css -->
    <link href="https://colorlib.com/polygon/gentelella/css/animate.min.css" rel="stylesheet">

    <!-- Custom Theme Style -->
    <link href="<?php echo base_url(); ?>assets/build/css/custom.min.css" rel="stylesheet">
<style>
body {
    background-image: url("bgimage.jpg");

</style>
  </head>


  <body>
    <div>
 
     <div class="col-md-4 col-md-offset-2">
        <?php if ($this->session->flashdata('msg')): ?>
        <div class="alert alert-success">
        <?php echo $this->session->flashdata('msg'); ?>
        </div>
        <?php endif ?>
        
        <?php if ($this->session->flashdata('err-msg')): ?>
        <div class="alert alert-danger">
        <?php echo $this->session->flashdata('err-msg'); ?>
        </div>
        <?php endif ?>
        </div>   

      <div style="position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: #121212; display: flex; justify-content: center; align-items: center; font-family: 'Segoe UI', sans-serif; margin: 0;">
  <div style="background-color: #1e1e1e; padding: 40px 30px; border-radius: 15px; box-shadow: 0 4px 20px rgba(0,0,0,0.6); width: 100%; max-width: 400px;">
    <form action="<?php echo base_url(); ?>Front/update_pass" method="post">
      <div style="text-align: center; margin-bottom: 25px;">
        <span style="color: #ffffff; font-size: 28px; font-weight: bold;">Reset Password</span>
      </div>

      <div style="height: 1px; background-color: #333; margin-bottom: 20px;"></div>

      <div>
        <p id="emstatus" style="color: #ff4d4d; text-align: center; font-weight: bold;"></p>
        <input type="text" id="u_email" name="u_email" placeholder="Email" required
               style="width: 100%; padding: 12px; margin-bottom: 15px; border-radius: 8px; border: 1px solid #444; background-color: #2a2a2a; color: #fff; font-size: 16px;" />
      </div>

      <div>
        <input type="password" id="new_pass" name="new_pass" placeholder="Password" required
               style="width: 100%; padding: 12px; margin-bottom: 15px; border-radius: 8px; border: 1px solid #444; background-color: #2a2a2a; color: #fff; font-size: 16px;" />
      </div>

      <div>
        <p id="status" style="color: #ff4d4d; text-align: center; font-weight: bold;"></p>
        <input type="password" id="con_pass" name="con_pass" placeholder="Confirm Password" required
               style="width: 100%; padding: 12px; margin-bottom: 20px; border-radius: 8px; border: 1px solid #444; background-color: #2a2a2a; color: #fff; font-size: 16px;" />
      </div>

      <div style="text-align: center;">
        <button type="submit" id="send"
                style="background-color: #00acac; color: white; border: none; padding: 10px 25px; border-radius: 8px; font-size: 16px; cursor: pointer;">
          Reset
        </button>
        <div style="margin-top: 15px;">
          <a href="<?php echo base_url(); ?>User" style="color: #00acac; font-weight: bold; text-decoration: none;">Back to Login</a>
        </div>
      </div>

      <div style="margin-top: 30px; text-align: center;">
        <p style="color: #888; font-size: 13px;">©2025 All Rights Reserved. Prudmac</p>
      </div>
    </form>
  </div>
</div>

    </div>
    
    <!-- jQuery -->
    <script src="<?php echo base_url(); ?>assets/vendors/jquery/dist/jquery.min.js"></script>
    <!-- Custom JS -->
    <script src="<?php echo base_url(); ?>assets/js/main.js"></script>
      <script>
    $(document).ready(function() {
    $("#u_email").keyup(function(){
    var email = $(this).val();
    $.get("<?php echo base_url(); ?>Front/admin_email/"+email,{},function(ret){
            if(ret==1)
            {
                $("#emstatus").text("");
                $("#send").removeAttr("disabled");
            }else
            {
                 $("#emstatus").text("Email does not exist");
                 $("#send").attr("disabled", "disabled");
            }

      }); 
        }); 
}); 
    </script>
    <script>
    $(document).ready(function() {
        $("#con_pass").keyup(function(){
    var newPassword = $("#new_pass").val();
   // alert(newPassword);
    var confirmPassword = $("#con_pass").val();

    if(newPassword !== confirmPassword) {
     $("#status").text("Password do not match");
    $("#send").attr("disabled", "disabled");
    }else{
     $("#status").text("");
     $("#send").removeAttr("disabled");;
    } 
        }); 
}); 
    </script>
    <script>
    $(document).ready(function() {
        window.setTimeout(function() {
$(".alert").fadeTo(500, 0).slideUp(500, function(){
    $(this).remove(); 
});
}, 3000);



});
    </script>
  </body>
</html>