<?php
  session_start();
  include_once"includes/conn.php";
  include_once"functions/Error.php";
?>
<!doctype html>
<html lang="en">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/main.css">
    <link rel="stylesheet" href="css/reg.css">
    <link rel="stylesheet" href="css/animate.css">
    <link rel="stylesheet" media="screen and (max-width:947px)" type="text/css" href="css/medium.css">
  <link rel="stylesheet" media="screen and (min-width:801px) and (max-width:946px)" type="text/css" href="css/smaller.css">
  <link rel="stylesheet" media="screen and (min-width:547px) and (max-width:800px)" type="text/css" href="css/small.css">
  <link rel="stylesheet" media='screen and (max-width:546px)' type="text/css" href="css/xtrasmall.css">
  <link href='bootstrap/css/bootstrap.min.css' rel='stylesheet'>  

    <title> Tropical Shipping Company | Sign in</title>
  </head>
  <body>
  <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
    <a class="navbar-brand" href="#"> Tropical Shipping Company 
</a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo02" aria-controls="navbarTogglerDemo02" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>

    <div class="collapse navbar-collapse" id="navbarTogglerDemo02">
      <ul class="navbar-nav mr-auto mt-2 mt-lg-0">
        <li class="nav-item">
          <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
        </li>
      </ul>
      <ul class="nav navbar-nav">
          
      <li class="nav-item">
          <a class="nav-link " href="form.php">Mailer</a>
        </li>
      <li class="nav-item">
          <a class="nav-link " href="register.php">Add Admin</a>
        </li>
        <li class="nav-item active">
          <a class="nav-link" href="#">Login</a>
        </li>
      </ul>
    </div>
  </nav>
    <div id="reg-cover"><br>
      <div class="container">
        <div class="row">
          <div class="col-lg-12">
            <div class="form-cov animated flipInY">
            <span><img src="img/logor.png"></span>
            <h5 class="display-">Login to your account</h5>
            <div class="alert alert-danger <?php
                            if (isset($_SESSION['er'])) {
                                echo "sr-only1";
                            }else{
                                echo "sr-only";
                            }
                            ?>">
                                <center><strong> <?php
                            if (isset($_SESSION['er']) && $_SESSION['er'] !== NULL) {
                                if ($_SESSION['er'] == 'emp') {
                                    EmptyField1($conn);
                                    $_SESSION['er'] = NULL;
                                }elseif ($_SESSION['er'] == 'inv') {
                                    invalidAcc1($conn);
                                    $_SESSION['er'] = NULL;
                                }
                            }
                            ?> </strong></center>
                            </div>
            <div>
              <form method="POST" action="LoginAction.php" class="form-group">
                <div class="form-group">
                  <input class="form-control" type="text" name="uname" placeholder="Username">
                </div>
                <div class="form-group">
                  <input class="form-control" type="password" name="pword" placeholder="Password">
                </div>
                <button name="Login" class="btn btn-dark btn-block"> Login</button>
                <p>Need More Admin? <a href="register.php"> Add Admin </a></p>
              </form>
            </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="footer bg-dark">
      <div class="container">
        <span class=""> Tropical Shipping Company </span>
      </div>
    </div>
    <!-- Optional JavaScript -->
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
    <script src="js/jquery.js"></script>
    <script src="js/bootstrap.min.js"></script>
  </body>
</html>