<?php
require_once($_SERVER['DOCUMENT_ROOT']."/hrm/config/config.php");
require_once($_SERVER['DOCUMENT_ROOT']."/hrm/config/mail.php");
require_once($_SERVER['DOCUMENT_ROOT']."/hrm/base/recruit.php");

if (isset($_POST['fogot'])){
    forgotPassword($_POST['email']);
    $succcess = "An Email has been sent to you with your password reset information";
}

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

<head>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="description" content="">
  <meta name="author" content="">
  <link href="/hrm/views/img/logo/logo.png" rel="icon">
  <title>MNC HR CAREER PORTAL</title>
  <link href="/hrm/views/vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
  <link href="/hrm/views/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css">
  <link href="/hrm/views/css/ruang-admin.min.css" rel="stylesheet">

</head>

<body class="bg-gradient-login">
  <!-- Login Content -->
  <div class="container-login">
    <div class="row justify-content-center">
      <div class="col-xl-6 col-lg-12 col-md-9">
        <div class="card shadow-sm my-5">
          <div class="card-body p-0">
            <div class="row">
              <div class="col-lg-12">
                <div class="login-form">
                  <div class="text-center">
                   <img style="width: 200px; height: 100px" src="/hrm/views/img/logo/logo.png" >
                   <hr>

                   <?php
                   
                   if(count($errors)> 0){
                    echo '
                    <div class="alert alert-danger alert-dismissible" role="alert">
                    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                      <span aria-hidden="true">&times;</span>
                    </button>
                    '.$errors[0].'
                  </div>
                    ';
                    errorsP($errors);
                    success($succcess);
                }
                   ?>
                    <!-- <h1 class="h4 text-gray-900 mb-4">Login</h1> -->
                    
                  </div>
                  <form class="user" action="" method="POST">
                    <div class="form-group">
                      <input type="email" class="form-control" id="exampleInputEmail" name="email"
                        placeholder="Enter your Email to Reset your Password">
                    </div>
                   
                    <div class="form-group">
                      <input type="submit" value="submit" class="btn btn-primary btn-block" name="fogot">
                    </div>

                    
                   
                 
                  </form>
                  <hr>
                  
                  <div class="text-center">
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <!-- Login Content -->
  <script src="/hrm/views/vendor/jquery/jquery.min.js"></script>
  <script src="/hrm/views/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
  <script src="/hrm/views/vendor/jquery-easing/jquery.easing.min.js"></script>
  <script src="/hrm/views/js/ruang-admin.min.js"></script>
  <script>
    function myFunction() {
  var x = document.getElementById("pds");
  if (x.type === "password") {
    x.type = "text";
  } else {
    x.type = "password";
  }
}
  </script>
</body>

</html>