' . $strNoTablesFound . '

' . "\n"; if ( empty( $table_is_schema ) ) { require('./libraries/display_create_table.lib.php'); } // end if (Create Table dialog) /** * Displays the footer */ require_once('./footer.inc.php'); exit; } // else // 2. Shows table informations - staybyte - 11 June 2001 require_once('./libraries/bookmark.lib.php'); // rabus: disable statistics for information_schema. if ( PMA_MYSQL_INT_VERSION >= 50002 && $db == 'information_schema' ) { $cfg['ShowStats'] = false; $table_is_schema = true; } else { $table_is_schema = false; } if ( PMA_MYSQL_INT_VERSION >= 40101 ) { require_once('./libraries/mysql_charsets.lib.php'); $db_collation = PMA_getDbCollation( $db ); } // Display function function PMA_TableHeader( $table_is_schema = false ) { $cnt = 0; // Let's count the columns... if ( $table_is_schema ) { $action_colspan = 3; } else { $action_colspan = 6; } echo '' . "\n" .'' . "\n" .'' . "\n" .' ' . "\n" .' ' .' ' . "\n"; if (!($GLOBALS['cfg']['PropertiesNumColumns'] > 1)) { echo ' ' . "\n"; $cnt++; if (PMA_MYSQL_INT_VERSION >= 40100) { echo ' ' . "\n"; $cnt++; } } if ($GLOBALS['cfg']['ShowStats']) { echo ' ' . "\n" . ' ' . "\n"; $cnt += 2; } echo '' . "\n"; echo '' . "\n"; echo '' . "\n"; $GLOBALS['structure_tbl_col_cnt'] = $cnt + $action_colspan + 3; } $titles = array(); if ( true == $cfg['PropertiesIconic'] ) { $titles['Browse'] = '' . $strBrowse . ''; $titles['NoBrowse'] = '' . $strBrowse . ''; $titles['Search'] = '' . $strSearch . ''; $titles['NoSearch'] = '' . $strSearch . ''; $titles['Insert'] = '' . $strInsert . ''; $titles['NoInsert'] = '' . $strInsert . ''; $titles['Structure'] = '' . $strStructure . ''; $titles['Drop'] = '' . $strDrop . ''; $titles['NoDrop'] = '' . $strDrop . ''; $titles['Empty'] = '' . $strEmpty . ''; $titles['NoEmpty'] = '' . $strEmpty . ''; if ( 'both' === $cfg['PropertiesIconic'] ) { $titles['Browse'] .= $strBrowse; $titles['Search'] .= $strSearch; $titles['NoBrowse'] .= $strBrowse; $titles['NoSearch'] .= $strSearch; $titles['Insert'] .= $strInsert; $titles['NoInsert'] .= $strInsert; $titles['Structure'] .= $strStructure; $titles['Drop'] .= $strDrop; $titles['NoDrop'] .= $strDrop; $titles['Empty'] .= $strEmpty; $titles['NoEmpty'] .= $strEmpty; } } else { $titles['Browse'] = $strBrowse; $titles['Search'] = $strSearch; $titles['NoBrowse'] = $strBrowse; $titles['NoSearch'] = $strSearch; $titles['Insert'] = $strInsert; $titles['NoInsert'] = $strInsert; $titles['Structure'] = $strStructure; $titles['Drop'] = $strDrop; $titles['NoDrop'] = $strDrop; $titles['Empty'] = $strEmpty; $titles['NoEmpty'] = $strEmpty; } /** * Displays the tables list */ ?> 1 ? ceil($num_tables / $cfg['PropertiesNumColumns']) + 1 : 0; $row_count = 0; $hidden_fields = array(); $odd_row = true; foreach ( $tables as $keyname => $sts_data ) { $sts_data['Type'] = isset( $sts_data['Type'] ) ? $sts_data['Type'] : ''; $table_encoded = urlencode($sts_data['Name']); // MySQL < 5.0.13 returns "view", >= 5.0.13 returns "VIEW" $table_is_view = (PMA_MYSQL_INT_VERSION >= 50000 && empty($sts_data['Type']) && strtoupper($sts_data['Comment']) == 'VIEW'); $alias = (!empty($tooltip_aliasname) && isset($tooltip_aliasname[$sts_data['Name']])) ? htmlspecialchars($tooltip_aliasname[$sts_data['Name']]) : htmlspecialchars($sts_data['Name']); $truename = (!empty($tooltip_truename) && isset($tooltip_truename[$sts_data['Name']])) ? htmlspecialchars($tooltip_truename[$sts_data['Name']]) : htmlspecialchars($sts_data['Name']); // Sets parameters for links $tbl_url_query = $url_query . '&table=' . $table_encoded; $i++; $row_count++; if ( $table_is_view ) { $hidden_fields[] = ''; } if ( ! empty( $sts_data['Rows'] ) || $table_is_view ) { $book_sql_query = PMA_queryBookmarks($db, $cfg['Bookmark'], '\'' . PMA_sqlAddslashes($sts_data['Name']) . '\'', 'label'); $browse_table = '' . $titles['Browse'] . ''; } else { $browse_table = $titles['NoBrowse']; } if ( ! empty($sts_data['Rows'] ) || $table_is_view ) { $search_table = '' . $titles['Search'] . ''; } else { $search_table = $titles['NoSearch']; } if ( ! $table_is_schema ) { if ( ! empty($sts_data['Rows']) ) { $empty_table = '' . $titles['Empty'] . ''; } else { $empty_table = $titles['NoEmpty']; } $drop_query = 'DROP ' . ( $table_is_view ? 'VIEW' : 'TABLE' ) . ' ' . PMA_backquote($sts_data['Name']); $drop_message = sprintf( $table_is_view ? $strViewHasBeenDropped : $strTableHasBeenDropped, htmlspecialchars( $sts_data['Name'] ) ); } // loic1: Patch from Joshua Nye to get valid // statistics whatever is the table type if ( isset( $sts_data['Rows'] ) ) { // MyISAM, ISAM or Heap table: Row count, data size and index size // is accurate. if ( preg_match('@^(MyISAM|ISAM|HEAP|MEMORY)$@', $sts_data['Type']) ) { if ($cfg['ShowStats']) { $tblsize = doubleval($sts_data['Data_length']) + doubleval($sts_data['Index_length']); $sum_size += $tblsize; list($formated_size, $unit) = PMA_formatByteDown($tblsize, 3, ($tblsize > 0) ? 1 : 0); if (isset($sts_data['Data_free']) && $sts_data['Data_free'] > 0) { list($formated_overhead, $overhead_unit) = PMA_formatByteDown($sts_data['Data_free']); $overhead_size += $sts_data['Data_free']; } } $sum_entries += $sts_data['Rows']; $display_rows = $sts_data['Rows']; } elseif ( $sts_data['Type'] == 'InnoDB' ) { // InnoDB table: Row count is not accurate but data and index // sizes are. if ($cfg['ShowStats']) { $tblsize = $sts_data['Data_length'] + $sts_data['Index_length']; $sum_size += $tblsize; list($formated_size, $unit) = PMA_formatByteDown($tblsize, 3, ($tblsize > 0) ? 1 : 0); } //$display_rows = ' - '; // get row count with another method if ($sts_data['Rows'] < $cfg['MaxExactCount']) { $local_query = 'SELECT COUNT(*) AS count FROM ' . PMA_backquote($db) . '.' . PMA_backquote($sts_data['Name']); $sum_entries += PMA_DBI_fetch_value( $local_query ); unset( $local_query ); } else { $row_count = $sts_data['Rows']; $sum_entries += $sts_data['Rows']; } $display_rows = $row_count; } elseif ( preg_match('@^(MRG_MyISAM|BerkeleyDB)$@', $sts_data['Type']) ) { // Merge or BerkleyDB table: Only row count is accurate. if ($cfg['ShowStats']) { $formated_size = ' - '; $unit = ''; } $sum_entries += $sts_data['Rows']; $display_rows = $sts_data['Rows']; } else { // Unknown table type. if ($cfg['ShowStats']) { $formated_size = 'unknown'; $unit = ''; } $display_rows = 'unknown'; } if (PMA_MYSQL_INT_VERSION >= 40100) { if ( isset( $sts_data['Collation'] ) ) { $collation = '' . $sts_data['Collation'] . ''; } else { $collation = '---'; } } if ( $cfg['ShowStats']) { if (isset($formated_overhead)) { $overhead = '' . $formated_overhead . ' ' . $overhead_unit . '' . "\n"; unset($formated_overhead); $overhead_check .= "document.getElementById('checkbox_tbl_$i').checked = true;"; } else { $overhead = '-'; } } // end if } if ( $num_columns > 0 && $num_tables > $num_columns && ( ($row_count % $num_columns) == 0 )) { $row_count = 1; $odd_row = true; ?>
' . $GLOBALS['strTable'] . '' . "\n" .' ' . $GLOBALS['strAction'] . "\n" .' ' . $GLOBALS['strRecords'] .PMA_showHint( $GLOBALS['strApproximateCount'] ) . "\n" .' ' . $GLOBALS['strType'] . '' . $GLOBALS['strCollation'] . '' . $GLOBALS['strSize'] . '' . $GLOBALS['strOverhead'] . '
/> 1)) { ?> - --- - - 1)) { echo ' --' . "\n"; if ( ! empty( $db_collation ) ) { echo ' ' . "\n" . ' ' . $db_collation . '' . "\n" . ' ' . "\n"; } } if ($cfg['ShowStats']) { ?>
 
<?php echo $strWithChecked; ?> / /
'; echo ''; if ( $cfg['PropertiesIconic'] ) { echo ''; } echo $strPrintView . ' '; echo ''; if($cfg['PropertiesIconic']){ echo ''; } echo $strDataDict . ''; echo '

'; if ( empty( $table_is_schema ) ) { require('./libraries/display_create_table.lib.php'); } // end if (Create Table dialog) /** * Displays the footer */ require_once('./footer.inc.php'); ?>