$_REQUEST->setType('with', '#[a-z][a-z_0-9]+#i'); /** * Load and initiate the configuration class, loading database configuration */ $CONFIG = new Config(); $CONFIG->loadFile(CONFIG_DIR . "/config.php"); require_once CONFIG_DIR . '/pwdEncode.php'; /** * Fire up the database * @var Database $DB The database object */ $DB = new Database($CONFIG->DB->host, $CONFIG->DB->username, $CONFIG->DB->password, $CONFIG->DB->db, $CONFIG->DB->prefix, $CONFIG->DB->charset); /** * Load the configuration stored in the database */ $CONFIG->loadFromDatabase(); //FIXME: Clean, automate and move /* Language and encoding */ $CONFIG->Site->setDescription('charset', 'Default text-encoding'); $CONFIG->Site->setDescription('locale', 'Default locale'); if (empty($CONFIG->Site->charset)) { $CONFIG->Site->charset = 'UTF-8'; } header('Content-Type: text/html; charset=' . $CONFIG->Site->charset); iconv_set_encoding("internal_encoding", "UTF-8"); iconv_set_encoding("output_encoding", $CONFIG->Site->charset); setlocale(LC_ALL, @$_COOKIE['locale'] ? @$_COOKIE['locale'] : (@$USER->settings->locale ? @$USER->settings->locale : $CONFIG->Site->locale)); bindtextdomain('lweb', './languages'); textdomain('lweb'); //Config google analytics $CONFIG->Site->setDescription('googleAnalyticsSetAccount', 'Google Analytics User Account');