<?php
session_start();
if (isset($_SESSION['username'])) {
    header("location:../index.php");
}
?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Login</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- Bootstrap -->
    <link href="../css/bootstrap.css" rel="stylesheet" media="screen">
    <!-- <link href="../css/main.css" rel="stylesheet" media="screen"> -->
    <script type="text/javascript" src="js/mask.js"></script>
  </head>

  <body>
    <div class="container">

      <img style="display: block; margin-left: auto; margin-right: auto; margin-top:50px;" src="images/login.png">
      <form class="form-signin text-center" name="form1" method="post" action="checklogin.php" style="width: 40vw; margin-left: auto; margin-right: auto; margin-top:50px;">
        <h2 class="form-signin-heading">Login</h2>
        <input name="myusername" id="myusername" type="text" class="form-control" placeholder="Cpf sem traços ou ponto" onkeydown="javascript: fMasc( this, mCPF );" autofocus>
        <input name="mypassword" id="mypassword" type="password" class="form-control" placeholder="Senha"><br/>
        <!-- The checkbox remember me is not implemented yet...
        <label class="checkbox">
          <input type="checkbox" value="remember-me"> Remember me
        </label>
        -->
        <button name="Submit" id="submit" class="btn btn-lg btn-primary btn-block" type="submit">Fazer Login</button>
        <a href="signup.php" class="btn btn-lg btn-primary btn-block">Criar conta</a>

        <div id="message"></div>
      </form>

    </div> <!-- /container -->

    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="js/jquery-2.2.4.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script type="text/javascript" src="js/bootstrap.js"></script>
    <!-- The AJAX login script -->
    <script src="js/login.js"></script>

  </body>
</html>
