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 "
@@ -34,7 +26,6 @@ echo "
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,15 +38,15 @@ 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); 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 " | \n|||||
";
echo " \n \n
| \n