Change language in login

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@42 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana 2007-07-05 11:51:06 +00:00
parent 159216969a
commit c5af16a7b2
2 changed files with 10 additions and 14 deletions

View file

@ -11,12 +11,9 @@ if (isset($_POST["server"])) {
if (isset($_GET["logout"]) || !@mysql_connect($_GET["server"], $_SESSION["username"], $_SESSION["password"])) {
page_header(lang('Login'), "auth");
?>
<h1><?php echo lang('phpMinAdmin'); ?></h1>
<?php
if (isset($_GET["logout"])) {
echo "<p class='message'>" . lang('Logout successful.') . "</p>\n";
} elseif (isset($_GET["server"])) {
} elseif (isset($_SESSION["username"])) {
echo "<p class='error'>" . lang('Invalid credentials.') . "</p>\n";
}
?>

View file

@ -12,24 +12,22 @@ function page_header($title, $missing = false) {
BODY { color: Black; background-color: White; }
A { color: Blue; }
A:visited { color: Navy; }
H1 { font-size: 150%; margin: 0; }
H1 A { color: Black; }
H2 { font-size: 150%; margin-top: 0; }
.error { color: Red; }
.message { color: Green; }
#menu { float: left; width: 15em; overflow: auto; white-space: nowrap; }
#menu H1 { font-size: 150%; margin: 0; }
#menu H1 A { color: Black; }
#content { margin-left: 16em; }
</style>
</head>
<body>
<?php
if ($missing != "auth") {
?>
<div id="menu">
<h1><a href="<?php echo htmlspecialchars(substr($SELF, 0, -1)); ?>"><?php echo lang('phpMinAdmin'); ?></a></h1>
<?php switch_lang(); ?>
<?php if ($missing != "auth") { ?>
<p>
<a href="<?php echo htmlspecialchars($SELF); ?>sql="><?php echo lang('SQL command'); ?></a>
<a href="<?php echo htmlspecialchars($SELF); ?>dump="><?php echo lang('Dump'); ?></a>
@ -64,22 +62,23 @@ H2 { font-size: 150%; margin-top: 0; }
echo '<p><a href="' . htmlspecialchars($SELF) . 'create=">' . lang('Create new table') . "</a></p>\n"; //! rights
mysql_free_result($result);
}
?>
}
?>
</div>
<div id="content">
<?php
echo "<h2>$title</h2>\n";
}
echo "<h2>$title</h2>\n";
if ($_SESSION["message"]) {
echo "<p class='message'>$_SESSION[message]</p>\n";
$_SESSION["message"] = "";
}
}
function page_footer($missing = false) {
echo "\n" . ($missing ? "" : "</div>\n");
function page_footer() {
?>
</div>
</body>
</html>
<?php