1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-30 01:30:12 +02:00

Print username next to the logout button

This commit is contained in:
Peter Knut
2024-10-16 09:24:28 +02:00
parent df0e5b59bb
commit 42d92875c5

View File

@@ -189,11 +189,12 @@ function page_messages($error) {
} }
} }
/** Print HTML footer /**
* @param string "auth", "db", "ns" * Prints HTML footer.
* @return null * @param $missing string "auth", "db", "ns"
*/ */
function page_footer($missing = "") { function page_footer($missing = "")
{
global $adminer, $token; global $adminer, $token;
?> ?>
</div> </div>
@@ -201,15 +202,18 @@ function page_footer($missing = "") {
<?php switch_lang(); ?> <?php switch_lang(); ?>
<?php if ($missing != "auth") { ?> <?php if ($missing != "auth") { ?>
<form action="" method="post"> <form action="" method="post">
<p class="logout"> <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">
</p> <input type="hidden" name="token" value="<?php echo $token; ?>">
</p>
</form> </form>
<?php } ?> <?php } ?>
<div id="menu"> <div id="menu">
<?php $adminer->navigation($missing); ?> <?php $adminer->navigation($missing); ?>
</div> </div>
<?php <?php
echo script("setupSubmitHighlight(document);"); echo script("setupSubmitHighlight(document);");
} }