diff --git a/ChangeLog b/ChangeLog index 247a07f5e..55d98524f 100755 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,8 @@ $Source$ fixed rowcount in left frame for tables in information_schema * libraries/sql_query_form.lib.php: XHTML compl. + * server_databases.php, css/phpmyadmin.css.php: + XHTML compl. 2005-10-12 Michal Čihař * libraries/get_foreign.lib.php: Fix paging. diff --git a/css/phpmyadmin.css.php b/css/phpmyadmin.css.php index 757d303e6..a8bf57ecd 100644 --- a/css/phpmyadmin.css.php +++ b/css/phpmyadmin.css.php @@ -37,11 +37,20 @@ table .value { font-family: "Courier New", Courier, monospace; } +table .unit, table .name { text-align: left; font-weight: normal; } +#tabledatabases td { + vertical-align: middle; +} + +.icon { + vertical-align: middle; +} + div#tablestatistics { border-bottom: 0.1em solid #669999; margin-bottom: 0.5em; @@ -341,7 +350,6 @@ span.tab, span.tabcaution { /* end topmenu */ - /* odd table rows 1,3,5,7,... */ table tbody tr.odd td, table tbody tr.odd th { diff --git a/server_databases.php b/server_databases.php index 9603543fb..1e338417c 100644 --- a/server_databases.php +++ b/server_databases.php @@ -88,9 +88,12 @@ require('./server_links.inc.php'); * Displays the sub-page heading */ echo '

' . "\n" - . ($GLOBALS['cfg']['MainPageIconic'] ? '' : '') - . ' ' . (empty($dbstats) ? $strDatabases : $strDatabasesStats) . "\n" - . '

