ini_set("display_errors", "on"); ini_set("default_charset", "UTF-8"); error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT); date_default_timezone_set("Europe/Amsterdam"); $imageRoot = "/"; $serverRoot = $_SERVER['DOCUMENT_ROOT'].$imageRoot; include $serverRoot.'includes/connect.php'; include $serverRoot.'includes/functions.php'; include $serverRoot.'includes/lib/swift_required.php'; $flagArray = array( "en" => "English", //"de" => "German", //"es" => "Spanish", //"ru" => "Russian", //"ar" => "Arabic", //"pl" => "Polish", ); $companyEmail = getSetting('companyEmail'); $companyName = getSetting('companyName'); if(isset($_GET["page"]) && $_GET["page"] != ""){ $path = explode("/", $_GET["page"]); if($path[count($path) - 1] == ""){ array_pop($path); } //if(count($flagArray) > 1){ if(isset($flagArray[$path[0]])){ $lang = $path[0]; array_shift($path); } else { show404(); } //} else { //$lang = "en"; //} $langArray = getLanguage($lang); if(count($path) == 0){ $pageArray = getPage("home"); } else { $pageArray = getPage($path[0]); if($pageArray == false){ show404(); } switch($pageArray["menu_file"]){ case "downloads.php": if(isset($path[1])){ } break; case "projecten.php": if(isset($path[1])){ $itemArray = getItemData("portfolio","",array("active"=>1,"label"=>$path[1]), true); if($itemArray == false){ show404(); } else{ $pageArray['doctitle'] = $itemArray['doctitle']; $pageArray['description'] = $itemArray['description']; $pageArray['keywords'] = $itemArray['keywords']; } } break; case "default.php": break; case "contact.php": if(isset($path[1])){ if($path[1] != getSetting('thanksUrl')){ $pageArray = getPage($path[1]); if($pageArray == false){ show404(); } } } break; default: if(count($path) > 1){ show404(); } } } $canonical = false; } else { $browserLang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); switch ($browserLang){ case "en": $lang = $browserLang; break; default: $lang = "en"; break; } $langArray = getLanguage($lang); $pageArray = getPage("home"); $path = array($pageArray['label']); } $menuArray = getMenus(); ?>