\n"; foreach (array( 'database' => lang('Create new database'), 'privileges' => lang('Privileges'), 'processlist' => lang('Process list'), 'variables' => lang('Variables'), 'status' => lang('Status'), ) as $key => $val) { if (support($key)) { echo "$val\n"; } } echo "
" . lang('%s version: %s through PHP extension %s', $drivers[DRIVER], "" . h($connection->server_info) . "", "$connection->extension") . "\n"; echo "
" . lang('Logged as: %s', "" . h(logged_user()) . "") . "\n"; $databases = $adminer->databases(); if ($databases) { $scheme = support("scheme"); $collations = collations(); echo "
\n"; } echo "" . lang('Refresh') . "\n"; } page_footer("db"); if ($databases) { echo "\n"; } } if (isset($_GET["status"])) { $_GET["variables"] = $_GET["status"]; } if (isset($_GET["import"])) { $_GET["sql"] = $_GET["import"]; } if (!(DB != "" ? $connection->select_db(DB) : isset($_GET["sql"]) || isset($_GET["dump"]) || isset($_GET["database"]) || isset($_GET["processlist"]) || isset($_GET["privileges"]) || isset($_GET["user"]) || isset($_GET["variables"]) || $_GET["script"] == "connect" || $_GET["script"] == "kill")) { if (DB != "" || $_GET["refresh"]) { restart_session(); set_session("dbs", null); } connect_error(); // separate function to catch SQLite error exit; } if (support("scheme") && DB != "" && $_GET["ns"] !== "") { if (!isset($_GET["ns"])) { redirect(preg_replace('~ns=[^&]*&~', '', ME) . "ns=" . get_schema()); } if (!set_schema($_GET["ns"])) { header("HTTP/1.1 404 Not Found"); page_header(lang('Schema') . ": " . h($_GET["ns"]), lang('Invalid schema.'), true); page_footer("ns"); exit; } }