<?
///Приветствие баном по айди
if($aut==true){
$ban = $db -> query("SELECT `id` FROM `ban` WHERE `iduser` = '".$ya['id']."' and `type` = 'id' LIMIT 1");
if ($ban -> num_rows > 0) {
header('location: '.ROOT.'ban.php?mode=login');
}
}
//Бан по ip
$ban = $db -> query("SELECT `id` FROM `ban` WHERE `ip` = '".strtok($ip,' ')."' and `type` = 'ip' LIMIT 1");
if ($ban -> num_rows > 0) {
header('location: '.ROOT.'ban.php?mode=ip');
}
unset($ban);
?>