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";
}
?>
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>
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