Move logout button

This commit is contained in:
Jakub Vrana 2013-07-08 23:34:17 -07:00
parent c2a3bec036
commit ffc1fa000f
4 changed files with 12 additions and 24 deletions

View file

@ -736,7 +736,7 @@ username.form['auth[driver]'].onchange();
* @return null
*/
function navigation($missing) {
global $VERSION, $token, $jush, $drivers;
global $VERSION, $jush, $drivers;
?>
<h1>
<?php echo $this->name(); ?> <span class="version"><?php echo $VERSION; ?></span>
@ -762,22 +762,12 @@ username.form['auth[driver]'].onchange();
}
}
} else {
?>
<form action="" method="post">
<p class="logout">
<?php
if (DB == "" || !$missing) {
echo "<a href='" . h(ME) . "sql='" . bold(isset($_GET["sql"])) . " title='" . lang('Import') . "'>" . lang('SQL command') . "</a>\n";
echo "<p><a href='" . h(ME) . "sql='" . bold(isset($_GET["sql"])) . " title='" . lang('Import') . "'>" . lang('SQL command') . "</a>\n";
if (support("dump")) {
echo "<a href='" . h(ME) . "dump=" . urlencode(isset($_GET["table"]) ? $_GET["table"] : $_GET["select"]) . "' id='dump'" . bold(isset($_GET["dump"])) . ">" . lang('Dump') . "</a>\n";
}
}
?>
<input type="submit" name="logout" value="<?php echo lang('Logout'); ?>" id="logout">
<input type="hidden" name="token" value="<?php echo $token; ?>">
</p>
</form>
<?php
$this->databasesPrint($missing);
if ($_GET["ns"] !== "" && !$missing && DB != "") {
echo '<p><a href="' . h(ME) . 'create="' . bold($_GET["create"] === "") . ">" . lang('Create new table') . "</a>\n";

View file

@ -106,11 +106,17 @@ function page_messages($error) {
* @return null
*/
function page_footer($missing = "") {
global $adminer;
global $adminer, $token;
?>
</div>
<?php switch_lang(); ?>
<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>
</form>
<div id="menu">
<?php $adminer->navigation($missing); ?>
</div>

View file

@ -50,13 +50,12 @@ input.default { box-shadow: 1px 1px 1px #777; }
.size { width: 6ex; }
.help { cursor: help; }
.pages { position: fixed; bottom: 0; left: 21em; padding: 5px; background: #ddf; border: 1px solid #999; }
.logout { margin-top: .5em; position: absolute; top: 0; right: 0; }
#menu { position: absolute; margin: 10px 0 0; padding: 0 0 30px 0; top: 2em; left: 0; width: 19em; }
#menu p { padding: .8em 1em; margin: 0; border-bottom: 1px solid #ccc; }
#dbs { overflow: hidden; }
#logins, #tables { white-space: nowrap; overflow: auto; text-overflow: ellipsis; }
#logins a, #tables a { background: #fff; }
#logout { background: none; border: none; color: blue; font: inherit; padding: 0; text-decoration: underline; cursor: pointer; }
#logout:hover { color: red; }
#content { margin: 2em 0 0 21em; padding: 10px 20px 20px 0; }
#lang { position: absolute; top: 0; left: 0; line-height: 1.8em; padding: .3em 1em; }
#breadcrumb { white-space: nowrap; position: absolute; top: 0; left: 21em; background: #eee; height: 2em; line-height: 1.8em; padding: 0 1em; margin: 0 0 0 -18px; }
@ -68,6 +67,7 @@ input.default { box-shadow: 1px 1px 1px #777; }
.rtl h2 { margin: 0 -18px 20px 0; }
.rtl p, .rtl table, .rtl .error, .rtl .message { margin: 1em 0 0 20px; }
.rtl .logout { left: 0; right: auto; }
.rtl #content { margin: 2em 21em 0 0; padding: 10px 0 20px 20px; }
.rtl #breadcrumb { left: auto; right: 21em; margin: 0 -18px 0 0; }
.rtl #lang, .rtl #menu { left: auto; right: 0; }

View file

@ -536,7 +536,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
}
function navigation($missing) {
global $VERSION, $token;
global $VERSION;
?>
<h1>
<?php echo $this->name(); ?> <span class="version"><?php echo $VERSION; ?></span>
@ -555,14 +555,6 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
}
}
} else {
?>
<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>
</form>
<?php
$this->databasesPrint($missing);
if ($missing != "db" && $missing != "ns") {
$table_status = table_status('', true);