diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2001-08-02 18:55:32 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2001-08-02 18:55:32 +0000 |
| commit | 31be0f053d6ce0073e84c8bfc27348cf1a290a61 (patch) | |
| tree | 12c7ecff032eab7b4c36473f3b0265ed06d49bf9 /frontends/php/include | |
| parent | 70706618a68f09f7bc1f283dc105dbabbb4c3566 (diff) | |
| download | zabbix-31be0f053d6ce0073e84c8bfc27348cf1a290a61.tar.gz zabbix-31be0f053d6ce0073e84c8bfc27348cf1a290a61.tar.xz zabbix-31be0f053d6ce0073e84c8bfc27348cf1a290a61.zip | |
IP address can be used fro connections to a host.
git-svn-id: svn://svn.zabbix.com/trunk@159 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
| -rw-r--r-- | frontends/php/include/config.inc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/frontends/php/include/config.inc b/frontends/php/include/config.inc index 33d71fd9..f913238c 100644 --- a/frontends/php/include/config.inc +++ b/frontends/php/include/config.inc @@ -1041,9 +1041,17 @@ # Add Host definition - function add_host($host,$port,$status,$template) + function add_host($host,$port,$status,$template,$useip,$ip) { - $sql="insert into hosts (host,port,status) values ('$host',$port,$status)"; + if($useip=="true") + { + $useip=1; + } + else + { + $useip=0; + } + $sql="insert into hosts (host,port,status,useip,ip) values ('$host',$port,$status,$useip,'$ip')"; $result=DBexecute($sql); $hostid=DBinsert_id($result,"hosts","hostid"); |
