num_segment = $num_segment; } parent::__construct($objects_ids); } protected function get_query() { return "SELECT * FROM facettes JOIN search_segments_facets ON search_segments_facets.num_facet = facettes.id_facette WHERE num_search_segment = ".$this->num_segment." ORDER BY search_segment_facet_order"; } public function set_num_segment($num_segment) { $this->num_segment = intval($num_segment); } public function get_num_segment() { if (isset($this->num_segment)) { return $this->num_segment; } return 0; } public function set_segment_search($segment_search) { $this->segment_search = $segment_search; } public function get_segment_search() { if (isset($this->segment_search)) { return $this->segment_search; } return ''; } protected function get_action_form() { return static::format_url("lvl=search_segment&action=segment_results&mode=".$this->mode."&facette_test=1&id=".$this->num_segment); } public function create_ajax_table_facettes(){ global $base_path; global $charset; global $mode; global $msg; global $universe_query; $this->create_search_environment(); $table = "
"; $table.= ""; return $table; } public static function make_facette_search_env() { global $search; global $check_facette; //creation des globales => parametres de recherche $n = count($search); if (is_array($check_facette)) { $fields = []; foreach($check_facette as $facet){ if(!isset($fields[$facet[2]][$facet[3]])){ $facet[1] = array($facet[1]); $fields[$facet[2]][$facet[3]] = $facet; }else{ $fields[$facet[2]][$facet[3]][1][] = $facet[1]; } } $i = 0; foreach($fields as $field => $subfields){ foreach($subfields as $subfield){ $search[] = "s_3"; $fieldname = "field_".($i+$n)."_s_3"; global ${$fieldname}; ${$fieldname} = array($subfield); $op = "op_".($i+$n)."_s_3"; $op_ = "EQ"; global ${$op}; ${$op}=$op_; $inter = "inter_".($i+$n)."_s_3"; $inter_ = "and"; global ${$inter}; ${$inter} = $inter_; $i++; } } } } protected static function get_link_not_clicked($name, $label, $code_champ, $code_ss_champ, $id, $nb_result) { return ''; } protected static function get_ajax_see_more_url() { $url = parent::get_ajax_see_more_url(); $url .= "&action=segment_results"; return $url; } public static function get_session_values() { return null; } public static function set_session_values($session_values) { return; } protected function get_filter_button_action() { return ""; } protected function on_facet_click($link = '') { return ""; } public function call_facets($additional_content = "") { global $universe_query; global $base_path; $ajax_facettes = $additional_content; $ajax_facettes .= static::get_facette_wrapper(); $ajax_facettes .="