0) echo "
$arch_aff50 $save $a1500 $save20 $sur1500 $nblignes $total1500

"; else $total_affiche = 0; $compt = 1; while ($compt <= $total_affiche) {//1 include ("identif/reponses.ebs"); $befcf = 1; $nblignes_reponses = 0; while ($befcf <= $nblignes) { if ($id_sond3[$befcf] == $id_sond23[$i]) { $nblignes_reponses++; $id_rep3[$nblignes_reponses] = "$id_rep3[$befcf]"; $reponse3[$nblignes_reponses] = "$reponse3[$befcf]"; $nbre_rep3[$nblignes_reponses] = "$nbre_rep3[$befcf]"; $reponse3[$nblignes_reponses] = sup_slash2($reponse3[$nblignes_reponses]); } $befcf++; } $nblignes2 = $nblignes_reponses; $a = 1; $nbre_votant = 0; while ($a <= $nblignes2) { $nbre_votant = $nbre_rep3[$a] + $nbre_votant; $a = $a + 1; } $where_is = strpos($html_archives2, '##QUESTION##'); $where_is2 = strpos($html_archives2, '', $where_is); $new_where = $where_is2 + 4; $where_is3 = strpos($html_archives2, '', $new_where); $where_is4 = strpos($html_archives2, '', $where_is3); $taille_code = $where_is4 - $where_is3 + 5; $annee = substr($date_ajou3[$i], 6, 4); $mois = substr($date_ajou3[$i], 3, 2); $jour = substr($date_ajou3[$i], 0, 2); if ($format_date2 == "1") $view_date_arch = $date_ajou3[$i]; else $view_date_arch = "$annee-$mois-$jour"; $code_html_deb = substr($html_archives2, 0, $where_is3); $code_html_deb = str_replace("##QUESTION##", $s_quest3[$i], $code_html_deb); $code_html_deb = str_replace("##DATE##", $view_date_arch, $code_html_deb); $code_html_form = substr($html_archives2, $where_is3, $taille_code); $code_html_fin = substr($html_archives2, $where_is4); echo "$code_html_deb"; $m = 1; while ($m <= $nblignes2) { if ($nbre_votant > 0){ $save_pourcent_sond = ($nbre_rep3[$m] * 100) / $nbre_votant; $pourcent_sond = $save_pourcent_sond * $coef_multiplicatif2;} else{ $save_pourcent_sond = 0; $pourcent_sond = 0;} $nbr_chif_virg = $nbre_chiffres_pourcent2; $where_point = strpos($save_pourcent_sond, "."); $limit_cut = ($where_point + 1) + $nbr_chif_virg; if ($save_pourcent_sond == "100") $stop_suite_trait = 1; if ($nbr_chif_virg != "0" && $stop_suite_trait != "1") $save_pourcent_sond = substr_replace($save_pourcent_sond, "", $limit_cut); elseif ($stop_suite_trait != "1") $save_pourcent_sond = round($save_pourcent_sond); $chaine1 = "$reponse3[$m]"; $chaine2 = "
  "; if ($pourcent_aff2 == "1") $chaine3 = "$save_pourcent_sond% "; else $chaine3 = ""; if ($nombre_aff2 == "1") $chaine4 = "($nbre_rep3[$m])"; else $chaine4 = ""; $code_html_form2 = str_replace("##REPONSES##", "$chaine1$chaine2$chaine3$chaine4", $code_html_form); echo "$code_html_form2"; $m++; } if ($votes_total_aff2 == "1") $chaine5 = "votes: $nbre_votant"; else $chaine5 = ""; $code_html_fin = str_replace("##COMMENT##", $commentaire3[$i], $code_html_fin); $code_html_fin = str_replace("##NBREVOTES##", $chaine5, $code_html_fin); echo "$code_html_fin
"; $i++; $compt++; }//1 ?> 1) {//si il y a plusieurs pages, on affiche le menu echo "
"; if ($page > 1) { $a = $page - 1; echo "<<$precedent     "; } echo "[ "; $i = 1; while ($i <= $nbrepages) { if ($page == $i) echo "$i"; else { echo "$i"; } $i++; if ($i <= $nbrepages) echo "-"; } echo " ]"; if ($page < $nbrepages) { $a = $page + 1; echo "     $suivant>>"; } echo "
"; }//fin si il y a plusieurs pages on affiche le menu ?>
$pas_sond_arch"; echo "$html_bas_arch42"; ?>