diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2002-06-17 06:27:32 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2002-06-17 06:27:32 +0000 |
| commit | 043dbb70cbc557bbc5f70a74453e506546148963 (patch) | |
| tree | 9dcdd9364879c4ac3384d4e53b2054653964a69b /frontends/php/include | |
| parent | 565fba506fd51acbedc8d06c07b93abae22444a7 (diff) | |
| download | zabbix-043dbb70cbc557bbc5f70a74453e506546148963.tar.gz zabbix-043dbb70cbc557bbc5f70a74453e506546148963.tar.xz zabbix-043dbb70cbc557bbc5f70a74453e506546148963.zip | |
- php/include/*inc renamed to php/include/*inc.php (Alexei)
- check of source IP address for trapped values (Alexei)
- added include/security.h and include/security.c (Alexei)
- added items.trapper_hosts (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@411 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
| -rw-r--r-- | frontends/php/include/.htaccess | 2 | ||||
| -rw-r--r-- | frontends/php/include/config.inc.php (renamed from frontends/php/include/config.inc) | 14 | ||||
| -rw-r--r-- | frontends/php/include/db.inc.php (renamed from frontends/php/include/db.inc) | 0 |
3 files changed, 8 insertions, 8 deletions
diff --git a/frontends/php/include/.htaccess b/frontends/php/include/.htaccess index 89b8ddb2..53c662c2 100644 --- a/frontends/php/include/.htaccess +++ b/frontends/php/include/.htaccess @@ -1,7 +1,7 @@ Order Deny,Allow Deny from All -<files config.inc> +<files *.php> Order Deny,Allow Deny from All </files> diff --git a/frontends/php/include/config.inc b/frontends/php/include/config.inc.php index 438cfea8..bb48475d 100644 --- a/frontends/php/include/config.inc +++ b/frontends/php/include/config.inc.php @@ -1,5 +1,5 @@ <? - include "include/db.inc"; + include "include/db.inc.php"; $USER_DETAILS =""; $ERROR_MSG =""; @@ -1219,7 +1219,7 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid"; # Update Item definition - function update_item($itemid,$description,$key,$hostid,$delay,$history,$status,$type,$snmp_community,$snmp_oid,$value_type) + function update_item($itemid,$description,$key,$hostid,$delay,$history,$status,$type,$snmp_community,$snmp_oid,$value_type,$trapper_hosts) { global $ERROR_MSG; @@ -1234,7 +1234,7 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid"; return 0; } - $sql="update items set description='$description',key_='$key',hostid=$hostid,delay=$delay,history=$history,lastdelete=0,nextcheck=0,status=$status,type=$type,snmp_community='$snmp_community',snmp_oid='$snmp_oid',value_type=$value_type where itemid=$itemid"; + $sql="update items set description='$description',key_='$key',hostid=$hostid,delay=$delay,history=$history,lastdelete=0,nextcheck=0,status=$status,type=$type,snmp_community='$snmp_community',snmp_oid='$snmp_oid',value_type=$value_type,trapper_hosts='$trapper_hosts' where itemid=$itemid"; return DBexecute($sql); } @@ -1505,7 +1505,7 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid"; # Add Item definition - function add_item($description,$key,$hostid,$delay,$history,$status,$type,$snmp_community,$snmp_oid,$value_type) + function add_item($description,$key,$hostid,$delay,$history,$status,$type,$snmp_community,$snmp_oid,$value_type,$trapper_hosts) { global $ERROR_MSG; @@ -1521,7 +1521,7 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid"; return 0; } - $sql="insert into items (description,key_,hostid,delay,history,lastdelete,nextcheck,status,type,snmp_community,snmp_oid,value_type) values ('$description','$key',$hostid,$delay,$history,0,0,$status,$type,'$snmp_community','$snmp_oid',$value_type)"; + $sql="insert into items (description,key_,hostid,delay,history,lastdelete,nextcheck,status,type,snmp_community,snmp_oid,value_type,trapper_hosts) values ('$description','$key',$hostid,$delay,$history,0,0,$status,$type,'$snmp_community','$snmp_oid',$value_type,'$trapper_hosts')"; $result=DBexecute($sql); return DBinsert_id($result,"items","itemid"); } @@ -1770,7 +1770,7 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid"; $delay=DBget_field($result,$i,3); $value_type=DBget_field($result,$i,4); - $itemid=add_item($description,$key,$hostid,$delay,30*24*3600,0,0,"","",$value_type); + $itemid=add_item($description,$key,$hostid,$delay,30*24*3600,0,0,"","",$value_type,''); $result2=DBselect("select triggertemplateid,description,expression from triggers_template where itemtemplateid=$itemtemplateid"); for($j=0;$j<DBnum_rows($result2);$j++) @@ -1901,7 +1901,7 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid"; while($row=DBfetch($result)) { $item=get_item_by_itemid($row["itemid"]); - $itemid=add_item($item["description"],$item["key_"],$hostid,$item["delay"],$item["history"],$item["status"],$item["type"],$item["snmp_community"],$item["snmp_oid"],$item["value_type"]); + $itemid=add_item($item["description"],$item["key_"],$hostid,$item["delay"],$item["history"],$item["status"],$item["type"],$item["snmp_community"],$item["snmp_oid"],$item["value_type"],""); $sql="select distinct t.triggerid from triggers t,functions f where f.itemid=".$row["itemid"]." and f.triggerid=t.triggerid"; $result2=DBselect($sql); diff --git a/frontends/php/include/db.inc b/frontends/php/include/db.inc.php index 2de3acce..2de3acce 100644 --- a/frontends/php/include/db.inc +++ b/frontends/php/include/db.inc.php |
