Esempio n. 1
0
    if (Config::Get('DEBUG_MODE') == true) {
        DB::show_errors();
    } else {
        DB::hide_errors();
    }
    if (!DB::connect(DBASE_USER, DBASE_PASS, DBASE_NAME, DBASE_SERVER)) {
        Debug::showCritical(Lang::gs('database.connection.failed') . ' (' . DB::$errno . ': ' . DB::$error . ')');
        die;
    }
    # Set the charset type to send to mysql
    if (Config::Get('DB_CHARSET_NAME') !== '') {
        DB::query('SET NAMES \'' . Config::Get('DB_CHARSET_NAME') . '\'');
    }
    # Include ORM
    #include_once(VENDORS_PATH.DS.'orm'.DS.'idiorm.php');
    #include_once(VENDORS_PATH.DS.'orm'.DS.'paris.php');
    #ORM::configure('mysql:host='.DBASE_SERVER.';dbname='.DBASE_NAME);
    #ORM::configure('username', DBASE_USER);
    #ORM::configure('password', DBASE_PASS);
}
include CORE_PATH . DS . 'bootstrap.inc.php';
if (function_exists('pre_module_load')) {
    pre_module_load();
}
MainController::loadEngineTasks();
define('ACTIVE_SKIN_PATH', LIB_PATH . DS . 'skins' . DS . CURRENT_SKIN);
Template::setTemplatePath(TEMPLATES_PATH);
Template::setSkinPath(ACTIVE_SKIN_PATH);
if (function_exists('post_module_load')) {
    post_module_load();
}