\n"; // tableau principal
// *************** gauche *****************
if (!isset($left) || ($left ==1))
{
//echo "";
$cachefile = "tmp/left.cache.html";
if (!file_exists($cachefile) || (filemtime($cachefile) < filemtime("modules/liens")))
{
$cachecontent=file_get_contents("http://tma.tourmentine.com/left.php");
$fp = fopen($cachefile,"w");
fwrite($fp,$cachecontent);
fclose($fp);
}
echo "\n\n\n\n";
echo "
\n";
include $cachefile;
echo " | \n";
echo "\n\n\n";
// echo "";
}
// ************** centre ****************
echo " | \n";
// --- gestion des modules ---
if (isset($modulepage))
{
//include "include/logo.inc.php";
switch($modulepage)
{
case "sondage":
extract($themeset, EXTR_OVERWRITE);
$headstartcode = "";
$headendcode ="";
$bodyclass="centerbody";
$module = "sondage";
$titre = "Résultats du sondage";
include "modules/magicbox.php";
break;
case "goldbook":
unset($NbMaxPost);
extract($themeset, EXTR_OVERWRITE);
$headstartcode = "";
$headendcode ="";
$bodyclass = "centerbody";
$module = "goldbook";
$titre = "Livre d'or";
$GoldbookFile = "goldbook";
echo "
\nLaissez-nous un message... \n";
include "modules/magicbox.php";
unset($bodyclass);
break;
case "addnews":
extract($themeset, EXTR_OVERWRITE);
if (isset($File))
$FileNews = $File;
// fichier de news par défaut
if (!isset($FileNews))
$FileNews = "modules/news/news";
$headstartcode = "";
$headendcode ="";
$bodyclass = "centerbody";
$module = "admin/addnews";
$titre = "Ajout d'une nouvelle";
include "modules/magicbox.php";
unset($bodyclass);
// unset($NewsFile);
// unset($File);
break;
case "affnews":
if (isset($File))
$FileNews = $File;
if (!isset($FileNews))
$FileNews = "modules/news/pipnews";
// appel direct du module affnews ; magicbox est appelé par ce dernier
include "modules/affnews.php";
unset($NewsFile);
// unset($newsnb);
//unset($File);
break;
case "commentnews":
if (isset($File))
$FileNews = $File;
if (!isset($FileNews))
$FileNews = "modules/news/news";
$modulepage="affnews";
$start=$idnews;
$NbMaxNews=1;
include "modules/affnews.php";
$headstartcode = "";
$headendcode ="";
$bodyclass = "centerbody";
$module = "forum";
$titre = "Commentaires";
//$goldbooktype = "comment";
$forumfile = "$FileNews.$idnews.forum.csv";
include "modules/magicbox.php";
//$modulepage = "commentbook";
// unset($goldbooktype);
// unset($NewsFile);
// unset($File);
break;
case "print":
if (isset($File))
$FileNews = $File;
if (!isset($FileNews))
$FileNews = "modules/news/news";
include "modules/print.php";
break;
case "backend":
if (isset($File))
$FileNews = $File;
if (!isset($FileNews))
$FileNews = "modules/news/news";
include "modules/genbackend.php";
break;
case "chatlogin":
extract($themeset, EXTR_OVERWRITE);
$bodyclass = "centerbody";
$module = "kikchat/login";
$headstartcode = "";
$headendcode ="";
$titre = "Bienvenue sur le chat";
$bodystartcode="";
$bodyendcode=" ";
$footerbox = 1;
$footerboxtext = "Retour au menu";
$footerlien = "/";
include "modules/magicbox.php";
unset($bodyclass);
break;
case "kikchat":
extract($themeset, EXTR_OVERWRITE);
$bodyclass = "centerbody";
$module = "kikchat/post";
$titre = "Kik it Productions' Live Chat";
$headlien = "http://www.kik-it.com";
$footerbox = 1;
$footerboxtext = "Retour au menu";
$footerlien = "/";
include "modules/magicbox.php";
unset($bodyclass);
break;
case "affimage":
extract($themeset, EXTR_OVERWRITE);
// $headstartcode = "";
// $headendcode ="";
$bodyclass = "centerbody";
$module = "affimages";
$titre = $image;
$footerbox = 1;
$footerboxtext = "Retour au menu";
$footerlien = "/";
include "modules/magicbox.php";
unset($bodyclass);
break;
default:
include "pages/menu.php";
}
}
else
{
// ---- affichage des pages ----
//echo "";
if (isset($section) && isset($page) && $page != "menu")
{
// si url éronnée, affiche la page d'acceuil
if (file_exists("$section/$page.php"))
{
/* echo " "; */
include_once "$section/$page.php";
/* echo " ";*/
}
else
include_once "pages/menu.php";
echo " ";
}
else
{
//include "include/logo.inc.php";
include "pages/menu.php";
}
}
echo " | ";
// *************** droite *************************
/*if (!isset($right) || ($right == 1))
{
echo " | ";
echo "";
include_once "right.php";
echo " | ";
}*/
echo "
";
//****************** pied de page *********************
//require_once "footer.php";
$endgen = getmicrotime();
$timegen = round($endgen - $startgen, 2);
echo "\n\n\n";
?>