</tr>

<!-- End table headers -->

<?php 
$count = 0;
/**
* Sends the query and buffers the result
*/
$res = @mysql_query('SHOW TABLE STATUS FROM `' . $mysql_db . '`') or die(mysql_error());
while ($row = mysql_fetch_array($res)) {
    list($formatted_Avg, $formatted_Abytes) = formatByteDown($row['Avg_row_length']);
    list($formatted_Dlength, $formatted_Dbytes) = formatByteDown($row['Data_length']);
    list($formatted_Ilength, $formatted_Ibytes) = formatByteDown($row['Index_length']);
    list($formatted_Dfree, $formatted_Fbytes) = formatByteDown($row['Data_free']);
    $tablesize = $row['Data_length'] + $row['Index_length'];
    list($formatted_Tsize, $formatted_Tbytes) = formatByteDown($tablesize, 3, $tablesize > 0 ? 1 : 0);
    $thispage = "?Do=T&table=" . $row['Name'];
    $overhead = $formatted_Dfree > 0 ? "<a href=mysql_overview.php" . $thispage . "><font color='red'><b>" . $formatted_Dfree . " " . $formatted_Fbytes . "</b></font></a>" : $formatted_Dfree . " " . $formatted_Fbytes;
    echo "<tr align=\"right\"><td align=\"left\">{$row['Name']}</td>" . "<td>{$formatted_Tsize} {$formatted_Tbytes}</td>" . "<td>{$row['Rows']}</td>" . "<td>{$formatted_Avg} {$formatted_Abytes}</td>" . "<td>{$formatted_Dlength} {$formatted_Dbytes}</td>" . "<td>{$formatted_Ilength} {$formatted_Ibytes}</td>" . "<td>{$overhead}</td></tr>" . "<tr><td colspan=\"7\" align=\"right\"><i><b>Row Format:</b></i> {$row['Row_format']}" . "<br /><i><b>Create Time:</b></i> {$row['Create_time']}" . "<br /><i><b>Update Time:</b></i> {$row['Update_time']}" . "<br /><i><b>Check Time:</b></i> {$row['Check_time']}</td></tr>";
    // do sums
    $count++;
}
//end while
echo "<tr><td><b>Tables: {$count}</b></td><td colspan=\"6\" align=\"right\">If it's <font color=\"red\"><b>RED</b></font> it probably needs optimising!!</td></tr>";
?>
<!-- End table -->
</table>

<?php 
stdfoot();
Beispiel #2
0
echo join(' ', formatByteDown($serverStatus['Bytes_sent']));
?>
&nbsp;</td>
<td bgcolor="#EFF3FF" align="right">&nbsp;<?php 
echo join(' ', formatByteDown($serverStatus['Bytes_sent'] * 3600 / $serverStatus['Uptime']));
?>
&nbsp;</td>
</tr>
<tr>
<td bgcolor="lightgrey">&nbsp;Total&nbsp;</td>
<td bgcolor="lightgrey" align="right">&nbsp;<?php 
echo join(' ', formatByteDown($serverStatus['Bytes_received'] + $serverStatus['Bytes_sent']));
?>
&nbsp;</td>
<td bgcolor="lightgrey" align="right">&nbsp;<?php 
echo join(' ', formatByteDown(($serverStatus['Bytes_received'] + $serverStatus['Bytes_sent']) * 3600 / $serverStatus['Uptime']));
?>
&nbsp;</td>
</tr>
</table>
</td>
<td valign="top">
<table id="torrenttable" border="0">
<tr>
<th colspan="2" bgcolor="lightgrey">&nbsp;Connections&nbsp;</th>
<th bgcolor="lightgrey">&nbsp;&oslash;&nbsp;Per Hour&nbsp;</th>
<th bgcolor="lightgrey">&nbsp;%&nbsp;</th>
</tr>
<tr>
<td bgcolor="#EFF3FF">&nbsp;Failed Attempts&nbsp;</td>
<td bgcolor="#EFF3FF" align="right">&nbsp;<?php