<?php
defined('GCMS') or die('ОШИБКА!');
///Приветствие баном по айди
if($aut==true){
$ban = $db -> query("SELECT * FROM `ban` WHERE `iduser` = '".$ya['id']."' and `serius` = 'sys' and  `type` = 'id' LIMIT 1");
if ($ban -> num_rows > 0) {
header('location: '.ROOT.'ban.php?mode=login');
}}
//Бан по ip 
$ban = $db -> query("SELECT * FROM `ban` WHERE `ip` = '".$ya['ip']."' and `serius` = 'sys' and  `type` = 'ip' LIMIT 1");
if ($ban -> num_rows > 0) {
header('location: '.ROOT.'ban.php?mode=ip');
}
//Блок профиля
$ban = $db -> query("SELECT * FROM `ban` WHERE `serius` = 'blok' LIMIT 1");
if ($ban -> num_rows > 0) {
header('location: '.ROOT.'ban.php?mode=blok');
}
unset($sql);
?>