Register globals

This commit is contained in:
Alan Garcia 2012-08-20 14:27:49 +00:00
parent b65ae184ab
commit 4d6749920b
3 changed files with 30 additions and 14 deletions

View File

@ -35,6 +35,20 @@ if (!$admin->enabled) {
__("This page is restricted to authorized staff");
exit;
}
$fields = array (
"login" => array ("post", "string", ""),
"pass" => array ("post", "string", ""),
"passconf" => array ("post", "string", ""),
"canpass" => array ("post", "integer", ""),
"notes" => array ("post", "string", ""),
"nom" => array ("post", "string", ""),
"prenom" => array ("post", "string", ""),
"nmail" => array ("post", "string", ""),
"type" => array ("post", "string", ""),
"create_dom_list" => array ("post", "string", ""),
"submit" => array ("post", "string", ""),
);
getFields($fields);
if ($pass != $passconf) {
$error = _("Passwords do not match");

View File

@ -33,22 +33,24 @@ if (!$admin->enabled) {
__("This page is restricted to authorized staff");
exit();
}
$fields = array (
"uid" => array ("post", "integer", "0"),
);
getFields($fields);
if ($submit) {
if (!$uid) die('UID Error');
$mem->su($uid);
$qlist=$quota->qlist();
reset($qlist);
while (list($key,$val)=each($qlist)) {
$var="q_".$key;
$quota->setquota($key,$_REQUEST[$var]);
}
$mem->unsu();
$error=_("The quotas has been successfully edited");
include("adm_list.php");
exit;
$mem->su($uid);
$qlist=$quota->qlist();
reset($qlist);
while (list($key,$val)=each($qlist)) {
$var="q_".$key;
$quota->setquota($key,$_REQUEST[$var]);
}
$mem->unsu();
$error=_("The quotas has been successfully edited");
include("adm_list.php");
exit;
?>

View File

@ -56,7 +56,7 @@ $mem->unsu();
<hr id="topbar"/>
<br />
<?php
if ($error) {
if (isset($error) && $error) {
echo "<p class=\"error\">$error</p>";
include_once("foot.php");
exit();