array(T_ZBX_INT, O_OPT, P_SYS, BETWEEN(0,65535), NULL), "hostid"=> array(T_ZBX_INT, O_OPT, P_SYS, BETWEEN(0,65535), NULL), "start"=> array(T_ZBX_INT, O_OPT, P_SYS, BETWEEN(0,65535)."({}%100==0)", NULL), "next"=> array(T_ZBX_STR, O_OPT, P_SYS, NULL, NULL), "prev"=> array(T_ZBX_STR, O_OPT, P_SYS, NULL, NULL) ); check_fields($fields); validate_group_with_host("R", array("allow_all_hosts","monitored_hosts","with_items")); update_profile("web.menu.view.last",$page["file"]); ?> "; $h2=$h2.form_select("groupid",0,S_ALL_SMALL); $result=DBselect("select groupid,name from groups order by name"); while($row=DBfetch($result)) { // Check if at least one host with read permission exists for this group $result2=DBselect("select h.hostid,h.host from hosts h,items i,hosts_groups hg where h.status=".HOST_STATUS_MONITORED." and h.hostid=i.hostid and hg.groupid=".$row["groupid"]." and hg.hostid=h.hostid group by h.hostid,h.host order by h.host"); $cnt=0; while($row2=DBfetch($result2)) { if(!check_right("Host","R",$row2["hostid"])) { continue; } $cnt=1; break; } if($cnt!=0) { $h2=$h2.form_select("groupid",$row["groupid"],$row["name"]); } } $h2=$h2.""; $h2=$h2.SPACE.S_HOST.SPACE; $h2=$h2."".SPACE; if(isset($_REQUEST["start"])) { $h2=$h2.""; $h2=$h2.""; } else { $h2=$h2.""; } $h2=$h2.">\">"; show_header2($h1,$h2,"
","
"); ?> Show(); ?>