mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 00:24:21 +02:00
Lots of additions.
git-svn-id: http://www.observium.org/svn/observer/trunk@108 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -1,12 +1,15 @@
|
||||
<?php
|
||||
|
||||
if($_GET['status'] == '0') { $where = " AND service_status = '0'"; }
|
||||
if($_GET['status'] == '0') { $where = " AND service_status = '0'"; } else { unset ($where); }
|
||||
|
||||
echo("<div style='margin: 5px;'><table cellpadding=7 border=0 cellspacing=0 width=100%>");
|
||||
//echo("<tr class=interface-desc bgcolor='#e5e5e5'><td>Device</td><td>Service</td><td>Status</td><td>Changed</td><td>Checked</td><td>Message</td></tr>");
|
||||
|
||||
|
||||
if ($_SESSION['userlevel'] == '10') {
|
||||
$host_sql = "SELECT * FROM devices AS D, services AS S WHERE D.device_id = S.service_host GROUP BY D.hostname ORDER BY D.hostname";
|
||||
} else {
|
||||
$host_sql = "SELECT * FROM devices AS D, services AS S, devices_perms AS P WHERE D.device_id = S.service_host AND D.device_id = P.device_id AND P.user_id = '" . $_SESSION['user_id'] . "' $where GROUP BY D.hostname ORDER BY D.hostname";
|
||||
}
|
||||
$host_query = mysql_query($host_sql);
|
||||
while($host_data = mysql_fetch_array($host_query)) {
|
||||
$device_id = $host_data['device_id'];
|
||||
|
||||
Reference in New Issue
Block a user