id_vue=$id_vue; global $base_path; if (file_exists($base_path."/admin/opac/opac_view/filters/catalog_subst.xml")) $catalog=$base_path."/admin/opac/opac_view/filters/catalog_subst.xml"; else $catalog=$base_path."/admin/opac/opac_view/filters/catalog.xml"; $this->parse_catalog($catalog); } public function get_messages($lang_path) { global $lang; global $base_path; if (file_exists($base_path.$lang_path."/messages/".$lang.".xml")) { $file_name=$base_path.$lang_path."/messages/".$lang.".xml"; } else if (file_exists($base_path.$lang_path."/messages/fr_FR.xml")) { $file_name=$base_path.$lang_path."/messages/fr_FR.xml"; } if ($file_name) { $xmllist=new XMLlist($file_name); $xmllist->analyser(); return $xmllist->table; } } public function parse_catalog($catalog) { global $base_path,$lang; //Construction du tableau des connecteurs disponbibles $xml=file_get_contents($catalog); $param=_parser_text_no_function_($xml,"CATALOG",$catalog); for ($i=0; $icatalog[$item["ID"]]=$t; $this->msg[$item["ID"]]=$this->get_messages("/admin/opac/opac_view/filters/".$item["PATH"]); } } public function show_form($id) { global $base_path,$charset,$lang,$msg; //Inclusion de la classe require_once($base_path."/admin/opac/opac_view/filters/".$this->catalog[$id]["PATH"]."/".$this->catalog[$id]["NAME"].".class.php"); eval("\$filter=new ".$this->catalog[$id]["NAME"]."(\$this->id_vue,\$this->msg[\$id]);"); $form=$filter->get_form(); $form=str_replace("!!id!!",$id,$form); $form=gen_plus("filter_".$id,$this->msg[$id]["title"],$form,0); return $form; } public function show_all_form() { $all_form=""; foreach($this->catalog as $id => $val){ $all_form.=$this->show_form($id); } return $all_form; } public function save_all_form() { $all_form=""; foreach($this->catalog as $id => $val){ $all_form.=$this->save_form($id); } return $all_form; } public function save_form($id) { global $base_path,$charset,$lang,$msg; $all_form=""; //Inclusion de la classe require_once($base_path."/admin/opac/opac_view/filters/".$this->catalog[$id]["PATH"]."/".$this->catalog[$id]["NAME"].".class.php"); eval("\$filter=new ".$this->catalog[$id]["NAME"]."(\$this->id_vue,\$this->msg[\$id]);"); $form=$filter->save_form(); } }