diff --git a/tbl_printview.php b/tbl_printview.php index 73f4f2c29..d388cc7bd 100644 --- a/tbl_printview.php +++ b/tbl_printview.php @@ -1,31 +1,30 @@ 1); if ($multi_tables) { if (empty($GLOBALS['is_header_sent'])) { - require_once('./libraries/header.inc.php'); + require_once './libraries/header.inc.php'; } $tbl_list = ''; - foreach ($the_tables AS $key => $table) { + foreach ($the_tables as $key => $table) { $tbl_list .= (empty($tbl_list) ? '' : ', ') . PMA_backquote(urldecode($table)); } - echo ''. $strShowTables . ': ' . $tbl_list . '' . "\n"; + echo ''. $strShowTables . ': ' . $tbl_list . '' . "\n"; echo '
' . "\n"; } // end if $tables_cnt = count($the_tables); $counter = 0; -foreach ($the_tables AS $key => $table) { +foreach ($the_tables as $key => $table) { $table = urldecode($table); if ($counter + 1 >= $tables_cnt) { $breakstyle = ''; @@ -84,7 +83,8 @@ foreach ($the_tables AS $key => $table) { /** * Gets table informations */ - $result = PMA_DBI_query('SHOW TABLE STATUS LIKE \'' . PMA_sqlAddslashes($table, TRUE) . '\';'); + $result = PMA_DBI_query( + 'SHOW TABLE STATUS LIKE \'' . PMA_sqlAddslashes($table, true) . '\';'); $showtable = PMA_DBI_fetch_assoc($result); $num_rows = (isset($showtable['Rows']) ? $showtable['Rows'] : 0); $show_comment = (isset($showtable['Comment']) ? $showtable['Comment'] : ''); @@ -102,7 +102,9 @@ foreach ($the_tables AS $key => $table) { /** * Gets fields properties */ - $result = PMA_DBI_query('SHOW FIELDS FROM ' . PMA_backquote($table) . ';', null, PMA_DBI_QUERY_STORE); + $result = PMA_DBI_query( + 'SHOW FIELDS FROM ' . PMA_backquote($table) . ';', null, + PMA_DBI_QUERY_STORE); $fields_cnt = PMA_DBI_num_rows($result); // Check if we can use Relations (Mike Beck) @@ -112,12 +114,12 @@ foreach ($the_tables AS $key => $table) { $res_rel = PMA_getForeigners($db, $table); if (count($res_rel) > 0) { - $have_rel = TRUE; + $have_rel = true; } else { - $have_rel = FALSE; + $have_rel = false; } } else { - $have_rel = FALSE; + $have_rel = false; } // end if @@ -125,7 +127,7 @@ foreach ($the_tables AS $key => $table) { * Displays the comments of the table if MySQL >= 3.23 */ if (!empty($show_comment)) { - echo $strTableComments . ': ' . $show_comment . '

'; + echo $strTableComments . ': ' . $show_comment . '

'; } /** @@ -134,18 +136,18 @@ foreach ($the_tables AS $key => $table) { ?> - +
+ - - - - - - + + + + + + ' . $strLinksTo . '' . "\n"; + echo '' . "\n"; } if ($cfgRelation['commwork']) { echo ' ' . "\n"; @@ -155,26 +157,22 @@ foreach ($the_tables AS $key => $table) { } ?> - + + $table) { $row['Default'] = htmlspecialchars($row['Default']); } $field_name = htmlspecialchars($row['Field']); - echo "\n"; ?> - - - - - - - + + + + + '; + echo ' ' . "\n"; } if ($cfgRelation['commwork'] || PMA_MYSQL_INT_VERSION >= 40100) { - echo '
' . $strLinksTo . '' . $strComments . '
+ +
' . $field_name . ' ' . "\n"; + echo ' ' . $field_name . '' . "\n"; } else { - echo ' ' . $field_name . ' ' . "\n"; + echo ' ' . $field_name . "\n"; } ?> >     '; if (isset($res_rel[$field_name])) { echo htmlspecialchars($res_rel[$field_name]['foreign_table'] . ' -> ' . $res_rel[$field_name]['foreign_field'] ); } echo ' '; + echo ' '; $comments = PMA_getComments($db, $table); if (isset($comments[$field_name])) { echo htmlspecialchars($comments[$field_name]); @@ -241,7 +237,7 @@ foreach ($the_tables AS $key => $table) { if ($cfgRelation['mimework']) { $mime_map = PMA_getMIME($db, $table, true); - echo ' '; + echo ' '; if (isset($mime_map[$field_name])) { echo htmlspecialchars(str_replace('_', '/', $mime_map[$field_name]['mimetype'])); } @@ -252,18 +248,16 @@ foreach ($the_tables AS $key => $table) { +
- $table) { echo "\n"; ?>

- + -   - + +
@@ -293,26 +287,26 @@ foreach ($the_tables AS $key => $table) { 0) { @@ -327,35 +321,35 @@ foreach ($the_tables AS $key => $table) { if ($num_rows > 0) { list($avg_size, $avg_unit) = PMA_formatByteDown(($showtable['Data_length'] + $showtable['Index_length']) / $showtable['Rows'], 6, 1); } - + // Displays them ?>

- +
- + -
-   - + - - - + + +
+ + - - - + + + - - - + + + $table) { echo "\n"; ?> - - - + + + - - - + + + - - - + + + $table) { ?>
   -   - + +
- - + + ?> - - + 0) { - $bgcolor = ((++$i%2) ? $cfg['BgcolorTwo'] : $cfg['BgcolorOne']); - echo "\n"; ?> - - + 0 && $mergetable == FALSE) { - $bgcolor = ((++$i%2) ? $cfg['BgcolorTwo'] : $cfg['BgcolorOne']); - echo "\n"; + if (isset($showtable['Data_length']) && $showtable['Rows'] > 0 && $mergetable == false) { ?> - - + - - + - - + - - + - - + +
+ $table) { } else { echo $showtable['Row_format']; } - echo "\n"; ?>
+
 ø +  ø
 ø +  ø
 Autoindex +  Autoindex
+
+
+
- + ' . "\n"; } // end if echo '' . "\n"; } // end while - - /** * Displays the footer */ -echo "\n"; ?> + -
 ' . "\n"; -require_once('./libraries/footer.inc.php'); + + +