user_input = static::format_user_input($user_input); } public function proceed() { global $page; print $this->get_sel_header_template(); print $this->get_search_form(); print $this->get_js_script(); if(!$this->user_input) { $this->user_input = '*'; } show_results($this->user_input, $this->nbr_lignes, $page, 0); print $this->get_sel_footer_template(); } protected function get_form() { $form = ''; return $form; } protected function save() { } protected function get_search_form() { $sel_search_form = $this->get_sel_search_form_template(); return $sel_search_form; } protected function get_simple_search_form() { global $current_module; global $msg; global $mode; $form = ""; //onglets de recherche objets $searcher_tabs = $this->get_searcher_tabs_instance(); if(empty($mode)){ $mode = $searcher_tabs->get_mode_objects_type($this->get_objects_type()); } $searcher_tabs->set_current_mode($mode); $form .= "
"; $form .= $searcher_tabs->get_script_js_form($this->get_sel_search_form_name()); return $form; } protected function get_advanced_search_form() { global $search; global $pmb_extended_search_dnd_interface; global $mode; global $search_data; $advanced_search_form = ''; //onglets de recherche objets $searcher_tabs = $this->get_searcher_tabs_instance(); $searcher_tabs->set_current_mode($searcher_tabs->get_mode_multi_search_criteria()); $tab = $searcher_tabs->get_tab($searcher_tabs->get_mode_multi_search_criteria()); $sc = $this->get_search_instance(); $sc->set_filtered_objects_types($this->get_search_fields_filtered_objects_types()); if($tab['PREDEFINEDSEARCH'] && !(is_array($search) && count($search))) { $search_perso = $this->get_search_perso_instance($tab['PREDEFINEDSEARCH']); $sc->unserialize_search($search_perso->query); } // recherche segmentée if (!empty($search_data)) { $sc->json_decode_search(stripslashes($search_data)); } /** * TODO: Ajouter une url ou dériver le showform * */ $advanced_search_form .= $sc->show_form('',''); if ($pmb_extended_search_dnd_interface){ if(!isset($search_perso) || !is_object($search_perso)) { $search_perso = $this->get_search_perso_instance(); } $advanced_search_form .= ' '; } return $advanced_search_form; } protected function get_js_script() { global $jscript; global $jscript_common_selector; global $param1, $param2, $p1, $p2; global $infield; if(!isset($jscript)) $jscript = $jscript_common_selector; $jscript = str_replace('!!param1!!', ($param1 ? $param1 : $p1), $jscript); $jscript = str_replace('!!param2!!', ($param2 ? $param2 : $p2), $jscript); $jscript = str_replace('!!infield!!', $infield, $jscript); return $jscript; } protected function get_display_object($id=0, $object_id=0) { } protected function get_display_list() { } protected function results_search() { global $mode; $searcher_tabs = $this->get_searcher_tabs_instance(); $searcher_tabs->set_current_mode($mode); $searcher_tabs->proceed_search(); } protected function get_message_not_found() { } protected function get_link_pagination() { $link = static::get_base_url()."&user_input=".rawurlencode($this->user_input); return $link; } public function get_pagination() { global $nb_per_page; global $page; // constitution des liens $nbepages = ceil($this->nbr_lignes/$nb_per_page); if(!$page) { $page = 1; } $suivante = $page+1; $precedente = $page-1; // affichage du lien précédent si nécéssaire $pagination = "