diff --git a/old_adminstuds.php b/old_adminstuds.php deleted file mode 100644 index 46a8b8e..0000000 --- a/old_adminstuds.php +++ /dev/null @@ -1,131 +0,0 @@ - two modifications (comment, title, description, ...) on differents polls in the same session will generate only one mail. -$email_admin = $poll->admin_mail; -$poll_title = $poll->title; -$smtp_allowed = $config['use_smtp']; -function send_mail_admin() { - global $email_admin; - global $poll_title; - global $admin_poll_id; - global $smtp_allowed; - if($smtp_allowed==true){ - if(!isset($_SESSION['mail_admin_sent'])) { - Utils::sendEmail( $email_admin, - _("[ADMINISTRATOR] New settings for your poll") . ' ' . stripslashes( $poll_title ), - _("You have changed the settings of your poll. \nYou can modify this poll with this link") . - " :\n\n" . Utils::getUrlSondage($admin_poll_id, true) . "\n\n" . - _("Thanks for your confidence.") . "\n" . NOMAPPLICATION - ); - $_SESSION["mail_admin_sent"]=true; - } - } - -} - - -$nbcolonnes = count($sujets); -$nblignes = count($users); - -//si il n'y a pas suppression alors on peut afficher normalement le tableau - - - -//action quand on ajoute une colonne au format AUTRE -if (isset($_POST["ajoutercolonne"]) && !empty($_POST['nouvellecolonne']) && $poll->format == "A") { - $nouveauxsujets=$dsujet->sujet; - - //on rajoute la valeur a la fin de tous les sujets deja entrés - $nouveauxsujets.=","; - $nouveauxsujets.=str_replace(","," ",$_POST["nouvellecolonne"]); - $nouveauxsujets = htmlentities(html_entity_decode($nouveauxsujets, ENT_QUOTES, 'UTF-8'), ENT_QUOTES, 'UTF-8'); - - //mise a jour avec les nouveaux sujets dans la base - $sql = 'UPDATE sujet_studs SET sujet = '.$connect->Param('nouveauxsujets').' WHERE id_sondage = '.$connect->Param('numsondage'); - $sql = $connect->Prepare($sql); - if ($connect->Execute($sql, array($nouveauxsujets, $poll_id))) { - send_mail_admin(); - } -} - - -//on teste pour voir si une ligne doit etre modifiée -$testmodifier = false; -$testligneamodifier = false; - - - -// Button in the first td to avoid remove col on "Return" keypress) -$tr_add_remove_col = ''; - -$border = array(); // bordure pour distinguer les mois -$td_headers = array(); // for a11y, headers="M1 D4 H5" on each td -$radio_title = array(); // date for - -if ($poll->format == "A") { - $tr_subjects = ''; - - foreach ($sujets as $i=>$sujet) { - - $td_headers[$i]='';$radio_title[$i]=''; // init before concatenate - - // Subjects - preg_match_all('/\[!\[(.*?)\]\((.*?)\)\]\((.*?)\)/',$sujet->sujet,$md_a_img); // Markdown [![alt](src)](href) - preg_match_all('/!\[(.*?)\]\((.*?)\)/',$sujet->sujet,$md_img); // Markdown ![alt](src) - preg_match_all('/\[(.*?)\]\((.*?)\)/',$sujet->sujet,$md_a); // Markdown [text](href) - if (isset($md_a_img[2][0]) && $md_a_img[2][0]!='' && isset($md_a_img[3][0]) && $md_a_img[3][0]!='') { // [![alt](src)](href) - - $th_subject_text = (isset($md_a_img[1][0]) && $md_a_img[1][0]!='') ? stripslashes($md_a_img[1][0]) : _("Choice") .' '.($i+1); - $th_subject_html = ''.$th_subject_text.''; - - } elseif (isset($md_img[2][0]) && $md_img[2][0]!='') { // ![alt](src) - - $th_subject_text = (isset($md_img[1][0]) && $md_img[1][0]!='') ? stripslashes($md_img[1][0]) : _("Choice") .' '.($i+1); - $th_subject_html = ''.$th_subject_text.''; - - } elseif (isset($md_a[2][0]) && $md_a[2][0]!='') { // [text](href) - - $th_subject_text = (isset($md_a[1][0]) && $md_a[1][0]!='') ? stripslashes($md_a[1][0]) : _("Choice") .' '.($i+1); - $th_subject_html = ''.$th_subject_text.''; - - } else { // text only - - $th_subject_text = stripslashes($sujet->sujet); - $th_subject_html = $th_subject_text; - - } - $tr_subjects .= ''.$th_subject_html.''; - - $border[$i] = false; - $td_headers[$i] .= 'S'.$i; - $radio_title[$i] .= $th_subject_text; - - // Remove col - $tr_add_remove_col .= ''; - } - - // Add col - $tr_add_remove_col .= ''; - - $thead = $tr_add_remove_col.$tr_subjects.''; -} - -// Print headers diff --git a/old_exportcsv.php b/old_exportcsv.php deleted file mode 100644 index fd868bf..0000000 --- a/old_exportcsv.php +++ /dev/null @@ -1,104 +0,0 @@ -Param('numsondage').' ORDER BY id_users'; -$sql = $connect->Prepare($sql); -$user_studs = $connect->Execute($sql, array($_GET['numsondage'])); - -$dsondage = Utils::get_sondage_from_id($_GET['numsondage']); -$nbcolonnes=substr_count($dsondage->sujet,',')+1; - -$toutsujet=explode(",",$dsondage->sujet); - -//affichage des sujets du sondage -$input =","; -foreach ($toutsujet as $value) { - if ($dsondage->format=="D"||$dsondage->format=="D+") { - if (strpos($dsondage->sujet,'@') !== false) { - $days=explode("@",$value); - $input.= '"'.date("j/n/Y",$days[0]).'",'; - } else { - $input.= '"'.date("j/n/Y",$values).'",'; - } - } else { - - preg_match_all('/\[!\[(.*?)\]\((.*?)\)\]\((.*?)\)/',$value,$md_a_img); // Markdown [![alt](src)](href) - preg_match_all('/!\[(.*?)\]\((.*?)\)/',$value,$md_img); // Markdown ![alt](src) - preg_match_all('/\[(.*?)\]\((.*?)\)/',$value,$md_a); // Markdown [text](href) - if (isset($md_a_img[2][0]) && $md_a_img[2][0]!='' && isset($md_a_img[3][0]) && $md_a_img[3][0]!='') { // [![alt](src)](href) - $subject_text = (isset($md_a_img[1][0]) && $md_a_img[1][0]!='') ? stripslashes($md_a_img[1][0]) : _("Choice") .' '.($i+1); - } elseif (isset($md_img[2][0]) && $md_img[2][0]!='') { // ![alt](src) - $subject_text = (isset($md_img[1][0]) && $md_img[1][0]!='') ? stripslashes($md_img[1][0]) : _("Choice") .' '.($i+1); - } elseif (isset($md_a[2][0]) && $md_a[2][0]!='') { // [text](href) - $subject_text = (isset($md_a[1][0]) && $md_a[1][0]!='') ? stripslashes($md_a[1][0]) : _("Choice") .' '.($i+1); - } else { // text only - $subject_text = stripslashes($value); - } - $input.= '"'.html_entity_decode($subject_text).'",'; - } -} - -$input.="\r\n"; - -if (strpos($dsondage->sujet,'@') !== false) { - $input.=","; - foreach ($toutsujet as $value) { - $heures=explode("@",$value); - $input.= '"'.$heures[1].'",'; - } - - $input.="\r\n"; -} - -while ( $data=$user_studs->FetchNextObject(false)) { - // Le nom de l'utilisateur - $nombase=html_entity_decode(str_replace("°","'",$data->nom)); - $input.= '"'.$nombase.'",'; - //affichage des resultats - $ensemblereponses=$data->reponses; - for ($k=0;$k<$nbcolonnes;$k++) { - $car=substr($ensemblereponses,$k,1); - switch ($car) { - case "1": $input .= '"'._('Yes').'",'; $somme[$k]++; break; - case "2": $input .= '"'._('Ifneedbe').'",'; break; - default: $input .= '"'._('No').'",'; break; - } - } - - $input.="\r\n"; -} - -$filesize = strlen( $input ); -$filename=$_GET["numsondage"].".csv"; - -header( 'Content-Type: text/csv; charset=utf-8' ); -header( 'Content-Length: '.$filesize ); -header( 'Content-Disposition: attachment; filename="'.$filename.'"' ); -header( 'Cache-Control: max-age=10' ); - -echo str_replace('"','""',$input); - -die(); diff --git a/old_studs.php b/old_studs.php deleted file mode 100644 index 96f880f..0000000 --- a/old_studs.php +++ /dev/null @@ -1,706 +0,0 @@ -findPollById($numsondage); -if ($dsondage){ - $sujets = $connect->allSujetsByPollId($numsondage); - $users = $connect->allUsersByPollId($numsondage); -} else { - Utils::print_header( _("Error!")); - - bandeau_titre(_("Error!")); - - echo ' -
-

