2 bugfixes to devices page

git-svn-id: http://www.observium.org/svn/observer/trunk@775 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2010-02-06 22:20:59 +00:00
parent 61f8cb27c1
commit 86a109f4b2
+3 -1
View File
@@ -105,7 +105,7 @@ if ($_POST['version']) { $where .= " AND version = '".$_POST['version']."'"; }
if ($_POST['hardware']) { $where .= " AND hardware = '".$_POST['hardware']."'"; } if ($_POST['hardware']) { $where .= " AND hardware = '".$_POST['hardware']."'"; }
if ($_POST['features']) { $where .= " AND features = '".$_POST['features']."'"; } if ($_POST['features']) { $where .= " AND features = '".$_POST['features']."'"; }
if ($_POST['location']) { $where .= " AND location = '".$_POST['location']."'"; } if ($_POST['location']) { $where .= " AND location = '".$_POST['location']."'"; }
if ($_GET['location']) { $where .= " AND location = '".$_GET['location']."'"; } if ($_GET['location'] && !isset($_POST['location'])) { $where .= " AND location = '".$_GET['location']."'"; }
if ($_GET['type']) { $where = "AND type = '$_GET[type]'"; } if ($_GET['type']) { $where = "AND type = '$_GET[type]'"; }
if ($_GET['location'] == "Unset") { $where .= " AND location = ''"; } if ($_GET['location'] == "Unset") { $where .= " AND location = ''"; }
@@ -114,6 +114,8 @@ if ($_GET['status'] == "alerted") {
$sql = "SELECT * FROM devices " . $device_alert_sql . " GROUP BY `device_id` ORDER BY `ignore`, `status`, `os`, `hostname`"; $sql = "SELECT * FROM devices " . $device_alert_sql . " GROUP BY `device_id` ORDER BY `ignore`, `status`, `os`, `hostname`";
} }
echo $sql;
echo('<table cellpadding="7" cellspacing="0" class="devicetable" width="100%"> echo('<table cellpadding="7" cellspacing="0" class="devicetable" width="100%">
<tr class="tablehead"><th></th><th>Device</th><th>Operating System</th><th>Platform</th><th>Uptime</th></tr>'); <tr class="tablehead"><th></th><th>Device</th><th>Operating System</th><th>Platform</th><th>Uptime</th></tr>');