getPage($page)->get("type")=="" || !$jcms->getPage($page)->is("published")) $page = 2; if($page<=1) $page = 2; if(strpos($jcms->getPage($page)->get("type"), "link")!==false){ $url = $jcms->getPage($page)->get("url"); if(strpos($url, "http://")!==false){ header('Status: 301 Moved Permanently', false, 301); header('Location: ' . $url); exit(); } else { $page = $url; } } if(!$jcms->getPage($page)->is("published")) $page = 2; if($jcms->getPage($page)->get("type")=="show-first-child"){ foreach($jcms->getPage($page)->getChilds() as $item){ if($item->is("published") && $item->is("visible")){ $page = $item->get("id"); break; } } } function getArborescence($page){ global $jcms; $lRet = "["; foreach($jcms->getPage($page)->getChilds() as $item){ if($item->is("published") && $item->is("visible")){ $lRet .= '[' . $item->get('id') . ', "' . $item->get('name'); $lRet .= '", ' . getArborescence($item->get('id')) . '], '; } } if($lRet != "[") $lRet = substr($lRet, 0, count($lRet)-3); $lRet .= "]"; return $lRet; } ?> Du Nô à Mata Hari getPage($page), $mExtLang); $assoc = getAssoc($content["tab"]); include("templates/" . $jcms->getPage($page)->get("type") . ".php") ?>