File size: 2.64Kb
<?php
// Системный файл для надстроек
require('../flowap/system.php');
//
switch ($act) {
default:
if(isset($user['id'])): header('location: /'); exit; endif;
$title->SetTitle('Авторизация на сайте');
$title->GetHeader();
?>
<div class="_34t5rgteg">
<div id="oshhb" style="display: none;"><?php echo $errs;?></div>
<div class="_3rt4g5hegrf4"><i class="fab fa-keycdn"></i> Авторизация</div>
<div class="_3rfgwvwdd3 _dop345yhte">
Регистрация и аворизация происходят исключительно через email в качестве не только безопасности, но и в качестве отсеивания ботов на проекте.
<form id="ajax_form" class="_dop33fw3r2e23r" action="" onsubmit="return false;">
<?php if(isset($_SESSION['emailok'])):
$str = DB::$dbs->queryFetch('SELECT `id` FROM `logaut` WHERE `id` = ? LIMIT 1', [$_SESSION['emailok']]);
if(empty($str['id'])):
$_SESSION['error'] = 'Ошибка авторизации #1.';
unset($_SESSION['emailok']);
header('location: /vhod/');
exit;
endif;
?>
<input type="number" maxlength="5" name="codes" value="" class="_dop34t5geefgf" autofocus="true" style="padding-right: 0;" placeholder="Код из письма">
<input onclick='saveaj ("/ajax/logins.php?act=vhodes");return false;' type="submit" name="add" class="_dop34tgweef" value="Авторизация">
<?php
// unset($_SESSION['emailok']);
else: ?>
<input type="email" maxlength="50" name="email" value="" class="_dop34t5geefgf" placeholder="Ваш @email">
<div style="margin-bottom: 5px;"><img style="cursor: pointer;width: 67px;" onclick="this.setAttribute('src','/css/captcha/kcaptcha.php?'+Math.random());var captcha=document.getElementById('obnc');if(captcha){captcha.focus()}" id="obnc" src="/css/captcha/kcaptcha.php" title="Обновить капчу" /></div>
<input type="text" maxlength="8" name="captcha" value="" class="_dop34t5geefgf" autocomplete="off" autofocus="true" placeholder="Код с картинки">
<input onclick="saveaj ('/ajax/logins.php?act=auts');return false;" type="submit" name="add" class="_dop34tgweef" value="Выслать код">
<?php endif; ?>
</form>
</div>
</div>
<?php
$title->GetFooter();
break;
case 'exit':
if(empty($user['id'])): header('location: /'); exit; endif;
setcookie('token', '', (time()-3600), '/');
session_destroy();
unset($_SESSION['token']);
header('location: /'); exit;
break;
}
?>