reduce services/locations viewing level to 5

git-svn-id: http://www.observium.org/svn/observer/trunk@1032 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2010-03-17 15:25:33 +00:00
parent 0f1bd1f25d
commit 8ada8b4886
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
echo('<table cellpadding="7" cellspacing="0" class="devicetable" width="100%">');
if($_SESSION['userlevel'] == '10') {
if($_SESSION['userlevel'] >= '5') {
$sql = "SELECT `location` FROM `devices` GROUP BY `location` ORDER BY `location`";
} else {
$sql = "SELECT `location` FROM `devices` AS D, devices_perms AS P WHERE D.device_id = P.device_id AND P.user_id = '" . $_SESSION['user_id'] . "' GROUP BY `location` ORDER BY `location`";
+1 -1
View File
@@ -5,7 +5,7 @@ if($_GET['status'] == '0') { $where = " AND service_status = '0'"; } else { unse
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') {
if ($_SESSION['userlevel'] >= '5') {
$host_sql = "SELECT * FROM devices AS D, services AS S WHERE D.device_id = S.device_id 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.device_id AND D.device_id = P.device_id AND P.user_id = '" . $_SESSION['user_id'] . "' $where GROUP BY D.hostname ORDER BY D.hostname";