get_query_members("collections","collection_name","index_coll","collection_id"); $clause.= 'where '.$members["where"]; if ($opac_search_other_function) $add_notice=search_other_function_clause(); if ($typdoc || $add_notice) $clause = ',notices '.$clause.' and coll_id=collection_id '; if ($typdoc) $clause.=" and typdoc='".$typdoc."' "; if ($add_notice) $clause.= ' and notice_id in ('.$add_notice.')'; $tri = 'order by pert desc, index_coll'; $pert=$members["select"]." as pert"; $collections = mysql_query("SELECT COUNT(distinct collection_id) FROM collections $clause", $dbh); $nb_result_collections = mysql_result($collections, 0 , 0); //Enregistrement des stats if($pmb_logs_activate){ global $nb_results_tab; $nb_results_tab['collections'] = $nb_result_collections; } //définition du formulaire... $form = "
\n"; $form .= "\n"; if (function_exists("search_other_function_post_values")){ $form .=search_other_function_post_values(); } $form .= ""; $form .= "\n"; $form .= "\n"; $form .= "\n"; $form .= "\n"; $form .= "
"; if($opac_allow_affiliate_search){ $search_result_affiliate_all = str_replace("!!mode!!","collection",$search_result_affiliate_lvl1); $search_result_affiliate_all = str_replace("!!search_type!!","authorities",$search_result_affiliate_all); $search_result_affiliate_all = str_replace("!!label!!",$msg['collections'],$search_result_affiliate_all); $search_result_affiliate_all = str_replace("!!nb_result!!",$nb_result_collections,$search_result_affiliate_all); if($nb_result_collections){ $link = "".$msg['suite']." "; }else $link = ""; $search_result_affiliate_all = str_replace("!!link!!",$link,$search_result_affiliate_all); $search_result_affiliate_all = str_replace("!!style!!","",$search_result_affiliate_all); $search_result_affiliate_all = str_replace("!!user_query!!",rawurlencode(stripslashes((($charset == "utf-8")?$user_query:utf8_encode($user_query)))),$search_result_affiliate_all); $search_result_affiliate_all = str_replace("!!form_name!!","search_collection",$search_result_affiliate_all); $search_result_affiliate_all = str_replace("!!form!!",$form,$search_result_affiliate_all); print $search_result_affiliate_all; }else{ if($nb_result_collections) { // tout bon, y'a du résultat, on lance le pataquès d'affichage $requete = "select collection_id,collection_name from collections $clause $tri LIMIT $opac_search_results_first_level"; // ??? ER : $found = mysql_query($requete, $dbh); print "
"; print "$msg[collections] ".$nb_result_collections." $msg[results] "; print "$msg[suite] 
"; print $form; print "
"; } } if ($nb_result_collections) { $_SESSION["level1"]["collection"]["form"]=$form; $_SESSION["level1"]["collection"]["count"]=$nb_result_collections; }