diff --git a/html/pages/devices.php b/html/pages/devices.php
index 2f96eef5e..97d1460aa 100644
--- a/html/pages/devices.php
+++ b/html/pages/devices.php
@@ -11,10 +11,14 @@
".$data['os']."");
+ while ($data = mysql_fetch_array($query))
+ {
+ if ($data['os'])
+ {
+ echo("");
+ }
}
?>
@@ -23,10 +27,14 @@
".$data['version']."");
+ while ($data = mysql_fetch_array($query))
+ {
+ if ($data['version'])
+ {
+ echo("");
+ }
}
?>
@@ -36,10 +44,14 @@
".$data['hardware']."");
+ while ($data = mysql_fetch_array($query))
+ {
+ if ($data['hardware'])
+ {
+ echo("");
+ }
}
?>
@@ -48,10 +60,14 @@
".$data['features']."");
+ while ($data = mysql_fetch_array($query))
+ {
+ if ($data['features'])
+ {
+ echo("");
+ }
}
?>
@@ -61,15 +77,18 @@
".$data['location']."");
+ while ($data = mysql_fetch_array($query))
+ {
+ if ($data['location'])
+ {
+ echo("");
+ }
}
?>
-
|
@@ -81,18 +100,18 @@
print_optionbar_end();
-if($_POST['hostname']) { $where = " AND hostname LIKE '%".$_POST['hostname']."%'"; }
-if($_POST['os']) { $where = " AND os = '".$_POST['os']."'"; }
-if($_POST['version']) { $where .= " AND version = '".$_POST['version']."'"; }
-if($_POST['hardware']) { $where .= " AND hardware = '".$_POST['hardware']."'"; }
-if($_POST['features']) { $where .= " AND features = '".$_POST['features']."'"; }
-if($_POST['location']) { $where .= " AND location = '".$_POST['location']."'"; }
-if($_GET['location']) { $where = "AND location = '$_GET[location]'"; }
-if($_GET['location'] == "Unset") { $where = "AND location = ''"; }
-if($_GET['type']) { $where = "AND type = '$_GET[type]'"; }
+if ($_POST['hostname']) { $where = " AND hostname LIKE '%".$_POST['hostname']."%'"; }
+if ($_POST['os']) { $where = " AND os = '".$_POST['os']."'"; }
+if ($_POST['version']) { $where .= " AND version = '".$_POST['version']."'"; }
+if ($_POST['hardware']) { $where .= " AND hardware = '".$_POST['hardware']."'"; }
+if ($_POST['features']) { $where .= " AND features = '".$_POST['features']."'"; }
+if ($_POST['location']) { $where .= " AND location = '".$_POST['location']."'"; }
+if ($_GET['location']) { $where = "AND location = '$_GET[location]'"; }
+if ($_GET['location'] == "Unset") { $where = "AND location = ''"; }
+if ($_GET['type']) { $where = "AND type = '$_GET[type]'"; }
$sql = "select * from devices WHERE 1 $where ORDER BY `ignore`, `status`, `hostname`";
-if($_GET['status'] == "alerted") {
+if ($_GET['status'] == "alerted") {
$sql = "select * from devices " . $device_alert_sql . " GROUP BY `device_id` ORDER BY `ignore`, `status`, `os`, `hostname`";
}
@@ -100,8 +119,8 @@ echo('
| Device | Operating System | Platform | Uptime |
');
$device_query = mysql_query($sql);
-while($device = mysql_fetch_array($device_query)) {
- if( devicepermitted($device['device_id']) ) {
+while ($device = mysql_fetch_array($device_query)) {
+ if ( devicepermitted($device['device_id']) ) {
include("includes/hostbox.inc");
}
}