$total = $bytes['nBytesHard'];
foreach($myDBs as $db) {
echo '<tr><td width="100%">';
- $usage += $db['nBytes'];
if ($total>0)
$percentage = $db['nBytes']/$total;
else $percentage = 0;
- echo printBar($percentage, $db['Name'], sprintSize($db['nBytes']));
+ echo printBar($percentage, $db['Name'], str_replace(' ', ' ', sprintSize($db['nBytes'])));
echo '</td><td>';
echo '<input type="submit" name="dropask[',$db['Name'],']" value="drop">';
echo '</td></tr>';
}
- if ($total>0)
+ if ($total>0) {
$percentage = $usage/$total;
- else
+ } else {
$percentage = 0;
- echo printBar($percentage, '<b>TOTAL</b>', sprintSize($usage).' / '.sprintSize($total));
+ }
+ echo '<tr><td colspan=2>';
+ echo '<hr />';
+ echo '</td></tr>';
+ echo '<tr><td colspan=2>';
+ echo printBar($percentage, '<b>TOTAL USED</b>', str_replace(' ', ' ', sprintSize($usage).' of '.sprintSize($total)));
+ echo '</td></tr>';
?>
</form>
</table>