diff options
author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-09-08 17:02:02 +0000 |
---|---|---|
committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-09-08 17:02:02 +0000 |
commit | 383f0f805ae778253c9ccdaf4b7531f7427515f8 (patch) | |
tree | 575b332d9be833566fac80531595b9edc065b781 /frontends/php/hostprofiles.php | |
parent | 1d1a544dbef0e1ec664925cb085bb48ec42069d1 (diff) | |
download | zabbix-383f0f805ae778253c9ccdaf4b7531f7427515f8.tar.gz zabbix-383f0f805ae778253c9ccdaf4b7531f7427515f8.tar.xz zabbix-383f0f805ae778253c9ccdaf4b7531f7427515f8.zip |
Minor changes.
git-svn-id: svn://svn.zabbix.com/trunk@2057 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/hostprofiles.php')
-rw-r--r-- | frontends/php/hostprofiles.php | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/frontends/php/hostprofiles.php b/frontends/php/hostprofiles.php index 7467acb6..e4c6ee5a 100644 --- a/frontends/php/hostprofiles.php +++ b/frontends/php/hostprofiles.php @@ -20,6 +20,7 @@ ?> <?php include "include/config.inc.php"; + include "include/forms.inc.php"; $page["title"] = "S_HOST_PROFILES"; $page["file"] = "hostprofiles.php"; show_header($page["title"],0,0); @@ -32,11 +33,6 @@ show_footer(); exit; } - if(isset($_GET["select"])&&($_GET["select"]!="")) - { - unset($_GET["groupid"]); - unset($_GET["hostid"]); - } if(isset($_GET["hostid"])&&!check_right("Host","R",$_GET["hostid"])) { @@ -114,7 +110,11 @@ ?> <?php - if(isset($_GET["hostid"])||isset($_GET["select"])) + if(isset($_GET["hostid"])&&($_GET["hostid"]!=0)) + { + insert_host_profile_form($_GET["hostid"],1); + } + else { table_begin(); $header=array(); @@ -123,7 +123,14 @@ table_header($header); $col=0; - $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=".$_GET["hostid"]; + if(isset($_GET["groupid"])&&($_GET["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=".$_GET["groupid"]." order by h.host"; + } + 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 order by h.host"; + } $result=DBselect($sql); while($row=DBfetch($result)) @@ -148,10 +155,6 @@ table_end(); show_table_header_end(); } - else - { - table_nodata(); - } ?> <?php |