3 class mw_data_config extends mw_data{
5 function config($key = null){
11 $config = $this->data_read(
13 "table_name" => "config",
14 "index_name" => "key",
20 if(isset($config["value"])) $value = $config["value"];
26 $config_list = $this->data_list(
28 "table_name" => "config",
34 foreach($config_list["list"] as $config) $value[$config["key"]] = $config["value"];
39 function config_exists($key){
42 $config = $this->data_read(
44 "table_name" => "config",
45 "index_name" => "key",
51 return $config ? 1 : 0;
54 function set_config($key, $value){
57 $config = $this->data_read(
59 "table_name" => "config",
60 "index_name" => "key",
67 return $this->data_update(
69 "table_name" => "config",
70 "index_name" => "key",
71 "index_value" => $key,
79 return $this->data_insert(
81 "table_name" => "config",
91 function del_config($key){
92 return $this->data_delete(
94 "table_name" => "config",
95 "index_name" => "key",