summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/config.inc.php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-01-05 20:33:08 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-01-05 20:33:08 +0000
commitbe897f0d7f1d53d6f447646d89abdcfe397723d8 (patch)
tree1d23517d42e6450e20acf5e773517fa6129935ae /frontends/php/include/config.inc.php
parent4f287f0bb911d4be6c3e4b34af135521775742e0 (diff)
Finished form for host-templates linkage.
git-svn-id: svn://svn.zabbix.com/trunk@1582 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/config.inc.php')
-rw-r--r--frontends/php/include/config.inc.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php
index 38519007..1060655f 100644
--- a/frontends/php/include/config.inc.php
+++ b/frontends/php/include/config.inc.php
@@ -2996,6 +2996,27 @@ echo "</head>";
return DBexecute($sql);
}
+ # Add host-template linkage
+ function add_template_linkage($hostid,$templateid,$items,$triggers,$actions,$graphs,$screens)
+ {
+ $sql="insert into hosts_templates (hostid,templateid,items,triggers,actions,graphs,screens) values ($hostid,$templateid,$items,$triggers,$actions,$graphs,$screens)";
+ return DBexecute($sql);
+ }
+
+ # Update host-template linkage
+ function update_template_linkage($hosttemplateid,$hostid,$templateid,$items,$triggers,$actions,$graphs,$screens)
+ {
+ $sql="update hosts_templates set hostid=$hostid,templateid=$templateid,items=$items,triggers=$triggers,actions=$actions,graphs=$graphs,screens=$screens where hosttemplateid=$hosttemplateid";
+ return DBexecute($sql);
+ }
+
+ # Delete host-template linkage
+ function delete_template_linkage($hosttemplateid)
+ {
+ $sql="delete from hosts_templates where hosttemplateid=$hosttemplateid";
+ return DBexecute($sql);
+ }
+
# Add Host to system map
function add_host_to_sysmap($sysmapid,$hostid,$label,$x,$y,$icon,$url,$icon_on)