From 2b6e04ff5eac21482727558b20407b7e94c51c62 Mon Sep 17 00:00:00 2001 From: hugetoad Date: Wed, 10 Aug 2005 11:09:06 +0000 Subject: - added support of hosts profiles (Alexei) git-svn-id: svn://svn.zabbix.com/trunk@1962 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/include/forms.inc.php | 112 ++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) (limited to 'frontends/php/include/forms.inc.php') diff --git a/frontends/php/include/forms.inc.php b/frontends/php/include/forms.inc.php index 21c88fad..93735441 100644 --- a/frontends/php/include/forms.inc.php +++ b/frontends/php/include/forms.inc.php @@ -1223,4 +1223,116 @@ show_table2_header_end(); } + + # Insert host profile form + function insert_host_profile_form($hostid) + { + $selected=0; + + if(isset($hostid)) + { + $result=DBselect("select * from hosts_profiles where hostid=$hostid"); + + if(DBnum_rows($result)==1) + { + $row=DBfetch($result); + + $selected=1; + $devicetype=$row["devicetype"]; + $name=$row["name"]; + $os=$row["os"]; + $serialno=$row["serialno"]; + $tag=$row["tag"]; + $macaddress=$row["macaddress"]; + $hardware=$row["hardware"]; + $software=$row["software"]; + $contact=$row["contact"]; + $location=$row["location"]; + $notes=$row["notes"]; + } + } + if($selected==0) + { + $devicetype=""; + $name=""; + $os=""; + $serialno=""; + $tag=""; + $macaddress=""; + $hardware=""; + $software=""; + $contact=""; + $location=""; + $notes=""; + } + + $col=0; + + show_form_begin("host_profile"); + echo S_HOST_PROFILE; + + show_table2_v_delimiter($col++); + echo "
"; + echo ""; + echo ""; + + echo S_DEVICE_TYPE; + show_table2_h_delimiter(); + echo form_input("devicetype",$devicetype,64); + + show_table2_v_delimiter($col++); + echo S_NAME; + show_table2_h_delimiter(); + echo form_input("name",$name,64); + + show_table2_v_delimiter($col++); + echo S_OS; + show_table2_h_delimiter(); + echo form_input("os",$os,64); + + show_table2_v_delimiter($col++); + echo S_SERIALNO; + show_table2_h_delimiter(); + echo form_input("serialno",$serialno,64); + + show_table2_v_delimiter($col++); + echo S_TAG; + show_table2_h_delimiter(); + echo form_input("tag",$tag,64); + + show_table2_v_delimiter($col++); + echo S_HARDWARE; + show_table2_h_delimiter(); + echo form_input("hardware",$hardware,64); + + show_table2_v_delimiter($col++); + echo S_SOFTWARE; + show_table2_h_delimiter(); + echo form_input("software",$software,64); + + show_table2_v_delimiter($col++); + echo S_CONTACT; + show_table2_h_delimiter(); + echo form_input("contact",$contact,64); + + show_table2_v_delimiter($col++); + echo S_LOCATION; + show_table2_h_delimiter(); + echo form_input("location",$location,64); + + show_table2_v_delimiter($col++); + echo S_NOTES; + show_table2_h_delimiter(); + echo form_input("notes",$notes,64); + + show_table2_v_delimiter2($col++); + echo ""; + if(isset($escalationid)) + { + echo ""; + echo ""; + } + + show_table2_header_end(); + } ?> -- cgit