added "select all" for groups, fixed problems with count entries
This commit is contained in:
parent
37e8bbb095
commit
9e407116db
|
@ -188,14 +188,22 @@ $table_begin = ($page - 1) * $max_pageentrys;
|
|||
if (($page * $max_pageentrys) > sizeof($grp_info)) $table_end = sizeof($grp_info);
|
||||
else $table_end = ($page * $max_pageentrys);
|
||||
|
||||
// print group list
|
||||
for ($i = $table_begin; $i < $table_end; $i++) {
|
||||
if (sizeof($grp_info) > 0) {
|
||||
// print group list
|
||||
for ($i = $table_begin; $i < $table_end; $i++) {
|
||||
echo("<tr class=\"grouplist\" onMouseOver=\"group_over(this, '" . $grp_info[$i]["dn"] . "')\"" .
|
||||
" onMouseOut=\"group_out(this, '" . $grp_info[$i]["dn"] . "')\"" .
|
||||
" onClick=\"group_click(this, '" . $grp_info[$i]["dn"] . "')\"" .
|
||||
" onDblClick=\"parent.frames[1].location.href='../account/groupedit.php?DN=" . $grp_info[$i]["dn"] . "'\">" .
|
||||
" <td height=22><input onClick=\"group_click(this, '" . $grp_info[$i]["dn"] . "')\" type=\"checkbox\" name=\"" . $grp_info[$i]["dn"] . "\"></td>" .
|
||||
" <td align='center'><a href=\"../account/groupedit.php?DN='" . $grp_info[$i]["dn"] . "'\">" . _("Edit") . "</a></td>");
|
||||
" onDblClick=\"parent.frames[1].location.href='../account/groupedit.php?DN=" . $grp_info[$i]["dn"] . "'\">");
|
||||
if ($_GET['selectall'] == "yes") {
|
||||
echo " <td height=22><input onClick=\"group_click(this, '" . $grp_info[$i]["dn"] . "')\" type=\"checkbox\"" .
|
||||
" name=\"" . $grp_info[$i]["dn"] . "\" checked></td>";
|
||||
}
|
||||
else {
|
||||
echo " <td height=22><input onClick=\"group_click(this, '" . $grp_info[$i]["dn"] . "')\" type=\"checkbox\"" .
|
||||
" name=\"" . $grp_info[$i]["dn"] . "\"></td>";
|
||||
}
|
||||
echo (" <td align='center'><a href=\"../account/groupedit.php?DN='" . $grp_info[$i]["dn"] . "'\">" . _("Edit") . "</a></td>");
|
||||
for ($k = 0; $k < sizeof($attr_array); $k++) {
|
||||
echo ("<td>");
|
||||
// print all attribute entries seperated by "; "
|
||||
|
@ -217,6 +225,8 @@ for ($i = $table_begin; $i < $table_end; $i++) {
|
|||
// print all other attributes
|
||||
else {
|
||||
if (is_array($grp_info[$i][strtolower($attr_array[$k])])) {
|
||||
// delete "count" entry
|
||||
unset($grp_info[$i][strtolower($attr_array[$k])]['count']);
|
||||
// sort array
|
||||
sort($grp_info[$i][strtolower($attr_array[$k])]);
|
||||
echo utf8_decode(implode("; ", $grp_info[$i][strtolower($attr_array[$k])]));
|
||||
|
@ -227,6 +237,15 @@ for ($i = $table_begin; $i < $table_end; $i++) {
|
|||
echo ("</td>");
|
||||
}
|
||||
echo("</tr>\n");
|
||||
}
|
||||
// display select all link
|
||||
$colspan = sizeof($attr_array) + 1;
|
||||
echo "<tr class=\"grouplist\">\n";
|
||||
echo "<td align=\"center\"><img src=\"../../graphics/select.jpg\" alt=\"select all\"></td>\n";
|
||||
echo "<td colspan=$colspan> <a href=\"listgroups.php?norefresh=y&page=" . $page . "&sort=" . $sort .
|
||||
$searchfilter . "&selectall=yes\">" .
|
||||
"<font color=\"black\"><b>" . _("Select all") . "</b></font></a></td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
echo ("</table>");
|
||||
echo ("<br>");
|
||||
|
|
|
@ -214,8 +214,8 @@ if (sizeof($hst_info) > 0) {
|
|||
echo ("<td>");
|
||||
// print all attribute entries seperated by "; "
|
||||
if (sizeof($hst_info[$i][strtolower($attr_array[$k])]) > 0) {
|
||||
// delete first array entry which is "count"
|
||||
if ((! $_GET['norefresh']) && (is_array($hst_info[$i][strtolower($attr_array[$k])]))) array_shift($hst_info[$i][strtolower($attr_array[$k])]);
|
||||
// delete "count" entry
|
||||
unset($hst_info[$i][strtolower($attr_array[$k])]['count']);
|
||||
if (is_array($hst_info[$i][strtolower($attr_array[$k])])) {
|
||||
// sort array
|
||||
sort($hst_info[$i][strtolower($attr_array[$k])]);
|
||||
|
|
Loading…
Reference in New Issue