function Database() { $this->type = dbConfig::getProperty(CONFIGURATION_DATABASE, CONFIGURATION_DATABASE_TYPE); if ($this->db == null) { //$this->db = @mysqli_connect(Config::dbServer(), Config::dbUser(), Config::dbPassword()); //default mysql switch ($this->type) { case DB_SQLITE: $this->db = new SQLite3('c:/myprograms/wamp/bart/nubis.sqlite'); $this->db->createFunction('aes_encrypt', 'aes_encrypt'); $this->db->createFunction('aes_decrypt', 'aes_decrypt'); break; default: $this->db = @mysqli_connect(null, Config::dbUser(), Config::dbPassword()); //default mysql if ($this->db != null) { if (mysqli_select_db($this->db, Config::dbName())) { @mysqli_query($this->db, 'SET CHARACTER SET utf8;'); @mysqli_query($this->db, 'SET collation_connection = \'utf8_general_ci\';'); } else { $this->db = null; } } break; } } }
//return 'https://cesr.usc.edu/panel/index.php'; } static function sessionRedirectURL() { return dbConfig::getProperty(CONFIGURATION_SESSION, CONFIGURATION_SESSION_REDIRECT); //return 'https://cesr.usc.edu/panel/index.php';