3 if(!class_exists("mw_sgbd")) require_once $this->app_file("data/mw_sgbd.php");
4 if(!class_exists("mw_data")) require_once $this->app_file("data/mw_data.php");
5 if($this->app_file_exists("data/impl/mw_".$this->bdd("sgbd").".php")){
6 $sgbd_impl = "mw_".$this->bdd("sgbd");
7 if(!class_exists($sgbd_impl)) require_once $this->app_file("data/impl/".$sgbd_impl.".php");
8 if(class_exists($sgbd_impl)){
9 if(($plugins = $this->plugins("DESC")) !== false){
10 $data = new mw_data(true);
11 foreach($plugins as $plugin_name => $plugin){
12 if($plugin["installed"] && $plugin["enabled"]){
13 $data->load_modules($this->path("mw_dir")."plugins/".$plugin_name."/app/", "data/modules/share/");
14 $data->load_modules($this->path("mw_dir")."plugins/".$plugin_name."/app/", "data/modules/".($this->bdd("sgbd") == "xml" ? "xml" : "sql")."/");
17 $data->load_modules($this->path("mw_dir")."app/", "data/modules/share/");
18 $data->load_modules($this->path("mw_dir")."app/", "data/modules/".($this->bdd("sgbd") == "xml" ? "xml" : "sql")."/");
24 $this->bdd("password")
28 if($sgbd->extention_ok()){
29 $data->set_sgbd($sgbd);
30 $data->set_env($this);
31 $this->set_data($data);
33 else $this->erreur("L'extention php ".$this->bdd("sgbd")." n'est pas installée", true);
35 else $this->erreur("Impossible de lire les plugins pour charger les modules de donnees");
37 else $this->erreur("Impossible de trouver la classe d'implementation du sgbd ".$this->bdd("sgbd"), true);
39 else $this->erreur("Impossible de trouver le fichier d'implementation du sgbd ".$this->bdd("sgbd"), true);