summaryrefslogtreecommitdiffstats
path: root/frontends/php/queue.php
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/php/queue.php')
-rw-r--r--frontends/php/queue.php19
1 files changed, 15 insertions, 4 deletions
diff --git a/frontends/php/queue.php b/frontends/php/queue.php
index 986c2b13..b2692048 100644
--- a/frontends/php/queue.php
+++ b/frontends/php/queue.php
@@ -7,15 +7,23 @@
?>
<?
- show_table_header("QUEUE OF ITEMS TO BE UPDATED");
+ if(!check_right("Host","R",0))
+ {
+ show_table_header("<font color=\"AA0000\">No permissions !</font>");
+ show_footer();
+ exit;
+ }
+?>
+<?
+ show_table_header("QUEUE OF ITEMS TO BE UPDATED");
echo "<br>";
show_table_header("QUEUE");
?>
<?
$now=time();
- $result=DBselect("select i.itemid, i.nextcheck, i.description, h.host from items i,hosts h where i.status=0 and h.status in (0,2) and i.hostid=h.hostid and i.nextcheck<$now order by i.nextcheck");
+ $result=DBselect("select i.itemid, i.nextcheck, i.description, h.host,h.hostid from items i,hosts h where i.status=0 and h.status in (0,2) and i.hostid=h.hostid and i.nextcheck<$now order by i.nextcheck");
echo "<table border=0 width=100% bgcolor='#CCCCCC' cellspacing=1 cellpadding=3>";
echo "\n";
echo "<tr><td><b>Next time to check</b></td><td><b>Host</b></td><td><b>Description</b></td></tr>";
@@ -23,6 +31,10 @@
$col=0;
while($row=DBfetch($result))
{
+ if(!check_right("Host","R",$row["hostid"]))
+ {
+ continue;
+ }
if($col++%2==0) { echo "<tr bgcolor=#EEEEEE>"; }
else { echo "<tr bgcolor=#DDDDDD>"; }
echo "<td>".date("m.d.Y H:i:s",$row["nextcheck"])."</td>";
@@ -33,8 +45,7 @@
echo "</table>";
?>
<?
- $i=DBnum_rows($result);
- show_table_header("Total:$i");
+ show_table_header("Total:$col");
?>
<?