5 if (isset($i_dropask)) {
6 $dropdbs = array_keys($i_dropask);
7 echo '<form method="post" action="', $URI,'">';
8 foreach($dropdbs as $dbname) {
9 $msg1[] = 'Are you sure you want to drop `'.htmlentities($dbname).'`? <input style="position:absolute; right:20px;" type="submit" name="drop['.htmlentities($dbname).']" value="Yes">';
17 <form method="post" action="<?=$URI?>">
18 <input type='hidden' name='csrf_token' value='<?php echo $_SESSION['csrf_token']; ?>'>
19 <?php printErrors($err1); ?>
20 <?php printMsgs($msg1); ?>
24 <form method="post" action="<?=$URI?>">
25 <input type="hidden" name="csrf_token" value="<?php echo $_SESSION['csrf_token']; ?>">
27 $bytes = $User->getBytes();
28 $usage = $bytes['nBytes'];
29 $total = $bytes['nBytesHard'];
31 echo '<tr><td width="100%"><em>You have no databases. Add one below.</em></td></tr>';
33 foreach($myDBs as $db) {
34 echo '<tr><td width="100%">';
36 $percentage = $db['nBytes']/$total;
38 echo printBar($percentage, htmlentities($db['Name']), str_replace(' ', ' ', sprintSize($db['nBytes'])));
40 echo '<input type="submit" name="dropask[',htmlentities($db['Name']),']" value="drop">';
44 $percentage = $usage/$total;
48 echo '<tr><td colspan=2>';
51 echo '<tr><td colspan=2>';
52 echo printBar($percentage, '<b>TOTAL USED</b>', str_replace(' ', ' ', sprintSize($usage).' of '.sprintSize($total)));
58 <form method="post" action="<?=$URI?>">
59 <p align="right"><span style="width: 150px; font-style: italic;"><label for="p1">new database:</label></span> <?=$Login->getUsername()?>+<input type="text" name="newdb">
60 <input type="hidden" name="csrf_token" value="<?php echo $_SESSION['csrf_token']; ?>">
61 <input type=submit value="add"></p>
65 <p>One interface we recommend for managing SQL data is <a href="https://scripts.mit.edu/~sql/phpMyAdmin/" target="_blank">phpMyAdmin</a>. Feel free to use it after you've created your databases.</p>