32 require_once(
"../class/config.php");
34 if (!$admin->enabled) {
35 __(
"This page is restricted to authorized staff");
39 "action" => array (
"post",
"string",
""),
40 "type" => array (
"post",
"string",
""),
41 "del_confirm" => array (
"post",
"string",
""),
45 if($action ==
"add") {
47 if($quota->addtype($type)) {
48 $error=_(
"Account type").
" \"".htmlentities($type).
"\" "._(
"added");
50 $error=_(
"Account type").
" \"".htmlentities($type).
"\" "._(
"could not be added");
52 include(
"adm_defquotas.php");
53 }
else if($action ==
"delete") {
54 if($del_confirm ==
"y"){
56 if($quota->deltype($type)) {
57 $error=_(
"Account type").
" \"".htmlentities($type).
"\" "._(
"deleted");
59 $error=_(
"Account type").
" \"".htmlentities($type).
"\" "._(
"could not be deleted");
62 include(
"adm_defquotas.php");
66 <h3><?php printf(_(
"Deleting quota %s"),$type); ?> : </h3>
68 <form action=
"adm_dodefquotas.php" method=
"post">
69 <input type=
"hidden" name=
"action" value=
"delete" />
70 <input type=
"hidden" name=
"type" value=
"<?php echo $type ?>" />
71 <input type=
"hidden" name=
"del_confirm" value=
"y" />
72 <p
class=
"alert alert-warning"><?php
__(
"WARNING: Confirm the deletion of the quota"); ?></p>
73 <p><?php echo $type; ?></p>
75 <input type=
"submit" class=
"inb ok" name=
"confirm" value=
"<?php __("Yes,
delete this default quota
"); ?>" />
76 <input type=
"button" class=
"inb cancel" name=
"cancel" value=
"<?php __("No, don
't delete this default quota"); ?>" onclick="document.location='adm_defquotas.php
';" />
82 } else if($action == "modify") {
85 foreach($_POST as $key => $val) {
89 list($type, $q) = explode(":", $key, 2);
90 $c[$type][$q] = abs(floatval($val));
93 if($quota->setdefaults($c)) {
94 $error=_("Default quotas successfully changed");
96 $error=_("Default quotas could not be set.");
98 include("adm_panel.php");