| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 |
require_once("../class/config.php"); |
|---|
| 33 |
|
|---|
| 34 |
if (!$admin->enabled) { |
|---|
| 35 |
__("This page is restricted to authorized staff"); |
|---|
| 36 |
exit(); |
|---|
| 37 |
} |
|---|
| 38 |
|
|---|
| 39 |
include("head.php"); |
|---|
| 40 |
?> |
|---|
| 41 |
</head> |
|---|
| 42 |
<body> |
|---|
| 43 |
<h3><?php __("Change the default quotas"); ?></h3> |
|---|
| 44 |
<?php |
|---|
| 45 |
if ($error) { |
|---|
| 46 |
echo "<p class=\"error\">$error</p>"; |
|---|
| 47 |
} |
|---|
| 48 |
|
|---|
| 49 |
?> |
|---|
| 50 |
<p><form method="post" action="adm_dodefquotas.php"> |
|---|
| 51 |
<input type="hidden" name="action" value="add"> |
|---|
| 52 |
<input type="text" name="type" class="int"></td> |
|---|
| 53 |
<input type="submit" class="inb" value="<?php __("Add account type"); ?>" /> |
|---|
| 54 |
</form></p> |
|---|
| 55 |
|
|---|
| 56 |
<p><form method="post" action="adm_dodefquotas.php"> |
|---|
| 57 |
<input type="hidden" name="action" value="delete"> |
|---|
| 58 |
<select name="type" id="type" class="inl"> |
|---|
| 59 |
<?php |
|---|
| 60 |
$db->query("SELECT distinct(type) FROM defquotas WHERE TYPE != 'default' ORDER by type"); |
|---|
| 61 |
while($db->next_record()) { |
|---|
| 62 |
$type = $db->f("type"); |
|---|
| 63 |
echo "<option value=\"$type\">$type</option>"; |
|---|
| 64 |
} |
|---|
| 65 |
?></select> |
|---|
| 66 |
<input type="submit" class="inb" value="<?php __("Delete account type"); ?>" /> |
|---|
| 67 |
</form></p> |
|---|
| 68 |
|
|---|
| 69 |
<p> |
|---|
| 70 |
<?php __("Here is the list of the quotas on the server for the new accounts. If you want to change them, enter new values"); ?> |
|---|
| 71 |
</p> |
|---|
| 72 |
|
|---|
| 73 |
<form method="post" action="adm_dodefquotas.php"> |
|---|
| 74 |
<input type="hidden" name="action" value="modify"> |
|---|
| 75 |
<?php |
|---|
| 76 |
$col=1; |
|---|
| 77 |
$qlist=$quota->getdefaults(); |
|---|
| 78 |
$aqlist = $quota->qlist(); |
|---|
| 79 |
reset($qlist); |
|---|
| 80 |
foreach($qlist as $qname => $q) |
|---|
| 81 |
{ |
|---|
| 82 |
|
|---|
| 83 |
?> |
|---|
| 84 |
<h4><?php echo _("Accounts of type"). " \"" . $qname . "\"" ?></h4> |
|---|
| 85 |
<table border="0" cellpadding="4" cellspacing="0"> |
|---|
| 86 |
<tr><th><?php __("Quotas") ?></th><th><?php __("Default Value"); ?></th></tr> |
|---|
| 87 |
<?php |
|---|
| 88 |
|
|---|
| 89 |
foreach($aqlist as $aqtype => $aqname) |
|---|
| 90 |
{ |
|---|
| 91 |
$key = $qname . ":" . $aqtype; |
|---|
| 92 |
$col=3-$col; |
|---|
| 93 |
|
|---|
| 94 |
?> |
|---|
| 95 |
<tr class="lst<?php echo $col; ?>"> |
|---|
| 96 |
<td><label for="<?php echo $key; ?>"><?php echo $aqname; ?></label></td> |
|---|
| 97 |
<td><input type="text" class="int" size="16" maxlength="16" name="<?php echo $key; ?>" id="<?php echo $key; ?>" value="<?php echo $q[$aqtype]; ?>" /></td></tr> |
|---|
| 98 |
<?php |
|---|
| 99 |
|
|---|
| 100 |
} |
|---|
| 101 |
|
|---|
| 102 |
?> |
|---|
| 103 |
</table> |
|---|
| 104 |
<?php |
|---|
| 105 |
|
|---|
| 106 |
} |
|---|
| 107 |
|
|---|
| 108 |
?> |
|---|
| 109 |
<input type="submit" class="inb" value="<?php __("Edit the default quotas"); ?>" /> |
|---|
| 110 |
</form> |
|---|
| 111 |
|
|---|
| 112 |
</body> |
|---|
| 113 |
</html> |
|---|
| 114 |
|
|---|