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