<?php
  session_start();
?>
<!DOCTYPE html>
<html lang="pt-br" translate="no">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Control BD - Intersolid ERP </title>

  <!-- Google Font: Source Sans Pro -->
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css"-->
  <!-- icheck bootstrap -->
  <link rel="stylesheet" href="plugins/icheck-bootstrap/icheck-bootstrap.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="css/adminlte.min.css">
  <!-- Css do Login-->
  <link rel="stylesheet" href="css/login.css">


  <?php
    if (isset($_SESSION['Erro']) && !empty(trim($_SESSION['Erro']))) {

      $mensagemDeErro = $_SESSION['Erro'];
      echo '<script>';
      echo 'console.log("Mensagem de erro:", "' . $mensagemDeErro . '");';
      echo 'alert("' . $mensagemDeErro . '");';
      echo '</script>';
      // echo '<script>alert("' . $mensagemDeErro . '");</script>';
      unset($_SESSION['Erro']); // Remove a variável de sessão após exibição
    }
  ?>
</head>
<body id="Fundo" class="hold-transition login-page">
  <div class="logoEmp"></div>
  <div class="login-box">
    <!-- /.login-logo -->
    <div class="card card-outline card-primary">
      <div class="card-header text-center">
        <a href="#" class="h1"><b>Control BD</b> Intersolid ERP</a>
      </div>
      <div class="card-body">
        <p class="login-box-msg"></p>

        <form action="./php/Processos/ValidaLoginProcessos.php" method="post">
          <div class="input-group mb-3">
            <input type="email" class="form-control" name ="login" placeholder="Email" require>
            <div class="input-group-append">
              <div class="input-group-text">
                <span class="fas fa-envelope"></span>
              </div>
            </div>
          </div>
          <div class="input-group mb-3">
            <input type="password" class="form-control" name="senha" placeholder="Senha" require>
            <div class="input-group-append">
              <div class="input-group-text">
                <span class="fas fa-lock"></span>
              </div>
            </div>
          </div>
          <div class="row">
            <!-- /.col -->
            <div class="col-12">
              <button type="submit" class="btn btn-primary btn-block">Logar</button>
            </div>
            <!-- /.col -->
          </div>
        </form>
        <!-- /.social-auth-links -->

        <p class="mb-1">
          <a href="forgot-password.html">Esqueci a Senha</a>
        </p>
      </div>
      <!-- /.card-body -->
    </div>
    <!-- /.card -->
  </div>
<!-- /.login-box -->

<!-- jQuery -->
<script src="Sistema/plugins/jquery/jquery.min.js"></script>
<!-- Bootstrap 4 -->
<script src="../../plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- AdminLTE App -->
<script src="../../dist/js/adminlte.min.js"></script>
</body>
</html>
