diff --git a/lam/templates/lists/listhosts.php b/lam/templates/lists/listhosts.php index e7834fcc..822fd60c 100644 --- a/lam/templates/lists/listhosts.php +++ b/lam/templates/lists/listhosts.php @@ -194,30 +194,47 @@ $table_begin = ($page - 1) * $max_pageentrys; if (($page * $max_pageentrys) > sizeof($hst_info)) $table_end = sizeof($hst_info); else $table_end = ($page * $max_pageentrys); -// print host 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($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])]); - if (is_array($hst_info[$i][strtolower($attr_array[$k])])) { - // sort array - sort($hst_info[$i][strtolower($attr_array[$k])]); - echo utf8_decode(implode("; ", $hst_info[$i][strtolower($attr_array[$k])])); - } - else echo utf8_decode($hst_info[$i][strtolower($attr_array[$k])]); +if (sizeof($hst_info) > 0) { + // print host list + for ($i = $table_begin; $i < $table_end; $i++) { + echo(""); + if ($_GET['selectall'] == "yes") { + echo " "; } - echo (""); + else { + echo " "; + } + echo (" " . _("Edit") . ""); + for ($k = 0; $k < sizeof($attr_array); $k++) { + 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])]); + if (is_array($hst_info[$i][strtolower($attr_array[$k])])) { + // sort array + sort($hst_info[$i][strtolower($attr_array[$k])]); + echo utf8_decode(implode("; ", $hst_info[$i][strtolower($attr_array[$k])])); + } + else echo utf8_decode($hst_info[$i][strtolower($attr_array[$k])]); + } + 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 ("");