// Load our config settings
$Config = Config::getConfig();
/* load db config settings into constants */
$db = Database::getDatabase();
$rows = $db->getRows("SELECT config_key, config_value FROM site_config ORDER BY config_group, config_key");
if (COUNT($rows)) {
    foreach ($rows as $row) {
        $constantName = "SITE_CONFIG_" . strtoupper($row['config_key']);
        define($constantName, $row['config_value']);
    }
}
/* setup translations */
translate::setUpTranslationConstants();
// Store session info in the database?
if ($Config->useDBSessions === true) {
    DBSession::register();
}
// Initialize our session
session_name($Config->sessionName);
session_start();
// Initialize current user
$Auth = Auth::getAuth();
// Object for tracking and displaying error messages
$Error = Error::getError();
define("SITE_IMAGE_PATH", WEB_ROOT . "/themes/" . SITE_CONFIG_SITE_THEME . "/images");
define("SITE_CSS_PATH", WEB_ROOT . "/themes/" . SITE_CONFIG_SITE_THEME . "/styles");
define("SITE_JS_PATH", WEB_ROOT . "/themes/" . SITE_CONFIG_SITE_THEME . "/js");
/* check for banned ip */
$bannedIP = bannedIP::getBannedType();
if (strtolower($bannedIP) == "whole site") {
    header('HTTP/1.1 404 Not Found');