run(); //header('Content-Type: text/html; charset=utf-8'); //header('Access-Control-Allow-Origin: *'); echo $page; die(); require_once ("classes/form.class.php"); require_once("classes/core.class.php"); require_once("classes/categories.class.php"); require_once("classes/content.class.php"); require_once("classes/image.class.php"); require_once("classes/sphinx.class.php"); $init->route(); if (get_magic_quotes_gpc()) { function stripslashes_deep($value) { $value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value); return $value; } $_POST = array_map('stripslashes_deep', $_POST); $_GET = array_map('stripslashes_deep', $_GET); $_COOKIE = array_map('stripslashes_deep', $_COOKIE); $_REQUEST = array_map('stripslashes_deep', $_REQUEST); } if($init::$company_id!=0){ if (isset($_REQUEST['module']) && isset($_REQUEST['action'])){ if(!is_file("classes/" . $_REQUEST['module'] . ".class.php")) { $page = $init->fetchLang('error.html'); } else { require_once("classes/" . $_REQUEST['module'] . ".class.php"); $module = new $_REQUEST['module']; $function = $_REQUEST['action']; if( !method_exists($module, $function) ) { $page = $init->fetchLang('error.html'); } else { $page = $module->$function(); $module->assignLang("plugins", $module->plugins()); } } } else { $categories = new categories; $menu = $categories->getmenu(); require_once("classes/listings.class.php"); $module = new core; $function = 'homepage'; $page = $module->$function(); $module->assignLang("plugins", $module->plugins()); } $module->assignLang("time",time()); $module->assign("site_url", $module->site_url); $module->assignLang("menu", $menu); $module->assignLang("page", $page); $module->assignLang("protocol", $protocol); $page=$module->fetch('index.html'); $ban=0; } else{ //die(); if (isset($_REQUEST['module']) && isset($_REQUEST['action'])){ if(!is_file("classes/" . $_REQUEST['module'] . ".class.php")) { $page = $init->fetchLang('error.html'); } else { require_once("classes/" . $_REQUEST['module'] . ".class.php"); $module = new $_REQUEST['module']; $function = $_REQUEST['action']; $module->route(); if( !method_exists($module, $function) ) { $page = $init->fetchLang('error.html'); } else { $page = $module->$function(); $module->assignLang("plugins", $init->plugins()); } } } else{ require_once("classes/pub.class.php"); $module = new pub; $function = 'homepage'; $page = $module->$function(); } $module->assignLang("page", $page); $page=$module->fetch('index.html'); } header('Content-Type: text/html; charset=utf-8'); header('Access-Control-Allow-Origin: *'); print $page; $init->closeDB();