<?php
// (A) LOGIN CHECKS
require "./check.php";

// (B) LOGIN PAGE HTML ?>
<!DOCTYPE html>
<html>
  <head>
    <title>Login</title>
    <link href="/camp-view/login.css" rel="stylesheet">
  </head>
  <body>
    <?php if (isset($failed)) { ?>
    <div id="login-bad">Usuário ou senha incorreta.</div>
    <?php } ?>

    <form id="login-form" method="post" target="_self">
      <h1>Login</h1>
      <label for="user">Usuário</label>
      <input type="text" name="user" required>
      <label for="password">Senha</label>
      <input type="password" name="password" required>
      <input type="submit" value="Logar">
    </form>
  </body>
</html>