get_sel_header_template(); switch($action){ default: print $this->get_search_form(); print $this->get_js_script(); if($search_type == "autoindex"){ print $jscript_term; print $this->display_autoindex_list(); } else { if($pmb_allow_authorities_first_page || $this->user_input!= ""){ if(!$this->user_input) { $this->user_input = '*'; } } switch ($search_type) { case "term": $src='term_browse.php'; break; default: $src='category_browse.php'; break; } print " \n"; } break; } print $this->get_sel_footer_template(); } protected function get_thesaurus_id() { global $caller, $dyn; global $id_thes_unique; global $perso_id, $id_thes; if(!isset($this->thesaurus_id)) { if($id_thes_unique>0) { $this->thesaurus_id=$id_thes_unique; } else{ //recuperation du thesaurus session en fonction du caller switch ($caller) { case 'notice' : if($id_thes) $this->thesaurus_id = $id_thes; else $this->thesaurus_id = thesaurus::getNoticeSessionThesaurusId(); if (!$perso_id) thesaurus::setNoticeSessionThesaurusId($this->thesaurus_id); break; case 'categ_form' : if($id_thes) $this->thesaurus_id = $id_thes; else $this->thesaurus_id = thesaurus::getSessionThesaurusId(); if( $dyn!=2) thesaurus::setSessionThesaurusId($this->thesaurus_id); break; default : if($id_thes) $this->thesaurus_id = $id_thes; else $this->thesaurus_id = thesaurus::getSessionThesaurusId(); thesaurus::setSessionThesaurusId($this->thesaurus_id); break; } } } return $this->thesaurus_id; } protected function get_thesaurus_selector() { global $msg, $charset; global $caller, $dyn; global $thesaurus_mode_pmb, $id_thes_unique; global $search_type; $id_thes = $this->get_thesaurus_id(); $liste_thesaurus = thesaurus::getThesaurusList(); $sel_thesaurus = ''; if ($thesaurus_mode_pmb != 0 && !$id_thes_unique) { //la liste des thesaurus n'est pas affichée en mode monothesaurus $sel_thesaurus = " "; } return $sel_thesaurus; } protected function get_autoindex_form(){ global $autoindex_class; if(!$autoindex_class) return; $autoindex=new $autoindex_class(); return $autoindex->get_form(); } protected function display_autoindex_list(){ global $autoindex_class; if(!$autoindex_class) return; $autoindex=new $autoindex_class(); return $autoindex->index_list(); } protected function get_search_form() { global $msg, $charset; global $search_type; $sel_search_form = parent::get_search_form(); $sel_search_form=str_replace("!!sel_thesaurus!!", $this->get_thesaurus_selector(),$sel_search_form); // indexation auto $sel_search_form=str_replace("!!sel_index_auto!!", $this->get_autoindex_form(),$sel_search_form); switch ($search_type) { case "term": $sel_search_form=str_replace("!!t_checked!!","checked",$sel_search_form); $sel_search_form=str_replace("!!h_checked!!","",$sel_search_form); $sel_search_form=str_replace("!!autoindex_checked!!","",$sel_search_form); $sel_search_form=str_replace("!!display_search_part!!","block",$sel_search_form); break; case "autoindex": $sel_search_form=str_replace("!!t_checked!!","",$sel_search_form); $sel_search_form=str_replace("!!h_checked!!","",$sel_search_form); $sel_search_form=str_replace("!!autoindex_checked!!","checked",$sel_search_form); $sel_search_form=str_replace("!!display_search_part!!","none",$sel_search_form); break; default: $sel_search_form=str_replace("!!h_checked!!","checked",$sel_search_form); $sel_search_form=str_replace("!!t_checked!!","",$sel_search_form); $sel_search_form=str_replace("!!autoindex_checked!!","",$sel_search_form); $sel_search_form=str_replace("!!display_search_part!!","block",$sel_search_form); break; } return $sel_search_form; } protected function get_searcher_instance() { return searcher_factory::get_searcher('categories', '', $this->user_input); } public function get_sel_search_form_template() { global $msg, $charset; $sel_search_form ="
"; return $sel_search_form; } public static function get_params_url() { global $perso_id, $keep_tilde, $parent, $id_thes_unique; global $id2, $id_thes, $user_input, $f_user_input; if(!$parent) $parent=0; if(!$user_input) $user_input = $f_user_input; $params_url = parent::get_params_url(); $params_url .= ($perso_id ? "&perso_id=".$perso_id : "").($keep_tilde ? "&keep_tilde=".$keep_tilde : "").($parent ? "&parent=".$parent : "").($id_thes_unique ? "&id_thes_unique=".$id_thes_unique : "")."&autoindex_class=autoindex_record"; $params_url .= ($id2 ? "&id2=".$id2 : "").($id_thes ? "&id_thes=".$id_thes : ""); return $params_url; } } ?>