current_car,$aq->input_html,$aq->error_message)); exit; } $bulletin_notice = $bull->bulletin_notice; } else if(!$no_display && $idperio){ $bulletin_notice = $idperio; $no_display = 0; } // on récupére le nombre de lignes qui vont bien if($user_input=="") { $requete = "SELECT COUNT(1) FROM bulletins where bulletin_id!='".$no_display."' and bulletin_notice =$bulletin_notice "; } else { $requete = "SELECT COUNT(1) FROM bulletins where bulletin_numero like '".str_replace("*","%",$user_input)."' and bulletin_id!='".$no_display."' and bulletin_notice =$bulletin_notice "; } $res = mysql_query($requete, $dbh); $nbr_lignes = @mysql_result($res, 0, 0); if(!$page) $page=1; $debut =($page-1)*$nb_per_page; if ($nbr_lignes) { // on lance la vraie requête if($user_input=="") $requete = "SELECT bulletin_numero,mention_date, date_date,bulletin_titre,bulletin_id FROM bulletins where bulletin_id!=".$no_display." and bulletin_notice =$bulletin_notice ORDER BY date_date LIMIT $debut,$nb_per_page "; else $requete = "SELECT bulletin_numero,mention_date,bulletin_titre,bulletin_id FROM bulletins where bulletin_numero like '".str_replace("*","%",$user_input)."' and bulletin_id!=".$no_display." and bulletin_notice =$bulletin_notice ORDER BY date_date LIMIT $debut,$nb_per_page "; $res = @mysql_query($requete, $dbh); print ""; while(($bull=mysql_fetch_object($res))) { $notice_entry = $bull->bulletin_titre." ".$bull->mention_date; print " "; print ""; } print "
bulletin_id', '".htmlentities(addslashes($bull->bulletin_numero),ENT_QUOTES,$charset)." (".htmlentities(addslashes($bull->bulletin_titre),ENT_QUOTES,$charset).")' )\">".htmlentities($bull->bulletin_numero,ENT_QUOTES,$charset)." $notice_entry
"; // constitution des liens $nbepages = ceil($nbr_lignes/$nb_per_page); $suivante = $page+1; $precedente = $page-1; // affichage du lien précédent si nécéssaire print '
'; if($precedente > 0) print "[$msg[48]]"; for($i = 1; $i <= $nbepages; $i++) { if($i==$page) print "$i/$nbepages"; } if($suivante<=$nbepages) print "[$msg[49]]"; } print '
'; } // affichage des membres de la page $sel_search_form = str_replace("!!deb_rech!!", stripslashes($f_user_input), $sel_search_form); print $sel_search_form; print $jscript; show_results($dbh, $user_input, $nbr_lignes, $page); print $sel_footer;