hasGlobalAdmin()) { $ipmi_hostname = $_POST['ipmi_hostname']; $ipmi_port = (int) $_POST['ipmi_port']; $ipmi_username = $_POST['ipmi_username']; $ipmi_password = $_POST['ipmi_password']; $ipmi_kg_key = $_POST['ipmi_kg_key']; if ($ipmi_hostname != '') { set_dev_attrib($device, 'ipmi_hostname', $ipmi_hostname); } else { del_dev_attrib($device, 'ipmi_hostname'); } if ($ipmi_port != '') { set_dev_attrib($device, 'ipmi_port', $ipmi_port); } else { set_dev_attrib($device, 'ipmi_port', '623'); // Default port } if ($ipmi_username != '') { set_dev_attrib($device, 'ipmi_username', $ipmi_username); } else { del_dev_attrib($device, 'ipmi_username'); } if ($ipmi_password != '') { set_dev_attrib($device, 'ipmi_password', $ipmi_password); } else { del_dev_attrib($device, 'ipmi_password'); } if ($ipmi_kg_key != '') { set_dev_attrib($device, 'ipmi_kg_key', $ipmi_kg_key); } else { del_dev_attrib($device, 'ipmi_kg_key'); } $update_message = 'Device IPMI data updated.'; $updated = 1; } else { include 'includes/html/error-no-perm.inc.php'; }//end if }//end if if ($updated && $update_message) { print_message($update_message); } elseif ($update_message) { print_error($update_message); } ?>