ci #1

Merged
n merged 3 commits from ci into main 2024-02-12 21:41:22 +01:00
45 changed files with 938 additions and 958 deletions
Showing only changes of commit 0a3c559a59 - Show all commits

View file

@ -14,4 +14,3 @@ define("MODULES_TRIBUNE_PATH",IFPP_PATH.MODULES_PATH."/tribune");
include INCLUDE_PATH."/body.inc.php"; include INCLUDE_PATH."/body.inc.php";
echo INCLUDE_PATH; echo INCLUDE_PATH;
?>

View file

@ -1,15 +1,18 @@
<?php <?php
echo "<img src='images/li_lgn1_animated.gif' width=100%><div align=center> echo "<img src='images/li_lgn1_animated.gif' width=100%><div align=center>
<table border=0 width='100%' valign=bottom><tr> <table border=0 width='100%' valign=bottom><tr>
<td align =center>\n<a href='http://fr.php.net/' target='_blank'>\n<img src='images/"; <td align =center>\n<a href='http://fr.php.net/' target='_blank'>\n<img src='images/";
if (date("n")!="4") if (date("n") != "4") {
echo "elephpant.gif"; echo "elephpant.gif";
else } else {
echo "phpoisson_davril.gif"; echo "phpoisson_davril.gif";
}
echo "' alt='Ce site utilise PHP5' title='Ce site utilise PHP5' border=0></a>\n</td>\n"; echo "' alt='Ce site utilise PHP5' title='Ce site utilise PHP5' border=0></a>\n</td>\n";
if ($HTTP_GET_VARS["IFRANCE"] =="1") if ($HTTP_GET_VARS["IFRANCE"] == "1") {
echo "<td align=center>{=compt_puce_b}</td>\n"; echo "<td align=center>{=compt_puce_b}</td>\n";
}
echo " echo "
<td align=center>\n<a href='http://www.ifrance.com/phpinfo/index.php?section=pages/pip&page=index&theme=$theme' target='_blank'>\n<img src='images/mercipip.jpg' height=45 width=102 alt='Powered by PIP' title='Powered by PIP' border=0></a>\n</td> <td align=center>\n<a href='http://www.ifrance.com/phpinfo/index.php?section=pages/pip&page=index&theme=$theme' target='_blank'>\n<img src='images/mercipip.jpg' height=45 width=102 alt='Powered by PIP' title='Powered by PIP' border=0></a>\n</td>
@ -20,4 +23,3 @@ echo "
</tr></table></div></div>\n"; </tr></table></div></div>\n";
// echo "<br><a href=\"index.php\">retour au menu</a><br></div>"; // echo "<br><a href=\"index.php\">retour au menu</a><br></div>";
?>

View file

@ -18,4 +18,3 @@ $noir = "#000000";
$blanc = "#FFFFFF"; $blanc = "#FFFFFF";
*/ */
echo "<body onload=\"initLightbox(); useStyleAgain('styleTestStore');\" onunload=\"rememberStyle('styleTestStore');\">"; echo "<body onload=\"initLightbox(); useStyleAgain('styleTestStore');\" onunload=\"rememberStyle('styleTestStore');\">";
?>

View file

@ -2,10 +2,11 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php <?php
if ($titlepage == "") if ($titlepage == "") {
$titlepage = "Train Miniature Avallonnais"; $titlepage = "Train Miniature Avallonnais";
else } else {
$titlepage = "Train Miniature Avallonnais : $titlepage"; $titlepage = "Train Miniature Avallonnais : $titlepage";
}
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"fr\"> echo "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"fr\">
<head> <head>

View file

