From 5e7692f19dc7f7cfac59b2314ee7d7f9f11e8c7c Mon Sep 17 00:00:00 2001 From: pascalc Date: Tue, 5 Mar 2013 10:58:01 +0100 Subject: [PATCH] fix Issue #4: change les boutons post en get sur la page d'accueil pour permettre de faire des liens directs vers les types de sondages --- index.php | 19 ++++++++--------- infos_sondage.php | 52 +++++++++++++++++++++++------------------------ 2 files changed, 34 insertions(+), 37 deletions(-) diff --git a/index.php b/index.php index adb6a6e..6563d95 100644 --- a/index.php +++ b/index.php @@ -10,10 +10,10 @@ //Ce logiciel est régi par la licence CeCILL-B soumise au droit français et //respectant les principes de diffusion des logiciels libres. Vous pouvez //utiliser, modifier et/ou redistribuer ce programme sous les conditions -//de la licence CeCILL-B telle que diffusée par le CEA, le CNRS et l'INRIA +//de la licence CeCILL-B telle que diffusée par le CEA, le CNRS et l'INRIA //sur le site "http://www.cecill.info". // -//Le fait que vous puissiez accéder à cet en-tête signifie que vous avez +//Le fait que vous puissiez accéder à cet en-tête signifie que vous avez //pris connaissance de la licence CeCILL-B, et que vous en avez accepté les //termes. Vous pouvez trouver une copie de la licence dans le fichier LICENCE. // @@ -26,10 +26,10 @@ //borghesi@unistra.fr // //This software is governed by the CeCILL-B license under French law and -//abiding by the rules of distribution of free software. You can use, +//abiding by the rules of distribution of free software. You can use, //modify and/ or redistribute the software under the terms of the CeCILL-B //license as circulated by CEA, CNRS and INRIA at the following URL -//"http://www.cecill.info". +//"http://www.cecill.info". // //The fact that you are presently reading this means that you have had //knowledge of the CeCILL-B license and that you accept its terms. You can @@ -58,9 +58,6 @@ echo ''."\n"; framanav(); -//debut du formulaire -echo '
'."\n"; - //bandeaux de tete logo(); bandeau_tete(); @@ -80,21 +77,21 @@ echo '
'."\n"; echo '
'; echo '
'; -echo ''; +echo '' + . _('Schedule an event') . ''; echo '
'; echo '
'; echo '
'; -echo ''; +echo ''. _('Make a poll') . ''; echo '
'; echo '
'."\n"; echo ''."\n"; -echo '
'."\n"; //bandeau de pied //sur_bandeau_pied(); bandeau_pied(); echo ''."\n"; -echo ''."\n"; \ No newline at end of file +echo ''."\n"; diff --git a/infos_sondage.php b/infos_sondage.php index 1384d1a..e7b8482 100644 --- a/infos_sondage.php +++ b/infos_sondage.php @@ -10,10 +10,10 @@ //Ce logiciel est régi par la licence CeCILL-B soumise au droit français et //respectant les principes de diffusion des logiciels libres. Vous pouvez //utiliser, modifier et/ou redistribuer ce programme sous les conditions -//de la licence CeCILL-B telle que diffusée par le CEA, le CNRS et l'INRIA +//de la licence CeCILL-B telle que diffusée par le CEA, le CNRS et l'INRIA //sur le site "http://www.cecill.info". // -//Le fait que vous puissiez accéder à cet en-tête signifie que vous avez +//Le fait que vous puissiez accéder à cet en-tête signifie que vous avez //pris connaissance de la licence CeCILL-B, et que vous en avez accepté les //termes. Vous pouvez trouver une copie de la licence dans le fichier LICENCE. // @@ -26,10 +26,10 @@ //borghesi@unistra.fr // //This software is governed by the CeCILL-B license under French law and -//abiding by the rules of distribution of free software. You can use, +//abiding by the rules of distribution of free software. You can use, //modify and/ or redistribute the software under the terms of the CeCILL-B //license as circulated by CEA, CNRS and INRIA at the following URL -//"http://www.cecill.info". +//"http://www.cecill.info". // //The fact that you are presently reading this means that you have had //knowledge of the CeCILL-B license and that you accept its terms. You can @@ -64,7 +64,7 @@ foreach ($session_var as $var) { $_SESSION[$var] = null; } } - + // On initialise également les autres variables $erreur_adresse = false; $erreur_injection_titre = false; @@ -80,37 +80,37 @@ if (issetAndNoEmpty("poursuivre")){ $_SESSION["nom"] = $nom; $_SESSION["adresse"] = $adresse; $_SESSION["commentaires"] = $commentaires; - + unset($_SESSION["studsplus"]); if ($studsplus !== null) { $_SESSION["studsplus"] = '+'; } else { $_SESSION["studsplus"] = ''; } - + unset($_SESSION["mailsonde"]); if ($mailsonde !== null) { $_SESSION["mailsonde"] = true; } else { $_SESSION["mailsonde"] = false; } - + if(validateEmail($adresse) === false) { $erreur_adresse = true; } - + if (preg_match(';<|>|";',$titre)) { $erreur_injection_titre = true; } - + if (preg_match(';<|>|";',$nom)) { $erreur_injection_nom = true; } - + if (preg_match(';<|>|";',$commentaires)) { $erreur_injection_commentaires = true; } - + // Si pas d'erreur dans l'adresse alors on change de page vers date ou autre if ($titre && $nom && $adresse && !$erreur_adresse && ! $erreur_injection_titre && ! $erreur_injection_commentaires && ! $erreur_injection_nom) { /* @@ -119,28 +119,28 @@ if (issetAndNoEmpty("poursuivre")){ header("Location:choix_date.php"); exit(); } - + if ($creation_sondage_autre !== null || $creation_sondage_autre_x !== null) { header("Location:choix_autre.php"); exit(); } - + if ( $creation_sondage_autre_x !== null) { header("Location:choix_autre.php"); exit(); - } -*/ + } +*/ if ( $poursuivre == "creation_sondage_date" ) { header("Location:choix_date.php"); exit(); - } - + } + if ( $poursuivre == "creation_sondage_autre" ) { header("Location:choix_autre.php"); exit(); - } - - + } + + } } @@ -168,7 +168,7 @@ if(!check_table_sondage()) { //debut du formulaire echo '
'."\n"; - + echo '
'."\n"; echo '
'. _("You are in the poll creation section.
Required fields cannot be left blank") .'

'."\n"; @@ -247,10 +247,10 @@ if ($_SESSION["mailsonde"]) { echo '
'."\n"; //affichage des boutons pour choisir sondage date ou autre -if ($_POST['choix_sondage']=='date') { - $choix="creation_sondage_date"; -} elseif ($_POST['choix_sondage']=='autre') { - $choix="creation_sondage_autre"; +if ($_GET['choix_sondage'] == 'date') { + $choix = "creation_sondage_date"; +} elseif ($_GET['choix_sondage'] == 'autre') { + $choix = "creation_sondage_autre"; } echo ''; echo '
';