has_forbidden_fields()){ $allow_search_affiliate_and_external=false; } } if($opac_allow_affiliate_search && $allow_search_affiliate_and_external){ $sr_form.= $search_result_extended_affiliate_lvl2_head; } else { $sr_form.= "

".$msg['resultat_recherche']."

\n
"; } //le contenu du catalogue est calculé dans 2 cas : // 1- la recherche affiliée n'est pas activée, c'est donc le seul résultat affichable // 2- la recherche affiliée est active et on demande l'onglet catalog... if(!$opac_allow_affiliate_search || ($opac_allow_affiliate_search && $tab == "catalog")){ //gestion du tri if (isset($_GET["sort"])) { $_SESSION["last_sortnotices"]=$_GET["sort"]; } if (isset($count) && $count>$opac_nb_max_tri) { $_SESSION["last_sortnotices"]=""; } if($facette_test==1){ global $search; facettes::checked_facette_search(); $_SESSION["lq_facette"]=$_SESSION["facette"]; $_SESSION["lq_facette_search"]["lq_search"]=$es->serialize_search(); }else if(isset($from_see) && $from_see == 1 && isset($filtre_compare) && $filtre_compare == "compare"){ //from_see est un élément posté dans un formulaire d'une page d'autorité //il flage l'origine qui nécessite une reconstruction de l'environnement de la multi-critère pour faire les filtres multiples ou le comparateur facettes::make_facette_search_env(); } $lib_recherche=$es->make_human_query(); $searcher = new searcher_extended(); if($opac_visionneuse_allow){ $nbexplnum_to_photo = $searcher->get_nb_explnums(); } $count = $searcher->get_nb_results(); $l_typdoc= implode(",",$searcher->get_typdocs());// La variable global $l_typdoc est utilisée pour la photothèque //Enregistrement des stats if($pmb_logs_activate){ global $nb_results_tab; $nb_results_tab['extended'] = $count; } if($count){ if(isset($_SESSION["last_sortnotices"]) && $_SESSION["last_sortnotices"]!==""){ $notices = $searcher->get_sorted_result($_SESSION["last_sortnotices"],$debut,$opac_search_results_per_page); }else{ $notices = $searcher->get_sorted_result("default",$debut,$opac_search_results_per_page); } if (count($notices)) { $_SESSION['tab_result_current_page'] = implode(",", $notices); } else { $_SESSION['tab_result_current_page'] = ""; } } $sr_form .= pmb_bidi(""); // pour la DSI - création d'une alerte if ($opac_allow_bannette_priv && $allow_dsi_priv && ((isset($_SESSION['abon_cree_bannette_priv']) && $_SESSION['abon_cree_bannette_priv']==1) || $opac_allow_bannette_priv==2)) { $sr_form.= $es->make_hidden_search_form('./index.php?lvl=more_results&mode=extended', 'bannette_priv_form_values', '', false); $sr_form.= $es->make_hidden_opac_view_form_content(); $sr_form.= ""; $sr_form.= " "; } // pour la DSI - Modification d'une alerte if(!empty($_SESSION['abon_edit_bannette_priv']) && !empty($_SESSION['abon_edit_bannette_priv_visibility_until']) && $_SESSION['abon_edit_bannette_priv_visibility_until'] < time()) { unset($_SESSION['abon_edit_bannette_priv']); } if ($opac_allow_bannette_priv && $allow_dsi_priv && (isset($_SESSION['abon_edit_bannette_priv']) && $_SESSION['abon_edit_bannette_priv']==1)) { $sr_form.= " ".bannette::get_tooltip_private_edition($_SESSION['abon_edit_bannette_id'], 'dsi_priv_tooltip')."  "; } if(!$opac_allow_affiliate_search || !$allow_search_affiliate_and_external) { $sr_form.= "
"; } $sr_form.= "
"; if ($count) { if ($opac_notices_depliable) { if(isset($filtre_compare) && $filtre_compare=='compare'){ $sr_form.=facette_search_compare::get_begin_result_list(); }else{ $sr_form.= $begin_result_liste; } } //impression $sr_form.= "".$link_to_print_search_result.""; //gestion du tri $sr_form.= sort::show_tris_in_result_list($count); $sr_form.= $add_cart_link; if($opac_visionneuse_allow && $nbexplnum_to_photo){ $search_to_post = $es->serialize_search(false,true); $sr_form.= "   ".$link_to_visionneuse; $sr_form.= " "; } } //affinage //enregistrement de l'endroit actuel dans la session if ($_SESSION["last_query"]) { $n=$_SESSION["last_query"]; } else { $n=$_SESSION["nb_queries"]; } if(empty($_SESSION['facette']) || count($_SESSION['facette'])==0){ $_SESSION["notice_view".$n]["search_mod"]="extended"; $_SESSION["notice_view".$n]["search_page"]=$page; } //affichage if($opac_search_allow_refinement){ $sr_form.= "  ".$msg["affiner_recherche"].""; } //fin affinage // url courte if($opac_short_url) { $shorturl_search = new shorturl_type_search(); $sr_form.= $shorturl_search->get_display_shorturl_in_result(); } //Etendre if ($opac_allow_external_search && $allow_search_affiliate_and_external) { $sr_form.= "  ".$msg["connecteurs_external_search_sources"].""; } //fin etendre $sr_form.= suggest::get_add_link(); //on suis le flag filtre/compare facettes::session_filtre_compare(); $sr_form.= "
"; if($filtre_compare=='compare'){ //on valide la variable session qui comprend les critères de comparaisons facette_search_compare::session_facette_compare(); //affichage comparateur $facette_compare= new facette_search_compare(); $compare=$facette_compare->compare($searcher); if($compare===true){ $sr_form.= $facette_compare->display_compare(); }else{ $sr_form.= $msg[$compare]; } }else{ //si demande de réinitialisation if(isset($reinit_compare) && $reinit_compare==1){ facette_search_compare::session_facette_compare(null,$reinit_compare); } $sr_form.= $searcher::get_current_search_map(); $sr_form.= aff_notice(-1); $nb=0; $recherche_ajax_mode=0; if(isset($notices) && is_array($notices) && count($notices)){ for ($i =0 ; $i4)$recherche_ajax_mode=1; $sr_form.= pmb_bidi(aff_notice($notices[$i], 0, 1, 0, "", "", 0, 0, $recherche_ajax_mode)); } } $sr_form.= aff_notice(-2); } $sr_form.= "
"; $sr_form.= "
 
"; //Si pas de résultats, affichage des suggestions if(!$count && $opac_simple_search_suggestions){ $tableSuggest=""; if ($opac_autolevel2==2) { $actionSuggest = $base_path."/index.php?lvl=more_results&autolevel1=1"; } else { $actionSuggest = $base_path."/index.php?lvl=search_result&search_type_asked=simple_search"; } $termes = ""; //on va chercher le premier champ $s=explode("_",$search[0]); $field_="field_0_".$search[0]; global ${$field_}; $field=${$field_}; $termes=str_replace('*','',stripslashes($_SESSION["user_query".$field[0]])); if (trim($termes)){ $suggestion = new suggest($termes); $tmpArray = array(); $tmpArray = $suggestion->listUniqueSimilars(); if(count($tmpArray)){ $tableSuggest.=""; foreach($tmpArray as $word){ $tableSuggest.=""; } $tableSuggest.="
".$word."
"; $sr_form.= "

".$msg['facette_suggest']."

".$tableSuggest."
"; } } } if($filtre_compare=='compare'){ $sr_form.=""; }elseif($count){ if(!$opac_allow_affiliate_search){ $url_page = "javascript:document.form_values.page.value=!!page!!; document.form_values.submit()"; $nb_per_page_custom_url = "javascript:document.form_values.nb_per_page_custom.value=!!nb_per_page_custom!!"; $action = "javascript:document.form_values.page.value=document.form.page.value; document.form_values.submit()"; }else{ $url_page = "javascript:document.form_values.page.value=!!page!!; document.form_values.catalog_page.value=document.form_values.page.value; document.form_values.action = \"./index.php?lvl=more_results&mode=extended&tab=catalog\"; document.form_values.submit()"; $nb_per_page_custom_url = "javascript:document.form_values.nb_per_page_custom.value=!!nb_per_page_custom!!"; $action = "javascript:document.form_values.page.value=document.form.page.value; document.form_values.catalog_page.value=document.form_values.page.value; document.form_values.action = \"./index.php?lvl=more_results&mode=extended&tab=catalog\"; document.form_values.submit()"; } $sr_form.=""; } if(!$opac_allow_affiliate_search || !$allow_search_affiliate_and_external) { $sr_form.= "
"; } $sr_form = str_replace('',$search_result_extended_affiliate_lvl2_head_wo_link,$sr_form); } else { if($tab == "affiliate"){ //l'onglet source affiliées est actif, il faut son contenu... $query = $es->serialize_search(); $as=new affiliate_search_extended($query); $as->getResults(); $sr_form.= $as->results; } $sr_form.= "
 
"; //Enregistrement des stats if($pmb_logs_activate){ global $nb_results_tab; $nb_results_tab['extended_affiliate'] = $as->getTotalNbResults(); } $es->unserialize_search($query); } print $sr_form; function extended_get_current_search_map($mode_search=0){ global $opac_map_activate; global $opac_map_max_holds; global $opac_map_size_search_result; global $page; $map = ""; if($opac_map_activate==1 || $opac_map_activate==2){ $map_hold = null; $current_search=$_SESSION["nb_queries"]; if($current_search<=0) $current_search = 0; $map_search_controler = new map_search_controler($map_hold, $current_search, $opac_map_max_holds,true); $map_search_controler->set_mode($current_search); $size=explode("*",$opac_map_size_search_result); if(count($size)!=2) { $map_size="width:100%; height:400px;"; } else { if (is_numeric($size[0])) { $size[0] = $size[0] . "px"; } if (is_numeric($size[1])) { $size[1] = $size[1] . "px"; } $map_size= "width:".$size[0]."; height:".$size[1].";"; } $map_search_controler->ajax = true; $map = " "; } return $map; }