'" . db_fetch_cell("select description from host where id=$args[id]") . "'?", getenv("HTTP_REFERER"), "host.php?action=remove&id=$args[id]"); include ('include/bottom_footer.php'); exit; } if (($config["remove_verification"]["value"] == "") || ($args[confirm] == "yes")) { db_execute("delete from host where id=$args[id]"); } } function host_save() { global $form; $save["id"] = $form["id"]; $save["host_template_id"] = $form["host_template_id"]; $save["description"] = $form["description"]; $save["hostname"] = $form["hostname"]; $save["management_ip"] = $form["management_ip"]; $save["snmp_community"] = $form["snmp_community"]; $save["snmp_version"] = $form["snmp_version"]; $save["snmp_username"] = $form["snmp_username"]; $save["snmp_password"] = $form["snmp_password"]; if (sql_save($save, "host")) { raise_message(1); }else{ raise_message(2); header("Location: " . $_SERVER["HTTP_REFERER"]); exit; } } function host_edit() { global $args, $colors, $snmp_versions; display_output_messages(); start_box("Polling Hosts [edit]", "", ""); if (isset($args[id])) { $host = db_fetch_row("select * from host where id=$args[id]"); }else{ unset($host); } ?>
Description
Give this host a meaningful description. Host Template
Choose what type of host, host template this is. The host template will govern what kinds of data should be gathered from this type of host. Hostname
Fill in the fully qualified hostname for this device. Management IP
Choose the IP address that will be used to gather data from this host. The hostname will be used a fallback in case this fails. SNMP Community
Fill in the SNMP read community for this device. SNMP Username
Fill in the SNMP username for this device (v3). SNMP Community
Fill in the SNMP password for this device (v3). SNMP Version
Choose the SNMP version for this host.
Polling Hosts", "", "host.php?action=edit"); print ""; DrawMatrixHeaderItem("Description",$colors[header_text],1); DrawMatrixHeaderItem("Hostname",$colors[header_text],1); DrawMatrixHeaderItem(" ",$colors[header_text],1); print ""; $hosts = db_fetch_assoc("select id,hostname,description from host order by description"); if (sizeof($hosts) > 0) { foreach ($hosts as $host) { DrawMatrixRowAlternateColorBegin($colors[alternate],$colors[light],$i); $i++; ?> Delete