<?php require_once(ROOT . "/views/" . LANG . "/layouts/_header_l.php"); ?>

<div class="container">
  <div class="content">
    <article class="col-md-12" style="
    width: 100%;
">
      <div class="row">
        <div class="col-md-4 col-md-offset-4"><div class="r_block">
          <form id="loginform" action="/login" method="POST">
            <input type="hidden" name="_tocken" value="<?=Session::$tocken; ?>">
            <div class="form-heading text-center">
              <a href="/"><img src="/assets/images/logo-small.png" style="max-width: 100%;"></a>
              <div class="title">Вход в аккаунт</div>
            </div>
            <div class="row">
              <div class="col-md-12" style="
    width: 100%;
">
                <input name="log_email" type="text" minlength="5" placeholder="Логин либо E-mail" required/> 
              </div>
              <div class="col-md-12" style="
    width: 100%;
">
                <input name="pass" type="password" maxlength="20" minlength="6" placeholder="Введите пароль" required /> 
              </div>
            </div>
            <div class="row">
              <div class="col-md-12 text-center" style="
    width: 100%;
">
                <button class="g-recaptcha adam-button adam-red">Войти в аккаунт</button>
                <p class="title-description"><a href="/recovery">Напомнить пароль</a> | <a href="/signup">Создать аккаунт</a></p>
              </div>
            </div>
          </form>
        </div>
      </div>
    </article>
    <div class="clearfix"></div>
  </div>
</div>

<script src="/assets/plugins/bootstrap-sweetalert/sweet-alert.min.js"></script>

<?php if(isset($errors) && $errors !== false) :  ?>

  <script>
    setTimeout(function(){swal('<?=$errors[0]; ?>', '<?=$errors[1]; ?>', '<?=$errors[2]; ?>')}, 100);
  </script>

<?php endif; ?>

</body>
</html>