proceed(); // affichage des membres de la page function show_results($user_input, $nbr_lignes=0, $page=0, $id = 0) { global $nb_per_page; global $base_url; global $caller; global $no_display; global $charset; global $msg; global $callback; global $param1; // on récupére le nombre de lignes qui vont bien // if($param1) $restrict=" and abt_id not in (select num_serialcirc_abt from serialcirc) "; if (!$id) { $user_input = str_replace("*","%",$user_input); if($user_input=="") { $requete = "SELECT COUNT(1) FROM abts_abts where abt_id!='$no_display' $restrict"; } else { $requete="select count(distinct abt_id) from abts_abts where abt_name like '%".$user_input."%' and abt_id!='$no_display' $restrict" ; } $res = pmb_mysql_query($requete); $nbr_lignes = pmb_mysql_result($res, 0, 0); } else $nbr_lignes=1; if (!$page) $page=1; $debut = ($page-1)*$nb_per_page; if($nbr_lignes) { // on lance la vraie requête if (!$id) { if($user_input=="") { $requete = "SELECT * FROM abts_abts where abt_id!='$no_display' $restrict "; $requete .= "ORDER BY abt_name LIMIT $debut,$nb_per_page "; } else { $requete = "SELECT * FROM abts_abts where abt_name like '%".$user_input."%' and abt_id!='$no_display' $restrict"; $requete .= "ORDER BY abt_name LIMIT $debut,$nb_per_page "; } } else $requete="select * from abts_abts where abt_id='".$id."'"; print ""; $res = @pmb_mysql_query($requete); while(($abt=pmb_mysql_fetch_object($res))) { $circlist_info=""; $flag_circlist_info=0; $requete="select id_serialcirc from serialcirc where num_serialcirc_abt=".$abt->abt_id; $res_circlist=pmb_mysql_query($requete); print ""; } print "
"; if (pmb_mysql_num_rows($res_circlist)) { $circlist_info="".$msg["serialcirc_img_info"].""; $flag_circlist_info=1; } print "$circlist_info"; $entry = $abt->abt_name; print pmb_bidi(" abt_id', '".htmlentities(addslashes($entry),ENT_QUOTES,$charset)."','$callback',$flag_circlist_info)\"> $entry"); print "
"; pmb_mysql_free_result($res); // constitution des liens $nbepages = ceil($nbr_lignes/$nb_per_page); $suivante = $page+1; $precedente = $page-1; // affichage pagination print "
 
"; $url_base = $base_url."&user_input=".rawurlencode(stripslashes($user_input)); $nav_bar = aff_pagination ($url_base, $nbr_lignes, $nb_per_page, $page, 10, false, true) ; print $nav_bar; print "
"; } }