39 lines
1.2 KiB
PHP
39 lines
1.2 KiB
PHP
|
<?php
|
||
|
|
||
|
if ($_POST["param"] != "postgb")
|
||
|
{
|
||
|
$cachefile = "tmp/livre.cache.php";
|
||
|
if (!file_exists($cachefile) || (filemtime($cachefile) < filemtime("modules/goldbook/default.csv")))
|
||
|
{
|
||
|
$cachecontent = "\n\n<!-- Partie mise en cache (".date("d/m/Y@H:i:s").")-->\n\n";
|
||
|
$cachecontent .= file_get_contents("http://".$_SERVER["HTTP_HOST"]."/modules/magicbox.php?module=goldbook&GoldbookFile=default&bodyclass=centerbody&titre=Livre%20d'or");
|
||
|
$cachecontent .= "\n<!-- fin Partie mise en cache -->\n\n";
|
||
|
|
||
|
$cachecontent = str_replace("<!--NOCACHE","<?php",$cachecontent);
|
||
|
$cachecontent = str_replace("NOCACHE-->","?>",$cachecontent);
|
||
|
|
||
|
$fp = fopen($cachefile,"w");
|
||
|
fwrite($fp,$cachecontent);
|
||
|
fclose($fp);
|
||
|
}
|
||
|
include $cachefile;
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
$param="postgb";
|
||
|
|
||
|
unset($NbMaxPost);
|
||
|
extract($themeset, EXTR_OVERWRITE);
|
||
|
//$headstartcode = "<font size='3' class='centerhead'>";
|
||
|
//$headendcode ="</font>";
|
||
|
$bodyclass = "centerbody";
|
||
|
$module = "goldbook";
|
||
|
$titre = "Livre d'or";
|
||
|
$GoldbookFile = "goldbook";
|
||
|
//echo "<br /><br /><br />\n<div class='center'><h1>Laissez-nous un message...</h1></div><br />\n";
|
||
|
$footerbox=0;
|
||
|
include "modules/magicbox.php";
|
||
|
unset($bodyclass);
|
||
|
}
|
||
|
?>
|