fixed display issues

This commit is contained in:
Sebastian Mendel
2005-11-09 09:33:52 +00:00
parent c2413163c0
commit 714c4c76d4
2 changed files with 29 additions and 26 deletions

View File

@@ -8,6 +8,7 @@ $Source$
2005-11-09 Sebastian Mendel <cybot_tm@users.sourceforge.net> 2005-11-09 Sebastian Mendel <cybot_tm@users.sourceforge.net>
* server_databases.php, mysql_charsets-lib.php: * server_databases.php, mysql_charsets-lib.php:
bug #1351743 undefined function: pma_getservercollation() bug #1351743 undefined function: pma_getservercollation()
* db_details_structure.php: fixed display issues
2005-11-08 Sebastian Mendel <cybot_tm@users.sourceforge.net> 2005-11-08 Sebastian Mendel <cybot_tm@users.sourceforge.net>
* Documentation.html, browse_foreigners.php, error.php, * Documentation.html, browse_foreigners.php, error.php,

View File

@@ -28,11 +28,11 @@ if ( empty( $is_info ) ) {
// 1. No tables // 1. No tables
if ( $num_tables == 0 ) { if ( $num_tables == 0 ) {
echo '<p>' . $strNoTablesFound . '</p>' . "\n"; echo '<p>' . $strNoTablesFound . '</p>' . "\n";
if ( empty( $db_is_information_schema ) ) { if ( empty( $db_is_information_schema ) ) {
require('./libraries/display_create_table.lib.php'); require('./libraries/display_create_table.lib.php');
} // end if (Create Table dialog) } // end if (Create Table dialog)
/** /**
* Displays the footer * Displays the footer
*/ */
@@ -53,13 +53,13 @@ if ( PMA_MYSQL_INT_VERSION >= 40101 ) {
// Display function // Display function
function PMA_TableHeader( $db_is_information_schema = false ) { function PMA_TableHeader( $db_is_information_schema = false ) {
$cnt = 0; // Let's count the columns... $cnt = 0; // Let's count the columns...
if ( $db_is_information_schema ) { if ( $db_is_information_schema ) {
$action_colspan = 3; $action_colspan = 3;
} else { } else {
$action_colspan = 6; $action_colspan = 6;
} }
echo '<table class="data" style="float: left;">' . "\n" echo '<table class="data" style="float: left;">' . "\n"
.'<thead>' . "\n" .'<thead>' . "\n"
.'<tr><td></td>' . "\n" .'<tr><td></td>' . "\n"
@@ -67,7 +67,7 @@ function PMA_TableHeader( $db_is_information_schema = false ) {
.' <th colspan="' . $action_colspan . '">' . "\n" .' <th colspan="' . $action_colspan . '">' . "\n"
.' ' . $GLOBALS['strAction'] . "\n" .' ' . $GLOBALS['strAction'] . "\n"
.' </th>' .' </th>'
.' <th>' . $GLOBALS['strRecords'] .' <th>' . $GLOBALS['strRecords']
.PMA_showHint( $GLOBALS['strApproximateCount'] ) . "\n" .PMA_showHint( $GLOBALS['strApproximateCount'] ) . "\n"
.' </th>' . "\n"; .' </th>' . "\n";
if (!($GLOBALS['cfg']['PropertiesNumColumns'] > 1)) { if (!($GLOBALS['cfg']['PropertiesNumColumns'] > 1)) {
@@ -135,7 +135,7 @@ if ( true == $cfg['PropertiesIconic'] ) {
*/ */
?> ?>
<form method="post" action="db_details_structure.php" name="tablesForm"> <form method="post" action="db_details_structure.php" name="tablesForm">
<?php <?php
echo PMA_generate_common_hidden_inputs( $db ); echo PMA_generate_common_hidden_inputs( $db );
PMA_TableHeader( $db_is_information_schema ); PMA_TableHeader( $db_is_information_schema );
@@ -156,7 +156,7 @@ foreach ( $tables as $keyname => $each_table ) {
$each_table['TABLE_ROWS'] = PMA_countRecords( $db, $each_table['TABLE_ROWS'] = PMA_countRecords( $db,
$each_table['TABLE_NAME'], $return = true, $force_exact = true ); $each_table['TABLE_NAME'], $return = true, $force_exact = true );
} }
$table_encoded = urlencode($each_table['TABLE_NAME']); $table_encoded = urlencode($each_table['TABLE_NAME']);
// MySQL < 5.0.13 returns "view", >= 5.0.13 returns "VIEW" // MySQL < 5.0.13 returns "view", >= 5.0.13 returns "VIEW"
$table_is_view = ( $each_table['TABLE_TYPE'] === 'VIEW' $table_is_view = ( $each_table['TABLE_TYPE'] === 'VIEW'
@@ -189,7 +189,7 @@ foreach ( $tables as $keyname => $each_table ) {
$browse_table = $titles['NoBrowse']; $browse_table = $titles['NoBrowse'];
$search_table = $titles['NoSearch']; $search_table = $titles['NoSearch'];
} }
if ( ! $db_is_information_schema ) { if ( ! $db_is_information_schema ) {
if ( ! empty($each_table['TABLE_ROWS']) ) { if ( ! empty($each_table['TABLE_ROWS']) ) {
$empty_table = '<a href="sql.php?' . $tbl_url_query $empty_table = '<a href="sql.php?' . $tbl_url_query
@@ -212,11 +212,11 @@ foreach ( $tables as $keyname => $each_table ) {
$drop_query = 'DROP ' $drop_query = 'DROP '
. ( $table_is_view ? 'VIEW' : 'TABLE' ) . ( $table_is_view ? 'VIEW' : 'TABLE' )
. ' ' . PMA_backquote($each_table['TABLE_NAME']); . ' ' . PMA_backquote($each_table['TABLE_NAME']);
$drop_message = sprintf( $drop_message = sprintf(
$table_is_view ? $strViewHasBeenDropped : $strTableHasBeenDropped, $table_is_view ? $strViewHasBeenDropped : $strTableHasBeenDropped,
htmlspecialchars( $each_table['TABLE_NAME'] ) ); htmlspecialchars( $each_table['TABLE_NAME'] ) );
} }
// loic1: Patch from Joshua Nye <josh at boxcarmedia.com> to get valid // loic1: Patch from Joshua Nye <josh at boxcarmedia.com> to get valid
// statistics whatever is the table type // statistics whatever is the table type
if ( isset( $each_table['TABLE_ROWS'] ) ) { if ( isset( $each_table['TABLE_ROWS'] ) ) {
@@ -257,31 +257,31 @@ foreach ( $tables as $keyname => $each_table ) {
$unit = ''; $unit = '';
} }
} }
if (PMA_MYSQL_INT_VERSION >= 40100) { if (PMA_MYSQL_INT_VERSION >= 40100) {
if ( isset( $each_table['Collation'] ) ) { if ( isset( $each_table['Collation'] ) ) {
$collation = '<dfn title="' $collation = '<dfn title="'
. PMA_getCollationDescr($each_table['Collation']) . '">' . PMA_getCollationDescr($each_table['Collation']) . '">'
. $each_table['Collation'] . '</dfn>'; . $each_table['Collation'] . '</dfn>';
} else { } else {
$collation = '---'; $collation = '---';
} }
} }
if ( $cfg['ShowStats']) { if ( $cfg['ShowStats']) {
if (isset($formated_overhead)) { if (isset($formated_overhead)) {
$overhead = '<a href="tbl_properties_structure.php?' $overhead = '<a href="tbl_properties_structure.php?'
. $tbl_url_query . '#showusage">' . $formated_overhead . $tbl_url_query . '#showusage">' . $formated_overhead
. ' ' . $overhead_unit . '</a>' . "\n"; . ' ' . $overhead_unit . '</a>' . "\n";
unset($formated_overhead); unset($formated_overhead);
$overhead_check .= $overhead_check .=
"document.getElementById('checkbox_tbl_$i').checked = true;"; "document.getElementById('checkbox_tbl_$i').checked = true;";
} else { } else {
$overhead = '-'; $overhead = '-';
} }
} // end if } // end if
} }
if ( $num_columns > 0 && $num_tables > $num_columns if ( $num_columns > 0 && $num_tables > $num_columns
&& ( ($row_count % $num_columns) == 0 )) { && ( ($row_count % $num_columns) == 0 )) {
$row_count = 1; $row_count = 1;
@@ -313,7 +313,7 @@ foreach ( $tables as $keyname => $each_table ) {
<?php echo $titles['Insert']; ?></a></td> <?php echo $titles['Insert']; ?></a></td>
<td align="center"><?php echo $empty_table; ?></td> <td align="center"><?php echo $empty_table; ?></td>
<td align="center"> <td align="center">
<a href="sql.php?<?php echo $tbl_url_query; <a href="sql.php?<?php echo $tbl_url_query;
?>&amp;reload=1&amp;purge=1&amp;sql_query=<?php ?>&amp;reload=1&amp;purge=1&amp;sql_query=<?php
echo urlencode($drop_query); ?>&amp;zero_rows=<?php echo urlencode($drop_query); ?>&amp;zero_rows=<?php
echo urlencode($drop_message); ?>" echo urlencode($drop_message); ?>"
@@ -355,7 +355,7 @@ foreach ( $tables as $keyname => $each_table ) {
// Show Summary // Show Summary
if ($cfg['ShowStats']) { if ($cfg['ShowStats']) {
list($sum_formated, $unit) = PMA_formatByteDown($sum_size, 3, 1); list($sum_formated, $unit) = PMA_formatByteDown($sum_size, 3, 1);
list($overhead_formated, $overhead_unit) = list($overhead_formated, $overhead_unit) =
PMA_formatByteDown($overhead_size, 3, 1); PMA_formatByteDown($overhead_size, 3, 1);
} }
?> ?>
@@ -374,8 +374,8 @@ if (!($cfg['PropertiesNumColumns'] > 1)) {
echo ' <th align="center">--</th>' . "\n"; echo ' <th align="center">--</th>' . "\n";
if ( ! empty( $db_collation ) ) { if ( ! empty( $db_collation ) ) {
echo ' <th align="center">' . "\n" echo ' <th align="center">' . "\n"
. ' <dfn title="' . ' <dfn title="'
. PMA_getCollationDescr($db_collation) . '">' . $db_collation . PMA_getCollationDescr($db_collation) . '">' . $db_collation
. '</dfn>' . "\n" . '</dfn>' . "\n"
. ' </th>' . "\n"; . ' </th>' . "\n";
} }
@@ -391,12 +391,13 @@ if ($cfg['ShowStats']) {
</tr> </tr>
</tbody> </tbody>
</table> </table>
<div class="clearfloat">&nbsp;</div>
<div class="clearfloat">
<?php <?php
// Check all tables url // Check all tables url
$checkall_url = 'db_details_structure.php?' . PMA_generate_common_url($db); $checkall_url = 'db_details_structure.php?' . PMA_generate_common_url($db);
?> ?>
<img src="<?php echo $pmaThemeImage .'arrow_'.$text_dir.'.png'; ?>" <img class="selectallarrow" src="<?php echo $pmaThemeImage .'arrow_'.$text_dir.'.png'; ?>"
width="38" height="22" alt="<?php echo $strWithChecked; ?>" /> width="38" height="22" alt="<?php echo $strWithChecked; ?>" />
<a href="<?php echo $checkall_url; ?>&amp;checkall=1" <a href="<?php echo $checkall_url; ?>&amp;checkall=1"
onclick="setCheckboxes('tablesForm', true); return false;"> onclick="setCheckboxes('tablesForm', true); return false;">
@@ -443,6 +444,7 @@ echo ' <option value="' . $strAnalyzeTable . '" >'
<input type="submit" value="<?php echo $strGo; ?>" /> <input type="submit" value="<?php echo $strGo; ?>" />
</noscript> </noscript>
<?php echo implode( "\n", $hidden_fields ) . "\n"; ?> <?php echo implode( "\n", $hidden_fields ) . "\n"; ?>
</div>
</form> </form>
<hr /> <hr />
@@ -456,14 +458,14 @@ echo ' <option value="' . $strAnalyzeTable . '" >'
echo '<p>'; echo '<p>';
echo '<a href="db_printview.php?' . $url_query . '">'; echo '<a href="db_printview.php?' . $url_query . '">';
if ( $cfg['PropertiesIconic'] ) { if ( $cfg['PropertiesIconic'] ) {
echo '<img class="icon" src="' . $pmaThemeImage echo '<img class="icon" src="' . $pmaThemeImage
.'b_print.png" width="16" height="16" alt="" />'; .'b_print.png" width="16" height="16" alt="" />';
} }
echo $strPrintView . '</a> '; echo $strPrintView . '</a> ';
echo '<a href="./db_datadict.php?' . $url_query . '">'; echo '<a href="./db_datadict.php?' . $url_query . '">';
if($cfg['PropertiesIconic']){ if($cfg['PropertiesIconic']){
echo '<img class="icon" src="' . $pmaThemeImage echo '<img class="icon" src="' . $pmaThemeImage
.'b_tblanalyse.png" width="16" height="16" alt="" />'; .'b_tblanalyse.png" width="16" height="16" alt="" />';
} }
echo $strDataDict . '</a>'; echo $strDataDict . '</a>';