$msg[183] !!cle!!

!!list!!
!!nav_bar!!
"; /* pour ajouter un lien de création : $msg[176] */ function list_collection($coll, $collection_list, $nav_bar) { global $sub_collection_list_tmpl; global $charset; $sub_collection_list_tmpl = str_replace("!!cle!!", $coll, $sub_collection_list_tmpl); $sub_collection_list_tmpl = str_replace("!!list!!", $collection_list, $sub_collection_list_tmpl); $sub_collection_list_tmpl = str_replace("!!nav_bar!!", $nav_bar, $sub_collection_list_tmpl); subcollection::search_form(); print pmb_bidi($sub_collection_list_tmpl); } // on récupére le nombre de lignes qui vont bien if(!$nbr_lignes) { if(!$user_input) { $requete = "SELECT count(1) FROM sub_collections"; if ($last_param) $requete = "SELECT count(1) FROM sub_collections ".$tri_param." ".$limit_param; } else { $aq=new analyse_query(stripslashes($user_input)); if ($aq->error) { subcollection::search_form(); error_message($msg["searcher_syntax_error"],sprintf($msg["searcher_syntax_error_desc"],$aq->current_car,$aq->input_html,$aq->error_message)); exit; } $requete=$aq->get_query_count("sub_collections","sub_coll_name","index_sub_coll","sub_coll_id"); } $res = mysql_query($requete, $dbh); $nbr_lignes = mysql_result($res, 0, 0); } else $aq=new analyse_query(stripslashes($user_input)); if(!$page) $page=1; $debut =($page-1)*$nb_per_page; if($nbr_lignes) { $sub_collection_list_tmpl=str_replace( "",$nbr_lignes.' ',$sub_collection_list_tmpl); $collection_list = " ".$msg[103]." ".$msg[165]." ".$msg["count_notices_assoc"]." "; // on lance la vraie requête if(!$user_input) { $requete = "SELECT A.*, B.*, C.* FROM sub_collections A, collections B, publishers C"; $requete .= " WHERE B.collection_id=A.sub_coll_parent"; $requete .= " AND C.ed_id=B.collection_parent"; $requete .= " ORDER BY A.sub_coll_name LIMIT $debut,$nb_per_page "; if ($last_param) { $requete = "SELECT A.*, B.*, C.* FROM sub_collections A, collections B, publishers C"; $requete .= " WHERE B.collection_id=A.sub_coll_parent"; $requete .= " AND C.ed_id=B.collection_parent"; $requete .= " ".$tri_param." ".$limit_param; } } else { $members=$aq->get_query_members("sub_collections","sub_coll_name","index_sub_coll","sub_coll_id"); $requete = "SELECT sub_collections.*, collections.*, publishers.*,".$members["select"]." as pert FROM sub_collections, collections, publishers where ".$members["where"]." and collection_id=sub_coll_parent and collection_parent=ed_id group by sub_coll_id order by pert desc, index_sub_coll, index_coll,index_publisher limit $debut,$nb_per_page"; } $res = @mysql_query($requete, $dbh); $parity=1; $url_base = "$PHP_SELF?categ=souscollections&sub=reach&user_input=".rawurlencode(stripslashes($user_input)) ; while(($coll=mysql_fetch_object($res))) { if ($parity % 2) { $pair_impair = "even"; } else { $pair_impair = "odd"; } $parity += 1; $notice_count_sql = "SELECT count(*) FROM notices WHERE subcoll_id = ".$coll->sub_coll_id; $notice_count = mysql_result(mysql_query($notice_count_sql), 0, 0); $tr_javascript=" onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='$pair_impair'\" "; $collection_list.= " sub_coll_id&user_input=".rawurlencode(stripslashes($user_input))."&nbr_lignes=$nbr_lignes&page=$page';\"> $coll->sub_coll_name"; $collection_list .= " ($coll->collection_name. $coll->ed_name)"; $collection_list .= "".htmlentities($coll->sub_coll_issn,ENT_QUOTES, $charset).""; if($notice_count && $notice_count>0) $collection_list .= "sub_coll_id'\">".$notice_count.""; else $collection_list.= " "; $collection_list .= ""; } // fin while mysql_free_result($res); if (!$last_param) $nav_bar = aff_pagination ($url_base, $nbr_lignes, $nb_per_page, $page, 10, false, true) ; else $nav_bar = ""; // affichage du résultat list_collection($user_input, $collection_list, $nav_bar); } else { // la requête n'a produit aucun résultat subcollection::search_form(); error_message($msg[184], str_replace('!!cle!!', stripslashes($user_input), $msg[181]), 0, './autorites.php?categ=souscollections&sub=&id='); }