diff --git a/bureau/admin/adm_deactivate.php b/bureau/admin/adm_deactivate.php index 0974bb9d..215b59f4 100644 --- a/bureau/admin/adm_deactivate.php +++ b/bureau/admin/adm_deactivate.php @@ -31,13 +31,24 @@ require_once("../class/config.php"); include_once("head.php"); -$uid = $_GET['uid']; +if (!$admin->enabled) { + __("This page is restricted to authorized staff"); + exit; +} +$fields = array ( + "uid" => array ("request", "integer", ""), + "submit" => array ("post", "string", ""), + "redirect" => array ("post", "string", ""), +); +getFields($fields); + if (!$uid) { __("Missing uid"); include_once("foot.php"); exit(); } -if (!$admin->enabled || !$admin->checkcreator($uid)) { + +if (!$admin->checkcreator($uid)) { __("This page is restricted to authorized staff"); include_once("foot.php"); exit(); @@ -49,12 +60,15 @@ if (!$r=$admin->get($uid)) { exit(); } -if (! ($confirmed = ($_GET['submit'] == _("Confirm")) ) ) { +$confirmed = ($submit == _("Confirm"))?true:false; + + +if (! ($confirmed ) ) { print '