Файл: _core/_inc/user.php
Строк: 20
<?php
# mark core v1.0
# author Drk in
# date 24.10.19
# check CK users
if (isset($_COOKIE['CK'])):
$CK = system::check($_COOKIE['CK']);
$ID = system::check($_COOKIE['ID']);
if (cache_ck::ch($CK) == true):
$US = cache_ck::get($CK);
if ($US['CK'] == $CK): if ($US['id'] == $ID):
if (cache_user::ch($US['id']) == true):
$user = cache_user::get($US['id']);
if ($user['ban'] == 0):
cache_user::time($user['id']);
$no_fail = 1;
# error
else: $no_fail = 0; endif;
else: $no_fail = 0; endif;
else: $no_fail = 0; endif;
else: $no_fail = 0; endif;
else: $no_fail = 0; endif;
# unset cookies
if ($no_fail == 0):
setcookie("CK", "", time() - 2419200, "/", "".domain."");
setcookie("ID", "", time() - 2419200, "/", "".domain."");
system::header('/');
endif;
endif;
?>