fetch_data(); } public static function parse_catalog() { global $base_path; if(!isset(static::$xml_catalog)) { if (file_exists($base_path."/admin/planificateur/catalog_subst.xml")) { $filename = $base_path."/admin/planificateur/catalog_subst.xml"; } else { $filename = $base_path."/admin/planificateur/catalog.xml"; } $xml=file_get_contents($filename); static::$xml_catalog = _parser_text_no_function_($xml,"CATALOG", $filename); } } public static function get_catalog_element($id=0, $attribute='') { $id += 0; if($id) { static::parse_catalog(); foreach (static::$xml_catalog["ACTION"] as $anitem) { if($anitem['ID'] == $id) { return get_msg_to_display($anitem[$attribute]); } } } } protected function fetch_data() { static::parse_catalog(); foreach (static::$xml_catalog["ACTION"] as $anitem) { $this->tasks[$anitem['NAME']] = new scheduler_tasks_type($anitem['ID']); $this->tasks[$anitem['NAME']]->set_name($anitem['NAME']); $this->tasks[$anitem['NAME']]->set_path($anitem['PATH']); $this->tasks[$anitem['NAME']]->set_comment($anitem['COMMENT']); } } protected function get_js_display_list () { global $base_path; $display = " "; return $display; } public function get_display_list () { $display = $this->get_js_display_list(); $display .= " "; $display .= list_configuration_planificateur_manager_ui::get_instance()->get_display_list(); return $display; } public static function get_selector_options($type, $selected) { $options = ''; static::parse_catalog(); $num_type_tache = 0; foreach (static::$xml_catalog['ACTION'] as $catalog) { if($catalog['NAME'] == $type) { $num_type_tache = $catalog['ID']; } } $query = "select id_planificateur, libelle_tache from planificateur where num_type_tache = ".$num_type_tache; $result = pmb_mysql_query($query); while($row = pmb_mysql_fetch_object($result)) { $options .= ""; } return $options; } }