diff options
author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-02-29 15:44:44 +0000 |
---|---|---|
committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-02-29 15:44:44 +0000 |
commit | b3fdbc2e18481417daa954df4a84715019ead9a3 (patch) | |
tree | a66eaa27f88e3a180afc8f28c7b04b82b0b47eed /frontends/php/include/hosts.inc.php | |
parent | 9ebbcf5e025c0353bef8bf11d8bccd811c663024 (diff) | |
download | zabbix-b3fdbc2e18481417daa954df4a84715019ead9a3.tar.gz zabbix-b3fdbc2e18481417daa954df4a84715019ead9a3.tar.xz zabbix-b3fdbc2e18481417daa954df4a84715019ead9a3.zip |
- [DEV-118] updates and fixes {still beta} (Artem)
- [DEV-126] removed screen/maps/graphs {beta} (Artem)
- other changes (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5423 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/hosts.inc.php')
-rw-r--r-- | frontends/php/include/hosts.inc.php | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/frontends/php/include/hosts.inc.php b/frontends/php/include/hosts.inc.php index 7a843557..81ac6b60 100644 --- a/frontends/php/include/hosts.inc.php +++ b/frontends/php/include/hosts.inc.php @@ -20,7 +20,6 @@ ?> <?php require_once "include/graphs.inc.php"; -require_once "include/profiles.inc.php"; require_once "include/triggers.inc.php"; require_once "include/items.inc.php"; @@ -1288,4 +1287,32 @@ require_once "include/items.inc.php"; } return $status; } + +// Add Host Profile + + function add_host_profile($hostid,$devicetype,$name,$os,$serialno,$tag,$macaddress,$hardware,$software,$contact,$location,$notes){ + + $result=DBselect("select * from hosts_profiles where hostid=$hostid"); + if(DBfetch($result)){ + error("Host profile already exists"); + return 0; + } + + $result=DBexecute("insert into hosts_profiles". + " (hostid,devicetype,name,os,serialno,tag,macaddress,hardware,software,contact,". + "location,notes) values ($hostid,".zbx_dbstr($devicetype).",".zbx_dbstr($name).",". + zbx_dbstr($os).",".zbx_dbstr($serialno).",".zbx_dbstr($tag).",".zbx_dbstr($macaddress). + ",".zbx_dbstr($hardware).",".zbx_dbstr($software).",".zbx_dbstr($contact).",". + zbx_dbstr($location).",".zbx_dbstr($notes).")"); + + return $result; + } + +// Delete Host Profile + + function delete_host_profile($hostid){ + $result=DBexecute("delete from hosts_profiles where hostid=$hostid"); + + return $result; + } ?> |