]> git.joonet.de Git - adminer.git/commitdiff
Move menu to footer
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Fri, 6 Jul 2007 08:47:20 +0000 (08:47 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Fri, 6 Jul 2007 08:47:20 +0000 (08:47 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@53 7c3ca157-0c34-0410-bff1-cbf682f78f5c

auth.inc.php
connect.inc.php
design.inc.php

index 770f2c72df19f10aef6dde0cc584691098cc6adc..6501ad8b19a5a04696b00d03f9bfe553c51d1d1e 100644 (file)
@@ -10,7 +10,7 @@ if (isset($_POST["server"])) {
 }
 
 if (isset($_GET["logout"]) || !@mysql_connect($_GET["server"], $_SESSION["usernames"][$_GET["server"]], $_SESSION["passwords"][$_GET["server"]])) {
-       page_header(lang('Login'), "auth");
+       page_header(lang('Login'));
        if (isset($_GET["logout"])) {
                echo "<p class='message'>" . lang('Logout successful.') . "</p>\n";
        } elseif (isset($_SESSION["usernames"][$_GET["server"]])) {
index 759eb24fca70d96a32bc50108e871378ca14aec5..33deffb296c81eeb4b37fb8243ce1c4ddd2085ff 100644 (file)
@@ -1,12 +1,12 @@
 <?php
 if (!(strlen($_GET["db"]) ? mysql_select_db($_GET["db"]) : isset($_GET["sql"]) || isset($_GET["dump"]) || isset($_GET["database"]))) {
-       page_header(lang('Select database'), "db");
+       page_header(lang('Select database'));
        if (strlen($_GET["db"])) {
                echo "<p class='error'>" . lang('Invalid database.') . "</p>\n";
        } else {
                echo '<a href="' . htmlspecialchars($SELF) . 'database=">' . lang('Create new database') . '</a>';
        }
-       page_footer();
+       page_footer("db");
        exit;
 }
 mysql_query("SET CHARACTER SET utf8");
index 93b0fe21086fe285bc7198f36ffea1b287ecaa85..57b6035a55d790dc7522139f5aa9bee4c2cc3f86 100644 (file)
@@ -1,12 +1,11 @@
 <?php
-function page_header($title, $missing = false) {
-       global $SELF;
+function page_header($title) {
        header("Content-Type: text/html; charset=utf-8");
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" lang="cs">
 <head>
-<title><?php echo lang('phpMinAdmin') . ($title ? " - $title" : ""); ?></title>
+<title><?php echo lang('phpMinAdmin') . " - $title"; ?></title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <style type="text/css">
 BODY { color: Black; background-color: White; }
@@ -14,15 +13,32 @@ A { color: Blue; }
 A:visited { color: Navy; }
 H1 { font-size: 150%; margin: 0; }
 H2 { font-size: 150%; margin-top: 0; }
+FIELDSET { float: left; padding: .5em; margin: 0; }
 .error { color: Red; }
 .message { color: Green; }
-#menu { float: left; width: 15em; overflow: auto; white-space: nowrap; }
+#menu { position: absolute; top: 8px; left: 8px; width: 15em; overflow: auto; white-space: nowrap; }
 #content { margin-left: 16em; }
 </style>
 </head>
 
 <body>
 
+<div id="content">
+<?php
+       echo "<h2>$title</h2>\n";
+       if ($_SESSION["message"]) {
+               echo "<p class='message'>$_SESSION[message]</p>\n";
+               $_SESSION["message"] = "";
+       }
+}
+
+function page_footer($missing = false) {
+       global $SELF;
+       ob_flush();
+       flush();
+?>
+</div>
+
 <div id="menu">
 <h1><a href="<?php echo (strlen($SELF) > 1 ? htmlspecialchars(substr($SELF, 0, -1)) : "."); ?>"><?php echo lang('phpMinAdmin'); ?></a></h1>
 <?php switch_lang(); ?>
@@ -36,6 +52,7 @@ H2 { font-size: 150%; margin-top: 0; }
 <p><?php if (strlen($_GET["server"])) { ?><input type="hidden" name="server" value="<?php echo htmlspecialchars($_GET["server"]); ?>" /><?php } ?>
 <select name="db" onchange="this.form.submit();"><option value="">(<?php echo lang('database'); ?>)</option>
 <?php
+               flush();
                $result = mysql_query("SHOW DATABASES");
                while ($row = mysql_fetch_row($result)) {
                        echo "<option" . ($row[0] == $_GET["db"] ? " selected='selected'" : "") . ">" . htmlspecialchars($row[0]) . "</option>\n";
@@ -65,19 +82,6 @@ H2 { font-size: 150%; margin-top: 0; }
        ?>
 </div>
 
-<div id="content">
-<?php
-       echo "<h2>$title</h2>\n";
-       if ($_SESSION["message"]) {
-               echo "<p class='message'>$_SESSION[message]</p>\n";
-               $_SESSION["message"] = "";
-       }
-}
-
-function page_footer() {
-?>
-
-</div>
 </body>
 </html>
 <?php