Connect(); $root = New RootObject(); $GLOBAL_GET = $root->GetGlobalGetVars($_GET['GLOBAL_GET']); //alle GLOBAL_GET vars langslopen //voor elke GLOBAL_GET var die tevens een keyword is voor een pagina //uitkomst is een tweetal arrays: // $GLOBAL_PAGES -> alle keywords // $extra_get_vars -> extra parameters $i = 1; $j = 1; $found_last = FALSE; if($GLOBAL_GET) { foreach($GLOBAL_GET as $val) { $basepath = $GLOBAL_BASEDIR."includes/".$subdir; $file = $basepath."/".$val .".inc.php"; if(file_exists($file) && !$found_last) { $GLOBAL_PAGES[$i] = $val; $GLOBAL_PHP_SELF .= "/" . $val; $i++; } else { $found_last = true; $GLOBAL_GET_VARS[$j] = $val; $j++; } } $GLOBAL_PHP_SELF = $GLOBAL_PHP_SELF . "/"; $GLOBAL_NUM_PAGES = count($GLOBAL_PAGES); } //algemene sessie vars voor zowel blog als portal welke worden gebruikt voor tracking/debuginfo if($_SERVER['HTTP_REFERER'] && !$_SESSION['tracking']['ref']) $_SESSION['tracking']['ref'] = $_SERVER['HTTP_REFERER']; $_SESSION['tracking']['last_page'] = $_SESSION['tracking']['current_page']; $_SESSION['tracking']['current_page'] = "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; //============================================================================== // SMARTY INIT //============================================================================== require("{$GLOBAL_BASEDIR}/libs/smarty/libs/Smarty.class.php"); $smarty = new Smarty(); $smarty->caching = 0; $smarty->config_dir = "{$GLOBAL_BASEDIR}/libs/smarty/configs"; $templatedir = "{$GLOBAL_BASEDIR}templates/$GLOBAL_SITE_DOMAIN_MAIN/"; $templatedir = "{$GLOBAL_BASEDIR}templates/"; $smarty->template_dir = $templatedir; //zet unieke compile id om clashes te voorkomen $smarty->compile_id = $_SERVER['HTTP_HOST']; $smarty->compile_dir = "{$GLOBAL_BASEDIR}../smarty/templates_c"; $smarty->cache_dir = "{$GLOBAL_BASEDIR}../smarty/cache"; $smarty->assign('global_php_self', $GLOBAL_PHP_SELF); $smarty->assign('global_site_domain', $GLOBAL_SITE_DOMAIN); $smarty->assign('GLOBAL_GOOGLE_MAPS_API_KEY', $GLOBAL_GOOGLE_MAPS_API_KEY); //============================================================================== // site //============================================================================== //host is http://reismee.nl -> stuur door naar www.reismee.nl if(substr($_SERVER['HTTP_HOST'],0,strlen($GLOBAL_SITE_DOMAIN_MAIN)+1) == $GLOBAL_SITE_DOMAIN_MAIN.".") { Header( "HTTP/1.1 301 Moved Permanently" ); Header("Location: http://www.$GLOBAL_SITE_DOMAIN"); exit; } //www.reismee.nl -> stuur alles door naar /includes/site if(substr($_SERVER['HTTP_HOST'],0,strlen($GLOBAL_SITE_DOMAIN_MAIN)+5) == "www.".$GLOBAL_SITE_DOMAIN_MAIN.".") { $includedir = "site"; if($GLOBAL_GET[0] == "doorlopende-reisverzekering" || $GLOBAL_GET[0] == "kortlopende-reisverzekering" || $GLOBAL_GET[0] == "lang-op-reis-verzekering" || $GLOBAL_GET[0] == "wintersport-reisverzekering" || $GLOBAL_GET[0] == "annuleringsverzekering") { $tmpurlstr = $GLOBAL_GET[0]; $tmpurlstr2 = $GLOBAL_GET[1]; $GLOBAL_GET = array("welke-reisverzekering", $tmpurlstr, $tmpurlstr2); $GLOBAL_GET_VARS = array("", "welke-reisverzekering", $tmpurlstr, $tmpurlstr2); } $file = $GLOBAL_BASEDIR . "includes/$includedir/" .$GLOBAL_GET[0] . ".inc.php"; if(!$GLOBAL_GET[0]) $file = $GLOBAL_BASEDIR . "includes/$includedir/home.inc.php"; elseif(!file_exists($file)) $file = $GLOBAL_BASEDIR . "includes/$includedir/404.inc.php"; require($file); } if(($GLOBAL_SHOW_PERFORMANCE || in_array($_SERVER['REMOTE_ADDR'], $GLOBAL_ALLOWED_IP_LIST)) && !$GLOBAL_HIDE_PERFORMANCE) { include($GLOBAL_BASEDIR . "includes/debuginfo.inc.php"); } ?>