get_sel_header_template(); print $this->get_js_script(); if(!$this->user_input) { $this->user_input = '*'; } print $this->get_display_list(); print $this->get_sel_footer_template(); } protected function get_marc_list_instance() { if($this->search_field_id) { if(!isset($this->search)) { $this->search = new search($this->search_xml_file); } $p=explode('_', $this->search_field_id); if($p[0] == 'f') { return new marc_list($this->search->fixedfields[$p[1]]["INPUT_OPTIONS"]["NAME"][0]["value"]); } } } protected function filter_from_search($marc_list_instance) { $p=explode('_', $this->search_field_id); if($p[0] == 'f') { $array_selector = $this->search->get_options_list_field($this->search->fixedfields[$p[1]]); $marc_list_instance->table = $array_selector; } return $marc_list_instance; } protected function get_display_list() { global $nb_per_page; global $page; global $letter; global $msg; $display_list = ''; if(!$page) { $debut = 0; } else { $debut = ($page-1)*$nb_per_page; } $marc_list_instance = $this->get_marc_list_instance(); if(isset($this->search)) { $marc_list_instance = $this->filter_from_search($marc_list_instance); } $amarc_list=$marc_list_instance->table; $special = false; $favorite = false; $alphabet = array(); //attention pour le tri aux valeurs accentuées + minuscules/majuscules $tmp=array(); $tmp=array_map("convert_diacrit",$amarc_list);//On enlève les accents $tmp=array_map("strtoupper",$tmp);//On met en majuscule asort($tmp);//Tri sur les valeurs en majuscule sans accent foreach ( $tmp as $key => $value ) { $tmp[$key]=$amarc_list[$key];//On reprend les bons couples clé / libellé } $amarc_list=$tmp; foreach($amarc_list as $key => $val) { if ($key>=900) { $special=true; } else { $alphabet[] = strtoupper(convert_diacrit(pmb_substr($val,0,1))); } if (isset($marc_list_instance->tablefav[$key])) $favorite=true; } $alphabet = array_unique($alphabet); if(!$letter) { if ($favorite) { $letter = "Fav"; } elseif ($special) { $letter="My"; } else { $letter = "a"; } } // affichage d'un sommaire par lettres $display_list .= "