diff options
| author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-02-22 12:39:55 +0000 |
|---|---|---|
| committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-02-22 12:39:55 +0000 |
| commit | bb235bd63289bd6debf4a951e4169fb3c9430a5f (patch) | |
| tree | 2151874c5fb08cb56cc80846f44c4e8b2113ff63 /frontends/php | |
| parent | bc3b6068812aa65d806b74b9b89ff1aa74ee0ccb (diff) | |
| download | zabbix-bb235bd63289bd6debf4a951e4169fb3c9430a5f.tar.gz zabbix-bb235bd63289bd6debf4a951e4169fb3c9430a5f.tar.xz zabbix-bb235bd63289bd6debf4a951e4169fb3c9430a5f.zip | |
- added value mapping for e-mail content (Eugene)
- fixed frontend (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@2671 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php')
| -rw-r--r-- | frontends/php/config.php | 4 | ||||
| -rw-r--r-- | frontends/php/history.php | 4 | ||||
| -rw-r--r-- | frontends/php/include/bulkloader.inc.php | 16 | ||||
| -rw-r--r-- | frontends/php/include/db.inc.php | 1 | ||||
| -rw-r--r-- | frontends/php/items.php | 2 |
5 files changed, 6 insertions, 21 deletions
diff --git a/frontends/php/config.php b/frontends/php/config.php index abec61a2..6bde4f11 100644 --- a/frontends/php/config.php +++ b/frontends/php/config.php @@ -83,8 +83,8 @@ "imagetype"=> array(T_ZBX_INT, O_OPT, NULL, IN("1,2"), '({config}==3)&&(isset({save}))'), //value mapping - "valuemapid"=> array(T_ZBX_INT, O_NO, P_SYS, DB_ID, '{form}=="update"'), - "mapname"=> array(T_ZBX_STR, O_OPT, NULL, NOT_EMPTY, 'isset({save})'), + "valuemapid"=> array(T_ZBX_INT, O_NO, P_SYS, DB_ID, '{config}==6&&{form}=="update"'), + "mapname"=> array(T_ZBX_STR, O_OPT, NULL, NOT_EMPTY, '{config}==6&&isset({save})'), "valuemap"=> array(T_ZBX_STR, O_OPT, NULL, NULL, NULL), "rem_value"=> array(T_ZBX_INT, O_OPT, NULL, BETWEEN(0,65535), NULL), "add_value"=> array(T_ZBX_STR, O_OPT, NULL, NOT_EMPTY, 'isset({add_map})'), diff --git a/frontends/php/history.php b/frontends/php/history.php index f6e35741..00ee3917 100644 --- a/frontends/php/history.php +++ b/frontends/php/history.php @@ -180,7 +180,7 @@ { $sql="select h.clock,h.value,h.timestamp,h.source,h.severity,i.valuemapid". " from history_log h, items i". - " where h.itemid=i.itemid and itemid=".$_REQUEST["itemid"]. + " where h.itemid=i.itemid and i.itemid=".$_REQUEST["itemid"]. " and h.clock>$time and h.clock<$till order by id desc, clock desc"; } else @@ -304,7 +304,7 @@ { $sql="select h.clock,h.value,h.timestamp,h.source,h.severity,i.valuemapid". " from history_log h, items i". - " where h.itemid=i.itemid and itemid=".$_REQUEST["itemid"]. + " where h.itemid=i.itemid and i.itemid=".$_REQUEST["itemid"]. " order by id desc, clock desc limit 500"; } else diff --git a/frontends/php/include/bulkloader.inc.php b/frontends/php/include/bulkloader.inc.php index c730df49..1de27ccb 100644 --- a/frontends/php/include/bulkloader.inc.php +++ b/frontends/php/include/bulkloader.inc.php @@ -46,22 +46,6 @@ include_once "include/config.inc.php"; } } - // This function adds host to a host group based on ID numbers. - // Returns: 0 on failure, otherwise it returns 1 - function add_Host_To_Group($groupid=0,$hostid=0) - { - if($groupid==0||$hostid==0) - { - return 0; - } - $result=DBexecute("insert into hosts_groups (groupid,hostid) values ($groupid,$hostid)"); - if($result) - { - return 1; - } - return 0; - } - // This function takes a user group name and populates the database. // Returns: 0 if unable to create, otherwise it returns the groupID function create_User_Group($group) diff --git a/frontends/php/include/db.inc.php b/frontends/php/include/db.inc.php index 8f6c2b68..058a2a73 100644 --- a/frontends/php/include/db.inc.php +++ b/frontends/php/include/db.inc.php @@ -26,6 +26,7 @@ $DB_TYPE ="MYSQL"; $DB_SERVER ="localhost"; $DB_DATABASE ="zabbix"; +// $DB_DATABASE ="osmiy"; $DB_USER ="root"; $DB_PASSWORD =""; // END OF DATABASE CONFIGURATION diff --git a/frontends/php/items.php b/frontends/php/items.php index 4b13215f..b8c54ca6 100644 --- a/frontends/php/items.php +++ b/frontends/php/items.php @@ -74,7 +74,7 @@ "delta"=> array(T_ZBX_INT, O_OPT, NULL, IN("0,1,2"),'isset({save})&&'.IN("0,3","type")), "formula"=> array(T_ZBX_DBL, O_OPT, NULL, NULL,'isset({save})&&{multiplier}==1'), - "logtimefmt"=> array(T_ZBX_STR, O_OPT, NULL, NOT_EMPTY,'isset({save})&&{value_type}==2'), + "logtimefmt"=> array(T_ZBX_STR, O_OPT, NULL, NULL,'isset({save})&&{value_type}==2'), "group_itemid"=> array(T_ZBX_INT, O_OPT, NULL, DB_ID, NULL), |
