Commit 502dd726 authored by root's avatar root
Browse files

Correction de la suppression des comptes et presentation en liste des comptes a supprimer

parent 0729df43
...@@ -40,19 +40,15 @@ $fields = array ( ...@@ -40,19 +40,15 @@ $fields = array (
); );
getFields($fields); getFields($fields);
$accountList = $d;
if($del_confirm == "y"){ if($del_confirm == "y"){
if (!is_array($accountList)) { $error = "";
$accountList[] = $accountList; foreach ($accountList as $key => $val) {
}
reset($accountList);
while (list($key,$val)=each($accountList)) {
if (!$admin->checkcreator($val)) { if (!$admin->checkcreator($val)) {
__("This page is restricted to authorized staff"); __("This page is restricted to authorized staff");
exit(); exit();
} }
$error = "";
if (!($u=$admin->get($val)) || !$admin->del_mem($val)) { if (!($u=$admin->get($val)) || !$admin->del_mem($val)) {
$error .= sprintf(_("Member '%s' does not exist"),$val)."<br />"; $error .= sprintf(_("Member '%s' does not exist"),$val)."<br />";
} else { } else {
...@@ -77,12 +73,14 @@ if($del_confirm == "y"){ ...@@ -77,12 +73,14 @@ if($del_confirm == "y"){
<input type="hidden" name="del_confirm" value="y" /> <input type="hidden" name="del_confirm" value="y" />
<p class="alert alert-warning"><?php __("WARNING : Confirm the deletion of the users"); ?></p> <p class="alert alert-warning"><?php __("WARNING : Confirm the deletion of the users"); ?></p>
<p> <p>
<?php <ul>
foreach($accountList as $userid){ <?php
$membre = $admin->get($userid); foreach($accountList as $userid){
echo "<input type=\"hidden\" name=\"d[]\" value=\"$userid\" />".$membre['login']."<br/>"; $membre = $admin->get($userid);
} echo "<li><input type=\"hidden\" name=\"d[]\" value=\"$userid\" />".$membre['login']."</li>";
?> }
?>
</ul>
</p> </p>
<blockquote> <blockquote>
<input type="submit" class="inb ok" name="confirm" value="<?php __("Yes, delete those accounts"); ?>" />&nbsp;&nbsp; <input type="submit" class="inb ok" name="confirm" value="<?php __("Yes, delete those accounts"); ?>" />&nbsp;&nbsp;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment