0) { 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) { if(!check_right("Host","U",0)) { error("Insufficient permissions"); return 0; } $result=DBexecute("delete from hosts_profiles where hostid=$hostid"); return $result; } ?>