<!DOCTYPE html>
<html lang="PT_BR">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Longin Fábrica</title>
    
    <link
      rel="shortcut icon"
      href="https://pbs.twimg.com/profile_images/674285053107707904/DffC3jYg_400x400.png"
      type="image/x-icon"
    />

    <link rel="stylesheet" href="https://unicons.iconscout.com/release/v4.0.0/css/line.css">

    <link rel="stylesheet" href="../style/style.css">

</head>
<body>

    <div class="conteiner">

        <div class="conteiner-box">

        <div class="divider"></div>

            <form method="post" action="./login.php">

               

                <h2>Login Fábrica</h2>    

                <label for="email" class="sr-only">E-mail</label>
                <input type="email" name="userEmail" id="email" placeholder="Infome seu e-mail" required>
                <br>
                <label for="password" class="sr-only">Senha</label>
                <input type="password" name="userPass" id="password" placeholder="Infome sua senha" required>
                <i class="uil uil-eye"></i>

                <br>
                

                <input type="submit" >

                <p>Não é registrado? <a href="./cadastro.php">Criar sua conta</a>.</p>

            </form>

            

        </div>


    </div>

    <?php

        if(isset($_POST['userEmail']) == true && isset($_POST['userPass']) == true) {

            $email = $_POST['userEmail'];
            $senha = $_POST['userPass'];

            if($email == "luciene@gmail.com" && $senha == "123") {
                header("location:/fabrica-de-software/frontend/views/form-facil.html");
            } else {
                echo "<p class='error'>E-mail ou senha inválidos<p>";
            }



        }


    ?>

    <script src="../src/main.js"></script>
    
</body>
</html>