diff options
| author | sasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-03-11 20:17:42 +0000 |
|---|---|---|
| committer | sasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-03-11 20:17:42 +0000 |
| commit | 3fa60cc03b6abbeeb4cd0342df8d6f672b3e2b6d (patch) | |
| tree | 6ea7cdefff873c7d24b98f4d3968c739ad38fea6 /frontends/php/items.php | |
| parent | f8bfbc1f123c48c09c93a01a5e831c577cbf68fd (diff) | |
| download | zabbix-3fa60cc03b6abbeeb4cd0342df8d6f672b3e2b6d.tar.gz zabbix-3fa60cc03b6abbeeb4cd0342df8d6f672b3e2b6d.tar.xz zabbix-3fa60cc03b6abbeeb4cd0342df8d6f672b3e2b6d.zip | |
- [DEV-108] GUI
git-svn-id: svn://svn.zabbix.com/trunk@5475 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/items.php')
| -rw-r--r-- | frontends/php/items.php | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/frontends/php/items.php b/frontends/php/items.php index 8f76da79..23d2b408 100644 --- a/frontends/php/items.php +++ b/frontends/php/items.php @@ -682,16 +682,18 @@ include_once "include/page_header.php"; if(isset($_REQUEST["groupid"]) && $_REQUEST["groupid"]>0) { - $sql="select distinct h.hostid,h.host from hosts h,hosts_groups hg". - " where hg.groupid=".$_REQUEST["groupid"]." and hg.hostid=h.hostid ". - " and h.hostid in (".$accessible_hosts.") ". - " and h.status<>".HOST_STATUS_DELETED." group by h.hostid,h.host order by h.host"; + $sql='select distinct h.hostid,h.host from hosts h,hosts_groups hg'. + ' where hg.groupid='.$_REQUEST['groupid'].' and hg.hostid=h.hostid '. + ' and h.status in ('.HOST_STATUS_MONITORED.','.HOST_STATUS_NOT_MONITORED.','.HOST_STATUS_TEMPLATE.')'. + ' and h.hostid in ('.$accessible_hosts.') '. + ' group by h.hostid,h.host order by h.host'; } else { - $sql="select distinct h.hostid,h.host from hosts h where h.status<>".HOST_STATUS_DELETED. - " and h.hostid in (".$accessible_hosts.") ". - " group by h.hostid,h.host order by h.host"; + $sql='select distinct h.hostid,h.host from hosts h'. + ' where h.status in ('.HOST_STATUS_MONITORED.','.HOST_STATUS_NOT_MONITORED.','.HOST_STATUS_TEMPLATE.')'. + ' and h.hostid in ('.$accessible_hosts.') '. + ' group by h.hostid,h.host order by h.host'; } $result=DBselect($sql); |
