back to the welcome page if (!empty($db)) { $is_db = @mysql_select_db($db); } if (empty($db) || !$is_db) { header('Location: ' . $cfg['PmaAbsoluteUri'] . 'main.php3?lang=' . $lang . '&server=' . $server . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1'); exit(); } } // end if (ensures db exists) // Displays headers if (!isset($message)) { $js_to_run = 'functions.js'; include('./header.inc.php3'); // Reloads the navigation frame via JavaScript if required if (isset($reload) && $reload) { echo "\n"; ?> = 32303) { // Special speedup for newer MySQL Versions (in 4.0 format changed) if ($cfg['SkipLockedTables'] == TRUE && PMA_MYSQL_INT_VERSION >= 32330) { $local_query = 'SHOW OPEN TABLES FROM ' . PMA_backquote($db); $result = mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0); // Blending out tables in use if ($result != FALSE && mysql_num_rows($result) > 0) { while ($tmp = mysql_fetch_row($result)) { // if in use memorize tablename if (eregi('in_use=[1-9]+', $tmp[1])) { $sot_cache[$tmp[0]] = TRUE; } } mysql_free_result($result); if (isset($sot_cache)) { $local_query = 'SHOW TABLES FROM ' . PMA_backquote($db); $result = mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0); if ($result != FALSE && mysql_num_rows($result) > 0) { while ($tmp = mysql_fetch_row($result)) { if (!isset($sot_cache[$tmp[0]])) { $local_query = 'SHOW TABLE STATUS FROM ' . PMA_backquote($db) . ' LIKE \'' . addslashes($tmp[0]) . '\''; $sts_result = mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0); $sts_tmp = mysql_fetch_array($sts_result); $tables[] = $sts_tmp; } else { // table in use $tables[] = array('Name' => $tmp[0]); } } mysql_free_result($result); $sot_ready = TRUE; } } } } if (!isset($sot_ready)) { $local_query = 'SHOW TABLE STATUS FROM ' . PMA_backquote($db); $result = mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0); if ($result != FALSE && mysql_num_rows($result) > 0) { while ($sts_tmp = mysql_fetch_array($result)) { $tables[] = $sts_tmp; } mysql_free_result($result); } } $num_tables = (isset($tables) ? count($tables) : 0); } // end if (PMA_MYSQL_INT_VERSION >= 32303) else { $result = mysql_list_tables($db); $num_tables = @mysql_numrows($result); for ($i = 0; $i < $num_tables; $i++) { $tables[] = mysql_tablename($result, $i); } mysql_free_result($result); } /** * Displays an html table with all the tables contained into the current * database */ ?> = 3.23.03 - staybyte - 11 June 2001 else if (PMA_MYSQL_INT_VERSION >= 32303) { ?>
' . ucfirst($strSize) . ''; } echo "\n"; ?> 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']) && ereg('^(MyISAM|ISAM|HEAP)$', $sts_data['Type'])) { 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); } $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 = ' - '; } // Merge or BerkleyDB table: Only row count is accurate. else if (isset($sts_data['Type']) && ereg('^(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'; } ?>
  
/>     ' . $strBrowse . ''; } else { echo $strBrowse; } ?> ' . $strSelect . ''; } else { echo $strSelect; } ?> = 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) . '\')">' . $strEmpty . ''; } else { echo $strEmpty; } ?>      
   --  
<?php echo $strWithChecked; ?>  /     
= 3.23.03 // 3. Shows tables list mysql < 3.23.03 else { $i = 0; echo "\n"; ?>
  
/>   
<?php echo $strWithChecked; ?>  /