diff --git a/bureau/admin/adm_defquotas.php b/bureau/admin/adm_defquotas.php
index f8c4970b..f96223a0 100644
--- a/bureau/admin/adm_defquotas.php
+++ b/bureau/admin/adm_defquotas.php
@@ -66,9 +66,8 @@ include_once ("head.php");
diff --git a/bureau/admin/adm_dodefquotas.php b/bureau/admin/adm_dodefquotas.php
index e5588697..1ac27857 100644
--- a/bureau/admin/adm_dodefquotas.php
+++ b/bureau/admin/adm_dodefquotas.php
@@ -35,23 +35,28 @@ if (!$admin->enabled) {
__("This page is restricted to authorized staff");
exit();
}
+$fields = array (
+ "action" => array ("post", "string", ""),
+ "type" => array ("post", "string", ""),
+ "del_confirm" => array ("post", "string", ""),
+);
+getFields($fields);
-if($_POST["action"] == "add") {
- $type = $_POST['type'];
+if($action == "add") {
if($quota->addtype($type)) {
- $error=_("Account type"). " \"$type\" "._("added");
+ $error=_("Account type"). " \"".htmlentities($type)."\" "._("added");
} else {
- $error=_("Account type"). " \"$type\" "._("could not be added");
+ $error=_("Account type"). " \"".htmlentities($type)."\" "._("could not be added");
}
include("adm_defquotas.php");
-} else if($_POST["action"] == "delete") {
- if(@$_POST["del_confirm"] == "y"){
- if($_POST['type']) {
- if($quota->deltype($_POST['type'])) {
- $error=_("Account type"). " \"$type\" "._("deleted");
+} else if($action == "delete") {
+ if($del_confirm == "y"){
+ if(!empty($type)) {
+ if($quota->deltype($type)) {
+ $error=_("Account type"). " \"".htmlentities($type)."\" "._("deleted");
} else {
- $error=_("Account type"). " \"$type\" "._("could not be deleted");
+ $error=_("Account type"). " \"".htmlentities($type)."\" "._("could not be deleted");
}
}
include("adm_defquotas.php");
@@ -60,11 +65,11 @@ if($_POST["action"] == "add") {
?>
- :
+ :
|