1) $menu_name = $r2; else $menu_name = $r1; // ACTIVE MENU $menu_item = NULL; for($i = 0; $i < sizeof($menus); $i++) { if(parseLanguage($menus[$i]["urlseo"]) == $menu_name) { $menu_item = $menus[$i]; break; } } if($menu_item == NULL) $menu_item = $menus[0]; array_push($change_lang, $menu_item["urlseo"]); $file = $menu_item["file"]; $page = $menu_item["id"]; $page_title = parseLanguage($menu_item["title"]); // SITE CONFIG $sitetags = new AYSchema(); $sitetags->load(0,"SiteMetatagsAnalytics"); $sitetags->setCurrentLanguage($_SESSION["lang"]); $sitetags_detail = $sitetags->selectFirst(); $curr_url = urlencode("http://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]); $site_title = $sitetags_detail["title"]; $site_description = processSiteDescription($sitetags_detail["description"]); $site_keywords = $sitetags_detail["keywords"]; $share_image = $sitetags_detail["social_logo"]; include_once("langs/" . $lang . "/lang.php"); ob_start(); if(file_exists("pages/".$file.".php")) include_once("pages/".$file.".php"); $contents = ob_get_clean(); ob_start(); if(file_exists("pages/header.php")) include_once("pages/header.php"); $header = ob_get_clean(); ob_start(); if(file_exists("pages/footer.php")) include_once("pages/footer.php"); $footer = ob_get_clean(); ?> <? echo $site_title; if($page_title != "") echo " - " . $page_title; ?> " /> " /> ">