<?php
// $Id: seofilter.php,v 1.8.4.14 2007/03/24 15:07:26 snm Exp $
if (!defined('E_WARNING')) {
define('E_WARNING', 2048);
}
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "seofilter.config.php");
require_once(SEOFILTER_LIB_DIR . "seofilter.lib.php");
if (!defined('SEOFILTER_BASE_DIR') || !defined('SEOFILTER_SRC_DIR')) {
return;
}
$module_file = seofilter_get_module_file();
$module_class = seofilter_get_module_name();
if (!file_exists($module_file)) {
die("Invalid module " . $module_class);
} else {
include_once($module_file);
if (!class_exists($module_class)) {
die(nl2br("Invalid module " . $module_class . ".\nClass " . $module_class . " not found."));
}
}
$content = '';
// parsing request
$file = seofilter_input_parser();
if (empty($file) || !file_exists($file) || $file == 'seofilter.php') {
$file = "index.php";
}
$content = seofilter_system_content();
// getting contents
if (!empty($content) || seofilter_system_status() & SEOFILTER_STATUS_EXIT) {
print seofilter_system_header();
print $content;
exit();
} elseif (file_exists(SEOFILTER_BASE_DIR . $file)) {
ob_start("seofilter_handler");
include_once(SEOFILTER_BASE_DIR . $file);
} else {
die("Incorrect request '$file'.");
}
?>