From c28818ecee0743e799b60df755b91f3f3b3b6972 Mon Sep 17 00:00:00 2001 From: Sebastian Mendel Date: Wed, 9 Jul 2008 12:40:17 +0000 Subject: [PATCH] tweaked main page layout --- main.php | 152 +++++++++--------- .../darkblue_orange/css/theme_right.css.php | 12 +- themes/original/css/theme_right.css.php | 12 +- 3 files changed, 93 insertions(+), 83 deletions(-) diff --git a/main.php b/main.php index 14a080444..9ef5b3077 100644 --- a/main.php +++ b/main.php @@ -30,11 +30,44 @@ if ($server > 0) { require './libraries/server_links.inc.php'; } +// robbat2: Use the verbose name of the server instead of the hostname +// if a value is set +$server_info = ''; +if (! empty($cfg['Server']['verbose'])) { + $server_info .= htmlspecialchars($cfg['Server']['verbose']); + if ($GLOBALS['cfg']['ShowServerInfo']) { + $server_info .= ' ('; + } +} +if ($GLOBALS['cfg']['ShowServerInfo'] || empty($cfg['Server']['verbose'])) { + $server_info .= PMA_DBI_get_host_info(); +} +if (! empty($cfg['Server']['verbose']) && $GLOBALS['cfg']['ShowServerInfo']) { + $server_info .= ')'; +} +$mysql_cur_user_and_host = PMA_DBI_fetch_value('SELECT USER();'); + +// should we add the port info here? +$short_server_info = (!empty($GLOBALS['cfg']['Server']['verbose']) + ? $GLOBALS['cfg']['Server']['verbose'] + : $GLOBALS['cfg']['Server']['host']); + echo '
' . "\n"; echo '
'; -echo '
'; +echo '
'; echo '

' . $strActions . '

'; +echo '
    '; +/** + * Displays the MySQL servers choice form + */ +if (! $cfg['LeftDisplayServers'] && (count($cfg['Servers']) > 1 || $server == 0 && count($cfg['Servers']) == 1)) { + echo '
  • '; + require_once './libraries/select_server.lib.php'; + PMA_select_server(true, true); + echo '
  • '; +} + /** * Displays the mysql server related links */ @@ -45,15 +78,6 @@ if ($server > 0) { if ($cfg['Server']['auth_type'] == 'config') { $cfg['ShowChgPassword'] = false; } -} - -if ($server > 0) { - echo '
      '; - if ($cfg['ShowCreateDb']) { - echo '
    • '; - require './libraries/display_create_database.lib.php'; - echo '
    • ' . "\n"; - } /** * Change password @@ -77,76 +101,22 @@ if ($server > 0) { } // end if } // end of if ($server > 0) -?> - 1 || $server == 0 && count($cfg['Servers']) == 1)) { - if ($server == 0) { - echo '
        '; - } - echo '
      • '; - require_once './libraries/select_server.lib.php'; - PMA_select_server(true, true); - echo '
      • '; -} echo '
      '; echo '
'; -echo '
'; -if ($server > 0) { - echo '

' . $strMySQLServerInformation . '

'; - // robbat2: Use the verbose name of the server instead of the hostname - // if a value is set - $server_info = ''; - if (! empty($cfg['Server']['verbose'])) { - $server_info .= htmlspecialchars($cfg['Server']['verbose']); - if ($GLOBALS['cfg']['ShowServerInfo']) { - $server_info .= ' ('; - } - } - if ($GLOBALS['cfg']['ShowServerInfo'] || empty($cfg['Server']['verbose'])) { - $server_info .= PMA_DBI_get_host_info(); - } - - if (! empty($cfg['Server']['verbose']) && $GLOBALS['cfg']['ShowServerInfo']) { - $server_info .= ')'; - } - $mysql_cur_user_and_host = PMA_DBI_fetch_value('SELECT USER();'); - - // should we add the port info here? - $short_server_info = (!empty($GLOBALS['cfg']['Server']['verbose']) - ? $GLOBALS['cfg']['Server']['verbose'] - : $GLOBALS['cfg']['Server']['host']); - //echo '

' . $short_server_info . '

' . "\n"; - unset($short_server_info); -} - if ($server > 0) { + echo '
'; + echo '

MySQL ' . $short_server_info . '

