示例#1
0
 public static function ipbanned($onlineip)
 {
     global $ipaccess, $timestamp, $cachelost;
     if ($ipaccess && !GlobalCore::ipaccess($onlineip, $ipaccess)) {
         return TRUE;
     }
     $cachelost .= @(include NOWHERE_ROOT . './data/cache/cache_ipbanned.php') ? '' : 'ipbanned';
     if (empty($_NCACHE['ipbanned'])) {
         return FALSE;
     } else {
         if ($_NCACHE['ipbanned']['expiration'] < $timestamp) {
             @unlink(NOWHERE_ROOT . './data/cache/cache_ipbanned.php');
         }
         return preg_match("/^(" . $_NCACHE['ipbanned']['regexp'] . ")\$/", $onlineip);
     }
 }