<?php
    if(ENVIRONNEMENT == "DEV"){
        $titleHead = "<span class=\"badge\" style=\"background-color:red;\">DEV</span>";
    } elseif(ENVIRONNEMENT == "R7"){
        $titleHead = "<span class=\"badge\" style=\"background-color:red;\">R7</span>";
    } elseif(ENVIRONNEMENT == "PREPROD"){
        $titleHead = "<span class=\"badge\" style=\"background-color:red;\">PREPROD</span>";
    } elseif(ENVIRONNEMENT == "PROD"){
        $titleHead = "";
    }

    if(debug::isFile("debug")){
        $titleDebug = "<span class=\"badge\" style=\"background-color:red; margin-top:5px;\">MODE DEBUG</span>";
    } else {
        $titleDebug = "";
    }
?>
<main class="login">
    <div class="login-form">
        <img src="img/logo-control.png" alt="logo">
        <form id="formLogin">
            <?php echo "<div style=\"margin: -65px 0 0 2em; position: fixed;\">" . $titleHead . $titleDebug . "</div>"; ?>
            <div style="margin-bottom: -20px; display: none;" id="divAlerte"></div>
            <input type="hidden" id="from" name="from" value="login">
            <input type="hidden" id="event" name="event" value="<?php echo (core::ifGet("e")) ? core::getGet("e") : ""; ?>">
            <div>
                <label for="email">Email</label>
                <input type="text" aria-label="Email" id="email" name="email" required>
            </div>
            <div>
                <label for="password">Mot de passe</label>
                <input type="password" aria-label="Mot de passe" id="password" value="" name="password" required>
            </div>
            <div>
                <button type="submit" id="submitLogin">Se connecter</button>
            </div>
        </form>
    <div>
    <script src="js/login-control.js"></script>
</main>