diff --git a/html/pages/device/edit.inc.php b/html/pages/device/edit.inc.php index 74a43b220..374570e35 100644 --- a/html/pages/device/edit.inc.php +++ b/html/pages/device/edit.inc.php @@ -12,6 +12,12 @@ if ($_SESSION['userlevel'] < '7') $panes['device'] = 'Device Settings'; $panes['snmp'] = 'SNMP'; $panes['ports'] = 'Port Settings'; + + if (count($config['os'][$device['os']]['icons'])) + { + $panes['icon'] = 'Icon'; + } + $panes['apps'] = 'Applications'; $panes['alerts'] = 'Alerts'; $panes['modules'] = 'Modules'; @@ -22,7 +28,7 @@ if ($_SESSION['userlevel'] < '7') } $panes['ipmi'] = 'IPMI'; - + print_optionbar_start(); unset($sep); diff --git a/html/pages/device/edit/device.inc.php b/html/pages/device/edit/device.inc.php index bf427a8f1..8af554de0 100644 --- a/html/pages/device/edit/device.inc.php +++ b/html/pages/device/edit/device.inc.php @@ -6,11 +6,6 @@ if ($_POST['editing']) { $updated = 0; - $descr = mres($_POST['descr']); - $ignore = mres($_POST['ignore']); - $type = mres($_POST['type']); - $disabled = mres($_POST['disabled']); - $override_sysLocation_bool = mres($_POST['override_sysLocation']); if (isset($_POST['sysLocation'])) { $override_sysLocation_string = mres($_POST['sysLocation']); } diff --git a/html/pages/device/edit/icon.inc.php b/html/pages/device/edit/icon.inc.php new file mode 100644 index 000000000..3b78c7ff9 --- /dev/null +++ b/html/pages/device/edit/icon.inc.php @@ -0,0 +1,84 @@ + "7") + { + $param = array('icon' => $_POST['icon']); + + $rows_updated = dbUpdate($param, 'devices', '`device_id` = ?', array($device['device_id'])); + + if ($rows_updated > 0 || $updated) + { + $update_message = "Device icon updated."; + $updated = 1; + $device = dbFetchRow("SELECT * FROM `devices` WHERE `device_id` = ?", array($device['device_id'])); + } elseif ($rows_updated = '-1') { + $update_message = "Device icon unchanged. No update necessary."; + $updated = -1; + } else { + $update_message = "Device icon update error."; + } + } + else + { + include("includes/error-no-perm.inc.php"); + } +} + +if ($updated && $update_message) +{ + print_message($update_message); +} elseif ($update_message) { + print_error($update_message); +} + +?> + +
| + + | ++ | + |