move server selection above server details (more logical)

This commit is contained in:
Sebastian Mendel
2006-07-06 08:21:32 +00:00
parent c15a853354
commit baf9be29bd
2 changed files with 74 additions and 72 deletions

View File

@@ -8,6 +8,7 @@ $Source$
2006-07-06 Sebastian Mendel <cybot_tm@users.sourceforge.net>
* libraries/select_server.lib.php: make serverlist a real html-list
* main.php: move server selection above server details (more logical)
2006-07-04 Marc Delisle <lem9@users.sourceforge.net>
* db_operations.php, tbl_properties_operations.php,

View File

@@ -12,7 +12,7 @@ if (!defined('PMA_DISPLAY_HEADING')) {
/**
* Gets some core libraries and displays a top message if required
*/
require_once('./libraries/common.lib.php');
require_once './libraries/common.lib.php';
// Handles some variables that may have been sent by the calling script
if (isset($db)) {
@@ -22,7 +22,7 @@ if (isset($table)) {
unset($table);
}
$show_query = '1';
require_once('./libraries/header.inc.php');
require_once './libraries/header.inc.php';
// Any message to display?
if (! empty($message)) {
@@ -40,20 +40,29 @@ echo '<div id="maincontainer">' . "\n";
*/
if ($server > 0) {
require_once('./libraries/check_user_privileges.lib.php');
require_once './libraries/check_user_privileges.lib.php';
// why this? a non-priv user should be able to change his
// password if the configuration permits
//$cfg['ShowChgPassword'] = $is_superuser = PMA_isSuperuser();
$is_superuser = PMA_isSuperuser();
if ($cfg['Server']['auth_type'] == 'config') {
$cfg['ShowChgPassword'] = FALSE;
$cfg['ShowChgPassword'] = false;
}
}
?>
<div id="mysqlmaininformation">
<?php
/**
* Displays the MySQL servers choice form
*/
if (!$cfg['LeftDisplayServers'] && (count($cfg['Servers']) > 1 || $server == 0 && count($cfg['Servers']) == 1)) {
require_once './libraries/select_server.lib.php';
PMA_select_server(true, false);
}
if ($server > 0) {
// robbat2: Use the verbose name of the server instead of the hostname
// if a value is set
@@ -81,14 +90,6 @@ if ( $server > 0 ) {
echo '<h1 xml:lang="en" dir="ltr">MySQL</h1>' . "\n";
}
/**
* Displays the MySQL servers choice form
*/
if (!$cfg['LeftDisplayServers'] && (count($cfg['Servers']) > 1 || $server == 0 && count($cfg['Servers']) == 1)) {
include('./libraries/select_server.lib.php');
PMA_select_server(TRUE, FALSE);
}
if ($server > 0) {
echo '<ul>' . "\n";
@@ -137,7 +138,7 @@ if ( $server > 0 ) {
. ' <label for="select_collation_connection">' . "\n"
. ' ' . $strMySQLConnectionCollation . ': ' . "\n"
. ' </label>' . "\n"
. PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'collation_connection', 'select_collation_connection', $collation_connection, TRUE, 4, TRUE)
. PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'collation_connection', 'select_collation_connection', $collation_connection, true, 4, true)
. ' <noscript><input type="submit" value="' . $strGo . '" /></noscript>' . "\n"
// put the doc link in the form so that it appears on the same line
. PMA_showMySQLDocu('MySQL_Database_Administration', 'Charset-connection') . "\n"
@@ -147,7 +148,7 @@ if ( $server > 0 ) {
if ($cfg['ShowCreateDb']) {
echo '<li id="li_create_database">';
require('./libraries/display_create_database.lib.php');
require './libraries/display_create_database.lib.php';
echo '</li>' . "\n";
}
@@ -232,7 +233,7 @@ if ( $server > 0 ) {
// Displays language selection combo
if (empty($cfg['Lang'])) {
echo '<li id="li_select_lang">';
require_once('./libraries/display_select_lang.lib.php');
require_once './libraries/display_select_lang.lib.php';
PMA_select_language();
echo '</li>';
}
@@ -403,5 +404,5 @@ function PMA_printListItem($name, $id = null, $url = null, $mysql_help_page = nu
/**
* Displays the footer
*/
require_once('./libraries/footer.inc.php');
require_once './libraries/footer.inc.php';
?>