Train Miniature Avallonnais https://tma.tourmentine.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

304 lines
10 KiB

3 months ago
  1. <?php
  2. $page=$_GET["page"];
  3. $modulepage=$_GET["modulepage"];
  4. function getmicrotime(){
  5. list($usec, $sec) = explode(" ",microtime());
  6. return ((float)$usec + (float)$sec);
  7. }
  8. $startgen = getmicrotime ();
  9. // visites
  10. //$lvc_include_dir = 'visit/include/';
  11. //include($lvc_include_dir.'new-visitor.inc.php3');
  12. /*include "include/random.inc.php";
  13. include "include/timer.inc.php";*/
  14. //$param = parse_ini_file("config/pip.ini");
  15. //extract($param);
  16. /* $NewsFileLogo = "modules/news/logos";
  17. $couleur = RandomColors(); */
  18. include "include/theme.inc.php";
  19. if (file_exists("themes/$theme/theme.php"))
  20. include "themes/$theme/theme.php";
  21. else
  22. include "themes/e/theme.php";
  23. if (!isset($section) || $section == "")
  24. $section="pages";
  25. if ($page == "index")
  26. $page="menu";
  27. if (isset($File))
  28. $FileNews = $File;
  29. // if (!isset($FileNews))
  30. // $FileNews = "modules/news/news";
  31. extract($themeset, EXTR_OVERWRITE);
  32. include "include/head.inc.php";
  33. include "include/body.inc.php";
  34. // ************** haut de page ******************
  35. /*if (!isset($header) || ($header ==1))
  36. {
  37. include "header.php";
  38. }*/
  39. echo "<table border='0' width='100%'><tr>\n"; // tableau principal
  40. // *************** gauche *****************
  41. if (!isset($left) || ($left ==1))
  42. {
  43. //echo "<div class='ltop'>";
  44. $cachefile = "tmp/left.cache.html";
  45. if (!file_exists($cachefile) || (filemtime($cachefile) < filemtime("modules/liens")))
  46. {
  47. $cachecontent=file_get_contents("http://tma.tourmentine.com/left.php");
  48. $fp = fopen($cachefile,"w");
  49. fwrite($fp,$cachecontent);
  50. fclose($fp);
  51. }
  52. echo "\n\n<!-- Partie mise en cache (".date("d/m/Y@H:i:s", filemtime($cachefile)).")-->\n\n";
  53. echo "<td valign='top' class='colonne'>\n";
  54. include $cachefile;
  55. echo "</td>\n";
  56. echo "\n<!-- fin Partie mise en cache -->\n\n";
  57. // echo "</div>";
  58. }
  59. // ************** centre ****************
  60. echo "<td class='pageseparator'><img src='/modules/share/trans.gif' alt='' title='' width='20' class='border0' /></td><td valign='top'>\n";
  61. // --- gestion des modules ---
  62. if (isset($modulepage))
  63. {
  64. //include "include/logo.inc.php";
  65. switch($modulepage)
  66. {
  67. case "sondage":
  68. extract($themeset, EXTR_OVERWRITE);
  69. $headstartcode = "<font name='verdana' size='3' class='centerhead'>";
  70. $headendcode ="</font>";
  71. $bodyclass="centerbody";
  72. $module = "sondage";
  73. $titre = "Résultats du sondage";
  74. include "modules/magicbox.php";
  75. break;
  76. case "goldbook":
  77. unset($NbMaxPost);
  78. extract($themeset, EXTR_OVERWRITE);
  79. $headstartcode = "<font size='3' class='centerhead'>";
  80. $headendcode ="</font>";
  81. $bodyclass = "centerbody";
  82. $module = "goldbook";
  83. $titre = "Livre d'or";
  84. $GoldbookFile = "goldbook";
  85. echo "<br /><br /><br />\n<div align='center'><h1>Laissez-nous un message...</h1></div><br />\n";
  86. include "modules/magicbox.php";
  87. unset($bodyclass);
  88. break;
  89. case "addnews":
  90. extract($themeset, EXTR_OVERWRITE);
  91. if (isset($File))
  92. $FileNews = $File;
  93. // fichier de news par défaut
  94. if (!isset($FileNews))
  95. $FileNews = "modules/news/news";
  96. $headstartcode = "<font name='verdana' size='3' class='centerhead'>";
  97. $headendcode ="</font>";
  98. $bodyclass = "centerbody";
  99. $module = "admin/addnews";
  100. $titre = "Ajout d'une nouvelle";
  101. include "modules/magicbox.php";
  102. unset($bodyclass);
  103. // unset($NewsFile);
  104. // unset($File);
  105. break;
  106. case "affnews":
  107. if (isset($File))
  108. $FileNews = $File;
  109. if (!isset($FileNews))
  110. $FileNews = "modules/news/pipnews";
  111. // appel direct du module affnews ; magicbox est appelé par ce dernier
  112. include "modules/affnews.php";
  113. unset($NewsFile);
  114. // unset($newsnb);
  115. //unset($File);
  116. break;
  117. case "commentnews":
  118. if (isset($File))
  119. $FileNews = $File;
  120. if (!isset($FileNews))
  121. $FileNews = "modules/news/news";
  122. $modulepage="affnews";
  123. $start=$idnews;
  124. $NbMaxNews=1;
  125. include "modules/affnews.php";
  126. $headstartcode = "<font name='verdana' size='3' class='centerhead'>";
  127. $headendcode ="</font>";
  128. $bodyclass = "centerbody";
  129. $module = "forum";
  130. $titre = "Commentaires";
  131. //$goldbooktype = "comment";
  132. $forumfile = "$FileNews.$idnews.forum.csv";
  133. include "modules/magicbox.php";
  134. //$modulepage = "commentbook";
  135. // unset($goldbooktype);
  136. // unset($NewsFile);
  137. // unset($File);
  138. break;
  139. case "print":
  140. if (isset($File))
  141. $FileNews = $File;
  142. if (!isset($FileNews))
  143. $FileNews = "modules/news/news";
  144. include "modules/print.php";
  145. break;
  146. case "backend":
  147. if (isset($File))
  148. $FileNews = $File;
  149. if (!isset($FileNews))
  150. $FileNews = "modules/news/news";
  151. include "modules/genbackend.php";
  152. break;
  153. case "chatlogin":
  154. extract($themeset, EXTR_OVERWRITE);
  155. $bodyclass = "centerbody";
  156. $module = "kikchat/login";
  157. $headstartcode = "<font name='verdana' size='3' class='centerhead'>";
  158. $headendcode ="</font>";
  159. $titre = "Bienvenue sur le chat";
  160. $bodystartcode="<div align=center>";
  161. $bodyendcode="</div>";
  162. $footerbox = 1;
  163. $footerboxtext = "Retour au menu";
  164. $footerlien = "/";
  165. include "modules/magicbox.php";
  166. unset($bodyclass);
  167. break;
  168. case "kikchat":
  169. extract($themeset, EXTR_OVERWRITE);
  170. $bodyclass = "centerbody";
  171. $module = "kikchat/post";
  172. $titre = "Kik it Productions' Live Chat";
  173. $headlien = "http://www.kik-it.com";
  174. $footerbox = 1;
  175. $footerboxtext = "Retour au menu";
  176. $footerlien = "/";
  177. include "modules/magicbox.php";
  178. unset($bodyclass);
  179. break;
  180. case "affimage":
  181. extract($themeset, EXTR_OVERWRITE);
  182. // $headstartcode = "<font name='verdana' size=4 class='centerhead'>";
  183. // $headendcode ="</font>";
  184. $bodyclass = "centerbody";
  185. $module = "affimages";
  186. $titre = $image;
  187. $footerbox = 1;
  188. $footerboxtext = "Retour au menu";
  189. $footerlien = "/";
  190. include "modules/magicbox.php";
  191. unset($bodyclass);
  192. break;
  193. default:
  194. include "pages/menu.php";
  195. }
  196. }
  197. else
  198. {
  199. // ---- affichage des pages ----
  200. //echo "<div align='center'>";
  201. if (isset($section) && isset($page) && $page != "menu")
  202. {
  203. // si url éronnée, affiche la page d'acceuil
  204. if (file_exists("$section/$page.php"))
  205. {
  206. /* echo "<div id='left'>"; */
  207. include_once "$section/$page.php";
  208. /* echo "</div>";*/
  209. }
  210. else
  211. include_once "pages/menu.php";
  212. echo "<div class='center'><a href='/'>&gt;Retour à la page d'accueil&lt;</a><br /></div>";
  213. }
  214. else
  215. {
  216. //include "include/logo.inc.php";
  217. include "pages/menu.php";
  218. }
  219. }
  220. echo "</td>";
  221. // *************** droite *************************
  222. /*if (!isset($right) || ($right == 1))
  223. {
  224. echo "<td><img src='/modules/share/trans.gif' alt='' width='20' /></td>";
  225. echo "<td align='right' valign='top' width='135'>";
  226. include_once "right.php";
  227. echo "</td>";
  228. }*/
  229. echo "</tr></table>";
  230. //****************** pied de page *********************
  231. //require_once "footer.php";
  232. $endgen = getmicrotime();
  233. $timegen = round($endgen - $startgen, 2);
  234. echo "\n<!-- page générée en $timegen secondes -->\n\n";
  235. ?>
  236. <?php /*
  237. <!-- Piwik -->
  238. <script type="text/javascript">
  239. var pkBaseURL = (("https:" == document.location.protocol) ? "https://stats.tourmentine.com/piwik/" : "http://stats.tourmentine.com/piwik/");
  240. document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
  241. </script><script type="text/javascript">
  242. try {
  243. var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 5);
  244. piwikTracker.trackPageView();
  245. piwikTracker.enableLinkTracking();
  246. } catch( err ) {}
  247. </script><noscript><p><img src="http://stats.tourmentine.com/piwik/piwik.php?idsite=5" style="border:0" alt="" /></p></noscript>
  248. <!-- End Piwik Tracking Code -->
  249. */
  250. ?>
  251. </body>
  252. </html>