'; echo '
    ' . "\n"; - if ($GLOBALS['cfg']['ShowServerInfo']) { - PMA_printListItem($strServer . ': ' . $server_info, 'li_server_info'); - PMA_printListItem($strServerVersion . ': ' . PMA_MYSQL_STR_VERSION, 'li_server_version'); - PMA_printListItem($strProtocolVersion . ': ' . PMA_DBI_get_proto_info(), - 'li_mysql_proto'); - PMA_printListItem($strUser . ': ' . htmlspecialchars($mysql_cur_user_and_host), - 'li_user_info'); - } else { - PMA_printListItem($strServerVersion . ': ' . PMA_MYSQL_STR_VERSION, 'li_server_version'); - PMA_printListItem($strServer . ': ' . $server_info, 'li_server_info'); + if ($cfg['ShowCreateDb']) { + echo '
  • '; + require './libraries/display_create_database.lib.php'; + echo '
  • ' . "\n"; } - echo '
  • '; - echo ' ' . $strMySQLCharset . ': ' - . ' ' - . ' ' . $mysql_charsets_descriptions[$mysql_charset_map[strtolower($charset)]] . "\n" - . ' (' . $mysql_charset_map[strtolower($charset)] . ')' . "\n" - . ' ' . "\n" - . '
  • ' . "\n" - . '
  • '; + echo '
  • '; echo '
    ' . "\n" . PMA_generate_common_hidden_inputs(null, null, 4, 'collation_connection') . '
  • ' . "\n"; + echo '
'; echo '
'; } -echo '
'; -echo '
'; - -echo '
'; +echo '
'; echo '

' . $strInterface . '

'; echo '
    '; @@ -192,8 +160,38 @@ echo ''; echo '
'; echo '
'; + +echo '
'; +echo '
'; + + if ($server > 0) { - echo '
'; + echo '
'; + echo '

' . $strMySQLServerInformation . '

'; + echo '
    ' . "\n"; + PMA_printListItem($strServer . ': ' . $server_info, 'li_server_info'); + PMA_printListItem($strServerVersion . ': ' . PMA_MYSQL_STR_VERSION, 'li_server_version'); + if ($GLOBALS['cfg']['ShowServerInfo']) { + PMA_printListItem($strProtocolVersion . ': ' . PMA_DBI_get_proto_info(), + 'li_mysql_proto'); + PMA_printListItem($strUser . ': ' . htmlspecialchars($mysql_cur_user_and_host), + 'li_user_info'); + } + + echo '
  • '; + echo ' ' . $strMySQLCharset . ': ' + . ' ' + . ' ' . $mysql_charsets_descriptions[$mysql_charset_map[strtolower($charset)]] . "\n" + . ' (' . $mysql_charset_map[strtolower($charset)] . ')' . "\n" + . ' ' . "\n" + . '
  • ' . "\n"; + echo '
'; + echo '
'; +} + + +if ($server > 0) { + echo '
'; echo '

' . $strWebServerInformation . '

'; echo '
    '; PMA_printListItem($_SERVER['SERVER_SOFTWARE'], 'li_web_server_software'); @@ -209,7 +207,7 @@ if ($cfg['ShowPhpInfo']) { echo '
'; echo '
'; -echo '
'; +echo '
'; echo '

' . $strAboutphpMyAdmin . '

'; echo '
    '; PMA_printListItem($strVersionInformation . ': ' . PMA_VERSION, 'li_pma_version'); diff --git a/themes/darkblue_orange/css/theme_right.css.php b/themes/darkblue_orange/css/theme_right.css.php index 414d1413a..fb5cbfc32 100644 --- a/themes/darkblue_orange/css/theme_right.css.php +++ b/themes/darkblue_orange/css/theme_right.css.php @@ -1210,13 +1210,19 @@ code.sql { padding-: 1em; } -.box { - border-: 1pt solid ; +.group { + border-: 0.3em solid ; margin-bottom: 1em; } -.box h2 { +.group h2 { background-color: ; padding: 0.1em 0.3em; margin-top: 0; } + +#li_select_server { + padding-bottom: 0.3em; + border-bottom: 0.3em solid ; + margin-bottom: 0.3em; +} diff --git a/themes/original/css/theme_right.css.php b/themes/original/css/theme_right.css.php index 7ebed9185..6470b25b0 100644 --- a/themes/original/css/theme_right.css.php +++ b/themes/original/css/theme_right.css.php @@ -1161,13 +1161,19 @@ code.sql { padding-: 1em; } -.box { - border-: 1pt solid ; +.group { + border-: 0.3em solid ; margin-bottom: 1em; } -.box h2 { +.group h2 { background-color: ; padding: 0.1em 0.3em; margin-top: 0; } + +#li_select_server { + padding-bottom: 0.3em; + border-bottom: 0.3em solid ; + margin-bottom: 0.3em; +}