Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- error_reporting(E_ALL ^ E_NOTICE);
- @ini_set('display_errors', 'on');
- define('DS', DIRECTORY_SEPARATOR);
- define('SITE_ROOT', str_replace('core', '', dirname(__FILE__)));
- define('CORE_PATH', dirname(__FILE__) );
- define('CORE_LIB_PATH', CORE_PATH.DS.'lib');
- define('CLASS_PATH', CORE_PATH.DS.'classes');
- define('TEMPLATES_PATH', CORE_PATH.DS.'templates');
- define('MODULES_PATH', CORE_PATH.DS.'modules');
- define('CACHE_PATH', CORE_PATH.DS.'cache');
- define('COMMON_PATH', CORE_PATH.DS.'common');
- define('PAGES_PATH', CORE_PATH.DS.'pages');
- define('LIB_PATH', SITE_ROOT.DS.'lib');
- define('DOCTRINE_MODELS_PATH', CORE_PATH.DS.'models');
- $version = phpversion();
- if($version[0] != '5')
- {
- die('You are not running PHP 5+');
- }
- require CLASS_PATH.DS.'autoload.php';
- spl_autoload_register('codon_autoload');
- Config::Set('MODULES_PATH', CORE_PATH.DS.'modules');
- Config::Set('MODULES_AUTOLOAD', true);
- require CORE_PATH.DS.'app.config.php';
- @include CORE_PATH.DS.'local.config.php';
- /* Set the language */
- Lang::set_language(Config::Get('SITE_LANGUAGE'));
- error_reporting(Config::Get('ERROR_LEVEL'));
- Debug::$debug_enabled = Config::Get('DEBUG_MODE');
- /* Init caching engine */
- CodonCache::init($cache_settings);
- if(DBASE_NAME != '' && DBASE_SERVER != '' && DBASE_NAME != 'DBASE_NAME')
- {
- require CLASS_PATH.DS.'ezdb/ezdb.class.php';
- DB::$show_errors = Config::Get('DEBUG_MODE');
- DB::$throw_exceptions = false;
- DB::init(DBASE_TYPE);
- DB::set_log_errors(Config::Get('DEBUG_MODE'));
- DB::set_error_handler(array('Debug', 'db_error'));
- DB::set_caching(false);
- DB::$table_prefix = TABLE_PREFIX;
- DB::set_cache_dir(CACHE_PATH);
- DB::$DB->debug_all = false;
- 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 CORE_PATH.DS.'bootstrap.inc.php';
- if(function_exists('pre_module_load'))
- {
- pre_module_load();
- }
- MainController::loadEngineTasks();
- if(function_exists('post_module_load'))
- post_module_load();
- define('SKINS_PATH', LIB_PATH.DS.'skins'.DS.CURRENT_SKIN);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement