= 40101) { $db_collation = PMA_getDbCollation($db); } // Display function function pma_TableHeader($alternate = FALSE) { echo ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n"; if (!$alternate) { if (!($GLOBALS['cfg']['PropertiesNumColumns'] > 1)) { echo ' ' . "\n"; if (PMA_MYSQL_INT_VERSION >= 40100) { echo ' ' . "\n"; } } if ($GLOBALS['cfg']['ShowStats']) { echo ' ' . "\n" . ' ' . "\n"; } echo "\n"; } echo ' ' . "\n"; } /** * Settings for relations stuff */ require_once('./libraries/relation.lib.php'); $cfgRelation = PMA_getRelationsParam(); /** * Check if comments were updated */ if ($cfgRelation['commwork'] && isset($db_comment) && $db_comment == 'true') { PMA_SetComment($db, '', '(db_comment)', $comment); } /** * Displays the tables list */ ?> '; } else { $iconic_spacer = ''; } $titles['Browse'] = $iconic_spacer . '' . $strBrowse . ''; $titles['Search'] = $iconic_spacer . '' . $strSearch . ''; $titles['NoBrowse'] = $iconic_spacer . '' . $strBrowse . ''; $titles['NoSearch'] = $iconic_spacer . '' . $strSearch . ''; $titles['Insert'] = $iconic_spacer . '' . $strInsert . ''; $titles['Properties'] = $iconic_spacer . '' . $strProperties . ''; $titles['Drop'] = $iconic_spacer . '' . $strDrop . ''; $titles['Empty'] = $iconic_spacer . '' . $strEmpty . ''; $titles['NoEmpty'] = $iconic_spacer . '' . $strEmpty . ''; if ($propicon == 'both') { $titles['Browse'] .= ' ' . $strBrowse . ''; $titles['Search'] .= ' ' . $strSearch . ''; $titles['NoBrowse'] .= ' ' . $strBrowse . ''; $titles['NoSearch'] .= ' ' . $strSearch . ''; $titles['Insert'] .= ' ' . $strInsert . ''; $titles['Properties'] .= ' ' . $strProperties . ''; $titles['Drop'] .= ' ' . $strDrop . ''; $titles['Empty'] .= ' ' . $strEmpty . ''; $titles['NoEmpty'] .= ' ' . $strEmpty . ''; } } else { $titles['Browse'] = $strBrowse; $titles['Search'] = $strSearch; $titles['NoBrowse'] = $strBrowse; $titles['NoSearch'] = $strSearch; $titles['Insert'] = $strInsert; $titles['Properties'] = $strProperties; $titles['Drop'] = $strDrop; $titles['Empty'] = $strEmpty; $titles['NoEmpty'] = $strEmpty; } // 1. No tables if ($num_tables == 0) { echo $strNoTablesFound . "\n"; } // 2. Shows table informations - staybyte - 11 June 2001 else { // Get additional information about tables for tooltip is done in db_details_db_info.php only once if ($cfgRelation['commwork']) { $comment = PMA_getComments($db); /** * Displays table comment */ if (is_array($comment)) { ?>

