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