[fix] missing delete account button in long account list
This commit is contained in:
parent
34594c884f
commit
2793eb73f9
|
@ -2,7 +2,7 @@
|
|||
/*
|
||||
----------------------------------------------------------------------
|
||||
AlternC - Web Hosting System
|
||||
Copyright (C) 2006 Le réseau Koumbit Inc.
|
||||
Copyright (C) 2006 Le r<EFBFBD>seau Koumbit Inc.
|
||||
http://koumbit.org/
|
||||
Copyright (C) 2002 by the AlternC Development Team.
|
||||
http://alternc.org/
|
||||
|
@ -43,7 +43,8 @@ $fields = array (
|
|||
);
|
||||
getFields($fields);
|
||||
|
||||
if (empty($pattern)) $pattern="*";
|
||||
if (empty($pattern))
|
||||
$pattern = "*";
|
||||
|
||||
if ($short != -1) {
|
||||
$mem->adminpref($short);
|
||||
|
@ -61,9 +62,9 @@ if ($show=="all" && !$subadmin==1 && $cuid != 2000) {
|
|||
}
|
||||
|
||||
if ($pattern && $pattern_type) {
|
||||
$r=$admin->get_list($show == 'all' ? 1 : 0, $creator, $pattern, $pattern_type);
|
||||
$accountList = $admin->get_list($show == 'all' ? 1 : 0, $creator, $pattern, $pattern_type);
|
||||
} else {
|
||||
$r = FALSE;
|
||||
$accountList = FALSE;
|
||||
}
|
||||
?>
|
||||
|
||||
|
@ -122,17 +123,16 @@ if ($mem->user["admlist"]==0) { // Normal (large) mode
|
|||
if (!empty($error)) {
|
||||
echo '<p class="alert alert-danger">', $error, '</p>';
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<p>
|
||||
<?php __("Here is the list of hosted AlternC accounts"); ?> (<?php printf(_("%s accounts"),count($r)); ?>)
|
||||
<?php __("Here is the list of hosted AlternC accounts"); ?> (<?php printf(_("%s accounts"), count($accountList)); ?>)
|
||||
</p>
|
||||
|
||||
<p><span class="ina add"><a href="adm_add.php"><?php __("Create a new AlternC account"); ?></a></span></p>
|
||||
|
||||
<?php
|
||||
if (!is_array($r) || empty($r) ) {
|
||||
if (!is_array($accountList) || empty($accountList)) {
|
||||
echo '<p class="alert alert-danger">' . _("No account defined for now") . '</p>';
|
||||
include('foot.php');
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ if (!is_array($r) || empty($r) ) {
|
|||
if ($mem->user["admlist"] == 0) { // Normal (large) mode
|
||||
?>
|
||||
<p>
|
||||
<?php if (count($r)>5) { ?>
|
||||
<?php if (count($accountList) > 5) { ?>
|
||||
<input type="submit" class="inb delete" name="submit" value="<?php __("Delete checked accounts"); ?>" />
|
||||
<?php } ?>
|
||||
</p>
|
||||
|
@ -163,16 +163,15 @@ if ($mem->user["admlist"]==0) { // Normal (large) mode
|
|||
<th><?php __('Expiry') ?></th>
|
||||
</tr>
|
||||
<?php
|
||||
reset($r);
|
||||
reset($accountList);
|
||||
|
||||
$col = 1;
|
||||
while (list($key,$val)=each($r)) {
|
||||
while (list($key, $val) = each($accountList)) {
|
||||
$col = 3 - $col;
|
||||
?>
|
||||
<tr class="lst<?php echo $col; ?>">
|
||||
|
||||
<?php
|
||||
if ($val["su"]) { ?>
|
||||
<?php if ($val["su"]) { ?>
|
||||
<td id="user_<?php echo $val["uid"]; ?>"> </td>
|
||||
<?php } else { ?>
|
||||
<td><input type="checkbox" class="inc" name="d[]" id="user_<?php echo $val["uid"]; ?>" value="<?php echo $val["uid"]; ?>" /></td>
|
||||
|
@ -211,9 +210,14 @@ while (list($key,$val)=each($r)) {
|
|||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
} // while (list($key,$val)=each($r)) {
|
||||
echo '</table></form><br/>';
|
||||
|
||||
} // while (list($key,$val)=each($accountList)) {
|
||||
?>
|
||||
</table>
|
||||
<br/>
|
||||
<p>
|
||||
<input type="submit" class="inb" name="submit" value="<?php __("Delete checked accounts"); ?>" /></p>
|
||||
</form>
|
||||
<?php
|
||||
} // NORMAL MODE
|
||||
if ($mem->user["admlist"] == 1) { // SHORT MODE
|
||||
?>
|
||||
|
@ -223,7 +227,7 @@ if ($mem->user["admlist"]==1) { // SHORT MODE
|
|||
[ <?php __("Q"); ?> ] <?php __("Quotas"); ?>
|
||||
|
||||
<p>
|
||||
<?php if (count($r)>50) { ?>
|
||||
<?php if (count($accountList) > 50) { ?>
|
||||
<input type="submit" class="inb" name="submit" value="<?php __("Delete checked accounts"); ?>" />
|
||||
<?php } // finc count > 50 ?>
|
||||
</p>
|
||||
|
@ -235,30 +239,36 @@ if ($mem->user["admlist"]==1) { // SHORT MODE
|
|||
<th colspan="2"> </th><th><?php __("Account"); ?></th>
|
||||
</tr>
|
||||
<?php
|
||||
reset($r);
|
||||
reset($accountList);
|
||||
|
||||
$count_r = 0;
|
||||
foreach ($r as $val) {
|
||||
if ( ($count_r % 3) == 0 ) { echo '<tr class="lst">'; }
|
||||
foreach ($accountList as $val) {
|
||||
if (($count_r % 3) == 0) {
|
||||
echo '<tr class="lst">';
|
||||
}
|
||||
|
||||
if ($val["su"]) {
|
||||
echo '<td> </td>';
|
||||
} else {
|
||||
echo '<td align="center"><input type="checkbox" class="inc" name="d[]" value="' . $val["uid"] . '" id="id_c_' . $val["uid"] . '" /></td>';
|
||||
} // if $val["su"] ?>
|
||||
} // if $val["su"]
|
||||
?>
|
||||
<td align="center">
|
||||
<a href="adm_login.php?id=<?php echo $val["uid"]; ?>" title="<?php __("Connect as"); ?>">[ <?php __("C"); ?> ]</a>
|
||||
<a href="adm_edit.php?uid=<?php echo $val["uid"] ?>" title="<?php __("Edit"); ?>">[ <?php __("E"); ?> ]</a>
|
||||
<?php if ($admin->checkcreator($val['uid'])) { ?>
|
||||
<a href="adm_quotaedit.php?uid=<?php echo $val["uid"] ?>" title="<?php __("Quotas"); ?>">[ <?php __("Q"); ?> ]</a><?php
|
||||
} // $admin->checkcreator
|
||||
$creator_name = ( ($val['creator'] == '0')?_("himself"):$list_creators[$val['creator']]['login']) ?>
|
||||
$creator_name = ( ($val['creator'] == '0') ? _("himself") : $list_creators[$val['creator']]['login'])
|
||||
?>
|
||||
</td>
|
||||
<td style="padding-right: 2px; border-right: 1px solid black; <?php if ($val["su"]) echo "color: red"; ?>"><b><label title="<?php printf(_("Creator: %s"), $creator_name); ?>" for="id_c_<?php echo $val["uid"]; ?>"><?php echo $val["login"] ?></label></b></td>
|
||||
<?php
|
||||
if ( ($count_r % 3) == 2 ) { echo '</tr>'; }
|
||||
if (($count_r % 3) == 2) {
|
||||
echo '</tr>';
|
||||
}
|
||||
++$count_r;
|
||||
} // foreach $r
|
||||
} // foreach $accountList
|
||||
?>
|
||||
</table>
|
||||
<p><input type="submit" class="inb" name="submit" value="<?php __("Delete checked accounts"); ?>" /></p>
|
||||
|
|
Loading…
Reference in New Issue