27 require_once(
"../class/config.php");
29 if (!$admin->enabled) {
30 $msg->raise(
"ERROR",
"admin", _(
"This page is restricted to authorized staff"));
31 echo
$msg->msg_html_all();
36 "accountList" => array (
"post",
"array", array()),
37 "del_confirm" => array(
"post",
"string",
""),
41 if($del_confirm ==
"y"){
42 foreach ($accountList as
$key =>
$val) {
43 if (!$admin->checkcreator(
$val)) {
44 $msg->raise(
"ERROR",
"admin", _(
"This page is restricted to authorized staff"));
45 echo
$msg->msg_html_all();
48 if (!($u=$admin->get(
$val)) || !$admin->del_mem(
$val)) {
49 $msg->raise(
"ERROR",
"admin", _(
"Member '%s' does not exist"),
$val);
51 $msg->raise(
"INFO",
"admin", _(
"Member %s successfully deleted"),$u[
"login"]);
54 include(
"adm_list.php");
57 if (!is_array($accountList) || count($accountList)==0) {
58 $msg->raise(
"ERROR",
"admin", _(
"Please check the accounts you want to delete"));
59 require(
"adm_list.php");
66 <h3><?php printf(_(
"Deleting users")); ?> : </h3>
67 <form action=
"adm_dodel.php" method=
"post">
69 <input type=
"hidden" name=
"action" value=
"delete" />
70 <input type=
"hidden" name=
"del_confirm" value=
"y" />
71 <p
class=
"alert alert-warning"><?php
__(
"WARNING : Confirm the deletion of the users"); ?></p>
75 foreach($accountList as $userid){
76 $membre = $admin->get($userid);
77 echo
"<li><input type=\"hidden\" name=\"accountList[]\" value=\"$userid\" />".$membre[
'login'].
"</li>";
83 <input type=
"submit" class=
"inb ok" name=
"confirm" value=
"<?php __("Yes,
delete those accounts
"); ?>" />
84 <input type=
"button" class=
"inb cancel" name=
"cancel" value=
"<?php __("No, don
't delete those accounts"); ?>" onclick="document.location='adm_list.php
';" />
if(! $admin->enabled) $fields
Delete one or more AlternC's accounts of course, confirm the deletion.
getFields($fields, $requestOnly=false)
Get the Fields of the posted form from $_REQUEST or POST or GET and check their type.
csrf_get($return=false)
Give a new CSRF uniq token for a form the session must be up since the CSRF is linked to the session ...
if(empty($_POST['key'])||empty($_POST['val'])) $key