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

' . _("Back to the homepage of ") . ' ' . NOMAPPLICATION . '

'."\n"; bandeau_pied(); } else { // Step 4 : Data prepare before insert in DB if (isset($_POST["confirmecreation"])) { //recuperation des données de champs textes $temp_results = ''; if (isset($_SESSION['choices'])) { for ($i = 0; $i < count($_SESSION['choices']); $i++) { if ($_SESSION['choices'][$i]!="") { $temp_results.=','.str_replace(",", " ", htmlentities(html_entity_decode($_SESSION['choices'][$i], ENT_QUOTES, 'UTF-8'), ENT_QUOTES, 'UTF-8')); } } } $temp_results=substr($temp_results,1); $_SESSION["toutchoix"]=$temp_results; // Expiration date → after 6 months if not filled or in bad format $_SESSION["champdatefin"]=time()+15552000; if (Utils::issetAndNoEmpty('champdatefin')) { $registredate = explode("/",$_POST["champdatefin"]); if (is_array($registredate) == true && count($registredate) == 3) { $time = mktime(0,0,0,$registredate[1],$registredate[0],$registredate[2]); if ($time > time() + 250000) { $_SESSION["champdatefin"]=mktime(0,0,0,$registredate[1],$registredate[0],$registredate[2]); } } } //format du sondage AUTRE $_SESSION["formatsondage"]="A".$_SESSION["studsplus"]; ajouter_sondage(); } // recuperation des sujets pour sondage AUTRE if (isset($_POST['choices'])) { $k = 0; for ($i = 0; $i < count($_POST['choices']); $i++) { if (Utils::issetAndNoEmpty($i, $_POST['choices'])) { $_SESSION['choices'][$k]=htmlentities(html_entity_decode($_POST['choices'][$i], ENT_QUOTES, 'UTF-8'), ENT_QUOTES, 'UTF-8'); $k++; } } } // Step 3/3 : Confirm poll creation and choose a removal date if (isset($_POST["fin_sondage_autre"])) { Utils::print_header ( _("Removal date and confirmation (3 on 3)") ); bandeau_titre(_("Removal date and confirmation (3 on 3)")); echo '

' . _("Your poll will be automatically removed after 6 months.") . '
' . _("You can fix another removal date for it.") .'

'. _("(dd/mm/yyyy)") .'

'. _("Once you have confirmed the creation of your poll, you will be automatically redirected on the administration page of your poll."). '

' . _("Then, you will receive quickly two emails: one contening the link of your poll for sending it to the voters, the other contening the link to the administration page of your poll.") .'

'."\n"; bandeau_pied(); // Step 2/3 : Select choices of the poll } else { Utils::print_header( _("Poll subjects (2 on 3)")); bandeau_titre(_("Poll subjects (2 on 3)")); echo '
'; echo '

'. _("To make a generic poll you need to propose at least two choices between differents subjects.") . '

'. _("You can add or remove additional choices with the buttons") .'

'."\n"; // Fields choices : 5 by default $nb_choices = (isset($_SESSION['choices'])) ? max(count($_SESSION['choices']), 5) : 5; for ($i = 0; $i < $nb_choices; $i++) { $choice_value = (isset($_SESSION['choices'][$i])) ? str_replace("\\","",$_SESSION['choices'][$i]) : ''; echo '
'."\n"; } echo '
'."\n"; bandeau_pied(); } }