' . "\n"; + . ( $GLOBALS['cfg']['MainPageIconic'] + ? '' + : '' ) + . ( empty($dbstats) ? $strDatabases : $strDatabasesStats ) . "\n" + .'' . "\n"; /** @@ -153,70 +156,61 @@ if (count($statistics) > 0) { . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" - . ' ' . "\n" + . '
' . "\n" + . ' ' . "\n" . ' ' . "\n" . ($is_superuser || $cfg['AllowUserDropDatabase'] ? ' ' . "\n" : '') . ' ' . "\n"; if (!empty($dbstats)) { if (PMA_MYSQL_INT_VERSION >= 40101) { - echo ' ' . "\n"; + echo ' ' . "\n"; } - echo ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n"; } if ($is_superuser) { - echo ' ' . "\n"; } - echo ' ' . "\n"; - $useBgcolorOne = TRUE; + echo ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n"; $total_calc = array( - 'db_cnt' => 0, - 'tbl_cnt' => 0, - 'data_sz' => 0, - 'idx_sz' => 0, - 'tot_sz' => 0 + 'db_cnt' => 0, + 'tbl_cnt' => 0, + 'data_sz' => 0, + 'idx_sz' => 0, + 'tot_sz' => 0 ); - foreach ($statistics as $current) { + $odd_row = false; + foreach ( $statistics as $current ) { + $odd_row = !$odd_row; list($data_size, $data_unit) = PMA_formatByteDown($current['data_sz'], 3, 1); list($idx_size, $idx_unit) = PMA_formatByteDown($current['idx_sz'], 3, 1); list($tot_size, $tot_unit) = PMA_formatByteDown($current['tot_sz'], 3, 1); @@ -225,15 +219,15 @@ if (count($statistics) > 0) { $total_calc['data_sz'] += $current['data_sz']; $total_calc['idx_sz'] += $current['idx_sz']; $total_calc['tot_sz'] += $current['tot_sz']; - echo ' ' . "\n"; + echo ' ' . "\n"; if ($is_superuser || $cfg['AllowUserDropDatabase']) { - echo ' ' . "\n"; } - echo ' ' . "\n"; } - echo ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n"; + echo ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n"; } if ($is_superuser) { - echo ' ' . "\n"; } echo ' ' . "\n"; - $useBgcolorOne = !$useBgcolorOne; - } // end while + } // end foreach ( $statistics as $current ) if (!empty($dbstats)) { list($data_size, $data_unit) = PMA_formatByteDown($total_calc['data_sz'], 3, 1); list($idx_size, $idx_unit) = PMA_formatByteDown($total_calc['idx_sz'], 3, 1); list($tot_size, $tot_unit) = PMA_formatByteDown($total_calc['tot_sz'], 3, 1); - echo ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" + . ' ' . "\n"; if (PMA_MYSQL_INT_VERSION >= 40101) { echo ' ' . "\n"; } - echo ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" + echo ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" . ' ' . "\n" . ' ' . "\n"; } if ($is_superuser || $cfg['AllowUserDropDatabase']) { $common_url_query = PMA_generate_common_url() . '&sort_by=' . $sort_by . '&sort_order=' . $sort_order . '&dbstats=' . (empty($dbstats) ? '0' : '1'); - echo ' ' . "\n" - . ' ' . "\n" . ' ' . "\n"; } - echo '
 ' . "\n" . ' ' . "\n" . ' ' . $strDatabase . "\n" - . ($sort_by == 'db_name' ? ' ' . ($sort_order == 'asc' ? $strAscending : $strDescending) . '' . "\n" : '') + . ($sort_by == 'db_name' ? ' ' . ($sort_order == 'asc' ? $strAscending : $strDescending) . '' . "\n" : '') . ' ' . "\n" - . '  ' . "\n" . ' ' . "\n" - . '  ' . $strCollation . ' ' . "\n" - . ' ' . $strCollation . '' . "\n" - . '  ' . "\n" - . ' ' . "\n" + echo ' ' . "\n" . ' ' . $strNumTables . "\n" - . ($sort_by == 'tbl_cnt' ? ' ' . ($sort_order == 'asc' ? $strAscending : $strDescending) . '' . "\n" : '') + . ($sort_by == 'tbl_cnt' ? ' ' . ($sort_order == 'asc' ? $strAscending : $strDescending) . '' . "\n" : '') . ' ' . "\n" - . '  ' . "\n" . ' ' . "\n" - . '  ' . "\n" . ' ' . "\n" . ' ' . $strData . "\n" - . ($sort_by == 'data_sz' ? ' ' . ($sort_order == 'asc' ? $strAscending : $strDescending) . '' . "\n" : '') + . ($sort_by == 'data_sz' ? ' ' . ($sort_order == 'asc' ? $strAscending : $strDescending) . '' . "\n" : '') . ' ' . "\n" - . '  ' . "\n" . ' ' . "\n" - . '  ' . "\n" . ' ' . "\n" . ' ' . $strIndexes . "\n" - . ($sort_by == 'idx_sz' ? ' ' . ($sort_order == 'asc' ? $strAscending : $strDescending) . '' . "\n" : '') + . ($sort_by == 'idx_sz' ? ' ' . ($sort_order == 'asc' ? $strAscending : $strDescending) . '' . "\n" : '') . ' ' . "\n" - . '  ' . "\n" . ' ' . "\n" - . '  ' . "\n" . ' ' . "\n" . ' ' . $strTotalUC . "\n" - . ($sort_by == 'tot_sz' ? ' ' . ($sort_order == 'asc' ? $strAscending : $strDescending) . '' . "\n" : '') + . ($sort_by == 'tot_sz' ? ' ' . ($sort_order == 'asc' ? $strAscending : $strDescending) . '' . "\n" : '') . ' ' . "\n" - . '  ' . "\n" . ' ' . "\n" - . '  ' . ($cfg['PropertiesIconic'] ? '' : $strAction . ' ') . "\n" + echo ' ' . ($cfg['PropertiesIconic'] ? ' ' : $strAction ) . "\n" . '
