summaryrefslogtreecommitdiffstats
path: root/frontends/php/queue.html
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2001-04-16 17:45:23 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2001-04-16 17:45:23 +0000
commita2f46eff39e547e40d042ce97851805b9f9efea4 (patch)
tree674ce1bfe3af9dd6ca058b44d5d0fdf9e7b4ba29 /frontends/php/queue.html
parenta23282b7b988f6bbe5e7f98170c88e0dfe24fc3b (diff)
downloadzabbix-a2f46eff39e547e40d042ce97851805b9f9efea4.tar.gz
zabbix-a2f46eff39e547e40d042ce97851805b9f9efea4.tar.xz
zabbix-a2f46eff39e547e40d042ce97851805b9f9efea4.zip
Added PostgreSQL support for PHP frontend. Added database abstraction layer in frontend/php/include/db.inc.
git-svn-id: svn://svn.zabbix.com/trunk@42 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/queue.html')
-rw-r--r--frontends/php/queue.html18
1 files changed, 10 insertions, 8 deletions
diff --git a/frontends/php/queue.html b/frontends/php/queue.html
index e2e5d4d3..f50c0c39 100644
--- a/frontends/php/queue.html
+++ b/frontends/php/queue.html
@@ -14,19 +14,20 @@
show_table_header("QUEUE");
?>
<?
- $result=mysql_query("select i.itemid, from_unixtime(i.nextcheck), i.description, h.host from items i,hosts h where i.status=0 and h.status=0 and i.hostid=h.hostid and i.nextcheck<UNIX_TIMESTAMP() order by i.nextcheck;",$mysql);
- $i=0;
+ $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=0 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>";
echo "\n";
- while($row=mysql_fetch_row($result))
+ for($i=0;$i<DBnum_rows($result);$i++)
{
- $i++;
- $itemid=$row[0];
- $time=$row[1];
- $description=$row[2];
- $host=$row[3];
+ $itemid=DBget_field($result,$i,0);
+ $time=DBget_field($result,$i,1);
+ $description=DBget_field($result,$i,2);
+ $host=DBget_field($result,$i,3);
+
+ $time=date("m.d.Y H:i:s",$time);
if($col==1)
{
@@ -46,6 +47,7 @@
echo "</table>";
?>
<?
+ $i=DBnum_rows($result);
show_table_header("Total:$i");
?>