50 lines
1.2 KiB
PHP
50 lines
1.2 KiB
PHP
|
<?php
|
||
|
extract($themeset, EXTR_OVERWRITE);
|
||
|
|
||
|
include "include/logo.inc.php";
|
||
|
|
||
|
$cachefile = "tmp/menu.$lang.cache.php";
|
||
|
if (!file_exists($cachefile) || (filemtime($cachefile) < filemtime("modules/news")))
|
||
|
{
|
||
|
$cachecontent=file_get_contents("http://".$_SERVER["HTTP_HOST"]."/modules/affnews.php?lang=$lang");
|
||
|
//$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);
|
||
|
}
|
||
|
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);
|
||
|
}
|
||
|
?>
|