if (!defined('DC_UPDATE_VERSION')) { define('DC_UPDATE_VERSION', 'stable'); } try { $core = new dcCore(DC_DBDRIVER, DC_DBHOST, DC_DBNAME, DC_DBUSER, DC_DBPASSWORD, DC_DBPREFIX, DC_DBPERSIST); } catch (Exception $e) { __error($e->getMessage(), $e->getCode() == 0 ? '<p>This either means that the username and password information in ' . 'your <strong>config.php</strong> file is incorrect or we can\'t contact ' . 'the database server at "<em>' . DC_DBHOST . '</em>". This could mean your ' . 'host\'s database server is down.</p> ' . '<ul><li>Are you sure you have the correct username and password?</li>' . '<li>Are you sure that you have typed the correct hostname?</li>' . '<li>Are you sure that the database server is running?</li></ul>' . '<p>If you\'re unsure what these terms mean you should probably contact ' . 'your host. If you still need help you can always visit the ' . '<a href="http://forum.dotclear.net/">Dotclear Support Forums</a>.</p>' : '', 20); } # If we have some __top_behaviors, we load them if (isset($__top_behaviors) && is_array($__top_behaviors)) { foreach ($__top_behaviors as $b) { $core->addBehavior($b[0], $b[1]); } unset($b); } http::trimRequest(); try { http::unsetGlobals(); } catch (Exception $e) { header('Content-Type: text/plain'); echo $e->getMessage(); exit; } l10n::init(); $core->url->registerDefault(array('dcUrlHandlers', 'home')); $core->url->register('lang', '', '^([a-zA-Z]{2}(?:-[a-z]{2})?(?:/page/[0-9]+)?)$', array('dcUrlHandlers', 'lang')); $core->url->register('post', 'post', '^post/(.+)$', array('dcUrlHandlers', 'post')); $core->url->register('preview', 'preview', '^preview/(.+)$', array('dcUrlHandlers', 'preview')); $core->url->register('category', 'category', '^category/(.+)$', array('dcUrlHandlers', 'category')); $core->url->register('archive', 'archive', '^archive(/.+)?$', array('dcUrlHandlers', 'archive')); $core->url->register('feed', 'feed', '^feed/(.+)$', array('dcUrlHandlers', 'feed'));