link->getPageLink('contact'); try { $file = preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $filename); $file = new SplFileObject($file); } catch (LogicException $exception) { die('SplFileObject : ' . $exception->getMessage()); } while ($file->valid()) { $line = $file->fgets(); array_push($banned_in_email, trim($line)); } $file = null; $_SESSION["bannedctc"] = "notbanned"; foreach ($banned_in_email as $string) { if (strstr($from, $string)) { //$this->errors[] = Tools::displayError('This email address is not allowed'); $_SESSION["bannedctc"] = "banned"; Tools::redirectAdmin($target); } } foreach ($banned_content as $string) { if (strstr($message, $string)) { //$this->errors[] = Tools::displayError('Invalid Content'); $_SESSION["bannedctc"] = "banned"; Tools::redirectAdmin($target); } } } } echo $_SESSION["bannedctc"]; parent::postProcess(); } }