EscapeString($_GET['ref']), time()+7200); } // Detect visitor referrer if(!$is_online && isset($_SERVER['HTTP_REFERER']) && !isset($_COOKIE['RefSource'])){ $main_domain = parse_url($config['site_url']); $http_referer = parse_url($_SERVER['HTTP_REFERER']); if($http_referer['host'] != $main_domain['host']){ setcookie('RefSource', $db->EscapeString($_SERVER['HTTP_REFERER']), time()+1800); } } /* Load Website */ // Starting compression ob_start(); // Load Header require_once('content/common/header.php'); // Load Content $pages = array( // script name => (1 = valid, 0 = disabled), (0 = offline, 1 = online, 2 = doesn't matter), File Location 'contact' => array(1, 2, 'pages/contact'), 'faq' => array(1, 2, 'pages/faq'), 'info' => array(1, 2, 'pages/info'), 'register' => array(1, 0, 'register'), 'recover' => array(1, 0, 'recover'), 'activate' => array(1, 0, 'activate'), 'videos' => array(1, 1, 'modules/video'), 'affiliates' => array(1, 1, 'affiliates'), 'account' => array(1, 1, 'account'), 'membership' => array(1, 1, 'membership'), 'videoad' => array(1, 1, 'videoad'), 'withdraw' => array(1, 1, 'withdraw') ); $valid = false; if (isset($_GET['page']) && $pages[$_GET['page']][0] == 1) { if($is_online && $pages[$_GET['page']][1] == 1){ $valid = true; }elseif(!$is_online && $pages[$_GET['page']][1] == 0){ $valid = true; }elseif($pages[$_GET['page']][1] == 2){ $valid = true; } } $page = ($is_online ? 'dashboard' : 'home'); if($valid) { $page = $pages[$_GET['page']][2]; } // Load Page require_once('content/'.$page.'.php'); // Load Footer require_once('content/common/footer.php'); // Show website ob_end_flush(); ?>