$val) { if ($val) { delete_device($db_link,$val); } } header("Location: " . $_SERVER["REQUEST_URI"]); exit; } print_device_submenu($page_url); $sort_sql=" ORDER BY device_name"; if (!empty($sort_field) and !empty($order)) { $sort_sql = " ORDER BY $sort_field $order"; } ?>

0) { $filter .= ' and building_id=' . $f_building_id; } if ($f_devtype_id >= 0) { $filter .= ' and device_type=' . $f_devtype_id; } else { $filter .= ' and device_type<=2'; } if ($f_devmodel_id > 0) { $filter .= ' and device_model_id=' . $f_devmodel_id; } $dSQL = 'SELECT D.*, DM.model_name, B.name AS building_name FROM devices D LEFT JOIN device_models DM ON D.device_model_id = DM.id LEFT JOIN building B ON D.building_id = B.id WHERE D.deleted = 0 ' . $filter . ' ' . $sort_sql; $switches = get_records_sql($db_link,$dSQL); foreach ($switches as $row) { print "\n"; $cl = "data"; if (isset($row['nagios_status'])) { $cl = 'shutdown'; if ($row['nagios_status'] == 'UP') { $cl = 'up'; } } print "\n"; print "\n"; print "\n"; if (isset($row['user_id']) and $row['user_id']>0) { print "\n"; } else { print "\n"; } print "\n"; print '\n"; print "\n"; print "\n"; print "\n"; print "\n"; } ?>
> > > > >
".get_devtype_name($db_link,$row['device_type'])."" . $row['device_name'] . "".$row['ip']."".$row['ip']."" . get_vendor_name($db_link, $row['vendor_id']) . " " . $row['model_name'] . "' . $row['SN'] ."" . get_building($db_link, $row['building_id']); if (!empty($row['description'])) { print '
' . $row['description']; } print "
" . $row['port_count'] . "" . get_qa($row['nagios']) . "" . get_qa($row['discovery']) . "