diff --git a/include/head.inc.php b/include/head.inc.php index 14d94f9..ac0b1dd 100644 --- a/include/head.inc.php +++ b/include/head.inc.php @@ -2,7 +2,7 @@ ","\">[Lien]",$traite); // themes global $theme; - $traite = ereg_replace("THEME_COURANT", $theme, $traite); + $traite = str_replace("THEME_COURANT", $theme, $traite); return $traite; } diff --git a/index.php b/index.php index 0adfacf..4c3230c 100644 --- a/index.php +++ b/index.php @@ -1,7 +1,7 @@ \n"; - $modulepage = "commentnews"; - $gbparam = "\n"; -} -else*/ -//echo "?modulepage=goldbook'>\n"; echo "/livre.html'>\n"; echo "
\n\n\n\n"; if (isset($footerbox) && ($footerbox == 1)) {
@@ -34,7 +26,6 @@ echo "
-
Nom/Pseudo (facultatif): e-mail (facultatif):
Message:
Notes: 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.
\n"; @@ -47,19 +38,19 @@ if (!(file_exists("modules/goldbook/$GoldbookFile.csv"))) { } // ajout des messages -if ($param == "postgb") { +if (isset($param) && $param == "postgb") { if ($VMessage != "" && isset($_POST['piejacon'])) { $date = date_format(date_create(), "d/m/Y"); $iheure = date("H:i"); - $VMessage = ereg_replace("<", "<", $VMessage); - $VMessage = ereg_replace(">", ">", $VMessage); + $VMessage = str_replace("<", "<", $VMessage); + $VMessage = str_replace(">", ">", $VMessage); $VMessage = parse_string(stripcslashes($VMessage)); - $VMessage = ereg_replace("\n", "
", $VMessage); - $VMessage = ereg_replace("&", "&", $VMessage); + $VMessage = str_replace("\n", "
", $VMessage); + $VMessage = str_replace("&", "&", $VMessage); $gbline = sprintf("\"".$date."\",\"".$iheure."\",\"".htmlspecialchars($VName)."\",\"".$VEmail."\",\"".$VMessage."\"\n"); - $goldbook = fopen("modules/goldbook/$GoldbookFile.csv", "a"); - fwrite($goldbook, $gbline); - fclose($goldbook); + // $goldbook = fopen("modules/goldbook/$GoldbookFile.csv", "a"); + // fwrite($goldbook, $gbline); + // fclose($goldbook); mail("n@tourmentine.com", "[TMA] post livre d'or ", $VMessage, "From: ".$VName." <".$VEmail.">\r\nX-Mailer: PHP/" . phpversion()); //unlink("$GoldbookFile.dat"); } diff --git a/modules/magicbox.php b/modules/magicbox.php index ccf6eba..c80e8e1 100644 --- a/modules/magicbox.php +++ b/modules/magicbox.php @@ -38,13 +38,17 @@ if (isset($headclass)) { } echo "'>\n"; -echo "$headstartcode"; +if (isset($headstartcode)) { + echo "$headstartcode"; +} if (isset($headlien)) { echo "$titre"; } else { echo "$titre"; } -echo "$headendcode\n"; +if (isset($headendcode)) { + echo "$headendcode\n"; +} // ************** body ******************* echo "
"; echo "
\n\n\n\n\n
"; -echo "$bodystartcode"; +if (isset($bodystartcode)) { + echo "$bodystartcode"; +} include "modules/".$module.".php"; -echo "$bodyendcode"; +if (isset($bodyencode)) { + echo "$bodyencode"; +} echo "
\n
\n