1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-31 18:11:52 +02:00

Add <div> for page footer, layout changes

This commit is contained in:
Peter Knut
2024-10-22 12:52:48 +02:00
parent 555e2e76b7
commit 1ff6f246e8
3 changed files with 25 additions and 18 deletions

View File

@@ -187,29 +187,36 @@ function page_messages($error) {
/** /**
* Prints HTML footer. * Prints HTML footer.
*
* @param $missing string "auth", "db", "ns" * @param $missing string "auth", "db", "ns"
*/ */
function page_footer($missing = "") function page_footer($missing = "")
{ {
global $adminer, $token; global $adminer, $token;
echo "</div>"; // #content
echo "<div id='footer'>\n";
switch_lang();
if ($missing != "auth") {
?> ?>
</div>
<?php switch_lang(); ?> <div class="logout">
<?php if ($missing != "auth") { ?> <form action="" method="post">
<form action="" method="post"> <?php echo h($_GET["username"]); ?>
<p class="logout"> <input type="submit" name="logout" value="<?php echo lang('Logout'); ?>" id="logout">
<?php echo h($_GET["username"]); ?> <input type="hidden" name="token" value="<?php echo $token; ?>">
<input type="submit" name="logout" value="<?php echo lang('Logout'); ?>" id="logout"> </form>
<input type="hidden" name="token" value="<?php echo $token; ?>"> </div>
</p>
</form>
<?php } ?>
<div id="menu">
<?php $adminer->navigation($missing); ?>
</div>
<?php <?php
}
echo "</div>\n";
echo "<div id='menu'>\n";
$adminer->navigation($missing);
echo "</div>\n";
echo script("setupSubmitHighlight(document);"); echo script("setupSubmitHighlight(document);");
} }

View File

@@ -87,11 +87,11 @@ function lang($idf, $number = null) {
function switch_lang() { function switch_lang() {
global $LANG, $langs; global $LANG, $langs;
echo "<form action='' method='post'>\n<div id='lang'>"; echo "<div id='lang'><form action='' method='post'>\n";
echo lang('Language') . ": " . html_select("lang", $langs, $LANG, "this.form.submit();"); echo lang('Language') . ": " . html_select("lang", $langs, $LANG, "this.form.submit();");
echo " <input type='submit' value='" . lang('Use') . "' class='hidden'>\n"; echo " <input type='submit' value='" . lang('Use') . "' class='hidden'>\n";
echo "<input type='hidden' name='token' value='" . get_token() . "'>\n"; // $token may be empty in auth.inc.php echo "<input type='hidden' name='token' value='" . get_token() . "'>\n"; // $token may be empty in auth.inc.php
echo "</div>\n</form>\n"; echo "</form></div>\n";
} }
if (isset($_POST["lang"]) && verify_token()) { // $error not yet available if (isset($_POST["lang"]) && verify_token()) { // $error not yet available

View File

@@ -69,7 +69,7 @@ p.nowrap { white-space: pre; }
.footer > div { background: #fff; padding: 0 0 .5em; } .footer > div { background: #fff; padding: 0 0 .5em; }
.footer fieldset { margin-top: 0; } .footer fieldset { margin-top: 0; }
.links a { white-space: nowrap; margin-right: 20px; } .links a { white-space: nowrap; margin-right: 20px; }
.logout { margin-top: .5em; position: absolute; top: 0; right: 0; } .logout { margin: .5em 20px 0 0; position: absolute; top: 0; right: 0; }
.loadmore { margin-left: 1ex; } .loadmore { margin-left: 1ex; }
.tables-filter { padding: .8em 1em 0; } .tables-filter { padding: .8em 1em 0; }
.handle { cursor: grab; vertical-align: middle; } .handle { cursor: grab; vertical-align: middle; }