'."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''.NOMAPPLICATION.''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; logo(); bandeau_tete(); bandeau_titre(_("Error!")); echo '
'."\n"; print "

" . _("You haven't filled the first section of the poll creation.") . " !

"."\n"; print "" . _("Back to the homepage of ") . " ".NOMAPPLICATION."."."\n"; echo '


'."\n"; echo '
'."\n"; //bandeau de pied bandeau_pied(); echo ''."\n"; echo ''."\n"; } else { //partie creation du sondage dans la base SQL //On prépare les données pour les inserer dans la base if ($_POST["confirmecreation_x"]) { //recuperation des données de champs textes for ($i=0;$i<$_SESSION["nbrecases"]+1;$i++) { if ($_POST["choix"][$i]) { $toutchoix.=','; $toutchoix.=str_replace(","," ",$_POST["choix"][$i]); } } $toutchoix=str_replace("'","°",$toutchoix); $toutchoix=substr("$toutchoix",1); $_SESSION["toutchoix"]=$toutchoix; if ($_POST["champdatefin"]) { $registredate=explode("/",$_POST["champdatefin"]); if (mktime(0,0,0,$registredate[1],$registredate[0],$registredate[2])>time()+250000) { $_SESSION["champdatefin"]=mktime(0,0,0,$registredate[1],$registredate[0],$registredate[2]); } } else { $_SESSION["champdatefin"]=time()+15552000; } //format du sondage AUTRE $_SESSION["formatsondage"]="A".$_SESSION["studsplus"]; ajouter_sondage(); } // recuperation des sujets pour sondage AUTRE for ($i=0;$i<$_SESSION["nbrecases"];$i++) { if (!preg_match(';<|>|";',$_POST["choix"][$i])) { $_SESSION["choix$i"]=$_POST["choix"][$i]; } else { $erreur_injection="yes"; } } //nombre de cases par défaut if (!$_SESSION["nbrecases"]) { $_SESSION["nbrecases"]=10; } if ($_POST["ajoutcases"]||$_POST["ajoutcases_x"]) { $_SESSION["nbrecases"]=$_SESSION["nbrecases"]+5; } echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''.NOMAPPLICATION.''."\n"; echo ''."\n"; echo ''; echo ''."\n"; echo ''."\n"; echo '
'."\n"; logo(); bandeau_tete(); bandeau_titre(_("Poll subjects (2 on 2)")); sous_bandeau_choix(); echo '
'."\n"; echo '
'. _("Your poll aim is to make a choice between different subjects.
Enter the subjects to vote for:") .'

'."\n"; echo ''."\n"; //affichage des cases texte de formulaire for ($i=0;$i<$_SESSION["nbrecases"];$i++) { $j=$i+1; echo ''."\n"; } echo '
'. _("Choice") .' '.$j.' :
'."\n"; //focus javascript sur premiere case echo ''."\n"; //ajout de cases supplementaires echo ''."\n"; echo ''."\n"; echo '
'. _("5 choices more") .'
'."\n"; echo'
'."\n"; echo ''."\n"; echo ''."\n"; echo '
'. _("Next") .'
'."\n"; //test de remplissage des cases for ($i=0;$i<$_SESSION["nbrecases"];$i++) { if ($_POST["choix"][$i]!="") { $testremplissage="ok"; } } //message d'erreur si aucun champ renseigné if ($testremplissage!="ok"&&($_POST["fin_sondage_autre"]||$_POST["fin_sondage_autre_x"])) { print "
" . _("Enter at least one choice") . "

"."\n"; $erreur="yes"; } if ($erreur_injection) { print "" . _("Characters \" < and > are not permitted") . "

\n"; } if (($_POST["fin_sondage_autre"]||$_POST["fin_sondage_autre_x"])&&!$erreur&&!$erreur_injection) { //demande de la date de fin du sondage echo '
'."\n"; echo '
'."\n"; echo '
'. _("Your poll will be automatically removed after 6 months.
You can fix another removal date for it.") .'

'."\n"; echo _("Removal date (optional)") .' : '. _("(DD/MM/YYYY)") ."\n"; echo '
'."\n"; echo '
'."\n"; echo ''. _("Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.

Then, you will receive quickly an email contening the link to your poll for sending it to the voters.") .'
'."\n"; echo '
'."\n"; echo '
'."\n"; echo ''."\n"; echo ''."\n"; echo '
'. _("Create the poll") .'
'."\n"; } //fin du formulaire et bandeau de pied echo ''."\n"; echo ''."\n"; echo '


'."\n"; echo '
'."\n"; //bandeau de pied bandeau_pied_mobile(); echo ''."\n"; echo ''."\n"; }