type) { case 'authors': global $author_type; switch($author_type) { case '71': $title .= $msg["collectivites_found"]; break; case '72': $title .= $msg["congres_found"]; break; case '70': default: $title .= $msg["authors_found"]; break; } break; case 'subcollections': $title .= $msg['subcolls_found']; break; case 'categories': $title .= $msg['categs_found']; break; case 'authperso': global $name; $title .= $name; break; case 'extended' : $es = new search_authorities("search_fields_authorities"); $title = $es->make_human_query(); break; default: $title .= parent::get_title(); break; } return $title; } protected function get_categories_query() { global $opac_stemming_active; global $id_thes; global $lang; $first_clause = "catdef.libelle_categorie not like '~%' "; $aq=new analyse_query($this->user_query,0,0,1,0,$opac_stemming_active); $members_catdef = $aq->get_query_members('catdef','catdef.libelle_categorie','catdef.index_categorie','catdef.num_noeud'); $list_thes = array(); if ($id_thes == -1) { //recherche dans tous les thesaurus $list_thes = thesaurus::getThesaurusList(); } else { //recherche dans le thesaurus transmis $thes = new thesaurus($id_thes); $list_thes[$id_thes]=$thes->libelle_thesaurus; } $q = "drop table if exists catjoin "; $r = pmb_mysql_query($q); $query = "create temporary table catjoin ENGINE=MyISAM as select "; foreach ($list_thes as $id_thesaurus=>$libelle_thesaurus) { $thes = new thesaurus($id_thesaurus); $query .= " noeuds.id_noeud as num_noeud, noeuds.num_thesaurus, ".$members_catdef['select']." as pert from noeuds "; $query .= "join categories as catdef on noeuds.id_noeud = catdef.num_noeud and catdef.langue = '".$thes->langue_defaut."' "; $query .= "where noeuds.num_thesaurus = '".$thes->id_thesaurus."' "; $query .= "and ".$first_clause." "; $query .= "and ".$members_catdef['where']." "; pmb_mysql_query($query); $query = "INSERT INTO catjoin SELECT "; } return "select id_authority as id, catjoin.pert from catjoin JOIN authorities ON catjoin.num_noeud = authorities.num_object AND type_object = ".AUT_TABLE_CATEG; } protected function get_query() { global $pert, $clause, $tri, $limiter; if(!isset($this->query)){ $query = "select id_authority as id, ".stripslashes($pert)." from authorities "; switch($this->type) { case 'authors': $query .= "JOIN authors ON author_id = authorities.num_object AND type_object = ".AUT_TABLE_AUTHORS; global $type; if($type) { $query .= " AND author_type='$type'"; } break; case 'categories': $query = ""; //Spécifique aux catégories $query .= $this->get_categories_query(); break; case 'publishers': $query .= "JOIN publishers ON ed_id = authorities.num_object AND type_object = ".AUT_TABLE_PUBLISHERS; break; case 'collections': $query .= "JOIN collections ON coll_id = authorities.num_object AND type_object = ".AUT_TABLE_COLLECTIONS; break; case 'subcollections': $query .= "JOIN sub_collections ON sub_coll_id = authorities.num_object AND type_object = ".AUT_TABLE_SUB_COLLECTIONS; break; case 'indexint': $query .= "JOIN indexint ON indexint_id = authorities.num_object AND type_object = ".AUT_TABLE_INDEXINT; break; case 'titres_uniformes': $query .= "JOIN titres_uniformes ON tu_id = authorities.num_object AND type_object = ".AUT_TABLE_TITRES_UNIFORMES; break; case 'authperso': $query .= "JOIN authperso_authorities ON id_authperso_authority = authorities.num_object AND type_object = ".AUT_TABLE_AUTHPERSO; break; case 'extended' : $searcher = new searcher_authorities_extended(); $searcher->get_result(); $query = "select id_authority as id from ".$searcher->table; break; } $query .= " ".stripslashes($clause)." group by id_authority ".$tri." ".$limiter; $this->query = $query; } return $this->query; } protected function get_permalink($id) { $permalink = 'index.php?lvl='; switch($this->type) { case 'authors': $permalink .= "author_see"; break; case 'categories': $permalink .= "categ_see"; break; case 'publishers': $permalink .= "publisher_see"; break; case 'collections': $permalink .= "coll_see"; break; case 'subcollections': $permalink .= "subcoll_see"; break; case 'indexint': $permalink .= "indexint_see"; break; case 'titres_uniformes': $permalink .= "titre_uniforme_see"; break; case 'concepts': $permalink .= "concept_see"; break; case 'authperso': $permalink .= "authperso_see"; break; } $permalink .= "&id=".$id."&from=search"; return $permalink; } protected function get_display_element($element) { $display = ''; switch($this->type) { case 'indexint': $display .= " ".$element->indexint_name." ".$element->indexint_comment.""; break; default: $display .= "