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

This commit is contained in:
root 2014-03-27 16:15:17 +01:00
parent 0729df438e
commit 502dd726db
2 changed files with 11 additions and 13 deletions

View File

@ -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"){
<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;