maj syntaxe accolades, maj jQuery, correction layout contact
[mtweb] / web / app / data / modules / share / mw_data_out_config.php
1 <?php
2
3   class mw_data_out_config extends mw_data{
4
5     function out_config(){
6       $env = $this->env();
7       $config = array();
8       if($env->out_file_exists("config.xml")){
9         if($this->buffer = file_get_contents($env->out_file("config.xml"))){
10           if(!isset($this->sxml)) $this->sxml = new sxml();
11           $this->sxml->parse($this->buffer);
12           $this->buffer = $this->sxml->data["config"][0];
13           if($this->buffer["subs"]) foreach($this->buffer["subs"] as $key => $value){
14             $config[$key] = array(
15               "type" => $value[0]["attrs"]["type"],
16               "default" => $value[0]["attrs"]["default"],
17               "text" => $value[0]["data"]
18             );
19           }
20         }
21         else $config = false;
22       }
23       return $config;
24     }
25
26   }
27
28 ?>