diff --git a/adminer/db.inc.php b/adminer/db.inc.php index 60fb6dee..67735e4c 100644 --- a/adminer/db.inc.php +++ b/adminer/db.inc.php @@ -47,7 +47,28 @@ if ($tables_views && !$error && !$_POST["search"]) { page_header(($_GET["ns"] == "" ? lang('Database') . ": " . h(DB) : lang('Schema') . ": " . h($_GET["ns"])), $error, true); if ($adminer->homepage()) { - if ($_GET["ns"] !== "") { + if ($_GET["ns"] === "") { + echo "

" . lang('Schemas') . "

\n"; + $schemas = schemas(); + if (!$schemas) { + echo "

" . lang('No schemas.') . "\n"; + } else { + // TODO: Checkboxes for batch dropping of schemas. + echo "

\n", + "\n", + '', + '", + ''; + + foreach ($schemas as $name) { + echo "", + "", + ""; + } + + echo '
', lang('Schema'), "
" . h($name) . "
'; + } + } else { echo "

" . lang('Tables and views') . "

\n"; $tables_list = tables_list(); if (!$tables_list) { @@ -186,12 +207,16 @@ if ($adminer->homepage()) { echo "

" . lang('Sequences') . "

\n"; $sequences = get_vals("SELECT sequence_name FROM information_schema.sequences WHERE sequence_schema = current_schema() ORDER BY sequence_name"); if ($sequences) { - echo "\n"; - echo "\n"; + echo "
" . lang('Name') . "
\n", + "\n"; + odd(''); foreach ($sequences as $val) { - echo "", + "\n"; } + echo "
", lang('Name'), "
" . h($val) . "\n"; + echo "", + "", h($val), "", lang('Alter'), "
\n"; } echo "

" . lang('User types') . "

\n"; $user_types = types(); if ($user_types) { - echo "\n"; - echo "\n"; + echo "
" . lang('Name') . "
\n", + "\n"; + odd(''); foreach ($user_types as $val) { - echo "", + "\n"; } + echo "
", lang('Name'), "
" . h($val) . "\n"; + echo "", + "", h($val), "", lang('Alter'), "
\n"; } echo "