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 ''; echo ''; echo ''; echo ''; echo ''; echo ''; if ($cfg['ShowStats']) { echo ''; } echo ''; echo ''; echo ''; echo ''; $sum_entries = $sum_size = 0; $odd_row = true; foreach ($tables as $sts_data) { if (PMA_Table::isMerge($db, $sts_data['TABLE_NAME']) || strtoupper($sts_data['ENGINE']) == 'FEDERATED' ) { $merged_size = true; } else { $merged_size = false; } $sum_entries += $sts_data['TABLE_ROWS']; echo ''; echo ''; if (isset($sts_data['TABLE_ROWS'])) { echo ''; 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 ''; } // end if } else { echo ''; } echo ''; echo ''; } echo ''; echo ''; echo ''; echo ''; if ($cfg['ShowStats']) { list($sum_formated, $unit) = PMA_Util::formatByteDown($sum_size, 3, 1); echo ''; } echo ''; echo ''; echo ''; echo '
' . __('Table') . '' . __('Rows') . '' . __('Type') . '' . __('Size') . '' . __('Comments') . '
'; echo htmlspecialchars($sts_data['TABLE_NAME']); 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 $sts_data['ENGINE']; echo ''; echo $formated_size . ' ' . $unit; echo ''; if (! PMA_Table::isView($db, $sts_data['TABLE_NAME'])) { echo __('in use'); } 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 ''; if (! empty($sts_data['Create_time'])) { echo ''; echo ''; echo ''; echo ''; } if (! empty($sts_data['Update_time'])) { echo ''; echo ''; echo ''; echo ''; } if (! empty($sts_data['Check_time'])) { echo ''; echo ''; echo ''; echo ''; } echo '
' . __('Creation:') . ''; echo PMA_Util::localisedDate(strtotime($sts_data['Create_time'])); echo '
' . __('Last update:') . ''; echo PMA_Util::localisedDate(strtotime($sts_data['Update_time'])); echo '
' . __('Last check:') . ''; echo PMA_Util::localisedDate(strtotime($sts_data['Check_time'])); echo '
'; } echo '
'; printf( _ngettext('%s table', '%s tables', $num_tables), PMA_Util::formatNumber($num_tables, 0) ); echo ''; echo PMA_Util::formatNumber($sum_entries, 0); echo ''; echo '--'; echo ''; echo $sum_formated . ' ' . $unit; echo '
'; } /** * Displays the footer */ echo PMA_Util::getButton(); echo "
\n"; ?>