parseCookie("visitor"); $bancookie = $cookie->getKey("visitor", "isbanned"); if ($bancookie == "") { // it seems like we never did check this visitor to see if hes banned check now $banresult = $dbCore->queryFetch("SELECT `visitorbanid` FROM `". TABLE_PREFIX ."visitorbans` WHERE `ipaddress` = '". $dbCore->escape($_SWIFT["IP"]) ."' LIMIT 1;"); if (trim($banresult["visitorbanid"]) != "") { // He is banned! $cookie->addCookie("visitor", "isbanned", "1"); $isbanned = true; } else { $cookie->addCookie("visitor", "isbanned", "0"); $isbanned = false; } $cookie->buildCookie("visitor"); } else if ($bancookie == "1") { $isbanned = true; } else { $isbanned = false; } if ($isbanned == false) { if (!$events->triggerEvent(EVENT_VISITOR)) { // Display default frontpage here } } ?>