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:
parent
159216969a
commit
c5af16a7b2
|
@ -11,12 +11,9 @@ if (isset($_POST["server"])) {
|
||||||
|
|
||||||
if (isset($_GET["logout"]) || !@mysql_connect($_GET["server"], $_SESSION["username"], $_SESSION["password"])) {
|
if (isset($_GET["logout"]) || !@mysql_connect($_GET["server"], $_SESSION["username"], $_SESSION["password"])) {
|
||||||
page_header(lang('Login'), "auth");
|
page_header(lang('Login'), "auth");
|
||||||
?>
|
|
||||||
<h1><?php echo lang('phpMinAdmin'); ?></h1>
|
|
||||||
<?php
|
|
||||||
if (isset($_GET["logout"])) {
|
if (isset($_GET["logout"])) {
|
||||||
echo "<p class='message'>" . lang('Logout successful.') . "</p>\n";
|
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";
|
echo "<p class='error'>" . lang('Invalid credentials.') . "</p>\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -12,24 +12,22 @@ function page_header($title, $missing = false) {
|
||||||
BODY { color: Black; background-color: White; }
|
BODY { color: Black; background-color: White; }
|
||||||
A { color: Blue; }
|
A { color: Blue; }
|
||||||
A:visited { color: Navy; }
|
A:visited { color: Navy; }
|
||||||
|
H1 { font-size: 150%; margin: 0; }
|
||||||
|
H1 A { color: Black; }
|
||||||
H2 { font-size: 150%; margin-top: 0; }
|
H2 { font-size: 150%; margin-top: 0; }
|
||||||
.error { color: Red; }
|
.error { color: Red; }
|
||||||
.message { color: Green; }
|
.message { color: Green; }
|
||||||
#menu { float: left; width: 15em; overflow: auto; white-space: nowrap; }
|
#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; }
|
#content { margin-left: 16em; }
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<?php
|
|
||||||
if ($missing != "auth") {
|
|
||||||
?>
|
|
||||||
<div id="menu">
|
<div id="menu">
|
||||||
<h1><a href="<?php echo htmlspecialchars(substr($SELF, 0, -1)); ?>"><?php echo lang('phpMinAdmin'); ?></a></h1>
|
<h1><a href="<?php echo htmlspecialchars(substr($SELF, 0, -1)); ?>"><?php echo lang('phpMinAdmin'); ?></a></h1>
|
||||||
<?php switch_lang(); ?>
|
<?php switch_lang(); ?>
|
||||||
|
<?php if ($missing != "auth") { ?>
|
||||||
<p>
|
<p>
|
||||||
<a href="<?php echo htmlspecialchars($SELF); ?>sql="><?php echo lang('SQL command'); ?></a>
|
<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>
|
<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
|
echo '<p><a href="' . htmlspecialchars($SELF) . 'create=">' . lang('Create new table') . "</a></p>\n"; //! rights
|
||||||
mysql_free_result($result);
|
mysql_free_result($result);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="content">
|
<div id="content">
|
||||||
<?php
|
<?php
|
||||||
echo "<h2>$title</h2>\n";
|
echo "<h2>$title</h2>\n";
|
||||||
}
|
|
||||||
if ($_SESSION["message"]) {
|
if ($_SESSION["message"]) {
|
||||||
echo "<p class='message'>$_SESSION[message]</p>\n";
|
echo "<p class='message'>$_SESSION[message]</p>\n";
|
||||||
$_SESSION["message"] = "";
|
$_SESSION["message"] = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function page_footer($missing = false) {
|
function page_footer() {
|
||||||
echo "\n" . ($missing ? "" : "</div>\n");
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
<?php
|
<?php
|
||||||
|
|
Loading…
Reference in a new issue