diff options
author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-07-23 09:37:47 +0000 |
---|---|---|
committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-07-23 09:37:47 +0000 |
commit | 5c3768ceaa3080321c3bf6481640fcdd380d0025 (patch) | |
tree | 172b94421c008b166a1106c5c42f983c2b8fe5b3 /frontends/php/hostprofiles.php | |
parent | 6db9d7bcf88b79ab279dd2b5dc929fabb1a23f1f (diff) | |
download | zabbix-5c3768ceaa3080321c3bf6481640fcdd380d0025.tar.gz zabbix-5c3768ceaa3080321c3bf6481640fcdd380d0025.tar.xz zabbix-5c3768ceaa3080321c3bf6481640fcdd380d0025.zip |
- [DEV-192] added filter to Status of triggers (Artem)
- [DEV-191] monitoring screens inline update preparation (Artem)
- [DEV-192] added severity filter in status of triggers (Artem)
- [DEV-137] sql fixes for oracle (Artem)
- [ZBX-396] fixed error maps message (Artem)
- [ZBX-394] fixed showing hosts without group in status of triggers (Artem)
- [DEV-137] small fixes (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5841 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/hostprofiles.php')
-rw-r--r-- | frontends/php/hostprofiles.php | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/frontends/php/hostprofiles.php b/frontends/php/hostprofiles.php index d42db41f..0254f6a9 100644 --- a/frontends/php/hostprofiles.php +++ b/frontends/php/hostprofiles.php @@ -50,11 +50,11 @@ include_once "include/page_header.php"; $cmbGroup->AddItem(0,S_ALL_SMALL); - $availiable_hosts = get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_LIST); + $available_hosts = get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_LIST,PERM_RES_IDS_ARRAY); $result=DBselect('SELECT DISTINCT g.groupid,g.name '. ' FROM groups g, hosts_groups hg, hosts h, items i '. - ' WHERE h.hostid IN ('.$availiable_hosts.') '. + ' WHERE '.DBcondition('h.hostid',$available_hosts). ' AND hg.groupid=g.groupid '. ' AND h.status='.HOST_STATUS_MONITORED. ' AND h.hostid=i.hostid '. @@ -88,28 +88,25 @@ include_once "include/page_header.php"; make_sorting_link(S_MACADDRESS,'p.macaddress')) ); - if($_REQUEST["groupid"] > 0) - { + if($_REQUEST["groupid"] > 0){ $sql='SELECT h.hostid,h.host,p.name,p.os,p.serialno,p.tag,p.macaddress'. ' FROM hosts h,hosts_profiles p,hosts_groups hg '. ' WHERE h.hostid=p.hostid'. ' and h.hostid=hg.hostid '. ' and hg.groupid='.$_REQUEST['groupid']. - ' and h.hostid in ('.$availiable_hosts.') '. + ' and '.DBcondition('h.hostid',$available_hosts). order_by('h.host,h.hostid,p.name,p.os,p.serialno,p.tag,p.macaddress'); } else{ - $sql='SELECT h.hostid,h.host,p.name,p.os,p.serialno,p.tag,p.macaddress'. ' FROM hosts h,hosts_profiles p '. ' WHERE h.hostid=p.hostid'. - ' AND h.hostid in ('.$availiable_hosts.') '. + ' AND '.DBcondition('h.hostid',$available_hosts). order_by('h.host,h.hostid,p.name,p.os,p.serialno,p.tag,p.macaddress'); } $result=DBselect($sql); - while($row=DBfetch($result)) - { + while($row=DBfetch($result)){ $table->AddRow(array( get_node_name_by_elid($row['hostid']), new CLink($row["host"],"?hostid=".$row["hostid"].url_param("groupid"),"action"), |