1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-30 01:30:12 +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.
*
* @param $missing string "auth", "db", "ns"
*/
function page_footer($missing = "")
{
global $adminer, $token;
echo "</div>"; // #content
echo "<div id='footer'>\n";
switch_lang();
if ($missing != "auth") {
?>
</div>
<?php switch_lang(); ?>
<?php if ($missing != "auth") { ?>
<form action="" method="post">
<p class="logout">
<?php echo h($_GET["username"]); ?>
<input type="submit" name="logout" value="<?php echo lang('Logout'); ?>" id="logout">
<input type="hidden" name="token" value="<?php echo $token; ?>">
</p>
</form>
<?php } ?>
<div id="menu">
<?php $adminer->navigation($missing); ?>
</div>
<div class="logout">
<form action="" method="post">
<?php echo h($_GET["username"]); ?>
<input type="submit" name="logout" value="<?php echo lang('Logout'); ?>" id="logout">
<input type="hidden" name="token" value="<?php echo $token; ?>">
</form>
</div>
<?php
}
echo "</div>\n";
echo "<div id='menu'>\n";
$adminer->navigation($missing);
echo "</div>\n";
echo script("setupSubmitHighlight(document);");
}

View File

@@ -87,11 +87,11 @@ function lang($idf, $number = null) {
function switch_lang() {
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 " <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 "</div>\n</form>\n";
echo "</form></div>\n";
}
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 fieldset { margin-top: 0; }
.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; }
.tables-filter { padding: .8em 1em 0; }
.handle { cursor: grab; vertical-align: middle; }