]>
Commit | Line | Data |
---|---|---|
dc478ec8 JP |
1 | <?php |
2 | ||
3 | include 'head.php'; | |
4 | ||
e47be57b JP |
5 | if (isset($i_dropask)) { |
6 | $dropdbs = array_keys($i_dropask); | |
7 | echo '<form method="post">'; | |
8 | foreach($dropdbs as $dbname) { | |
9 | $msg[] = 'Are you sure you want to drop `'.$dbname.'`? <input style="position:absolute; right:20px;" type="submit" name="drop['.$dbname.']" value="Yes">'; | |
10 | } | |
11 | echo '</form>'; | |
12 | } | |
13 | ||
dc478ec8 JP |
14 | ?> |
15 | <h2>Databases</h2> | |
1389493c | 16 | |
e47be57b | 17 | <form method="post"> |
377015e0 | 18 | <?php printErrors($err); ?> |
88b7d384 | 19 | <?php printMsgs($msg); ?> |
e47be57b | 20 | </form> |
377015e0 | 21 | |
88b7d384 | 22 | <table width="100%"> |
1426e302 | 23 | <form method="post"> |
2ea5a69f | 24 | <?php |
88b7d384 JP |
25 | $bytes = $User->getBytes(); |
26 | $usage = $bytes['nBytes']; | |
27 | $total = $bytes['nBytesHard']; | |
2ea5a69f | 28 | foreach($myDBs as $db) { |
88b7d384 | 29 | echo '<tr><td width="100%">'; |
88b7d384 JP |
30 | if ($total>0) |
31 | $percentage = $db['nBytes']/$total; | |
32 | else $percentage = 0; | |
9c70b481 | 33 | echo printBar($percentage, $db['Name'], str_replace(' ', ' ', sprintSize($db['nBytes']))); |
88b7d384 | 34 | echo '</td><td>'; |
e47be57b | 35 | echo '<input type="submit" name="dropask[',$db['Name'],']" value="drop">'; |
88b7d384 | 36 | echo '</td></tr>'; |
2ea5a69f | 37 | } |
9c70b481 | 38 | if ($total>0) { |
88b7d384 | 39 | $percentage = $usage/$total; |
9c70b481 | 40 | } else { |
88b7d384 | 41 | $percentage = 0; |
9c70b481 JP |
42 | } |
43 | echo '<tr><td colspan=2>'; | |
44 | echo '<hr />'; | |
45 | echo '</td></tr>'; | |
46 | echo '<tr><td colspan=2>'; | |
47 | echo printBar($percentage, '<b>TOTAL USED</b>', str_replace(' ', ' ', sprintSize($usage).' of '.sprintSize($total))); | |
48 | echo '</td></tr>'; | |
2ea5a69f | 49 | ?> |
88b7d384 JP |
50 | </form> |
51 | </table> | |
2ea5a69f | 52 | |
377015e0 JP |
53 | <form method="post"> |
54 | <p><span style="width: 150px;"><label for="p1">new database:</label></span> <input type="text" name="newdb"> | |
55 | <input type=submit value="Add"></p> | |
56 | </form> | |
1389493c | 57 | |
dc478ec8 JP |
58 | <?php |
59 | ||
60 | include 'foot.php'; | |
61 | ||
62 | ?> |