$[This post has been blocked by the administrator]"); $Blocklisted = 0; foreach((array)$BlocklistPages as $b) { $pn = FmtPageName($b,$pagename); $page = ReadPage($pn); if (!$page) continue; if (preg_match_all('/\\d+\\.\\d+\\.\\d+\\.(\\d+|(?=\\*))/', $page['text'], $match)) { foreach($match[0] as $m) { if ($m == $_SERVER['REMOTE_ADDR']) $Blocklisted++; if (substr($m,-1,1)=='.' && strncmp($_SERVER['REMOTE_ADDR'],$m,strlen($m))==0) $Blocklisted++; } } if ($pagename == $pn) return; if (preg_match_all('/block:(\\S+)/', $page['text'], $match)) { foreach($match[1] as $e) { if (stristr(@$_POST['text'],$e) !== FALSE) $Blocklisted++; } } } # okay, if the posting is blocked, then disallow the post and provide # a message if ($Blocklisted) { unset($_POST['post']); $EnablePost = 0; $MessagesFmt[] = $BlocklistMessageFmt; } ?>