proceed(); function show_results ($user_input, $nbr_lignes=0, $page=0, $id = 0) { global $nb_per_page; global $base_url; global $caller; global $msg; global $no_display ; global $charset; global $idperio; if(!$idperio){ $requete = "SELECT bulletin_notice FROM bulletins where bulletin_id=".$no_display." "; $res = @pmb_mysql_query($requete); if(!($bull=pmb_mysql_fetch_object($res))) { error_message($msg["searcher_syntax_error"],sprintf($msg["searcher_syntax_error_desc"],$aq->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 = pmb_mysql_query($requete); $nbr_lignes = @pmb_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 = @pmb_mysql_query($requete); 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 | "; print "