54 lines
1.5 KiB
PHP
54 lines
1.5 KiB
PHP
<?php
|
|
extract($themeset, EXTR_OVERWRITE);
|
|
|
|
include "include/logo.inc.php";
|
|
$lang = $_GET["lang"];
|
|
$cachefile = "tmp/menu.$lang.cache.php";
|
|
if (!file_exists($cachefile) || (filemtime($cachefile) < filemtime("modules/news")))
|
|
{
|
|
//echo $lang;
|
|
//echo $_SERVER["HTTP_HOST"];
|
|
//$cachecontent=file_get_contents("http://192.168.1.1/modules/affnews.php?lang=$lang");
|
|
$cachecontent=file_get_contents("http://".$_SERVER["HTTP_HOST"]."/modules/affnews.php?lang=$lang");
|
|
//$cachecontent=file_get_contents("http://".$_SERVER["HTTP_HOST"]."/modules/affnews.php");
|
|
//$cachecontent=eval(file_get_contents("modules/affnews.php"));
|
|
//$cachecontent= eval(implode("",file("modules/affnews.php")));
|
|
$cachecontent = str_replace("<!--NOCACHE","<?php",$cachecontent);
|
|
$cachecontent = str_replace("NOCACHE-->","?>",$cachecontent);
|
|
|
|
$fp = fopen($cachefile,"w");
|
|
fwrite($fp,$cachecontent);
|
|
fclose($fp);
|
|
//echo "wrote";
|
|
}
|
|
if (file_exists($cachefile))
|
|
{
|
|
echo "\n\n<!-- Partie mise en cache (".date("d/m/Y@H:i:s", filemtime($cachefile)).")-->\n\n";
|
|
|
|
include $cachefile;
|
|
echo "\n<!-- fin Partie mise en cache -->\n\n";
|
|
}
|
|
else
|
|
{
|
|
|
|
// $NbMaxNews = 1;
|
|
// $FileNews = "modules/news/edito";
|
|
// $footerbox = 0;
|
|
// include "modules/affnews.php";
|
|
unset($newsnb);
|
|
unset($titleonly);
|
|
unset($FileNews);
|
|
unset($start);
|
|
|
|
// $NbMaxNews = 3;
|
|
$FileNews = "modules/news/news";
|
|
$footerbox = 0;
|
|
//$NbMaxNews=3;
|
|
include "modules/affnews.php";
|
|
echo "<br /><br />";
|
|
unset($newsnb);
|
|
unset($titleonly);
|
|
unset($FileNews);
|
|
unset($start);
|
|
}
|
|
?>
|