\n
".printnavbar($page, $count, $opac_search_results_per_page, $url_page, $nb_per_page_custom_url, $action)."
";
return $catal_navbar;
}
public static function display_list() {
global $msg;
global $base_path, $class_path, $include_path;
global $mode;
global $active_facette;
global $nav_displayed;
global $opac_max_results_on_a_page, $opac_search_results_per_page;
global $search_type;
global $active_facettes_external;
global $user_query;
switch($mode) {
case 'tous':
$active_facette = 1;
if (!$nav_displayed) $opac_search_results_per_page = $opac_max_results_on_a_page;
static::$level2_search = new level2_records_search(static::$user_query, 'tous');
facettes::set_facet_type('notices');
break;
case 'titre':
case 'title':
$active_facette = 1;
if (!$nav_displayed) $opac_search_results_per_page = $opac_max_results_on_a_page;
static::$level2_search = new level2_records_search(static::$user_query, 'titres');
facettes::set_facet_type('notices');
break;
case 'auteur':
$active_facette = 1;
static::$level2_search = new level2_authorities_search(static::$user_query, 'authors');
facettes::set_facet_type('authors');
break;
case 'editeur':
$active_facette = 1;
static::$level2_search = new level2_authorities_search(static::$user_query, 'publishers');
facettes::set_facet_type('publishers');
break;
case 'titre_uniforme':
$active_facette = 1;
static::$level2_search = new level2_authorities_search(static::$user_query, 'titres_uniformes');
facettes::set_facet_type('titres_uniformes');
break;
case 'collection':
$active_facette = 1;
static::$level2_search = new level2_authorities_search(static::$user_query, 'collections');
facettes::set_facet_type('collections');
break;
case 'souscollection':
$active_facette = 1;
static::$level2_search = new level2_authorities_search(static::$user_query, 'subcollections');
facettes::set_facet_type('subcollections');
break;
case 'categorie':
$active_facette = 1;
static::$level2_search = new level2_authorities_search(static::$user_query, 'categories');
facettes::set_facet_type('categories');
break;
case 'indexint':
$active_facette = 1;
static::$level2_search = new level2_authorities_search(static::$user_query, 'indexint');
facettes::set_facet_type('indexint');
break;
case 'abstract':
$active_facette = 1;
if (!$nav_displayed) $opac_search_results_per_page = $opac_max_results_on_a_page;
static::$level2_search = new level2_records_search(static::$user_query, 'abstract');
break;
case 'keyword':
$active_facette = 1;
if (!$nav_displayed) $opac_search_results_per_page = $opac_max_results_on_a_page;
if ($search_type=="extended_search") $search_type="";
static::$level2_search = new level2_records_search(static::$user_query, 'keywords');
break;
case 'extended':
//On annule la navigation par critères simples
$_SESSION["level1"]=array();
$active_facette = 1;
if (!$nav_displayed) $opac_search_results_per_page = $opac_max_results_on_a_page;
require_once($base_path.'/search/level2/extended.inc.php');
facettes::set_facet_type('notices');
break;
case 'extended_authorities':
//On annule la navigation par critères simples
$_SESSION["level1"]=array();
$active_facette = 1;
static::$level2_search = new level2_authorities_search("", 'extended');
facettes::set_facet_type('');
break;
case 'external':
$active_facettes_external = 1;
//On annule la navigation par critères simples
$_SESSION["level1"]=array();
require_once($base_path.'/search/level2/external.inc.php');
facettes::set_facet_type('');
break;
case 'docnum':
require_once($base_path.'/search/level2/docnum.inc.php');
facettes::set_facet_type('');
break;
case 'concept':
$active_facette = 1;
static::$level2_search = new level2_authorities_search(static::$user_query, 'concepts');
facettes::set_facet_type('concepts');
break;
default:
if(substr($mode, 0,10) == "authperso_"){
$active_facette = 1;
static::$level2_search = new level2_authpersos_search(static::$user_query, 'authperso');
$authperso = explode('_', $mode);
if (!empty($authperso[1])) {
static::$level2_search->set_authperso_id($authperso[1]);
}
}else
facettes::set_facet_type('');
print $msg['no_document_found'];
break;
}
if(isset(static::$level2_search) && is_object(static::$level2_search)) {
static::$level2_search->proceed();
}
}
protected static function init_session_facets() {
global $reinit_facette;
global $searcher;
global $es;
global $opac_map_activate, $opac_map_activate;
global $search_type;
if ($reinit_facette) unset($_SESSION['facette']);
if(isset($searcher) && is_object($searcher)) {
$tab_result = $searcher->get_result();
if (isset($_SESSION['facette']) && count($_SESSION['facette']) > 0) {
$search_type = "extended_search";
if(!is_object($es)) $es = new search();
}
$_SESSION['tab_result'] = $tab_result;
if ($opac_map_activate == 1 || $opac_map_activate == 3) {
searcher::check_emprises();
}
} elseif(isset(static::$level2_search) && is_object(static::$level2_search)) {
$tab_result = implode(',', static::$level2_search->get_elements_ids());
if (isset($_SESSION['facette']) && count($_SESSION['facette']) > 0) {
$search_type = "extended_search";
if(!is_object($es)) $es = new search_authorities();
}
$_SESSION['tab_result'] = $tab_result;
}
static::set_search_type($search_type);
return $tab_result;
}
public static function get_display_facets() {
global $opac_facettes_ajax;
$facettes_tpl = '';
$tab_result = static::init_session_facets();
if (!$opac_facettes_ajax) {
facettes::set_url_base(static::$url_base);
$facettes_tpl .= facettes::make_facette($tab_result);
} else {
$facettes_tpl .= facettes::call_ajax_facettes();
}
return $facettes_tpl;
}
public static function get_display_facets_external() {
global $opac_facettes_ajax;
$facettes_tpl = '';
if (!$opac_facettes_ajax) {
$tab_result = $_SESSION['tab_result_external'];
$facettes_tpl .= facettes_external::make_facette($tab_result);
} else {
// $_SESSION['tab_result_external']=$tab_result;
$facettes_tpl .= facettes_external::call_ajax_facettes();
}
return $facettes_tpl;
}
public static function get_hidden_search_form() {
global $charset;
global $include_path;
global $clause , $tri, $pert, $clause_bull, $clause_bull_num_notice, $join;
global $mode, $count, $typdoc;
global $l_typdoc;
global $opac_indexation_docnum_allfields;
global $author_type;
global $id_thes, $surligne, $tags;
global $page, $nb_per_page_custom, $catalog_page, $affiliate_page;
global $nbexplnum_to_photo;
global $opac_cart_allow, $opac_cart_only_for_subscriber, $facette_test, $es;
global $opac_allow_affiliate_search, $id_authperso;
global $external_env;
$page = intval($page);
if(!isset($id_authperso)) $id_authperso = 0;
// affichage recherche
$clause = stripslashes($clause);
$tri = stripslashes($tri);
$pert = stripslashes($pert);
$clause_bull = stripslashes($clause_bull);
$clause_bull_num_notice = stripslashes($clause_bull_num_notice);
$join = stripslashes($join);
/* les données disponibles dans ce script sont :
$user_query : la requête utilisateur
$mode : sur quoi porte la recherche
$count : le nombre de résultats trouvés
$clause : la chaine contenant la clause MySQL
$tri : la chaine contenant la clause MySQL de tri
*/
$form = '';
switch (static::$search_type) {
case 'simple_search':
// Gestion des alertes à partir de la recherche simple
include_once($include_path."/alert_see.inc.php");
$form .= $alert_see_mc_values;
case 'tags_search':
// constitution du form pour la suite
$f_values = "