' . "\n"; + echo ' ' . "\n"; if (PMA_MYSQL_INT_VERSION < 50002 || $current['db_name'] != 'information_schema') { echo ' ' . "\n"; } echo ' ' . "\n" + echo ' ' . "\n" . ' ' . "\n" . ' ' . htmlspecialchars($current['db_name']) . "\n" . ' ' . "\n" @@ -241,100 +235,64 @@ if (count($statistics) > 0) { if (!empty($dbstats)) { if (PMA_MYSQL_INT_VERSION >= 40101) { $current_collation = PMA_getDbCollation($current['db_name']); - echo ' ' . "\n" - . ' ' . "\n" + echo ' ' . "\n" . ' ' . htmlspecialchars($current_collation) . "\n" . ' ' . "\n" . ' ' . "\n" - . ' ' . $current['tbl_cnt'] . "\n" - . ' ' . "\n" - . ' ' . $data_size . "\n" - . ' ' . "\n" - . ' ' . $data_unit . "\n" - . ' ' . "\n" - . ' ' . $idx_size . "\n" - . ' ' . "\n" - . ' ' . $idx_unit . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . $tot_size . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . $tot_unit . "\n" - . ' ' . "\n" - . ' ' . $current['tbl_cnt'] . '' . $data_size . '' . $data_unit . '' . $idx_size . '' . $idx_unit . '' . $tot_size . '' . $tot_unit . '' . "\n" + echo ' ' . "\n" . ' '. "\n" - . ' ' .($cfg['PropertiesIconic'] ? ' ' .$strCheckPrivs . ' ' : $strCheckPrivs ). "\n" + . ' ' .($cfg['PropertiesIconic'] ? ' ' .$strCheckPrivs . ' ' : $strCheckPrivs ). "\n" . ' ' . "\n" . '
 ' . "\n" - . '  ' . $strTotalUC . ': ' . $total_calc['db_cnt'] . ' ' . "\n" + echo '
 ' . $strTotalUC . ': ' . $total_calc['db_cnt'] . '  ' . "\n" - . '  ' . $total_calc['tbl_cnt'] . ' ' . "\n" - . ' ' . "\n" - . '  ' . $data_size . "\n" - . ' ' . "\n" - . ' ' . $data_unit . ' ' . "\n" - . ' ' . "\n" - . '  ' . $idx_size . "\n" - . ' ' . "\n" - . ' ' . $idx_unit . ' ' . "\n" - . ' ' . "\n" - . '  ' . $tot_size . "\n" - . ' ' . "\n" - . ' ' . $tot_unit . ' ' . "\n" - . ' ' . $total_calc['tbl_cnt'] . '' . $data_size . '' . $data_unit . '' . $idx_size . '' . $idx_unit . '' . $tot_size . '' . $tot_unit . ' 
' . "\n" - . ' ' . $strWithChecked . '' . "\n" + echo '
' . "\n" + . ' ' . $strWithChecked . '' . "\n" . ' ' . "\n" . ' ' . $strCheckAll . ' ' . "\n" - . '  / ' . "\n" + . ' / ' . "\n" . ' ' . "\n" . ' ' . $strUncheckAll . ' ' . "\n" . '
' . "\n"; + echo ' ' . "\n" + .' ' . "\n"; unset($data_size); unset($data_unit); unset($idx_size); @@ -345,40 +303,37 @@ if (count($statistics) > 0) { { // iconic view if ($is_superuser || $cfg['AllowUserDropDatabase']) { - echo '
' . "\n"; + echo '
' . "\n"; if ($is_superuser && empty($dbstats)) { - echo ' ' . "\n"; } else if ($is_superuser && !empty($dbstats)) { - echo ' ' . "\n"; } - echo ' ' . "\n" + . ' ' . "\n" @@ -391,31 +346,24 @@ if (count($statistics) > 0) { if ($is_superuser || $cfg['AllowUserDropDatabase']) { echo '
' . "\n" - . ' ' . "\n" - . ' ' . "\n" + echo '
' . "\n" + . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" - . ' ' . "\n" + . ' ' . "\n" . ' ' . "\n" . ' ' . $strDatabasesStatsEnable . "\n" . ' ' . "\n" - . ' ' . "\n" - . '
 ' . "\n" + . ' ' . "\n" + . '
' . "\n" . ' ' . $strDatabasesStatsHeavyTraffic . "\n" . '
 
' . "\n" - . ' ' . "\n" - . ' ' . "\n" + echo '
' . "\n" + . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" - . ' ' . "\n" + . ' ' . "\n" . ' ' . "\n" . ' ' . $strDatabasesStatsDisable . "\n" . ' ' . "\n" - . ' ' . "\n" + . ' ' . "\n" . '
 
' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . $strDropSelectedDatabases . "\n" - . ' ' . "\n" + echo '
' . "\n" + . ' ' + . ' ' . $strDropSelectedDatabases + . ' ' . "\n" . '
 ' . "\n" . ' ' . "\n" . '
 
' . "\n"; + echo '
' . "\n"; echo '' . "\n" - . ' ' . "\n" . '
' . "\n" - . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" . ' ' . "\n"; }