";//exit; if(isset($askedPage) && $askedPage != '' && $askedPage != '/' && $askedPage != CONTENT_HOME_RUB_CODE){ $arAskedPage = split('/',$askedPage); //print_r($arAskedPage); forEach($arAskedPage as $k=>$v){ if(strpos($arAskedPage[$k],'.html') !== false){ // on publication part $pubCode = str_replace('.html','',$arAskedPage[$k]); // stop after publication break; } if($k == 0){ // Manage N1 rub $rubN1Code = $arAskedPage[$k]; }else{ // Manage N2 rub or publi if existe $rubCode = $arAskedPage[$k]; } } if($rubCode == '') $rubCode = $rubN1Code; } //echo "
rubN1Code=$rubN1Code
rubCode=$rubCode
pubCode=$pubCode
"; // END URL DECODE // Get Rubrique in order to find the comportement to follow // If no rub or publication defined => get home page rub if($rubCode == '' && $pubCode == ''){ $rub = getRubriqueByCode(CONTENT_HOME_RUB_CODE); $isHome = true; } // Get publi by pubRef directely if set else if($pubCode != ''){ $publi = getOnlinePubliByCode($pubCode); $rub = getRubriqueByRef($publi->rubRef); } // If set rubRef, get publi according to the comportement of the rubrique else if($rubCode != ''){ $rub = getRubriqueByCode($rubCode); } // common definition if($rub != null){ $navi = $rub->getNavigation(); } // include comportement code to set the template variable $comportement = $rub->comportement; if(trim($comportement) == '') $comportement = '404'; include_once(PATH_FO_COMPORTEMENT.strToLower($comportement).'.php'); // DRAW PAGE $curPage = new pageTemplate(PATH_FO_TEMPLATE.'template_front.php', SITE_NAME, $titre, $body, '', $navi, $isHome); $curPage->drawPage(); //phpinfo(); ?>