1) { ?>
' . "\n" . '  ' . $GLOBALS['strTable'] . ' ' . "\n" . ' ' . "\n" . '  ' . $GLOBALS['strAction'] . ' ' . "\n" . ' ' . "\n" . '  ' . $GLOBALS['strRecords'] . ' ' . "\n" . ' ' . "\n" . '  ' . $GLOBALS['strType'] . ' ' . "\n" . ' ' . "\n" . '  ' . $GLOBALS['strCollation'] . ' ' . "\n" . ' ' . "\n" . '  ' . $GLOBALS['strSize'] . ' ' . "\n" . ' ' . "\n" . '  ' . $GLOBALS['strOverhead'] . ' ' . "\n" . '
1 ? (ceil($num_tables / $cfg['PropertiesNumColumns']) + 1) : 0); $row_count = 0; if ($cfg['NaturalOrder']) { $tables_temp = $tables; foreach (array_keys($tables_temp) as $each) { $tables_sort[$each] = $tables_temp[$each]['Name']; } natsort($tables_sort); $sort_i = 0; foreach (array_keys($tables_sort) as $each) { $tables_temp[$sort_i] = $tables[$each]; $sort_i++; } $tables = $tables_temp; } foreach ($tables AS $keyname => $sts_data) { $table = $sts_data['Name']; $table_encoded = urlencode($table); $table_name = htmlspecialchars($table); $alias = (!empty($tooltip_aliasname) && isset($tooltip_aliasname[$table])) ? htmlspecialchars($tooltip_aliasname[$table]) : htmlspecialchars($sts_data['Name']); $truename = (!empty($tooltip_truename) && isset($tooltip_truename[$table])) ? htmlspecialchars($tooltip_truename[$table]) : htmlspecialchars($sts_data['Name']); // Sets parameters for links $tbl_url_query = $url_query . '&table=' . $table_encoded; $bgcolor = ($i++ % 2) ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; echo "\n"; if ($GLOBALS['cfg']['BrowsePointerEnable'] == TRUE) { $on_mouse = ' onmouseover="setPointer(this, ' . $i . ', \'over\', \'' . $bgcolor . '\', \'' . $GLOBALS['cfg']['BrowsePointerColor'] . '\', \'' . $GLOBALS['cfg']['BrowseMarkerColor'] . '\');"' . ' onmouseout="setPointer(this, ' . $i . ', \'out\', \'' . $bgcolor . '\', \'' . $GLOBALS['cfg']['BrowsePointerColor'] . '\', \'' . $GLOBALS['cfg']['BrowseMarkerColor'] . '\');"'; } else { $on_mouse = ''; } if ($GLOBALS['cfg']['BrowseMarkerEnable'] == TRUE) { $on_mouse .= ' onmousedown="setPointer(this, ' . $i . ', \'click\', \'' . $bgcolor . '\', \'' . $GLOBALS['cfg']['BrowsePointerColor'] . '\', \'' . $GLOBALS['cfg']['BrowseMarkerColor'] . '\');"'; } $click_mouse = ' onmousedown="document.getElementById(\'checkbox_tbl_' . $i . '\').checked = (document.getElementById(\'checkbox_tbl_' . $i . '\').checked ? false : true);" '; $row_count++; if ($num_columns > 0 && $num_tables > $num_columns && (($row_count % ($num_columns)) == 0)) { $bgcolor = $cfg['BgcolorTwo']; $row_count = 1; ?>
> /> >     ' . $titles['Browse'] . ''; } else { echo $titles['NoBrowse']; } ?> ' . $titles['Search'] . ''; } else { echo $titles['NoSearch']; } ?> = 40000) { echo urlencode('TRUNCATE ' . PMA_backquote($table)) . '&zero_rows=' . urlencode(sprintf($strTableHasBeenEmptied, htmlspecialchars($table))) . '" onclick="return confirmLink(this, \'TRUNCATE '; } else { echo urlencode('DELETE FROM ' . PMA_backquote($table)) . '&zero_rows=' . urlencode(sprintf($strTableHasBeenEmptied, htmlspecialchars($table))) . '" onclick="return confirmLink(this, \'DELETE FROM '; } echo PMA_jsFormat($table) . '\')">' . $titles['Empty'] . ''; } else { echo $titles['NoEmpty']; } ?> 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 (isset($sts_data['Type']) && preg_match('@^(MyISAM|ISAM|HEAP)$@', $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 = number_format($sts_data['Rows'], 0, $number_decimal_separator, $number_thousands_separator); } // InnoDB table: Row count is not accurate but data and index // sizes are. else if (isset($sts_data['Type']) && $sts_data['Type'] == 'InnoDB') { 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($table); $table_info_result = PMA_DBI_query($local_query); list($row_count) = PMA_DBI_fetch_row($table_info_result); PMA_DBI_free_result($table_info_result); unset($table_info_result); $sum_entries += $row_count; } else { $row_count = $sts_data['Rows']; $sum_entries += $sts_data['Rows']; } $display_rows = number_format($row_count, 0, $number_decimal_separator, $number_thousands_separator); } // Merge or BerkleyDB table: Only row count is accurate. else if (isset($sts_data['Type']) && preg_match('@^(MRG_MyISAM|BerkeleyDB)$@', $sts_data['Type'])) { if ($cfg['ShowStats']) { $formated_size = ' - '; $unit = ''; } $sum_entries += $sts_data['Rows']; $display_rows = number_format($sts_data['Rows'], 0, $number_decimal_separator, $number_thousands_separator); } // Unknown table type. else { if ($cfg['ShowStats']) { $formated_size = 'unknown'; $unit = ''; } $display_rows = 'unknown'; } ?> > 1)) { echo ' ' . "\n" . '  ' . (isset($sts_data['Type']) ? $sts_data['Type'] : ' ') . ' ' . "\n" . ' ' . "\n"; if (PMA_MYSQL_INT_VERSION >= 40100) { echo ' ' . "\n" . '  ' . (isset($sts_data['Collation']) ? '' . $sts_data['Collation'] . '' : '---') . ' ' . "\n" . ' ' . "\n"; } } if ($cfg['ShowStats']) { echo "\n"; ?> >    >    ' . $formated_overhead . ' ' . $overhead_unit . '' . "\n"; unset($formated_overhead); $overhead_check .= "document.getElementById('checkbox_tbl_$i').checked = true;"; } else { echo " - \n"; } ?> >    1)) { echo ' ' . "\n" . ' --' . "\n" . ' ' . "\n"; if (PMA_MYSQL_INT_VERSION >= 40100) { echo ' ' . "\n" . '  ' . $db_collation . ' ' . "\n" . ' ' . "\n"; } } if ($cfg['ShowStats']) { echo "\n"; ?>     1)) { $basecolspan++; if (PMA_MYSQL_INT_VERSION >= 40100) { $basecolspan++; } } if ($cfg['ShowStats']) { $basecolspan += 2; } ?> <?php echo $strWithChecked; ?>  /   /      1) { ?>
0) { ?>
'; if ($cfg['PropertiesIconic']) { echo ''; } echo $strPrintView . ''; ?>       '; if($cfg['PropertiesIconic']){ echo ''; } echo $strDataDict . ''; ?>
'; echo ' '; echo ' '; echo ' '; echo ' '; echo ' = 40101) { // MySQL supports setting default charsets / collations for databases since // version 4.1.1. echo ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n\n"; } if ($num_tables > 0 && !$cfgRelation['allworks'] && $cfg['PmaNoRelation_DisableWarning'] == FALSE) { echo '' . '' . ''; } // end if ?>
'; } // if you want navigation: $strDBLink = '' . htmlspecialchars($GLOBALS['db']) . ''; // else use // $strDBLink = htmlspecialchars($db); echo ' ' . sprintf($strCreateNewTable, $strDBLink) . ': ' . "\n"; echo '
'; echo ' ' . $strName . ': ' . "\n"; echo ' '; echo ' ' . ''; echo '  
'; echo ' ' . $strFields . ': ' . "\n"; echo ' '; echo ' ' . '' . "\n"; echo ' '; echo ' ' . ' ' . "\n"; ?>
'; } echo $strDBComment; ?>
'; } echo $strDBRename.': '; ?>
' . PMA_generate_common_hidden_inputs($db); ?>
'; if ($cfg['PropertiesIconic']) { echo ''; } echo ' : ' . "\n" . '
' . PMA_generate_common_hidden_inputs($db, $table, 3) . PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'db_collation', 'select_db_collation', $db_collation, FALSE, 3) . ' ' . ' ' . "\n" . '
' . $strError . '
' . sprintf(wordwrap($strRelationNotWorking,65,'
'), '', '') . '
0) { $takeaway = $url_query . '&table=' . urlencode($table); } if (($cfgRelation['pdfwork'] && $num_tables > 0) || ($num_tables > 0 && $cfgRelation['relwork'] && $cfgRelation['commwork'] && isset($cfg['docSQLDir']) && !empty($cfg['docSQLDir']) ) ) { ?>
0) { ?> 0) { echo "\n"; ?> 0 && $cfgRelation['relwork'] && $cfgRelation['commwork'] && isset($cfg['docSQLDir']) && !empty($cfg['docSQLDir']) ) { ?> 0) || ($num_tables > 0 && $cfgRelation['relwork'] && $cfgRelation['commwork'] && isset($cfg['docSQLDir']) && !empty($cfg['docSQLDir']) ) ) { ?>
'; } ?>PDF
'; if ($cfg['PropertiesIconic']) { echo ''; } echo ''. $strEditPDFPages . ''; ?>
'; } echo $strDisplayPDF; ?>: 
   
 
 
 
 
 
 
 
    
'; if ($cfg['PropertiesIconic']) { echo ''; } echo $strImportDocSQL . ''; ?>