getHeader();
$header->enablePrintView();
PMA_Util::checkParameters(array('db'));
/**
* Defines the url to return to in case of error in a sql statement
*/
$err_url = 'db_sql.php?' . PMA_URL_getCommon($db);
/**
* Settings for relations stuff
*/
$cfgRelation = PMA_getRelationsParam();
/**
* If there is at least one table, displays the printer friendly view, else
* an error message
*/
$tables = $GLOBALS['dbi']->getTablesFull($db);
$num_tables = count($tables);
echo '
';
// 1. No table
if ($num_tables == 0) {
echo __('No tables found in database.');
} else {
// 2. Shows table information
echo '
' . __('Table') . ' | '; echo '' . __('Rows') . ' | '; echo '' . __('Type') . ' | '; if ($cfg['ShowStats']) { echo '' . __('Size') . ' | '; } echo '' . __('Comments') . ' | '; echo '|||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
'; echo htmlspecialchars($sts_data['TABLE_NAME']); echo ' | '; if (isset($sts_data['TABLE_ROWS'])) { echo ''; if ($merged_size) { echo ''; echo PMA_Util::formatNumber($sts_data['TABLE_ROWS'], 0); echo ''; } else { echo PMA_Util::formatNumber($sts_data['TABLE_ROWS'], 0); } echo ' | '; echo ''; echo $sts_data['ENGINE']; echo ' | '; if ($cfg['ShowStats']) { $tblsize = $sts_data['Data_length'] + $sts_data['Index_length']; $sum_size += $tblsize; list($formated_size, $unit) = PMA_Util::formatByteDown($tblsize, 3, 1); echo ''; echo $formated_size . ' ' . $unit; echo ' | '; } // end if } else { echo ''; if (! PMA_Table::isView($db, $sts_data['TABLE_NAME'])) { echo __('in use'); } echo ' | '; } echo '';
if (! empty($sts_data['Comment'])) {
echo htmlspecialchars($sts_data['Comment']);
$needs_break = ' '; } else { $needs_break = ''; } if (! empty($sts_data['Create_time']) || ! empty($sts_data['Update_time']) || ! empty($sts_data['Check_time']) ) { echo $needs_break; echo '
| ';
echo '||||||||
'; printf( _ngettext('%s table', '%s tables', $num_tables), PMA_Util::formatNumber($num_tables, 0) ); echo ' | '; echo ''; echo PMA_Util::formatNumber($sum_entries, 0); echo ' | '; echo ''; echo '--'; echo ' | '; if ($cfg['ShowStats']) { list($sum_formated, $unit) = PMA_Util::formatByteDown($sum_size, 3, 1); echo ''; echo $sum_formated . ' ' . $unit; echo ' | '; } echo ''; echo ' |