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"]);
if (v($_GET["x"]) == 1)
echo '
1
'; // success
else
header('Location: '.EXTERNAL_PATH);
exit;
}
// after this, we need the user set options to be visible everywhere
include_once(BASE_PATH . "/lib/options.php");
if (v($_REQUEST["q"]) == "wrkfrm") {
if (!$DB->connect(DB_HOST, DB_USER, DB_PASS, getDbName() ))
die(showDBError());
execute_request($DB);
$DB->disconnect();
include_once(BASE_PATH . "/lib/output.php");
Output::flush();
exit();
}
include(BASE_PATH . "/lib/html.php");
include(BASE_PATH. "/lib/interface.php");
?>
MyWebSQL
connect(DB_HOST,DB_USER,DB_PASS,getDbName())) {
include(BASE_PATH . "/modules/splash.php");
die(getSplashScreen(showDBError()));
}
if (Session::get('session', 'init') != '1') {
// session just started, so we load information here
Session::set('db', 'user', $DB->getCurrentUser(), true);
Session::set('session', 'init', 1);
}
$KEY_CODES = getKeyCodes();
?>
-
disconnect();
echo getContextMenusHTML();
updateSqlEditor();
echo getHotkeysHTML();
echo getGeneratedJS();
?>