<?php require APPROOT . '/views/inc/header.php'; ?>

<div style="background-image: url(<?php echo URLROOT2 ;?>'/public/images/bg.jpg');" class="col-lg-12 bg-light">

<img src="<?php echo URLROOT2 ;?>/public/images/logo.png" class="img-fluid" alt="Responsive image" />

</div>

<div class="row">

<div style="background-color: #003366;" class="col-12 text-center text-white">

<h2><?php echo SITE_EMP ;?></h2>

</div>

</div>



<div class="row">

    <div class="col-md-6 mx-auto">

        <div class="card bg-light mt-5">

            <div class="card-header card-text" style="background-color: #006600;color:#FFFFFF;">

                <?php flash('register_success'); ?>

                <h2 class="card-text">Control de Acceso Instructores</h2>

<!--            <p class="card-text">Escriba su usuario y la contrase&ntilde;a.</p>  -->

            </div>

<?php

if (isset($_SESSION["k_msj"])){

?>

<div class="col-12 text-center">

<div class="alert alert-danger" role="alert">

<b><?php

echo $_SESSION["k_msj"];

unset($_SESSION["k_msj"]);

?></b>

</div>

</div>

<?php

}

?>

            <div class="card-body">

                <form method="post" action="<?php echo URLROOT2 ;?>/users/login">

                    <div class="form-group">

                        <label for="email">Usuario:</label>

                        <input type="text" name="email" class="form-control form-control-lg <?php echo (!empty($data['email_err'])) ? 'is-invalid' : '' ;?>" value="<?php echo $data['email'] ;?>">

                        <span class="invalid-feedback"><?php echo $data['email_err'] ;?> </span>

                    </div>



                    <div class="form-group">

                        <label for="password">Contrase&ntilde;a:</label>

                        <input type="password" name="password" class="form-control form-control-lg <?php echo (!empty($data['password_err'])) ? 'is-invalid' : '' ;?>" value="<?php echo $data['password'] ;?>">

                        <span class="invalid-feedback"><?php echo $data['password_err'] ;?> </span>

                    </div>



                    <div class="form-group">

                        <div class="row">

                            <div class="col">

                                <input type="submit" class="btn btn-success btn-block pull-left" value="Aceptar">

                            </div>

                            <div class="col">

<!--                                <a href="<?php echo URLROOT2 ;?>/users/register" class="btn btn-light btn-block pull-right">Registrarse</a>

-->                            </div>

                        </div>

                    </div>

                </form>

            </div>

        </div>

    </div>

    <div class="col-md-12 mt-10 text-center">

        <br><br><br><br><br><br><br><br><h4>Puedes reportar cualquier falla o inquietud de la plataforma a: sirconet@gmail.com</h4>

    </div>

</div>

<?php require APPROOT . '/views/inc/footer.php'; ?>