PHP Coding Standards fixes

This commit is contained in:
n 2024-02-12 20:46:07 +01:00
parent 9fc0ef62d5
commit 0a3c559a59
45 changed files with 938 additions and 958 deletions

View file

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

View file

@ -1,15 +1,18 @@
<?php
echo "<img src='images/li_lgn1_animated.gif' width=100%><div align=center>
<table border=0 width='100%' valign=bottom><tr>
<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";
else
} else {
echo "phpoisson_davril.gif";
}
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>\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";
// echo "<br><a href=\"index.php\">retour au menu</a><br></div>";
?>

View file

@ -18,4 +18,3 @@ $noir = "#000000";
$blanc = "#FFFFFF";
*/
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">
<?php
if ($titlepage == "")
if ($titlepage == "") {
$titlepage = "Train Miniature Avallonnais";
else
} else {
$titlepage = "Train Miniature Avallonnais : $titlepage";
}
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"fr\">
<head>

View file

@ -1,4 +1,5 @@
<?php
require_once "include/standard.inc.php";
require_once "include/timer.inc.php";
require_once "include/random.inc.php";
@ -8,8 +9,7 @@ require_once "include/random.inc.php";
// valeur = 24h.
$Logo = timer("logo", 240000);
if ($Logo == FALSE)
{
if ($Logo == false) {
while (($RandomLogo = RandomFile("images/logos/")) == $Logo);
settimer("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>";
unset($Logo);
unset($RandomLogo);
?>

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,5 +1,3 @@
<?php
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);
if (isset($GoldbookFile) && $GoldbookFile != "")
if (isset($GoldbookFile) && $GoldbookFile != "") {
$GoldbookFile = "default";
}
$Cpt = 0;
@ -40,17 +41,14 @@ else*/
// <hr></td></tr>\n";
unset($File);
// 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+");
fclose($goldbook);
}
// ajout des messages
if ($param == "postgb")
{
if ($VMessage != "" && isset($_POST['piejacon']))
{
if ($param == "postgb") {
if ($VMessage != "" && isset($_POST['piejacon'])) {
$date = strftime("%d/%m/%Y", time());
$iheure = date("H:i");
$VMessage = ereg_replace("<", "&lt;", $VMessage);
@ -71,8 +69,7 @@ if ($param == "postgb")
// lecture des messages
$goldbook = fopen("modules/goldbook/$GoldbookFile.csv", "r");
while ($data = fgetcsv($goldbook, 1000, ","))
{
while ($data = fgetcsv($goldbook, 1000, ",")) {
$VisitorDate[$Cpt] = $data[0];
$VisitorTime[$Cpt] = $data[1];
$VisitorName[$Cpt] = stripcslashes($data[2]);
@ -84,35 +81,34 @@ fclose($goldbook);
unset($data);
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
if ((!isset($NbMaxPost)) || ($NbMaxPost > $Cpt))
{
if ((!isset($NbMaxPost)) || ($NbMaxPost > $Cpt)) {
$NbMaxPost = $Cpt;
}
// affichage des messages
echo "<hr /><div class='left'>";
if ($NbMaxPost)
for($i=0;$i<=$NbMaxPost-1;$i++)
{
if ($VisitorName[$i] == "")
if ($NbMaxPost) {
for($i = 0;$i <= $NbMaxPost - 1;$i++) {
if ($VisitorName[$i] == "") {
$VisitorName[$i] = "Anonyme";
}
if ($VisitorEmail[$i] != "")
if ($VisitorEmail[$i] != "") {
$Visiteur = "<a href='mailto:".$VisitorEmail[$i]."'>".$VisitorName[$i]."</a>";
else
} else {
$Visiteur = $VisitorName[$i];
}
echo "<i>Posté le ".$VisitorDate[$i]." à ".$VisitorTime[$i]." par <b>".$Visiteur."</b></i>:
<br />« ".$VisitorMessage[$i]." »<br/>";
if ($i != ($NbMaxPost-1))
if ($i != ($NbMaxPost - 1)) {
echo "<hr />";
}
}
}
echo "</div>";
$footerbox = 0;
//$footerboxtext = "Retour au menu";
//$footerlien = "/";
?>

View file

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

View file

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

View file

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

View file

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

View file

@ -1,4 +1,5 @@
<?php
unset($NbMaxPost);
extract($themeset, EXTR_OVERWRITE);
//$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";
include "modules/magicbox.php";
unset($bodyclass);
?>

View file

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