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