added the $cfgShowStats setting

This commit is contained in:
Loïc Chapeaux
2001-09-20 08:04:03 +00:00
parent 6026f15e75
commit 8a4bb53fc4
5 changed files with 254 additions and 204 deletions

View File

@@ -89,7 +89,12 @@ else if (MYSQL_INT_VERSION >= 32300) {
<th>&nbsp;<?php echo ucfirst($strTable); ?>&nbsp;</th>
<th><?php echo ucfirst($strRecords); ?></th>
<th><?php echo ucfirst($strType); ?></th>
<th><?php echo ucfirst($strSize); ?></th>
<?php
if ($cfgShowStats) {
echo '<th>' . ucfirst($strSize) . '</th>';
}
echo "\n";
?>
</tr>
<?php
$i = $sum_entries = $sum_size = 0;
@@ -116,7 +121,7 @@ else if (MYSQL_INT_VERSION >= 32300) {
if (isset($sts_data['Rows'])) {
if ($mergetable == FALSE) {
if ($nonisam == FALSE) {
if ($cfgShowStats && $nonisam == FALSE) {
$tblsize = $sts_data['Data_length'] + $sts_data['Index_length'];
$sum_size += $tblsize;
if ($tblsize > 0) {
@@ -124,20 +129,18 @@ else if (MYSQL_INT_VERSION >= 32300) {
} else {
list($formated_size, $unit) = format_byte_down($tblsize, 3, 0);
}
} else {
} else if ($cfgShowStats) {
$formated_size = '&nbsp;-&nbsp;';
$unit = '';
}
if (isset($sts_data['Rows'])) {
$sum_entries += $sts_data['Rows'];
}
$sum_entries += $sts_data['Rows'];
}
// MyISAM MERGE Table
else if ($mergetable == TRUE) {
else if ($cfgShowStats && $mergetable == TRUE) {
$formated_size = '&nbsp;-&nbsp;';
$unit = '';
}
else {
else if ($cfgShowStats) {
$formated_size = 'unknown';
$unit = '';
}
@@ -155,10 +158,16 @@ else if (MYSQL_INT_VERSION >= 32300) {
<td nowrap="nowrap">
&nbsp;<?php echo (isset($sts_data['Type']) ? $sts_data['Type'] : '&nbsp;'); ?>&nbsp;
</td>
<?php
if ($cfgShowStats) {
echo "\n";
?>
<td align="right" nowrap="nowrap">
&nbsp;<?php echo $formated_size . ' ' . $unit . "\n"; ?>
</td>
<?php
<?php
echo "\n";
} // end if
} else {
?>
<td colspan="3" align="center">
@@ -172,7 +181,9 @@ else if (MYSQL_INT_VERSION >= 32300) {
<?php
}
// Show Summary
list($sum_formated,$unit) = format_byte_down($sum_size,3,1);
if ($cfgShowStats) {
list($sum_formated, $unit) = format_byte_down($sum_size, 3, 1);
}
echo "\n";
?>
<tr>
@@ -185,9 +196,17 @@ else if (MYSQL_INT_VERSION >= 32300) {
<th align="center">
<b>--</b>
</td>
<?php
if ($cfgShowStats) {
echo "\n";
?>
<th align="right" nowrap="nowrap">
<b><?php echo $sum_formated . ' '. $unit; ?></b>
</th>
<?php
}
echo "\n";
?>
</tr>
</table>
<?php