' . _("This poll doesn't exist !") . '

-

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

-
'."\n"; - - bandeau_pied(); - - die(); -} - -//output a CSV and die() -if(!empty($_GET['export']) && $dsondage) { - if($_GET['export'] == 'csv') { - require_once('exportcsv.php'); - } - - die(); -} - -// quand on ajoute un commentaire utilisateur -if(isset($_POST['ajoutcomment'])) { - if (isset($_SESSION['nom']) && Utils::issetAndNoEmpty('commentuser') === false) { - // Si le nom vient de la session, on le de-htmlentities - $comment_user = html_entity_decode($_SESSION['nom'], ENT_QUOTES, 'UTF-8'); - } elseif(Utils::issetAndNoEmpty('commentuser')) { - $comment_user = $_POST["commentuser"]; - } elseif(isset($_POST["commentuser"])) { - $err |= COMMENT_USER_EMPTY; - } else { - $comment_user = _('anonyme'); - } - - if(Utils::issetAndNoEmpty('comment') === false) { - $err |= COMMENT_EMPTY; - } - - if (isset($_POST["comment"]) && !Utils::is_error(COMMENT_EMPTY) && !Utils::is_error(NO_POLL) && !Utils::is_error(COMMENT_USER_EMPTY)) { - // protection contre les XSS : htmlentities - $comment = htmlentities($_POST['comment'], ENT_QUOTES, 'UTF-8'); - $comment_user = htmlentities($comment_user, ENT_QUOTES, 'UTF-8'); - - // Check for doublons - $comment_doublon = false; - $req = 'SELECT * FROM comments WHERE id_sondage='.$connect->Param('numsondage').' ORDER BY id_comment'; - $sql = $connect->Prepare($req); - $comment_user_doublon = $connect->Execute($sql, array($numsondage)); - if ($comment_user_doublon->RecordCount() != 0) { - while ( $dcomment_user_doublon=$comment_user_doublon->FetchNextObject(false)) { - if($dcomment_user_doublon->comment == $comment && $dcomment_user_doublon->usercomment == $comment_user) { - $comment_doublon = true; - }; - } - } - - if(!$comment_doublon) { - $req = 'INSERT INTO comments (id_sondage, comment, usercomment) VALUES ('. - $connect->Param('id_sondage').','. - $connect->Param('comment').','. - $connect->Param('comment_user').')'; - $sql = $connect->Prepare($req); - - $comments = $connect->Execute($sql, array($numsondage, $comment, $comment_user)); - if ($comments === false) { - $err |= COMMENT_INSERT_FAILED; - } - } - } -} - - -// Action quand on clique le bouton participer -$user_studs = $connect->allUsersByPollId($numsondage); - -$nbcolonnes = countStuds($sujets); -if (!Utils::is_error(NO_POLL) && (isset($_POST["boutonp"]))) { - //Si le nom est bien entré - if (empty($_POST['nom'])) { - $err |= NAME_EMPTY; - } - - if(!Utils::is_error(NAME_EMPTY) && (! ( USE_REMOTE_USER && isset($_SERVER['REMOTE_USER']) ) || $_POST["nom"] == $_SESSION["nom"])) { - $nouveauchoix = ''; - for ($i=0;$i<$nbcolonnes;$i++) { - // radio checked 1 = Yes, 2 = Ifneedbe, 0 = No - if (isset($_POST["choix$i"])) { - switch ($_POST["choix$i"]) { - case 1: $nouveauchoix .= "1";break; - case 2: $nouveauchoix .= "2";break; - default: $nouveauchoix .= "0";break; - } - } - } - - $nom=substr($_POST["nom"],0,64); - - // protection contre les XSS : htmlentities - $nom = htmlentities($nom, ENT_QUOTES, 'UTF-8'); - - foreach ($users as $user) { - if ($nom == $user->nom) { - $err |= NAME_TAKEN; - } - } - - // Ecriture des choix de l'utilisateur dans la base - if (!Utils::is_error(NAME_TAKEN) && !Utils::is_error(NAME_EMPTY)) { - - // Todo : Il faudrait lever une erreur en cas d'erreur d'insertion - $newVote = $connect->insertVote($nom, $numsondage, $nouveauchoix); - $user_studs[] = $newVote; - - if ($dsondage->receiveNewVotes || /* compatibility for non boolean DB */ $dsondage->receiveNewVotes==="yes" || $dsondage->receiveNewVotes==="true") { - if($config['use_smtp']==true){ - Utils::sendEmail( $dsondage->admin_mail, - "[".NOMAPPLICATION."] "._("Poll's participation")." : ".html_entity_decode($dsondage->title, ENT_QUOTES, 'UTF-8') . ' ', - html_entity_decode($nom, ENT_QUOTES, 'UTF-8'). ' ' . - _("has filled a line.\nYou can find your poll at the link") . " :\n\n". - Utils::getUrlSondage($numsondage) . " \n\n" . - _("Thanks for your confidence.") . "\n". NOMAPPLICATION ); - } - } - } - } else { - $err |= NAME_EMPTY; - } - -} - -if($err != 0) { - Utils::print_header(_("Error!").' - '.$dsondage->title); - bandeau_titre(_("Error!")); - - echo '
'; - -} else { - Utils::print_header(_('Poll').' - '.$dsondage->title); - bandeau_titre(_('Poll').' - '.$dsondage->title); -} - -$title=stripslashes(str_replace("\\","",$dsondage->title)); -echo ' -
-
-
-

'.$title.'

-
-
-
- - -
-
-
-
-
-
-

'. _("Initiator of the poll") .'

-

'.stripslashes($dsondage->admin_name).'

-
- -
'."\n"; - -//affichage de la description du sondage -if ($dsondage->comment) { - $commentaires = $dsondage->comment; - $commentaires=nl2br(str_replace("\\","",$comment)); - echo ' -
-

'._("Description") .'


-

'. $commentaires .'

-
'; -} -echo ' -
-
'."\n"; // .jumbotron - -//On récupere les données et les sujets du sondage -$nblignes = count($users); - -//on teste pour voir si une ligne doit etre modifiée -$testmodifier = false; -$ligneamodifier = -1; -for ($i=0;$i<$nblignes;$i++) { - if (isset($_POST["modifierligne$i"])) { - $ligneamodifier = $i; - } - - //test pour voir si une ligne est a modifier - if (isset($_POST['validermodifier'.$i])) { - $modifier = $i; - $testmodifier = true; - } -} - -//si le test est valide alors on affiche des checkbox pour entrer de nouvelles valeurs -if ($testmodifier) { - $nouveauchoix = ''; - for ($i=0;$i<$nbcolonnes;$i++) { - // radio checked 1 = Yes, 2 = Ifneedbe, 0 = No - if (isset($_POST["choix$i"])) { - switch ($_POST["choix$i"]) { - case 1: $nouveauchoix .= "1";break; - case 2: $nouveauchoix .= "2";break; - default: $nouveauchoix .= "0";break; - } - } - } - - $compteur=0; - while ($data = $user_studs->FetchNextObject(false) ) { - //mise a jour des données de l'utilisateur dans la base SQL - if ($compteur == $modifier) { - $sql = 'UPDATE user_studs SET reponses='.$connect->Param('nouveauchoix').' WHERE nom='.$connect->Param('nom').' AND id_users='.$connect->Param('id_users'); - $sql = $connect->Prepare($sql); - $connect->Execute($sql, array($nouveauchoix, $data->nom, $data->id_users)); - - if ($dsondage->mailsonde=="yes") { - Utils::sendEmail( "$dsondage->mail_admin", "[".NOMAPPLICATION."] " . _("Poll's participation") . " : ".html_entity_decode($dsondage->title, ENT_QUOTES, 'UTF-8'), "\"".html_entity_decode($data->nom, ENT_QUOTES, 'UTF-8')."\""."" . _("has filled a line.\nYou can find your poll at the link") . " :\n\n" . Utils::getUrlSondage($numsondage) . " \n\n" . _("Thanks for your confidence.") . "\n".NOMAPPLICATION ); - } - } - $compteur++; - } -} - -// Table headers -$thead = ''; - -// Button in the first td to avoid remove col on "Return" keypress) -$border = array(); // bordure pour distinguer les mois -$td_headers = array(); // for a11y, headers="M1 D4 H5" on each td -$radio_title = array(); // date for - -// Dates poll -if ($dsondage->format === 'D') { - - $tr_months = ''; - $tr_days = ''; - $tr_hours = ''; - - // Headers - $colspan_month = 0; - - $col_number = 0; - foreach ($sujets as $i=>$sujet) { - - // Current date - $horoCur = explode("@", $sujet->sujet); //horoCur[0] = date, horoCur[1] = hour,hour,hour - if (isset($sujets[$i+1])){ - $next = $sujets[$i+1]; - $horoNext = explode("@", $next->sujet); - } else { - unset($next); - } - - - $border[$col_number] = false; - $current_radio_title = strftime($date_format['txt_short'], $horoCur[0]); - - // Months - $current_td_headers = 'M'.($i+1-$colspan_month); - - $currentYearMonth = strftime("%B%Y", $horoCur[0]); - $nextYearMonth = strftime("%B%Y", $horoNext[0]); - if (isset($next) && $currentYearMonth == $nextYearMonth) { - $colspan_month += substr_count($horoCur[1], ',') + 1; - } else { - $border[$i] = true; - $colspan_month += substr_count($horoCur[1], ',') + 1; - $tr_months .= ''.strftime("%B",$horoCur[0]).' '.strftime("%Y", $horoCur[0]).''; - $colspan_month=0; - } - - // Days - - $colspan_day = substr_count($horoCur[1], ',') + 1; - $current_td_headers .= ' D'.($col_number+1-$colspan_day); - $tr_days .= ''.strftime($date_format['txt_day'],$horoCur[0]).''; - - // Hours - if (!empty($horoCur[1])) { - $hours = explode(',', $horoCur[1]); - foreach($hours as $hour) { - if (end($hours) == $hour) { - $border[$col_number] = false; - } else { - $border[$col_number] = true; - } - - $rbd = ($border[$col_number]) ? ' rbd' : ''; - - $tr_hours .= ''.$hour.''; - $radio_title[$col_number] = $current_radio_title . ' - '.$hour; - $td_headers[$col_number] = $current_td_headers . ' H'.$col_number; - $col_number++; - } - } else { - $tr_hours .= ''; - } - } - - $border[count($border)-1] = false; // suppression de la bordure droite du dernier mois - - $tr_months .= ''; - $tr_days .= ''; - $tr_hours .= ''; - - $thead = "\n".$tr_months."\n".$tr_days."\n".$tr_hours."\n"; - -// Subjects poll -} else { - - $tr_subjects = ''; - - foreach ($sujets as $i=>$sujet) { - - $td_headers[$i]='';$radio_title[$i]=''; // init before concatenate - - // Subjects - preg_match_all('/\[!\[(.*?)\]\((.*?)\)\]\((.*?)\)/',$sujet->sujet,$md_a_img); // Markdown [![alt](src)](href) - preg_match_all('/!\[(.*?)\]\((.*?)\)/',$sujet->sujet,$md_img); // Markdown ![alt](src) - preg_match_all('/\[(.*?)\]\((.*?)\)/',$sujet->sujet,$md_a); // Markdown [text](href) - if (isset($md_a_img[2][0]) && $md_a_img[2][0]!='' && isset($md_a_img[3][0]) && $md_a_img[3][0]!='') { // [![alt](src)](href) - - $th_subject_text = (isset($md_a_img[1][0]) && $md_a_img[1][0]!='') ? stripslashes($md_a_img[1][0]) : _("Choice") .' '.($i+1); - $th_subject_html = ''.$th_subject_text.''; - - } elseif (isset($md_img[2][0]) && $md_img[2][0]!='') { // ![alt](src) - - $th_subject_text = (isset($md_img[1][0]) && $md_img[1][0]!='') ? stripslashes($md_img[1][0]) : _("Choice") .' '.($i+1); - $th_subject_html = ''.$th_subject_text.''; - - } elseif (isset($md_a[2][0]) && $md_a[2][0]!='') { // [text](href) - - $th_subject_text = (isset($md_a[1][0]) && $md_a[1][0]!='') ? stripslashes($md_a[1][0]) : _("Choice") .' '.($i+1); - $th_subject_html = ''.$th_subject_text.''; - - } else { // text only - - $th_subject_text = stripslashes($sujet->sujet); - $th_subject_html = $th_subject_text; - - } - $tr_subjects .= ''.$th_subject_html.''; - - $border[$i] = false; - $td_headers[$i] .= 'S'.$i; - $radio_title[$i] .= $th_subject_text; - - } - - $thead = $tr_subjects.''; -} - -// Print headers -echo ' -
- -'; -if ($dsondage->format=="A-" || $dsondage->format=="D-") { - echo ' -
-

