<?php 
session_start();

?>
<!DOCTYPE html>
<html>

<head>
 
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, shrink-to-fit=no" name="viewport">
  <title>Login</title>
  <!-- General CSS Files -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>

    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<link rel="stylesheet" href="assets/css/app.min.css">
  <link rel="stylesheet" href="assets/bundles/bootstrap-social/bootstrap-social.css">
  <!-- Template CSS -->
  <link rel="stylesheet" href="assets/css/style.css">
  <link rel="stylesheet" href="assets/css/components.css">
  <!-- Custom style CSS -->


  <!-- General JS Scripts -->
  <script src="assets/js/app.min.js"></script>
  
  
  <!-- Custom style CSS -->
  <link rel='shortcut icon' type='image/x-icon' href='assets/images/logo.jpeg' />


  <!-- General JS Scripts -->
 

  <style>
 
 </style>
</head>

<body class="background-image-body">
 <img alt="image" src="assets/images/logo.jpeg" style="width: 110px; height: 75px; " /><a href="registration.php"><button type="" class="btn btn-light" style="float: right">Registration</button></a>
  <div id="app">
    <section class="section">
      <div class="container" style="margin-top: 125px;">
        <div class="row ">
          <div class="col-12 col-sm-8 offset-sm-2 col-md-6 offset-md-3 col-lg-6 offset-lg-3 col-xl-4 offset-xl-4">
            <div class="login-brand login-brand-color">
            	
            </div>
            <div class="card card-auth">
              <div class="card-header card-header-auth">
                <h4>Login</h4>
              </div>
              <div class="card-body">
                 <?php if (isset($_SESSION['msg_scs'])): ?>
            <p class="alert alert-success"><?= $_SESSION['msg_scs'];?></p>
          <?php endif ?>
          <?php unset($_SESSION['msg_scs']);?>
         
          <?php if (isset($_SESSION['msg_err'])): ?>
            <p class="alert alert-danger"><?= $_SESSION['msg_err'];?></p>
          <?php endif ?>
          <?php unset($_SESSION['msg_err']);?>
                <form method="post" class="needs-validation" novalidate="" action="forgot_password.php">
                  <div class="form-group">
                    <label for="user">Username or Email</label>
                    <input  type="text" class="form-control" name="email" tabindex="1" required autofocus>
                    <div class="invalid-feedback">
                      Please fill in your email
                    </div>
                  </div>
                  
               
                  <div class="form-group">
                    <button name="mail" id="login" type="submit" class="btn btn-lg btn-block btn-danger"  tabindex="4">
                      Send Mail
                    </button>
                  </div>
                </form>
                <script>
                  $(document).ready(function(){
                      $('#login').on('click', function(){
                          var user = $('#user');
                          var pass = $('#password');
                            if (user.val() == '') {
                                user.css('border', '1px solid red');
                                alert("Username or Email Required");
                                return false;
                            }
                            else if (pass.val() == '') {
                                pass.css('border', '1px solid red');
                                alert("Password Required");
                                return false;
                            }
                            else{
                              return true;
                            }

                      });
                  });
                </script>
          
           
          </div>
        </div>
      </div>
    </section>
  </div>
  
 
  
</body>

</html>