]> andersk Git - sql-web.git/blame - tpl/main.php
BASE_PATH calc'd and added to include_path
[sql-web.git] / tpl / main.php
CommitLineData
dc478ec8
JP
1<?php
2
3include 'head.php';
4
5?>
6<h2>Databases</h2>
1389493c 7
377015e0 8<?php printErrors($err); ?>
88b7d384 9<?php printMsgs($msg); ?>
377015e0 10
201253ba 11<? if (!DEVEL && 0) { ?>
1389493c
JP
12<p>
13Thanks for signing up. This interface is nearly ready. We will e-mail you as soon as this portion of the site is ready.
14<br />
15<br />
16- The MIT SQL Team
17</p>
377015e0
JP
18<? } else { ?>
19
88b7d384 20<table width="100%">
1426e302 21<form method="post">
2ea5a69f 22<?php
88b7d384
JP
23 $bytes = $User->getBytes();
24 $usage = $bytes['nBytes'];
25 $total = $bytes['nBytesHard'];
2ea5a69f 26 foreach($myDBs as $db) {
88b7d384
JP
27 echo '<tr><td width="100%">';
28 $usage += $db['nBytes'];
29 if ($total>0)
30 $percentage = $db['nBytes']/$total;
31 else $percentage = 0;
32 echo printBar($percentage, $db['Name'], sprintSize($db['nBytes']));
33 echo '</td><td>';
34 echo '<input type="submit" name="drop[',$db['Name'],']" value="drop">';
35 echo '</td></tr>';
2ea5a69f 36 }
88b7d384
JP
37 if ($total>0)
38 $percentage = $usage/$total;
39 else
40 $percentage = 0;
41 echo printBar($percentage, '<b>TOTAL</b>', sprintSize($usage).' / '.sprintSize($total));
2ea5a69f 42?>
88b7d384
JP
43</form>
44</table>
2ea5a69f 45
377015e0
JP
46<form method="post">
47<p><span style="width: 150px;"><label for="p1">new database:</label></span> <input type="text" name="newdb">
48<input type=submit value="Add"></p>
49</form>
1389493c 50
377015e0 51<? } ?>
dc478ec8
JP
52<?php
53
54include 'foot.php';
55
56?>
This page took 0.191393 seconds and 5 git commands to generate.