]> andersk Git - sql-web.git/blob - tpl/main.php
git-svn-id: svn://presbrey.mit.edu/sql/mitsql@48 a142d4bd-2cfb-0310-9673-cb33a7e74f58
[sql-web.git] / tpl / main.php
1 <?php
2
3 include 'head.php';
4
5 ?>
6 <h2>Databases</h2>
7
8 <?php printErrors($err); ?>
9 <?php printMsgs($msg); ?>
10
11 <? if (!DEVEL && 0) { ?>
12 <p>
13 Thanks 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>
18 <? } else { ?>
19
20 <table width="100%">
21 <form method="post">
22 <?php
23         $bytes = $User->getBytes();
24         $usage = $bytes['nBytes'];
25         $total = $bytes['nBytesHard'];
26         foreach($myDBs as $db) {
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>';
36         }
37         if ($total>0)
38                 $percentage = $usage/$total;
39         else
40                 $percentage = 0;
41         echo printBar($percentage, '<b>TOTAL</b>', sprintSize($usage).' / '.sprintSize($total));
42 ?>
43 </form>
44 </table>
45
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>
50
51 <? } ?>
52 <?php
53
54 include 'foot.php';
55
56 ?>
This page took 0.101948 seconds and 5 git commands to generate.