Exemplo n.º 1
0
    Output::buffer();
} else {
    $_REQUEST["type"] = 'download';
}
if (defined("TRACE_FILEPATH") && TRACE_FILEPATH && defined("TRACE_MESSAGES") && TRACE_MESSAGES) {
    ini_set("error_log", TRACE_FILEPATH);
}
include_once BASE_PATH . "/lib/util.php";
require BASE_PATH . '/modules/auth.php';
$auth_module = new MyWebSQL_Authentication();
if (!$auth_module->authenticate()) {
    if (v($_REQUEST["q"]) == "wrkfrm") {
        echo view('session_expired');
    } else {
        include BASE_PATH . "/modules/splash.php";
        $form = view('auth', array('LOGINID' => htmlspecialchars($auth_module->getUserName()), 'SERVER_NAME' => htmlspecialchars($auth_module->getCustomServer()), 'SERVER_TYPE' => htmlspecialchars($auth_module->getCustomServerType())));
        echo getSplashScreen($auth_module->getError(), $form);
    }
    Output::flush();
    exit;
}
unset($auth_module);
$_db_info = getDBClass();
include_once $_db_info[0];
$_db_class = $_db_info[1];
$DB = new $_db_class();
unset($_db_info);
unset($_db_class);
if (v($_REQUEST["db"]) && Session::get('db', 'name') != v($_REQUEST["db"])) {
    Session::set('db', 'changed', true);
    Session::set('db', 'name', $_REQUEST["db"]);