- //echo "Number of catalog defined " . count($this->catalogs) . "<br />";
-
- /*
- $conf = new Config_File (CONFIG_DIR);
- $this->dbs = array();
-
- $i = 2;
- $sections = $conf->get(CONFIG_FILE,"DATABASE","host");
- array_push($this->dbs, "DATABASE");
-
- while ( !empty($sections) ) {
- $sections = $conf->get(CONFIG_FILE,"DATABASE".$i,"host");
- if ( !empty($sections) )
- array_push($this->dbs,"DATABASE".$i);
- $i++;
- }
-
- if ( $i < 4)
- $sec = "DATABASE";
- else {
- if ( !empty($_POST['sel_database']) ) {
- $_SESSION['DATABASE'] = $_POST['sel_database'];
- $sec = $_POST['sel_database'];
- } else {
- if (isset($_SESSION['DATABASE']) )
- $sec = $_SESSION['DATABASE'];
- else
- $sec = "DATABASE";
- }
- }
-
- $this->dsn['hostspec'] = $conf->get(CONFIG_FILE,$sec,"host");
- $this->dsn['username'] = $conf->get(CONFIG_FILE,$sec,"login");
- $this->dsn['password'] = $conf->get(CONFIG_FILE,$sec,"pass");
- $this->dsn['database'] = $conf->get(CONFIG_FILE,$sec,"db_name");
- $this->dsn['phptype'] = $conf->get(CONFIG_FILE,$sec,"db_type"); // mysql, pgsql
-
- if ( $conf->get(CONFIG_FILE,$sec,"db_port") )
- $this->dsn[port] = $conf->get(CONFIG_FILE,$sec,"db_port");
- */
-