' . _("The administrator locked this poll, votes and comments are frozen, it's not possible to participate anymore.") . '

- -
'; -} else { - echo ' -
-

' . _("If you want to vote in this poll, you have to give your name, choose the values that fit best for you and validate with the plus button at the end of the line.") . '

- -
'; -} -echo' - - -

'._('Votes of the poll ').'

-
- - - '. $thead . ' - '; - -// Print poll results - -//Usager pré-authentifié dans la liste? -$user_mod = false; - -//affichage des resultats actuels -$somme[] = 0; -$compteur = 0; - -foreach ($users as $user) { - - $ensemblereponses = $user->reponses; - - //affichage du nom - $nombase=str_replace("°","'",$user->nom); - echo ' -'."\n"; - - // ligne d'un usager pré-authentifié - $mod_ok = !( USE_REMOTE_USER && isset($_SERVER['REMOTE_USER']) ) || ($nombase == $_SESSION['nom']); - $user_mod |= $mod_ok; - - // pour chaque colonne - for ($k=0; $k < $nbcolonnes; $k++) { - // on remplace les choix de l'utilisateur par une ligne de checkbox pour recuperer de nouvelles valeurs - if ($compteur == $ligneamodifier) { - - $car = substr($ensemblereponses, $k , 1); - - // variable pour afficher la valeur cochée - $car_html[0]='value="0"';$car_html[1]='value="1"';$car_html[2]='value="2"'; - switch ($car) { - case "1": $car_html[1]='value="1" checked';break; - case "2": $car_html[2]='value="2" checked';break; - default: $car_html[0]='value="0" checked';break; - } - - echo ' - '."\n"; - - } else { - $rbd = ($border[$k]) ? ' rbd' : ''; - $car = substr($ensemblereponses, $k, 1); - switch ($car) { - case "1": echo ''."\n"; - if (isset($somme[$k]) === false) { - $somme[$k] = 0; - } - $somme[$k]++; break; - case "2": echo ''."\n"; break; - default: echo ''."\n"; - } - } - } - - //a la fin de chaque ligne se trouve les boutons modifier - if ($compteur != $ligneamodifier && ($dsondage->format=="A+"||$dsondage->format=="D+") && $mod_ok) { - echo ' - '."\n"; - } - - //demande de confirmation pour modification de ligne - for ($i=0;$i<$nblignes;$i++) { - if (isset($_POST["modifierligne$i"])) { - if ($compteur == $i) { - echo ''."\n"; - } - } - } - - $compteur++; - echo ''."\n"; -} - -// affichage de la ligne pour un nouvel utilisateur -if (( !(USE_REMOTE_USER && isset($_SERVER['REMOTE_USER'])) || !$user_mod) && $ligneamodifier==-1 && ($dsondage->format!="A-" && $dsondage->format!="D-")) { - //affichage de la case vide de texte pour un nouvel utilisateur - echo ' -'."\n"; - - //une ligne de checkbox pour le choix du nouvel utilisateur - for ($i = 0; $i < $nbcolonnes; $i++) { - echo ' - '."\n"; - } - - // Affichage du bouton de formulaire pour inscrire un nouvel utilisateur dans la base - echo ' -'."\n"; - -} - -// Addition and Best choice -//affichage de la ligne contenant les sommes de chaque colonne -$tr_addition = ''; -$meilleurecolonne = max($somme); -$compteursujet = 0; -$meilleursujet = ''; - - $meilleursujet.= '
  • '.$radio_title[$i].'
  • '; - $compteursujet++; - - } else { - $tr_addition .= ''; - } - } else { - $tr_addition .= ''; - } -} -$tr_addition .= ''; - -$meilleursujet = str_replace("°", "'", $meilleursujet).''; -$vote_str = ($meilleurecolonne > 1) ? $vote_str = _('votes') : _('vote'); - -// Print Addition and Best choice -echo $tr_addition.' - -
    '._('Votes of the poll ').$title.'
    '.stripslashes($nombase).' -
      -
    • - - -
    • -
    • - - -
    • -
    • - - -
    • -
    -
    ' . _('Yes') . '() ' . _('Yes') . _(', ifneedbe') . '' . _('No') . ' - -
    -
    - - -
    -
    -
      -
    • - - -
    • -
    • - - -
    • -
    • - - -
    • -
    -
    '. _("Addition") .''.$somme[$i].''.$somme[$i].'
    -
    -
    '."\n"; - -if ($compteursujet == 1) { - echo ' -

    ' . _("Best choice") . '

    -
    -

    ' . _("The best choice at this time is:") . '

    - ' . $meilleursujet . ' -

    ' . _("with") . ' ' . $meilleurecolonne . ' ' . $vote_str . '.

    -
    '."\n"; -} elseif ($compteursujet > 1) { - echo ' -

    ' . _("Best choices") . '

    -
    -

    ' . _("The bests choices at this time are:") . '

    - ' . $meilleursujet . ' -

    ' . _("with") . ' ' . $meilleurecolonne . ' ' . $vote_str . '.

    -
    '."\n"; -} - -echo ' -
    -
    '; - -// Comments -$comments = $connect->allCommentsByPollId($numsondage); - -if (count($comments) != 0) { - echo '

    ' . _("Comments of polled people") . '

    '."\n"; - - while($dcomment = $comment_user->FetchNextObject(false)) { - echo ' -
    - '.stripslashes($dcomment->usercomment). ' : - ' . stripslashes(nl2br($dcomment->comment)) . ' -
    '; - } - - echo '
    '; -} - -if ($dsondage->format!="A-" && $dsondage->format!="D-") { -echo ' -
    -
    -
    ' . _("Add a comment in the poll") . ' -
    -

    -
    -
    -


    -

    -
    -

    -
    -
    -
    -
    '; -} - -echo ' -
    '; - -bandeau_pied();