|";',$_POST["titre"])){ $erreur_injection_titre = true; } if (preg_match(';<|>|";',$_POST["nom"])){ $erreur_injection_nom = true; } if (preg_match(';<|>|";',$_POST["commentaires"])){ $erreur_injection_commentaires = true; } // Si pas d'erreur dans l'adresse alors on change de page vers date ou autre if ($_POST["titre"] && $_POST["nom"] && $_POST["adresse"] && ! $erreur_adresse && ! $erreur_injection_titre && ! $erreur_injection_commentaires && ! $erreur_injection_nom ){ if ($_POST["creation_sondage_date"]||$_POST["creation_sondage_date_x"]){ header("Location:choix_date.php"); exit(); } if ($_POST["creation_sondage_autre"]||$_POST["creation_sondage_autre_x"]){ header("Location:choix_autre.php"); exit(); } } //En cas d'erreur, recuperation des variables deja entrées if (empty($_POST["titre"]) || empty($_POST["adresse"]) || empty($_POST["nom"])) { $_SESSION["titre"]=$_POST["titre"]; $_SESSION["nom"]=$_POST["nom"]; $_SESSION["adresse"]=$_POST["adresse"]; $_SESSION["commentaires"]=$_POST["commentaires"]; } } //affichage de la page print_header(true); echo ''."\n"; //affichage des bandeaux de tete logo(); bandeau_tete(); echo '
'. _("Poll creation (1 on 2)") .'
'."\n"; sous_bandeau(); // premier sondage ? test l'existence des schémas SQL avant d'aller plus loin if(! check_table_sondage() ) { echo '

' . _("STUdS is not properly installed, please check the 'INSTALL' to setup the database before continuing") . "

"."\n"; bandeau_pied(); echo ''."\n"; echo ''."\n"; die(); } //debut du formulaire echo '
'."\n"; echo '
'."\n"; echo '
'. _("You are in the poll creation section.
Required fields cannot be left blank") .'

'."\n"; //Affichage des différents champs textes a remplir echo ''."\n"; echo ''."\n"; if (!$_SESSION["titre"]&&($_POST["creation_sondage_date"]||$_POST["creation_sondage_autre"]||$_POST["creation_sondage_date_x"]||$_POST["creation_sondage_autre_x"])){ print ""."\n"; } elseif ($erreur_injection_titre){ print "
"."\n"; } echo ''."\n"; echo ''."\n"; if ($erreur_injection_commentaires){ print "
"."\n"; } echo ''."\n"; echo ''."\n"; else echo ''."\n"; if (!$_SESSION["nom"]&&($_POST["creation_sondage_date"]||$_POST["creation_sondage_autre"]||$_POST["creation_sondage_date_x"]||$_POST["creation_sondage_autre_x"])){ print ""."\n"; } elseif ($erreur_injection_nom){ print "
"."\n"; } echo ''."\n"; echo ''."\n"; else echo ''."\n"; if (!$_SESSION["adresse"]&&($_POST["creation_sondage_date"]||$_POST["creation_sondage_autre"]||$_POST["creation_sondage_date_x"]||$_POST["creation_sondage_autre_x"])){ print ""."\n"; } elseif ($erreur_adresse&&($_POST["creation_sondage_date"]||$_POST["creation_sondage_autre"]||$_POST["creation_sondage_date_x"]||$_POST["creation_sondage_autre_x"])){ print ""."\n"; } echo ''."\n"; echo '
'. _("Poll title *: ") .'" . _("Enter a title") . "" . _("Characters < > and \" are not permitted") . "
'. _("Comments: ") .'" . _("Characters < > and \" are not permitted") . "
'. _("Your name*: ") .''; if (isset($_SERVER['REMOTE_USER'])) echo ''.$_SESSION["nom"].'" . _("Enter a name") . "" . _("Characters < > and \" are not permitted") . "
'. _("Your e-mail address *: ") .''; if (isset($_SERVER['REMOTE_USER'])) echo ''.$_SESSION["adresse"].'" . _("Enter an email address") . " " . _("The address is not correct! (You should enter a valid email address in order to receive the link to your poll)") . "
'."\n"; //focus javascript sur le premier champ echo ''."\n"; echo '
'. _("The fields marked with * are required!") .'

'."\n"; #affichage du cochage par défaut if (!$_SESSION["studsplus"]&&!$_POST["creation_sondage_date"]&&!$_POST["creation_sondage_autre"]&&!$_POST["creation_sondage_date_x"]&&!$_POST["creation_sondage_autre_x"]){$_SESSION["studsplus"]="+";} if ($_SESSION["studsplus"]=="+"){$cocheplus="checked";} echo ''. _(" Voters can modify their vote themselves.") .'
'."\n"; if ($_SESSION["mailsonde"]){$cochemail="checked";} echo ''. _(" To receive an email for each new vote.") .'
'."\n"; //affichage des boutons pour choisir sondage date ou autre echo '
'."\n"; echo ' '."\n"; echo ''."\n"; echo ' '."\n"; echo ''."\n"; echo '
'. _("Schedule an event") .'
'. _("Make a choice") .'
'."\n"; echo '


'."\n"; echo '
'."\n"; echo '
'."\n"; //bandeau de pied bandeau_pied(); echo ''."\n"; echo ''."\n"; ?>