From b95f24ea7ac709e4596c8fb70908f7711c861ef2 Mon Sep 17 00:00:00 2001
From: jakubvrana
\n";
- }
-
function table_name($row) {
return htmlspecialchars($row["Name"]);
}
@@ -31,6 +25,49 @@ class AdminerBase {
return htmlspecialchars($key);
}
+ function navigation($missing) {
+ global $SELF;
+ if ($missing != "auth") {
+ $databases = get_databases();
+ ?>
+
+
+" . lang('No tables.') . "
\n";
+ foreach ($table_status as $row) {
+ echo '' . lang('select') . ' ';
+ echo '' . $this->table_name($row) . "
\n";
+ }
+ echo "
' . lang('Create new table') . "
\n"; + } + } + } } $adminer = (class_exists("Adminer") ? new Adminer : new AdminerBase); diff --git a/adminer/include/bootstrap.inc.php b/adminer/include/bootstrap.inc.php index 02689fe1..684287d1 100644 --- a/adminer/include/bootstrap.inc.php +++ b/adminer/include/bootstrap.inc.php @@ -74,4 +74,6 @@ if (get_magic_quotes_gpc()) { unset($process); } set_magic_quotes_runtime(false); + $SELF = preg_replace('~^[^?]*/([^?]*).*~', '\\1?', $_SERVER["REQUEST_URI"]) . (strlen($_GET["server"]) ? 'server=' . urlencode($_GET["server"]) . '&' : '') . (strlen($_GET["db"]) ? 'db=' . urlencode($_GET["db"]) . '&' : ''); +$on_actions = array("RESTRICT", "CASCADE", "SET NULL", "NO ACTION"); diff --git a/adminer/include/design.inc.php b/adminer/include/design.inc.php index a7ed6157..6970d371 100644 --- a/adminer/include/design.inc.php +++ b/adminer/include/design.inc.php @@ -65,44 +65,7 @@ function page_footer($missing = false) {\n"; - foreach ($table_status as $row) { - $adminer->table_list($row); - } - echo "
\n"; - } - echo '\n"; - } - } - ?> +navigation($missing); ?>