summaryrefslogtreecommitdiffstats
path: root/frontends/php/include
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2003-07-30 17:43:56 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2003-07-30 17:43:56 +0000
commit7d2a80ded8f91654aa154d84c714bc14ceb2f818 (patch)
tree4067489d136fa0bad949868942f1aa8963e87097 /frontends/php/include
parentd3e2cd1b12ff78683f988d3ec2785be54bf83ca8 (diff)
downloadzabbix-7d2a80ded8f91654aa154d84c714bc14ceb2f818.tar.gz
zabbix-7d2a80ded8f91654aa154d84c714bc14ceb2f818.tar.xz
zabbix-7d2a80ded8f91654aa154d84c714bc14ceb2f818.zip
- show selected host in Host Add form (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@875 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
-rw-r--r--frontends/php/include/config.inc.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php
index 80392fb0..d0244066 100644
--- a/frontends/php/include/config.inc.php
+++ b/frontends/php/include/config.inc.php
@@ -3214,7 +3214,7 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
if(isset($HTTP_GET_VARS["itemid"]))
{
- $result=DBselect("select i.description, i.key_, h.host, h.port, i.delay, i.history, i.status, i.type, i.snmp_community,i.snmp_oid,i.value_type,i.trapper_hosts,i.snmp_port,i.units,i.multiplier from items i,hosts h where i.itemid=".$HTTP_GET_VARS["itemid"]." and h.hostid=i.hostid");
+ $result=DBselect("select i.description, i.key_, h.host, h.port, i.delay, i.history, i.status, i.type, i.snmp_community,i.snmp_oid,i.value_type,i.trapper_hosts,i.snmp_port,i.units,i.multiplier,h.hostid from items i,hosts h where i.itemid=".$HTTP_GET_VARS["itemid"]." and h.hostid=i.hostid");
$description=DBget_field($result,0,0);
$key=DBget_field($result,0,1);
@@ -3231,6 +3231,7 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
$snmp_port=DBget_field($result,0,12);
$units=DBget_field($result,0,13);
$multiplier=DBget_field($result,0,14);
+ $hostid=DBget_field($result,0,15);
}
else
{
@@ -3249,6 +3250,7 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
$snmp_port=@iif(isset($HTTP_GET_VARS["snmp_port"]),$HTTP_GET_VARS["snmp_port"],161);
$units=@iif(isset($HTTP_GET_VARS["units"]),$HTTP_GET_VARS["units"],'');
$multiplier=@iif(isset($HTTP_GET_VARS["multiplier"]),$HTTP_GET_VARS["multiplier"],0);
+ $hostid=@iif(isset($HTTP_GET_VARS["hostid"]),$HTTP_GET_VARS["hostid"],0);
}
echo "<br>";
@@ -3275,7 +3277,7 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
{
$hostid_=DBget_field($result,$i,0);
$host_=DBget_field($result,$i,1);
- if($host==$host_)
+ if($hostid==$hostid_)
{
echo "<option value=\"$hostid_\" selected>$host_";
}