@ -1,4 +1,5 @@
<?php <?php
require_once "include/standard.inc.php"; require_once "include/standard.inc.php";
require_once "include/timer.inc.php"; require_once "include/timer.inc.php";
require_once "include/random.inc.php"; require_once "include/random.inc.php";
@ -8,8 +9,7 @@ require_once "include/random.inc.php";
// valeur = 24h. // valeur = 24h.
$Logo = timer("logo", 240000); $Logo = timer("logo", 240000);
if ($Logo == FALSE) if ($Logo == false) {
{
while (($RandomLogo = RandomFile("images/logos/")) == $Logo); while (($RandomLogo = RandomFile("images/logos/")) == $Logo);
settimer("logo", "$RandomLogo"); settimer("logo", "$RandomLogo");
$Logo = $RandomLogo; $Logo = $RandomLogo;
@ -17,5 +17,3 @@ if ($Logo == FALSE)
echo "<a href='leclub.html' title='TMA'><img src='images/logos/$Logo' alt='TMA' width='147' height='82' class='border2' /></a>"; echo "<a href='leclub.html' title='TMA'><img src='images/logos/$Logo' alt='TMA' width='147' height='82' class='border2' /></a>";
unset($Logo); unset($Logo);
unset($RandomLogo); unset($RandomLogo);
?>

View file

@ -1,14 +1,14 @@
<?php <?php
// plante la graine... // plante la graine...
@mt_srand ((double) microtime() * 1000000); @mt_srand((float) microtime() * 1000000);
function RandomColors() function RandomColors()
{ {
$colors = array("ccccff","cceecc","ffcccc","eeccee","ffccff","cceeee","cceeff"); $colors = array("ccccff","cceecc","ffcccc","eeccee","ffccff","cceeee","cceeff");
$color[0] = $color[1] = "000000"; $color[0] = $color[1] = "000000";
while ($color[0] == $color[1]) while ($color[0] == $color[1]) {
{
$color[0] = $colors[mt_rand(0, count($colors) - 1)]; $color[0] = $colors[mt_rand(0, count($colors) - 1)];
$color[1] = $colors[mt_rand(0, count($colors) - 1)]; $color[1] = $colors[mt_rand(0, count($colors) - 1)];
} }
@ -23,19 +23,20 @@ function RandomFile($dirname)
$i = 0; $i = 0;
$d = opendir($dirname); $d = opendir($dirname);
while (false!==($rfile = readdir($d))) while (false !== ($rfile = readdir($d))) {
if (($rfile[0] != ".") && is_file($dirname."/".$rfile)) if (($rfile[0] != ".") && is_file($dirname."/".$rfile)) {
$listfiles[++$i] = $rfile; $listfiles[++$i] = $rfile;
}
}
closedir($d); closedir($d);
if (count($listfiles) > 1) if (count($listfiles) > 1) {
$rfile = $listfiles[mt_rand(1, count($listfiles))]; $rfile = $listfiles[mt_rand(1, count($listfiles))];
else } else {
$rfile = $listfiles[1]; $rfile = $listfiles[1];
}
@array_splice($listfiles, 0); @array_splice($listfiles, 0);
return $rfile; return $rfile;
} }
?>

View file

@ -1,4 +1,5 @@
<?php <?php
// extract($themeset, EXTR_OVERWRITE); // extract($themeset, EXTR_OVERWRITE);
// fonctions & icones par nitro skateboarding // fonctions & icones par nitro skateboarding
@ -73,12 +74,13 @@ function caller()
global $modulepage; global $modulepage;
global $theme; global $theme;
if (($section != "") && ($page != "")) if (($section != "") && ($page != "")) {
$liencaller = "index.php?section=$section&page=$page&theme=$theme"; $liencaller = "index.php?section=$section&page=$page&theme=$theme";
else if ($modulepage != "") } elseif ($modulepage != "") {
$liencaller = "index.php?modulepage=$modulepage&theme=$theme"; $liencaller = "index.php?modulepage=$modulepage&theme=$theme";
else } else {
$liencaller = "index.php?theme=$theme"; $liencaller = "index.php?theme=$theme";
}
return $liencaller; return $liencaller;
} }
@ -93,15 +95,16 @@ function formcaller()
global $modulepage; global $modulepage;
global $theme; global $theme;
if (($section != "") && ($page != "")) if (($section != "") && ($page != "")) {
$formcaller = "<input name='theme' value='$theme' type=hidden> $formcaller = "<input name='theme' value='$theme' type=hidden>
<input name='section' value='$section' type=hidden> <input name='section' value='$section' type=hidden>
<input name='page' value='$page' type=hidden>"; <input name='page' value='$page' type=hidden>";
else if ($modulepage != "") } elseif ($modulepage != "") {
$formcaller = "<input name='theme' value='$theme' type=hidden> $formcaller = "<input name='theme' value='$theme' type=hidden>
<input name='modulepage' value='$modulepage' type=hidden>"; <input name='modulepage' value='$modulepage' type=hidden>";
else } else {
$formcaller = "<input name='theme' value='$theme' type=hidden>"; $formcaller = "<input name='theme' value='$theme' type=hidden>";
}
return $formcaller; return $formcaller;
} }
@ -110,8 +113,7 @@ function formcaller()
function splitchar($Number) function splitchar($Number)
{ {
$byte = strval(dechex($Number)); $byte = strval(dechex($Number));
switch(strlen($byte)) switch(strlen($byte)) {
{
case 1: case 1:
$byte0 = $byte; $byte0 = $byte;
$byte1 = $byte2 = $byte3 = 0; $byte1 = $byte2 = $byte3 = 0;
@ -141,6 +143,7 @@ function splitchar($Number)
$byte1 = "$byte[2]$byte[3]"; $byte1 = "$byte[2]$byte[3]";
$byte2 = "$byte[0]$byte[1]"; $byte2 = "$byte[0]$byte[1]";
$byte3 = 0; $byte3 = 0;
// no break
case 7: case 7:
$byte0 = "$byte[5]$byte[6]"; $byte0 = "$byte[5]$byte[6]";
$byte1 = "$byte[3]$byte[4]"; $byte1 = "$byte[3]$byte[4]";
@ -168,28 +171,32 @@ function strfile($FileName)
$Nb = 0; $Nb = 0;
$index[$Nb++] = "0"; $index[$Nb++] = "0";
$input = fopen("$FileName.csv", "r"); $input = fopen("$FileName.csv", "r");
while ($data = fgetcsv($input, 10000, ",")) while ($data = fgetcsv($input, 10000, ",")) {
$index[$Nb++] = ftell($input); $index[$Nb++] = ftell($input);
}
fclose($input); fclose($input);
$index[--$Nb] = 0; $index[--$Nb] = 0;
$output = fopen("$FileName.dat", "w"); $output = fopen("$FileName.dat", "w");
fwrite($output, splitchar($Nb)); fwrite($output, splitchar($Nb));
for ($i = 0 ; $i < $Nb ; $i++) for ($i = 0 ; $i < $Nb ; $i++) {
fwrite($output, splitchar($index[$i])); fwrite($output, splitchar($index[$i]));
}
fclose($output); fclose($output);
} }
// lit un fichier d'index et renvoie l'index correspondant au numéro d'enregistrement // lit un fichier d'index et renvoie l'index correspondant au numéro d'enregistrement
function unstr($FileName, $Num) function unstr($FileName, $Num)
{ {
if (!file_exists("$FileName.dat")) if (!file_exists("$FileName.dat")) {
strfile($FileName); strfile($FileName);
}
$indexfile = fopen("$FileName.dat", "r"); $indexfile = fopen("$FileName.dat", "r");
$total = hexdec(bin2hex(fread($indexfile, 4))); $total = hexdec(bin2hex(fread($indexfile, 4)));
// echo $total; // echo $total;
if ($Num > $total) if ($Num > $total) {
$Num = $total; $Num = $total;
}
fseek($indexfile, ($Num * 4) + 4); fseek($indexfile, ($Num * 4) + 4);
$pos = hexdec(bin2hex(fread($indexfile, 4))); $pos = hexdec(bin2hex(fread($indexfile, 4)));
fclose($indexfile); fclose($indexfile);
@ -199,8 +206,9 @@ function unstr($FileName,$Num)
// retourne le nombre d'enregistrement d'après le fichier d'index // retourne le nombre d'enregistrement d'après le fichier d'index
function gettotal($FileName) function gettotal($FileName)
{ {
if (!file_exists("$FileName.dat")) if (!file_exists("$FileName.dat")) {
strfile($FileName); strfile($FileName);
}
$indexfile = fopen("$FileName.dat", "r"); $indexfile = fopen("$FileName.dat", "r");
return hexdec(bin2hex(fread($indexfile, 4))); return hexdec(bin2hex(fread($indexfile, 4)));
} }
@ -210,8 +218,9 @@ function countcsv($File)
{ {
$max = 0; $max = 0;
$fd = fopen("$File.csv", "r"); $fd = fopen("$File.csv", "r");
while (fgetcsv($fd,10000 , ",")) while (fgetcsv($fd, 10000, ",")) {
$max++; $max++;
}
fclose($fd); fclose($fd);
return $max; return $max;
} }
@ -251,8 +260,7 @@ function password($folder)
$fd = fopen("$folder/password.txt", "r"); $fd = fopen("$folder/password.txt", "r");
$titre = fgetcsv($fd, 10000, ","); $titre = fgetcsv($fd, 10000, ",");
while($fd) while($fd) {
{
$data = fgetcsv($fd, 10000, ","); $data = fgetcsv($fd, 10000, ",");
$login[$i] = $data[0]; $login[$i] = $data[0];
$mdp[$i] = $data[1]; $mdp[$i] = $data[1];
@ -263,20 +271,14 @@ function password($folder)
// vide le cache // vide le cache
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date du passé header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date du passé
if (!isset($PHP_AUTH_USER)) if (!isset($PHP_AUTH_USER)) {
{
header("WWW-Authenticate: Basic realm=\"iphp\" "); header("WWW-Authenticate: Basic realm=\"iphp\" ");
err401("Action annulée"); err401("Action annulée");
} } else {
else
{
if ($login[0] == $PHP_AUTH_USER) if ($login[0] == $PHP_AUTH_USER) {
{
echo "bienvenue superuser !"; echo "bienvenue superuser !";
} } else {
else
{
while (($login[$Cpt++] != $PHP_AUTH_USER) && ($mdp[$Cpt++] != $PHP_AUTH_PW)); while (($login[$Cpt++] != $PHP_AUTH_USER) && ($mdp[$Cpt++] != $PHP_AUTH_PW));
echo "bienvenue user !"; echo "bienvenue user !";
} }
@ -289,8 +291,9 @@ function addlog($url)
{ {
$File = "/logs/".str_replace("/", "_", $url).".log"; $File = "/logs/".str_replace("/", "_", $url).".log";
// si le fichier n'existe pas, on le crée: // si le fichier n'existe pas, on le crée:
if (!file_exists("$File.csv") ) if (!file_exists("$File.csv")) {
createfile("$File.csv"); createfile("$File.csv");
}
$date = strftime("%d/%m/%Y", time()); $date = strftime("%d/%m/%Y", time());
@ -358,17 +361,13 @@ function nb_visiteurs_connecte($time,$filename="/tmp/nbweb.dat")
$ii = 0; $ii = 0;
$bool = 0; $bool = 0;
if(file_exists($filename)) if(file_exists($filename)) {
{ if($fichier = fopen($filename, "r")) {
if($fichier=fopen($filename,"r")) while(!feof($fichier)) {
{
while(!feof($fichier))
{
$ligne = fgets($fichier, 4096); $ligne = fgets($fichier, 4096);
$tab = explode("|", $ligne); $tab = explode("|", $ligne);
if($tab[1]>0) if($tab[1] > 0) {
{
$tab_de_tab[$i][0] = $tab[0]; $tab_de_tab[$i][0] = $tab[0];
$tab_de_tab[$i][1] = $tab[1]; $tab_de_tab[$i][1] = $tab[1];
@ -379,39 +378,30 @@ function nb_visiteurs_connecte($time,$filename="/tmp/nbweb.dat")
} }
} }
for($j=0;$j<$i;$j++) for($j = 0;$j < $i;$j++) {
{ if(($date - chop($tab_de_tab[$j][1])) > $time) {
if(($date-chop($tab_de_tab[$j][1]))>$time)
{
//on ne fait rien //on ne fait rien
} } else {
else
{
$tab_de_tab_actualise[$ii][0] = $tab_de_tab[$j][0]; $tab_de_tab_actualise[$ii][0] = $tab_de_tab[$j][0];
$tab_de_tab_actualise[$ii][1] = chop($tab_de_tab[$j][1]); $tab_de_tab_actualise[$ii][1] = chop($tab_de_tab[$j][1]);
$ii++; $ii++;
} }
} }
for($j=0;$j<$ii;$j++) for($j = 0;$j < $ii;$j++) {
{ if($tab_de_tab_actualise[$j][0] == $ip) {
if($tab_de_tab_actualise[$j][0]==$ip)
{
$bool = 1; $bool = 1;
} }
} }
if($bool==0) if($bool == 0) {
{
$tab_de_tab_actualise[$ii][0] = $ip; $tab_de_tab_actualise[$ii][0] = $ip;
$tab_de_tab_actualise[$ii][1] = $date; $tab_de_tab_actualise[$ii][1] = $date;
$ii++; $ii++;
} }
if($fichier=fopen($filename,"w")) if($fichier = fopen($filename, "w")) {
{ for($j = 0;$j < $ii;$j++) {
for($j=0;$j<$ii;$j++)
{
fputs($fichier, chop($tab_de_tab_actualise[$j][0])); fputs($fichier, chop($tab_de_tab_actualise[$j][0]));
fputs($fichier, "|"); fputs($fichier, "|");
fputs($fichier, chop($tab_de_tab_actualise[$j][1])); fputs($fichier, chop($tab_de_tab_actualise[$j][1]));
@ -423,7 +413,3 @@ function nb_visiteurs_connecte($time,$filename="/tmp/nbweb.dat")
return $ii; return $ii;
} }
?>

View file

@ -1,5 +1,5 @@
<?php <?php
if (!isset($theme))
$theme = "default";
?> if (!isset($theme)) {
$theme = "default";
}

View file

@ -1,14 +1,16 @@
<?php <?php
/* fixe un timer */ /* fixe un timer */
function settimer($TimerName, $String) function settimer($TimerName, $String)
{ {
$FileTimerName = "modules/timers/$TimerName.csv"; $FileTimerName = "modules/timers/$TimerName.csv";
if (strftime("%m", time()) < 10) if (strftime("%m", time()) < 10) {
$Date = strftime("%Y%0m%d%H%M%S", time()); $Date = strftime("%Y%0m%d%H%M%S", time());
else } else {
$Date = strftime("%Y%m%d%H%M%S", time()); $Date = strftime("%Y%m%d%H%M%S", time());
}
$fp = fopen("$FileTimerName", "w+"); $fp = fopen("$FileTimerName", "w+");
$Ligne = sprintf("\"".$Date."\",\"".$String."\"\n"); $Ligne = sprintf("\"".$Date."\",\"".$String."\"\n");
@ -24,17 +26,15 @@ function timer($TimerName,$TimerNb)
$FileTimerN = "modules/timers/$TimerName.csv"; $FileTimerN = "modules/timers/$TimerName.csv";
if (strftime("%m", time()) < 10) if (strftime("%m", time()) < 10) {
$Date = strftime("%Y%0m%d%H%M%S", time()); $Date = strftime("%Y%0m%d%H%M%S", time());
else } else {
$Date = strftime("%Y%m%d%H%M%S", time()); $Date = strftime("%Y%m%d%H%M%S", time());
if (!file_exists("$FileTimerN"))
{
$timer = FALSE;
} }
else
{ if (!file_exists("$FileTimerN")) {
$timer = false;
} else {
// lecture de la date stockée dans le fichier // lecture de la date stockée dans le fichier
$fp = fopen("$FileTimerN", "r"); $fp = fopen("$FileTimerN", "r");
$data = fgetcsv($fp, 1000, ","); $data = fgetcsv($fp, 1000, ",");
@ -45,13 +45,10 @@ function timer($TimerName,$TimerNb)
$String = $data[1]; $String = $data[1];
if ($Date >= ($FileDate+$TimerNb)) if ($Date >= ($FileDate + $TimerNb)) {
{
// echo "date dépassée:".$Date." >= ".($FileDate+$TimerNb)."<br>"; // echo "date dépassée:".$Date." >= ".($FileDate+$TimerNb)."<br>";
$timer = FALSE; $timer = false;
} } else {
else
{
$timer = $String; $timer = $String;
} }
} }
@ -63,11 +60,10 @@ function timer($TimerName,$TimerNb)
function iheure() function iheure()
{ {
if ($HTTP_GET_VARS["IFRANCE"] =="1") if ($HTTP_GET_VARS["IFRANCE"] == "1") {
$iheure = $I_HEURE_UK; $iheure = $I_HEURE_UK;
else } else {
$iheure = date("H:i"); $iheure = date("H:i");
}
return $iheure; return $iheure;
} }
?>

View file

@ -3,7 +3,8 @@
$page = $_GET["page"]; $page = $_GET["page"];
$modulepage = $_GET["modulepage"]; $modulepage = $_GET["modulepage"];
function getmicrotime(){ function getmicrotime()
{
list($usec, $sec) = explode(" ", microtime()); list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec); return ((float)$usec + (float)$sec);
} }
@ -23,19 +24,23 @@ $couleur = RandomColors(); */
include "include/theme.inc.php"; include "include/theme.inc.php";
if (file_exists("themes/$theme/theme.php")) if (file_exists("themes/$theme/theme.php")) {
include "themes/$theme/theme.php"; include "themes/$theme/theme.php";
else } else {
include "themes/e/theme.php"; include "themes/e/theme.php";
}
if (!isset($section) || $section == "") if (!isset($section) || $section == "") {
$section = "pages"; $section = "pages";
}
if ($page == "index") if ($page == "index") {
$page = "menu"; $page = "menu";
}
if (isset($File)) if (isset($File)) {
$FileNews = $File; $FileNews = $File;
}
// if (!isset($FileNews)) // if (!isset($FileNews))
// $FileNews = "modules/news/news"; // $FileNews = "modules/news/news";
@ -54,12 +59,10 @@ include "include/body.inc.php";
echo "<table border='0' width='100%'><tr>\n"; // tableau principal echo "<table border='0' width='100%'><tr>\n"; // tableau principal
// *************** gauche ***************** // *************** gauche *****************
if (!isset($left) || ($left ==1)) if (!isset($left) || ($left == 1)) {
{
//echo "<div class='ltop'>"; //echo "<div class='ltop'>";
$cachefile = "tmp/left.cache.html"; $cachefile = "tmp/left.cache.html";
if (!file_exists($cachefile) || (filemtime($cachefile) < filemtime("modules/liens"))) if (!file_exists($cachefile) || (filemtime($cachefile) < filemtime("modules/liens"))) {
{
$cachecontent = file_get_contents("http://tma.tourmentine.com/left.php"); $cachecontent = file_get_contents("http://tma.tourmentine.com/left.php");
$fp = fopen($cachefile, "w"); $fp = fopen($cachefile, "w");
fwrite($fp, $cachecontent); fwrite($fp, $cachecontent);
@ -76,11 +79,9 @@ if (!isset($left) || ($left ==1))
echo "<td class='pageseparator'><img src='/modules/share/trans.gif' alt='' title='' width='20' class='border0' /></td><td valign='top'>\n"; echo "<td class='pageseparator'><img src='/modules/share/trans.gif' alt='' title='' width='20' class='border0' /></td><td valign='top'>\n";
// --- gestion des modules --- // --- gestion des modules ---
if (isset($modulepage)) if (isset($modulepage)) {
{
//include "include/logo.inc.php"; //include "include/logo.inc.php";
switch($modulepage) switch($modulepage) {
{
case "sondage": case "sondage":
extract($themeset, EXTR_OVERWRITE); extract($themeset, EXTR_OVERWRITE);
@ -111,12 +112,14 @@ if (isset($modulepage))
case "addnews": case "addnews":
extract($themeset, EXTR_OVERWRITE); extract($themeset, EXTR_OVERWRITE);
if (isset($File)) if (isset($File)) {
$FileNews = $File; $FileNews = $File;
}
// fichier de news par défaut // fichier de news par défaut
if (!isset($FileNews)) if (!isset($FileNews)) {
$FileNews = "modules/news/news"; $FileNews = "modules/news/news";
}
$headstartcode = "<font name='verdana' size='3' class='centerhead'>"; $headstartcode = "<font name='verdana' size='3' class='centerhead'>";
$headendcode = "</font>"; $headendcode = "</font>";
@ -132,11 +135,13 @@ if (isset($modulepage))
case "affnews": case "affnews":
if (isset($File)) if (isset($File)) {
$FileNews = $File; $FileNews = $File;
}
if (!isset($FileNews)) if (!isset($FileNews)) {
$FileNews = "modules/news/pipnews"; $FileNews = "modules/news/pipnews";
}
// appel direct du module affnews ; magicbox est appelé par ce dernier // appel direct du module affnews ; magicbox est appelé par ce dernier
include "modules/affnews.php"; include "modules/affnews.php";
@ -146,11 +151,13 @@ if (isset($modulepage))
break; break;
case "commentnews": case "commentnews":
if (isset($File)) if (isset($File)) {
$FileNews = $File; $FileNews = $File;
}
if (!isset($FileNews)) if (!isset($FileNews)) {
$FileNews = "modules/news/news"; $FileNews = "modules/news/news";
}
$modulepage = "affnews"; $modulepage = "affnews";
$start = $idnews; $start = $idnews;
@ -171,21 +178,25 @@ if (isset($modulepage))
// unset($File); // unset($File);
break; break;
case "print": case "print":
if (isset($File)) if (isset($File)) {
$FileNews = $File; $FileNews = $File;
}
if (!isset($FileNews)) if (!isset($FileNews)) {
$FileNews = "modules/news/news"; $FileNews = "modules/news/news";
}
include "modules/print.php"; include "modules/print.php";
break; break;
case "backend": case "backend":
if (isset($File)) if (isset($File)) {
$FileNews = $File; $FileNews = $File;
}
if (!isset($FileNews)) if (!isset($FileNews)) {
$FileNews = "modules/news/news"; $FileNews = "modules/news/news";
}
include "modules/genbackend.php"; include "modules/genbackend.php";
break; break;
@ -242,27 +253,21 @@ if (isset($modulepage))
} }
} } else {
else
{
// ---- affichage des pages ---- // ---- affichage des pages ----
//echo "<div align='center'>"; //echo "<div align='center'>";
if (isset($section) && isset($page) && $page != "menu") if (isset($section) && isset($page) && $page != "menu") {
{
// si url éronnée, affiche la page d'acceuil // si url éronnée, affiche la page d'acceuil
if (file_exists("$section/$page.php")) if (file_exists("$section/$page.php")) {
{
/* echo "<div id='left'>"; */ /* echo "<div id='left'>"; */
include_once "$section/$page.php"; include_once "$section/$page.php";
/* echo "</div>";*/ /* echo "</div>";*/
} } else {
else
include_once "pages/menu.php"; include_once "pages/menu.php";
}
echo "<div class='center'><a href='/'>&gt;Retour à la page d'accueil&lt;</a><br /></div>"; echo "<div class='center'><a href='/'>&gt;Retour à la page d'accueil&lt;</a><br /></div>";
} } else {
else
{
//include "include/logo.inc.php"; //include "include/logo.inc.php";
include "pages/menu.php"; include "pages/menu.php";
} }

View file

@ -1,10 +1,11 @@
<?php <?php
include_once "include/theme.inc.php"; include_once "include/theme.inc.php";
if (file_exists("themes/$theme/theme.php")) if (file_exists("themes/$theme/theme.php")) {
include_once "themes/$theme/theme.php"; include_once "themes/$theme/theme.php";
else } else {
include_once "themes/e/theme.php"; include_once "themes/e/theme.php";
}
$module = "liens"; $module = "liens";
$titre = "La gare d'Avallon"; $titre = "La gare d'Avallon";
$FileName = "modules/liens/lagare.csv"; $FileName = "modules/liens/lagare.csv";
@ -40,4 +41,3 @@ $FileName = "modules/liens/themes.csv";
//include "modules/magicbox.php"; //include "modules/magicbox.php";
unset($titleonly); unset($titleonly);
unset($FileNews); unset($FileNews);
?>

View file

@ -1,5 +1,3 @@
<?php <?php
echo "<div align=center valign=middle><img src='images/ayo73/$image' width=134 alt='$image' title='$image'></div>"; echo "<div align=center valign=middle><img src='images/ayo73/$image' width=134 alt='$image' title='$image'></div>";
?>

View file

@ -11,8 +11,9 @@ include_once "include/standard.inc.php";
extract($_POST); extract($_POST);
if (isset($GoldbookFile) && $GoldbookFile != "") if (isset($GoldbookFile) && $GoldbookFile != "") {
$GoldbookFile = "default"; $GoldbookFile = "default";
}
$Cpt = 0; $Cpt = 0;
@ -40,17 +41,14 @@ else*/
// <hr></td></tr>\n"; // <hr></td></tr>\n";
unset($File); unset($File);
// si le fichier n'existe pas, on le crée: // si le fichier n'existe pas, on le crée:
if (!(file_exists("modules/goldbook/$GoldbookFile.csv"))) if (!(file_exists("modules/goldbook/$GoldbookFile.csv"))) {
{
$goldbook = fopen("modules/goldbook/$GoldbookFile.csv", "w+"); $goldbook = fopen("modules/goldbook/$GoldbookFile.csv", "w+");
fclose($goldbook); fclose($goldbook);
} }
// ajout des messages // ajout des messages
if ($param == "postgb") if ($param == "postgb") {
{ if ($VMessage != "" && isset($_POST['piejacon'])) {
if ($VMessage != "" && isset($_POST['piejacon']))
{
$date = strftime("%d/%m/%Y", time()); $date = strftime("%d/%m/%Y", time());
$iheure = date("H:i"); $iheure = date("H:i");
$VMessage = ereg_replace("<", "&lt;", $VMessage); $VMessage = ereg_replace("<", "&lt;", $VMessage);
@ -71,8 +69,7 @@ if ($param == "postgb")
// lecture des messages // lecture des messages
$goldbook = fopen("modules/goldbook/$GoldbookFile.csv", "r"); $goldbook = fopen("modules/goldbook/$GoldbookFile.csv", "r");
while ($data = fgetcsv($goldbook, 1000, ",")) while ($data = fgetcsv($goldbook, 1000, ",")) {
{
$VisitorDate[$Cpt] = $data[0]; $VisitorDate[$Cpt] = $data[0];
$VisitorTime[$Cpt] = $data[1]; $VisitorTime[$Cpt] = $data[1];
$VisitorName[$Cpt] = stripcslashes($data[2]); $VisitorName[$Cpt] = stripcslashes($data[2]);
@ -84,35 +81,34 @@ fclose($goldbook);
unset($data); unset($data);
unset($goldbook); unset($goldbook);
// si $NbMaxPost n'est pas défini, ou si il est plus grand que le nombre d'éléments, on l'ajuste à ce nombre // si $NbMaxPost n'est pas défini, ou si il est plus grand que le nombre d'éléments, on l'ajuste à ce nombre
if ((!isset($NbMaxPost)) || ($NbMaxPost > $Cpt)) if ((!isset($NbMaxPost)) || ($NbMaxPost > $Cpt)) {
{
$NbMaxPost = $Cpt; $NbMaxPost = $Cpt;
} }
// affichage des messages // affichage des messages
echo "<hr /><div class='left'>"; echo "<hr /><div class='left'>";
if ($NbMaxPost) if ($NbMaxPost) {
for($i=0;$i<=$NbMaxPost-1;$i++) for($i = 0;$i <= $NbMaxPost - 1;$i++) {
{ if ($VisitorName[$i] == "") {
if ($VisitorName[$i] == "")
$VisitorName[$i] = "Anonyme"; $VisitorName[$i] = "Anonyme";
}
if ($VisitorEmail[$i] != "") if ($VisitorEmail[$i] != "") {
$Visiteur = "<a href='mailto:".$VisitorEmail[$i]."'>".$VisitorName[$i]."</a>"; $Visiteur = "<a href='mailto:".$VisitorEmail[$i]."'>".$VisitorName[$i]."</a>";
else } else {
$Visiteur = $VisitorName[$i]; $Visiteur = $VisitorName[$i];
}
echo "<i>Posté le ".$VisitorDate[$i]." à ".$VisitorTime[$i]." par <b>".$Visiteur."</b></i>: echo "<i>Posté le ".$VisitorDate[$i]." à ".$VisitorTime[$i]." par <b>".$Visiteur."</b></i>:
<br />« ".$VisitorMessage[$i]." »<br/>"; <br />« ".$VisitorMessage[$i]." »<br/>";
if ($i != ($NbMaxPost-1)) if ($i != ($NbMaxPost - 1)) {
echo "<hr />"; echo "<hr />";
} }
}
}
echo "</div>"; echo "</div>";
$footerbox = 0; $footerbox = 0;
//$footerboxtext = "Retour au menu"; //$footerboxtext = "Retour au menu";
//$footerlien = "/"; //$footerlien = "/";
?>

View file

@ -10,16 +10,14 @@ MAJ : 04/02/04
$Cpt = 0; $Cpt = 0;
// si le fichier n'existe pas, on le crée: // si le fichier n'existe pas, on le crée:
if (!(file_exists($FileName))) if (!(file_exists($FileName))) {
{
$fp = fopen($FileName, "w+"); $fp = fopen($FileName, "w+");
fclose($fp); fclose($fp);
} }
$fp = fopen($FileName, "r"); $fp = fopen($FileName, "r");
while ($data = fgetcsv($fp, 1000, ",")) while ($data = fgetcsv($fp, 1000, ",")) {
{
$level[$Cpt] = $data[0]; $level[$Cpt] = $data[0];
$linkname[$Cpt] = stripcslashes($data[1]); $linkname[$Cpt] = stripcslashes($data[1]);
$url[$Cpt] = stripcslashes($data[2]); $url[$Cpt] = stripcslashes($data[2]);
@ -32,63 +30,53 @@ while ($data = fgetcsv($fp, 1000, ","))
fclose($fp); fclose($fp);
// si $NbMaxPost n'est pas défini, ou si il est plus grand que le nombre d'éléments, on l'ajuste à ce nombre // si $NbMaxPost n'est pas défini, ou si il est plus grand que le nombre d'éléments, on l'ajuste à ce nombre
if ((!isset($NbMaxPost)) || ($NbMaxPost > $Cpt)) if ((!isset($NbMaxPost)) || ($NbMaxPost > $Cpt)) {
{
$NbMaxPost = $Cpt; $NbMaxPost = $Cpt;
} }
include "include/theme.inc.php"; include "include/theme.inc.php";
if ($Cpt <= 0) if ($Cpt <= 0) {
{
echo "<b>Aucun lien pour l'instant</b><br />"; echo "<b>Aucun lien pour l'instant</b><br />";
} } else {
else if (isset($TypeListe) && ($TypeListe == "deroul")) {
{
if (isset($TypeListe) && ($TypeListe == "deroul"))
{
echo "<div class='center'><br /><form action='modules/redirect.php' method='get' target=\"_blank\">"; echo "<div class='center'><br /><form action='modules/redirect.php' method='get' target=\"_blank\">";
?> ?>
<?php <?php
echo "<select name='ListeLiens'>"; echo "<select name='ListeLiens'>";
for($i=0;$i<=$NbMaxPost-1;$i++) for($i = 0;$i <= $NbMaxPost - 1;$i++) {
{
echo "<option value='$url[$i]'>$linkname[$i]</option>\n"; echo "<option value='$url[$i]'>$linkname[$i]</option>\n";
} }
echo "</select><br /><br /><input type='submit' value='Go!'></form></div>"; echo "</select><br /><br /><input type='submit' value='Go!'></form></div>";
} } else {
else
{
// affichage des liens // affichage des liens
echo "<div class='left'>"; echo "<div class='left'>";
for($i=0;$i<=$NbMaxPost-1;$i++) for($i = 0;$i <= $NbMaxPost - 1;$i++) {
{ if ($level[$i] == 1) {
if ($level[$i] == 1)
{
echo "<b>"; echo "<b>";
if ($url[$i] != "") if ($url[$i] != "") {
{
echo "<a href='".$url[$i]."' title='".$comment[$i]."'"; echo "<a href='".$url[$i]."' title='".$comment[$i]."'";
if ($target[$i] != "") if ($target[$i] != "") {
echo " target=\"$target[$i]\""; echo " target=\"$target[$i]\"";
echo ">".$linkname[$i]."</a>";
} }
else echo $linkname[$i]; echo ">".$linkname[$i]."</a>";
} else {
echo $linkname[$i];
}
echo "</b><br />\n"; echo "</b><br />\n";
} } else {
else
{
echo "&nbsp;&nbsp;"; echo "&nbsp;&nbsp;";
if ($url[$i] != "") if ($url[$i] != "") {
{
echo "<a href='".$url[$i]."' title='".$comment[$i]."' "; echo "<a href='".$url[$i]."' title='".$comment[$i]."' ";
if ($target[$i] != "") if ($target[$i] != "") {
echo " target=\"$target[$i]\""; echo " target=\"$target[$i]\"";
echo ">".$linkname[$i]."</a>";
} }
else echo $linkname[$i]; echo ">".$linkname[$i]."</a>";
} else {
echo $linkname[$i];
}
echo "<br />\n"; echo "<br />\n";
} }
} }

View file

@ -9,73 +9,80 @@ MAJ : 23/09/01
// include "include/theme.inc.php"; // include "include/theme.inc.php";
extract($themeset, EXTR_OVERWRITE); extract($themeset, EXTR_OVERWRITE);
if (!isset($largeur)) if (!isset($largeur)) {
$largeur = "100%"; $largeur = "100%";
}
if ($boxborder == "") if ($boxborder == "") {
$boxborder = 0; $boxborder = 0;
}
echo "\n<!-- // magicbox : module $module // -->\n"; echo "\n<!-- // magicbox : module $module // -->\n";
echo "<!-- // (titre: $titre) // -->\n\n"; echo "<!-- // (titre: $titre) // -->\n\n";
// ************* header ******************** // ************* header ********************
echo "<table width='$largeur' border='$boxborder' class='"; echo "<table width='$largeur' border='$boxborder' class='";
if ($boxborder != 0) if ($boxborder != 0) {
echo "bordure'>\n"; echo "bordure'>\n";
else } else {
echo "magicbox'>\n"; echo "magicbox'>\n";
}
echo " <tr>\n <td align='center'"; echo " <tr>\n <td align='center'";
//if (isset($headcolor) && $headcolor != "") //if (isset($headcolor) && $headcolor != "")
//echo " bgcolor='#".$headcolor; //echo " bgcolor='#".$headcolor;
echo " class='"; echo " class='";
if (isset($headclass)) if (isset($headclass)) {
echo $headclass; echo $headclass;
else } else {
echo "head"; echo "head";
}
echo "'>\n"; echo "'>\n";
echo "$headstartcode"; echo "$headstartcode";
if (isset($headlien)) if (isset($headlien)) {
echo "<a href='$headlien' title='$headtitle'>$titre</a>"; echo "<a href='$headlien' title='$headtitle'>$titre</a>";
else } else {
echo "$titre"; echo "$titre";
}
echo "$headendcode\n"; echo "$headendcode\n";
// ************** body ******************* // ************** body *******************
echo "</td>\n</tr>\n<tr>\n<td class='magicbox'>"; echo "</td>\n</tr>\n<tr>\n<td class='magicbox'>";
echo "<div class='center'>\n<table border='0' width='90%' class='"; echo "<div class='center'>\n<table border='0' width='90%' class='";
if (isset($bodyclass)) if (isset($bodyclass)) {
echo $bodyclass; echo $bodyclass;
else } else {
echo "magicbox"; echo "magicbox";
}
echo "'>\n<tr>\n<td>"; echo "'>\n<tr>\n<td>";
echo "$bodystartcode"; echo "$bodystartcode";
include "modules/".$module.".php"; include "modules/".$module.".php";
echo "$bodyendcode"; echo "$bodyendcode";
echo "</td>\n</tr>\n</table>\n</div>\n</td>\n</tr>"; echo "</td>\n</tr>\n</table>\n</div>\n</td>\n</tr>";
if (isset($footerbox) && ($footerbox == 1)) if (isset($footerbox) && ($footerbox == 1)) {
{
echo "<tr><td align='center'"; echo "<tr><td align='center'";
if (isset($headcolor) && $headcolor != "") if (isset($headcolor) && $headcolor != "") {
//echo " bgcolor='#".$headcolor; //echo " bgcolor='#".$headcolor;
echo " class='"; echo " class='";
if (isset($headclass)) }
if (isset($headclass)) {
echo $headclass; echo $headclass;
else } else {
echo "head"; echo "head";
}
echo "'>\n"; echo "'>\n";
echo "$footerstartcode"; echo "$footerstartcode";
if (isset($footerlien)) if (isset($footerlien)) {
{
echo "<a href='$footerlien' title='$footertitle' "; echo "<a href='$footerlien' title='$footertitle' ";
if (isset($footerlientype) && $footerlientype == "ext") if (isset($footerlientype) && $footerlientype == "ext") {
echo " target='blank'"; echo " target='blank'";
}
echo ">$footerboxtext</a>\n"; echo ">$footerboxtext</a>\n";
} } else {
else
echo "$footerboxtext"; echo "$footerboxtext";
}
echo "$footerendcode\n"; echo "$footerendcode\n";
echo " </td>\n</tr>\n"; echo " </td>\n</tr>\n";
} }
@ -100,5 +107,3 @@ unset($footerendcode);
unset($footerbox); unset($footerbox);
unset($footerboxtext); unset($footerboxtext);
unset($footerlien); unset($footerlien);
?>

View file

@ -1,8 +1,10 @@
<?php <?php
require_once "../include/standard.inc.php"; require_once "../include/standard.inc.php";
require_once "../include/news.inc.php"; require_once "../include/news.inc.php";
function PrintPage($FileNews,$newsnb) { function PrintPage($FileNews, $newsnb)
{
$MyNews = getnews($FileNews, $newsnb); $MyNews = getnews($FileNews, $newsnb);
echo " echo "
<html> <html>
@ -18,13 +20,15 @@ function PrintPage($FileNews,$newsnb) {
Posté le ".$MyNews["date"]." à ".$MyNews["heure"]." par <b>".$MyNews["nom"]." Posté le ".$MyNews["date"]." à ".$MyNews["heure"]." par <b>".$MyNews["nom"]."
</center><table><tr>"; </center><table><tr>";
if (isset($MyNews["icone"]) && ($MyNews["icone"] != "")) if (isset($MyNews["icone"]) && ($MyNews["icone"] != "")) {
echo "<td align=center width=100><img src=".$MyNews["icone"]." width=80 heigh=80 alt=''></td><td>&nbsp;&nbsp;</td>\n"; echo "<td align=center width=100><img src=".$MyNews["icone"]." width=80 heigh=80 alt=''></td><td>&nbsp;&nbsp;</td>\n";
}
if (isset($cadrenews) && ($cadrenews != 0)) if (isset($cadrenews) && ($cadrenews != 0)) {
echo "<td bgcolor=$blanc border=1 cellpadding=3 cellspacing=3 width=100%>\n"; echo "<td bgcolor=$blanc border=1 cellpadding=3 cellspacing=3 width=100%>\n";
else } else {
echo "<td>\n"; echo "<td>\n";
}
echo $MyNews["message"]."</td></tr></table> echo $MyNews["message"]."</td></tr></table>
</font> </font>
@ -43,5 +47,3 @@ function PrintPage($FileNews,$newsnb) {
} }
PrintPage($File, $newsnb); PrintPage($File, $newsnb);
?>

View file

@ -1,10 +1,14 @@
<?php <?php
$randimg = rand(1, 3); $randimg = rand(1, 3);
switch($randimg) switch($randimg) {
{ case '1': $logo = "yoyo.png";
case '1': $logo="yoyo.png"; $logodesc="Y8000"; break; $logodesc = "Y8000";
case '2': $logo="cc70002.png"; $logodesc="CC70002"; break; break;
case '3': $logo="vapeur.png"; $logodesc="Mallet 030 030T"; case '2': $logo = "cc70002.png";
$logodesc = "CC70002";
break;
case '3': $logo = "vapeur.png";
$logodesc = "Mallet 030 030T";
} }
?> ?>
<br /><br /><br /> <br /><br /><br />

View file

@ -1,4 +1,5 @@
<?php <?php
unset($NbMaxPost); unset($NbMaxPost);
extract($themeset, EXTR_OVERWRITE); extract($themeset, EXTR_OVERWRITE);
//$headstartcode = "<font size='3' class='centerhead'>"; //$headstartcode = "<font size='3' class='centerhead'>";
@ -10,4 +11,3 @@
echo "<br /><br /><br />\n<div class='center'><h1>Laissez-nous un message...</h1></div><br />\n"; echo "<br /><br /><br />\n<div class='center'><h1>Laissez-nous un message...</h1></div><br />\n";
include "modules/magicbox.php"; include "modules/magicbox.php";
unset($bodyclass); unset($bodyclass);
?>

View file

@ -1,4 +1,5 @@
<?php <?php
$themeset["pageimage"] = "/themes/default/fond.jpg"; $themeset["pageimage"] = "/themes/default/fond.jpg";
//$themeset["headcolor"] = "44cc44"; //$themeset["headcolor"] = "44cc44";
$themeset["headcolor"] = "C68484"; $themeset["headcolor"] = "C68484";
@ -6,4 +7,3 @@ $themeset["headcolor"] = "C68484";
$themeset["bodycolor"] = "fffff"; $themeset["bodycolor"] = "fffff";
$themeset["boxborder"] = 1; $themeset["boxborder"] = 1;
$themeset["dirtheme"] = "/themes/default"; $themeset["dirtheme"] = "/themes/default";
?>