]> andersk Git - sql-web.git/blame - tpl/main.php
check quotas code
[sql-web.git] / tpl / main.php
CommitLineData
dc478ec8
JP
1<?php
2
3include 'head.php';
4
e47be57b
JP
5if (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
JP
29 echo '<tr><td width="100%">';
30 $usage += $db['nBytes'];
31 if ($total>0)
32 $percentage = $db['nBytes']/$total;
33 else $percentage = 0;
34 echo printBar($percentage, $db['Name'], sprintSize($db['nBytes']));
35 echo '</td><td>';
e47be57b 36 echo '<input type="submit" name="dropask[',$db['Name'],']" value="drop">';
88b7d384 37 echo '</td></tr>';
2ea5a69f 38 }
88b7d384
JP
39 if ($total>0)
40 $percentage = $usage/$total;
41 else
42 $percentage = 0;
43 echo printBar($percentage, '<b>TOTAL</b>', sprintSize($usage).' / '.sprintSize($total));
2ea5a69f 44?>
88b7d384
JP
45</form>
46</table>
2ea5a69f 47
377015e0
JP
48<form method="post">
49<p><span style="width: 150px;"><label for="p1">new database:</label></span> <input type="text" name="newdb">
50<input type=submit value="Add"></p>
51</form>
1389493c 52
dc478ec8
JP
53<?php
54
55include 'foot.php';
56
57?>
This page took 0.114601 seconds and 5 git commands to generate.