fix some warnings
All checks were successful
lint / lint (push) Successful in 31s

This commit is contained in:
n 2024-11-03 21:50:57 +01:00
parent 49a5729403
commit 2c7d2e88b4
Signed by: n
GPG key ID: 510227DD6C502CE3
5 changed files with 22 additions and 23 deletions

View file

@ -2,7 +2,7 @@
<!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 (!isset($titlepage) || $titlepage == "") {
$titlepage = "Train Miniature Avallonnais"; $titlepage = "Train Miniature Avallonnais";
} else { } else {
$titlepage = "Train Miniature Avallonnais : $titlepage"; $titlepage = "Train Miniature Avallonnais : $titlepage";

View file

@ -60,7 +60,7 @@ function parse_string($chaine)
//$traite = ereg_replace("</url>","\">[Lien]</a>",$traite); //$traite = ereg_replace("</url>","\">[Lien]</a>",$traite);
// themes // themes
global $theme; global $theme;
$traite = ereg_replace("THEME_COURANT", $theme, $traite); $traite = str_replace("THEME_COURANT", $theme, $traite);
return $traite; return $traite;
} }

View file

@ -1,7 +1,7 @@
<?php <?php
$page = $_GET["page"]; if (isset($_GET["page"])) { $page = $_GET["page"]; }
$modulepage = $_GET["modulepage"]; if (isset($_GET["modulepage"])) { $modulepage = $_GET["modulepage"]; }
function getmicrotime() function getmicrotime()
{ {
@ -34,7 +34,7 @@ if (!isset($section) || $section == "") {
$section = "pages"; $section = "pages";
} }
if ($page == "index") { if (!isset($page) || $page == "index") {
$page = "menu"; $page = "menu";
} }

View file

@ -18,14 +18,6 @@ if (isset($GoldbookFile) && $GoldbookFile != "") {
$Cpt = 0; $Cpt = 0;
echo "<form method='post' action='"; echo "<form method='post' action='";
/*if (isset($goldbooktype) && ($goldbooktype == "comment"))
{
echo "?modulepage=commentnews&File=$File&idnews=".$MyNews["index"]."&theme=$theme'>\n";
$modulepage = "commentnews";
$gbparam = "<input name='File' value='$File' type='hidden'>\n<input name='idnews' value='".$MyNews["index"]."' type='hidden'>";
}
else*/
//echo "?modulepage=goldbook'>\n";
echo "/livre.html'>\n"; echo "/livre.html'>\n";
echo "<div class='center'><table border='0'><tr><td> echo "<div class='center'><table border='0'><tr><td>
@ -34,7 +26,6 @@ echo "<div class='center'><table border='0'><tr><td>
<i>Nom/Pseudo (facultatif)</i>:<input name=\"VName\" type='text' size='20' value=\"\" /></td><td> <i>Nom/Pseudo (facultatif)</i>:<input name=\"VName\" type='text' size='20' value=\"\" /></td><td>
<i>e-mail (facultatif)</i>:<input name=\"VEmail\" type='text' size='20' value=\"\" /></td></tr> <i>e-mail (facultatif)</i>:<input name=\"VEmail\" type='text' size='20' value=\"\" /></td></tr>
<tr><td><div class='center'><i>Message</i>:<textarea name='VMessage' cols='50' rows='12'></textarea></div></td></tr> <tr><td><div class='center'><i>Message</i>:<textarea name='VMessage' cols='50' rows='12'></textarea></div></td></tr>
<!--".$gbparam."-->
<input name='piejacon' value='piejacon' class='piejacon' /> <input name='piejacon' value='piejacon' class='piejacon' />
<tr><td class='right'><input name=\"Ecrire\" value='Ecrire' type='submit' /></td><td><input name=\"Effacer\" value=\"Effacer\" type=\"reset\" /></td></tr></table></div></form> <tr><td class='right'><input name=\"Ecrire\" value='Ecrire' type='submit' /></td><td><input name=\"Effacer\" value=\"Effacer\" type=\"reset\" /></td></tr></table></div></form>
<h6><i>Notes</i>: Les balises HTML ne sont pas autorisés dans la boite de saisie. Les messages sont modérés, ils n'apparaitront donc pas immédiatement sur le livre d'or.</h6>\n"; <h6><i>Notes</i>: Les balises HTML ne sont pas autorisés dans la boite de saisie. Les messages sont modérés, ils n'apparaitront donc pas immédiatement sur le livre d'or.</h6>\n";
@ -47,15 +38,15 @@ if (!(file_exists("modules/goldbook/$GoldbookFile.csv"))) {
} }
// ajout des messages // ajout des messages
if ($param == "postgb") { if (isset($param) && $param == "postgb") {
if ($VMessage != "" && isset($_POST['piejacon'])) { if ($VMessage != "" && isset($_POST['piejacon'])) {
$date = date_format(date_create(), "d/m/Y"); $date = date_format(date_create(), "d/m/Y");
$iheure = date("H:i"); $iheure = date("H:i");
$VMessage = ereg_replace("<", "&lt;", $VMessage); $VMessage = str_replace("<", "&lt;", $VMessage);
$VMessage = ereg_replace(">", "&gt;", $VMessage); $VMessage = str_replace(">", "&gt;", $VMessage);
$VMessage = parse_string(stripcslashes($VMessage)); $VMessage = parse_string(stripcslashes($VMessage));
$VMessage = ereg_replace("\n", "<br />", $VMessage); $VMessage = str_replace("\n", "<br />", $VMessage);
$VMessage = ereg_replace("&", "&amp;", $VMessage); $VMessage = str_replace("&", "&amp;", $VMessage);
$gbline = sprintf("\"".$date."\",\"".$iheure."\",\"".htmlspecialchars($VName)."\",\"".$VEmail."\",\"".$VMessage."\"\n"); $gbline = sprintf("\"".$date."\",\"".$iheure."\",\"".htmlspecialchars($VName)."\",\"".$VEmail."\",\"".$VMessage."\"\n");
$goldbook = fopen("modules/goldbook/$GoldbookFile.csv", "a"); $goldbook = fopen("modules/goldbook/$GoldbookFile.csv", "a");
fwrite($goldbook, $gbline); fwrite($goldbook, $gbline);

View file

@ -38,13 +38,17 @@ if (isset($headclass)) {
} }
echo "'>\n"; echo "'>\n";
if (isset($headstartcode)) {
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";
} }
if (isset($headendcode)) {
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='";
@ -54,9 +58,13 @@ if (isset($bodyclass)) {
echo "magicbox"; echo "magicbox";
} }
echo "'>\n<tr>\n<td>"; echo "'>\n<tr>\n<td>";
if (isset($bodystartcode)) {
echo "$bodystartcode"; echo "$bodystartcode";
}
include "modules/".$module.".php"; include "modules/".$module.".php";
echo "$bodyendcode"; if (isset($bodyencode)) {
echo "$bodyencode";
}
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)) {