]> andersk Git - sql-web.git/blobdiff - tpl/main.php
check quotas function
[sql-web.git] / tpl / main.php
index be194997022dd7993053c9e584a821c9eb436138..2c019d42f581b7dc491a35dccc8c321f6a9dbd7a 100644 (file)
@@ -27,20 +27,25 @@ if (isset($i_dropask)) {
        $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(' ', '&nbsp;', 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&nbsp;USED</b>', str_replace(' ', '&nbsp;', sprintSize($usage).' of '.sprintSize($total)));
+       echo '</td></tr>';
 ?>
 </form>
 </table>
This page took 0.039756 seconds and 4 git commands to generate.