if ($path == "deco") { $_SESSION = array(); session_destroy(); header('Location: ' . urlp(__defaultfather__)); die; } if ($path == "sitemap.xml" || $path == "robots.txt" || strpos($path, "fluxrss") === 0 && strpos($path, ".xml") > 0) { $filename = $_SERVER["DOCUMENT_ROOT"] . __racine__ . __repflux__ . $_SERVER["PATH_INFO"]; $handle = fopen($filename, "r"); $contents = fread($handle, filesize($filename)); fclose($handle); print $contents; die; } //on verifie si le fichier est déja en cache $fileexist = cache_file_exist('', array($_GET, $_POST, $_SESSION), $_SERVER["PATH_INFO"]); if ($fileexist !== 0 && $_GET["mode"] != "view" && $_GET["pdf"] != 1 && $_GET["file"] == "") { require $fileexist; } else { if (!__showlang__) { $sql = "select shortlib from " . __racinebd__ . "langue where langue_id=" . __defaultlangueid__; $link = query($sql); $tbl_result = fetch($link); $shortlib = $tbl_result["shortlib"]; } $_GET["wheresecure"] = $_SESSION["logfront"] != "" ? "" : "and secure=0"; $_GET["wheresecure2"] = $_SESSION["logfront"] != "" ? "" : "and a0.secure=0"; //on regarde l'url actuel //on recherche la langue //$_GET["etat_id"]=($_GET["etat_id"]!=""&&$_SESSION["islog"])?$_GET["etat_id"]:1; $_GET["etat_id"] = $_GET["etat_id"] != "" ? $_GET["etat_id"] : 1;
function cache_require($template, $key = array()) { //print $key."/icijc<br>"; $fileexist = cache_file_exist($template, $key); //print $fileexist; if ($fileexist !== 0) { require $fileexist; } else { cache_file_script($template, $key); } }