1) $menu_name = $r2; else $menu_name = $r2; //this is a one level menu, you can define your internal structure and define wich one appears on the menu $menus = array(); //dynamic templates of a simple text template $templatetext = new AYSchema(); $templatetext->load(0, "DynPage"); $templatetext = $templatetext->selectAll(array("active"), array(1), array("=")); $templatetmp = new AYSchema(); $templatetmp->load(0, "DynSubpage"); for ($i = 0; $i < sizeof($templatetext); $i++) { $sub_pages = $templatetmp->selectAll(array("active", "parent_id"), array(1, $templatetext[$i]["id"]), array("=", "=")); array_push($menus, array("key" => array($templatetext[$i]["urlseo"]), "file" => "template_text", "title" => array($templatetext[$i]["title"]), "menu" => "1", "submenu" => $sub_pages)); } array_push($menus, array("key" => array(""), "file" => "home", "title" => array("Home"), "menu" => "0", "submenu" => array())); array_push($menus, array("key" => array("contacts"), "file" => "contacts", "title" => array("Contacts"), "menu" => "1", "submenu" => array())); array_push($menus, array("key" => array("news"), "file" => "template_list", "title" => array("News"), "menu" => "1", "submenu" => array())); $change_lang = array(); array_push($change_lang, $langs); $menu_item = NULL; for ($i = 0; $i < sizeof($menus); $i++) { if (parseLanguage($menus[$i]["key"]) == $menu_name) { $menu_item = $menus[$i]; break; } } if ($menu_item == NULL) $menu_item = $menus[0]; array_push($change_lang, $menu_item["key"]); $file = $menu_item["file"]; $page = parseLanguage($menu_item["key"]); $page_title = parseLanguage($menu_item["title"]); $sitetags = new AYSchema(); $sitetags->load(0, "SiteMetatagsAnalytics"); $sitetags->setCurrentLanguage($_SESSION["lang"]); $sitetags_detail = $sitetags->selectFirst(); $site_title = $sitetags_detail["title"]; $site_description = $sitetags_detail["description"]; $site_keywords = $sitetags_detail["keywords"]; 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; ?>
CLOSE
" title="" alt="" class="zoom-img" />
" title="" alt="" class="zoom-img" />
" title="" alt="" class="zoom-img" />
" title="" alt="" class="zoom-img" />