// Database initialisation if (OOO_USEDB) { include_once OOO_LIB . '/adodb/adodb.inc.php'; $DB =& ADONewConnection(DB_TYPE); $result = $DB->Connect(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME); if (!$result) { echo 'Initialise: Cannot connect to database. Check database configuration. Application stopped.'; // TODO: isolate message to language file exit; } $DB->debug = OOO_DEBUG ? true : false; // get system configuration from db include_once OOO_CORE . '/SystemConfig.php'; $systemconfig = new SystemConfig(); $config['theme'] = $systemconfig->getThemesByDB($DB); $config['lang'] = $systemconfig->getLangByDB($DB, $_SESSION["session_lang"]); include_once OOO_CORE . '/Config.php'; include_once OOO_CORE . '/gui/SmartyUtil.php'; $smartyutil = new SmartyUtil(); $configobject = new Config($DB); $arr_data = $configobject->selectAllConfig(); $arr_config = $smartyutil->toSmartyArray($arr_data, 'config_value', 'config_name'); } // configuration of phpgacl if (OOO_USEGACL) { $gacl_options = array('items_per_page' => 100, 'max_select_box_items' => 100, 'max_search_return_items' => 200, 'db_type' => DB_TYPE, 'db_host' => DB_SERVER, 'db_user' => DB_USERNAME, 'db_password' => DB_PASSWORD, 'db_name' => DB_NAME, 'db_table_prefix' => 'ooo_', 'caching' => FALSE, 'force_cache_expire' => TRUE, 'cache_dir' => '/tmp/phpgacl_cache', 'cache_expire_time' => 600); $gacl_options['debug'] = OOO_DEBUG ? true : false; } // Language data file include_once OOO_APP_THEMES . $config['theme']['dir'] . '/languages' . $config['lang']['dir'] . '/data.php'; // URI manager