Bugfixes & interface cosmetic.

This commit is contained in:
Alexander M. Turek
2003-02-09 00:10:32 +00:00
parent f5d5bb3f73
commit 84e4fe065a
2 changed files with 38 additions and 14 deletions

View File

@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2003-02-09 Alexander M. Turek <rabus@users.sourceforge.net>
* server_databases.php3: Bugfixes & interface cosmetic.
2003-02-08 Alexander M. Turek <rabus@users.sourceforge.net> 2003-02-08 Alexander M. Turek <rabus@users.sourceforge.net>
* config.inc.php3, lang/add_message.sh: Typos. * config.inc.php3, lang/add_message.sh: Typos.
* lang/italian.inc.php3: Updates, thanks to Pietro Danesi (danone). * lang/italian.inc.php3: Updates, thanks to Pietro Danesi (danone).

View File

@@ -6,6 +6,7 @@
/** /**
* Does the common work * Does the common work
*/ */
$js_to_run = 'functions.js';
require('./server_common.inc.php3'); require('./server_common.inc.php3');
@@ -104,7 +105,11 @@ usort($statistics, 'PMA_dbCmp');
* Displays the page * Displays the page
*/ */
if (count($statistics) > 0) { if (count($statistics) > 0) {
echo '<form acrtion="./server_databases.php3" method="post">' . "\n" echo '<form action="./server_databases.php3" method="post" name="dbStatsForm">' . "\n"
. PMA_generate_common_hidden_inputs('', '', 1)
. ' <input type="hidden" name="dbstats" value="' . (empty($dbstats) ? '0' : '1') . '" />' . "\n"
. ' <input type="hidden" name="sort_by" value="' . $sort_by . '" />' . "\n"
. ' <input type="hidden" name="sort_order" value="' . $sort_order . '" />' . "\n"
. ' <table border="0">' . "\n" . ' <table border="0">' . "\n"
. ' <tr>' . "\n" . ' <tr>' . "\n"
. ' <th>&nbsp;</th>' . "\n" . ' <th>&nbsp;</th>' . "\n"
@@ -179,7 +184,7 @@ if (count($statistics) > 0) {
$total_calc['tot_sz'] += $current['tot_sz']; $total_calc['tot_sz'] += $current['tot_sz'];
echo ' <tr>' . "\n" echo ' <tr>' . "\n"
. ' <td bgcolor="' . ($useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']) . '">' . "\n" . ' <td bgcolor="' . ($useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']) . '">' . "\n"
. ' <input type="checkbox" name="selected_db[]" title="' . htmlspecialchars($current['db_name']) . '" value="' . htmlspecialchars($current['db_name']) . '" />' . "\n" . ' <input type="checkbox" name="selected_db[]" title="' . htmlspecialchars($current['db_name']) . '" value="' . htmlspecialchars($current['db_name']) . '" ' . (empty($checkall) ? '' : 'checked="checked" ') . '/>' . "\n"
. ' </td>' . "\n" . ' </td>' . "\n"
. ' <td bgcolor="' . ($useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']) . '">' . "\n" . ' <td bgcolor="' . ($useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']) . '">' . "\n"
. ' <a href="' . $cfg['DefaultTabDatabase'] . $url_query . '&amp;db=' . urlencode($current['db_name']) . '" title="' . sprintf($strJumpToDB, htmlspecialchars($current['db_name'])) . '">' . "\n" . ' <a href="' . $cfg['DefaultTabDatabase'] . $url_query . '&amp;db=' . urlencode($current['db_name']) . '" title="' . sprintf($strJumpToDB, htmlspecialchars($current['db_name'])) . '">' . "\n"
@@ -254,28 +259,44 @@ if (count($statistics) > 0) {
. ' <th>&nbsp;</th>' . "\n" . ' <th>&nbsp;</th>' . "\n"
. ' </tr>' . "\n"; . ' </tr>' . "\n";
} }
echo ' </table><br />' . "\n"; $common_url_query = PMA_generate_common_url() . '&amp;sort_by=' . $sort_by . '&amp;sort_order=' . $sort_order . '&amp;dbstats=' . (empty($dbstats) ? '10' : '3');
echo ' <tr>' . "\n"
. ' <td colspan="' . (empty($dbstats) ? '10' : '3') . '">' . "\n"
. ' <img src="./images/arrow_' . $text_dir . '.gif" border="0" width="38" height="22" alt="' . $strWithChecked . '" />' . "\n"
. ' <a href="./server_databases.php3?' . $common_url_query . '&amp;checkall=1" onclick="setCheckboxes(\'dbStatsForm\', true); return false;">' . "\n"
. ' ' . $strCheckAll
. ' </a>' . "\n"
. ' &nbsp;/&nbsp;' . "\n"
. ' <a href="./server_databases.php3?' . $common_url_query . '" onclick="setCheckboxes(\'dbStatsForm\', false); return false;">' . "\n"
. ' ' . $strUncheckAll
. ' </a>' . "\n"
. ' </td>' . "\n"
. ' </tr>' . "\n"
. ' </table>' . "\n"
. ' <ul>' . "\n";
unset($data_size); unset($data_size);
unset($data_unit); unset($data_unit);
unset($idx_size); unset($idx_size);
unset($idx_unit); unset($idx_unit);
unset($tot_size); unset($tot_size);
unset($tot_unit); unset($tot_unit);
echo ' <li>' . "\n"
. ' <b>' . "\n";
if ($is_superuser && empty($dbstats) && PMA_MYSQL_INT_VERSION >= 32303) { if ($is_superuser && empty($dbstats) && PMA_MYSQL_INT_VERSION >= 32303) {
echo ' <b>' . "\n" echo ' <a href="./server_databases.php3?' . $url_query . '&amp;dbstats=1" title="' . $strDatabasesStatsEnable . '">' . "\n"
. ' <a href="./server_databases.php3?' . $url_query . '&amp;dbstats=1" title="' . $strDatabasesStatsEnable . '">' . "\n"
. ' ' . $strDatabasesStatsEnable . "\n" . ' ' . $strDatabasesStatsEnable . "\n"
. ' </a>' . "\n" . ' </a>' . "\n"
. ' </b><br />' . "\n" . ' </b><br />' . "\n"
. $strDatabasesStatsHeavyTraffic . "\n"; . $strDatabasesStatsHeavyTraffic . "\n";
} else if (!empty($dbstats)) { } else if (!empty($dbstats)) {
echo ' <b>' . "\n" echo ' <a href="./server_databases.php3?' . $url_query . '" title="' . $strDatabasesStatsDisable . '">'. "\n"
. ' <a href="./server_databases.php3?' . $url_query . '" title="' . $strDatabasesStatsDisable . '">'. "\n"
. ' ' . $strDatabasesStatsDisable . "\n" . ' ' . $strDatabasesStatsDisable . "\n"
. ' </a>' . "\n" . ' </a>' . "\n"
. ' </b><br />' . "\n" . ' </b>' . "\n";
. '</form>' . "\n";
} }
echo ' </li>' . "\n"
. ' </ul>' . "\n"
. '</form>' . "\n";
} else { } else {
echo $strNoDatabases . "\n"; echo $strNoDatabases . "\n";
} }