$path_uri = trim($path_uri, '/'); $temp = explode('/', $path_uri); $thisSite->current_tab_paths = array_filter($temp); $thisSite->current_tab_paths_full = array_filter($temp); $thisSite->current_urlQuery = $parse_url["query"]; // VERIFIE Si fichier avec une extension et si elle est autorisée. // CHANGE de script principal si il y a une extension valide $typeURL = "redirect"; $last_elt = $thisSite->current_tab_paths[count($thisSite->current_tab_paths) - 1]; $pos = strrpos($last_elt, "."); if ($pos > 0) { $ext = strtolower(substr($last_elt, $pos + 1, strlen($last_elt) - $pos)); if ($ext != "") { if (strpos($thisSite->EXTENSIONS_INDEX_OK, $ext) === FALSE) { $thisSite->current_scriptPHP = "404.php"; config_404("index.php: strpos({$thisSite->EXTENSIONS_INDEX_OK},{$ext})===FALSE >" . $_SERVER['REQUEST_URI']); } else { // extension existe et autorisée $typeURL = "direct"; } } } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// if (count($thisSite->LIST_LANG) > 1) { // SITE MULTILANGUES // vérification si premier niveau est celui de la langue (site multi langues) $lg_from_path = $thisSite->current_tab_paths[0]; // on récupére la langue du chemin et on l'enleve du chemin $lg_from_path = substr($lg_from_path, strlen($thisSite->PREFIXE_LG)); // on enleve le Prefixe de la langue. if ($lg_from_path != "") {
<?php $fichier_php = implode("/", $thisSite->current_tab_paths); $script_php = get_path($fichier_php, 0); if ($script_php == "") { $script_php = get_path_pages($fichier_php, 0); } if ($script_php == "") { $script_php = $fichier_php; } if (!file_exists($script_php) || $script_php == "") { $thisSite->current_scriptPHP = get_path_pages("404.php", 0); config_404("index-php.php: page_php inconnue: " . $thisSite->RACINE . $script_php); } else { $thisSite->current_scriptPHP = $script_php; } $thisSite->current_scriptTPL = remove_extension($thisSite->current_scriptPHP) . ".tpl"; include_once $thisSite->DOS_BASE_INIT . "init_commun.php"; // initialisation commune à tout les types de page include $thisSite->current_scriptPHP; $smarty->assign("thisSite", $thisSite); $_SESSION["thisSite"] = serialize($thisSite); if (file_exists($thisSite->current_scriptTPL)) { $smarty->display($thisSite->current_scriptTPL); }
if ($thisSite->current_srub == "") { $thisSite->idPage = $thisSite->current_rub; } else { if ($thisSite->current_ssrub == "") { $thisSite->idPage = $thisSite->current_srub; } else { if ($thisSite->current_ssrub != "") { $thisSite->idPage = $thisSite->current_ssrub; } } } $thisSite->page = $thisSite->pages[$thisSite->idPage]; //////////// if ($thisSite->current_scriptPHP == "") { $thisSite->current_scriptPHP = "404.php"; config_404("index-nophp.php: page_php==''"); } $fichier_php = get_path_pages($thisSite->current_scriptPHP, 0); if ($fichier_php == "") { $thisSite->current_scriptTPL = ""; } // Templating if ($thisSite->current_scriptTPL == "") { $thisSite->current_scriptTPL = remove_extension($fichier_php) . ".tpl"; } else { $thisSite->current_scriptTPL = get_path_pages($thisSite->current_scriptTPL, 0); } $my_cache_id = $thisSite->current_lang . "_" . implode($thisSite->current_tab_paths, "_"); $my_cache_id = md5($my_cache_id); if ($thisSite->current_scriptTPL == "") { $isCached = 0;