diff --git a/lam/templates/lists/listgroups.php b/lam/templates/lists/listgroups.php index ce2bf6a4..591ce99b 100644 --- a/lam/templates/lists/listgroups.php +++ b/lam/templates/lists/listgroups.php @@ -188,45 +188,64 @@ $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++) { - echo("" . - " " . - " " . _("Edit") . ""); - for ($k = 0; $k < sizeof($attr_array); $k++) { - echo (""); - // print all attribute entries seperated by "; " - if (sizeof($grp_info[$i][strtolower($attr_array[$k])]) > 0) { - // delete first array entry which is "count" - if ((! $_GET['norefresh']) && (is_array($grp_info[$i][strtolower($attr_array[$k])]))) array_shift($grp_info[$i][strtolower($attr_array[$k])]); - // generate links for group members - if (strtolower($attr_array[$k]) == "memberuid") { - // sort array - sort($grp_info[$i][strtolower($attr_array[$k])]); - // make a link for each member of the group - $linklist = array(); - for ($d = 0; $d < sizeof($grp_info[$i][strtolower($attr_array[$k])]); $d++) { - $user = $grp_info[$i][strtolower($attr_array[$k])][$d]; // user name - $linklist[$d] = "" . $user . ""; - } - echo implode("; ", $linklist); - } - // print all other attributes - else { - if (is_array($grp_info[$i][strtolower($attr_array[$k])])) { +if (sizeof($grp_info) > 0) { + // print group list + for ($i = $table_begin; $i < $table_end; $i++) { + echo(""); + if ($_GET['selectall'] == "yes") { + echo " "; + } + else { + echo " "; + } + echo (" " . _("Edit") . ""); + for ($k = 0; $k < sizeof($attr_array); $k++) { + echo (""); + // print all attribute entries seperated by "; " + if (sizeof($grp_info[$i][strtolower($attr_array[$k])]) > 0) { + // delete first array entry which is "count" + if ((! $_GET['norefresh']) && (is_array($grp_info[$i][strtolower($attr_array[$k])]))) array_shift($grp_info[$i][strtolower($attr_array[$k])]); + // generate links for group members + if (strtolower($attr_array[$k]) == "memberuid") { // sort array sort($grp_info[$i][strtolower($attr_array[$k])]); - echo utf8_decode(implode("; ", $grp_info[$i][strtolower($attr_array[$k])])); + // make a link for each member of the group + $linklist = array(); + for ($d = 0; $d < sizeof($grp_info[$i][strtolower($attr_array[$k])]); $d++) { + $user = $grp_info[$i][strtolower($attr_array[$k])][$d]; // user name + $linklist[$d] = "" . $user . ""; + } + echo implode("; ", $linklist); + } + // 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])])); + } + else echo utf8_decode($grp_info[$i][strtolower($attr_array[$k])]); } - else echo utf8_decode($grp_info[$i][strtolower($attr_array[$k])]); } + echo (""); } - echo (""); + echo("\n"); } - echo("\n"); + // display select all link + $colspan = sizeof($attr_array) + 1; + echo "\n"; + echo "\"select\n"; + echo " " . + "" . _("Select all") . "\n"; + echo "\n"; } echo (""); echo ("
"); diff --git a/lam/templates/lists/listhosts.php b/lam/templates/lists/listhosts.php index 822fd60c..47c9713e 100644 --- a/lam/templates/lists/listhosts.php +++ b/lam/templates/lists/listhosts.php @@ -214,8 +214,8 @@ if (sizeof($hst_info) > 0) { echo (""); // 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])]);