From 5093910be5d37164158f5ce7cf62b36ca4f38866 Mon Sep 17 00:00:00 2001 From: arjen Date: Mon, 10 Feb 2003 15:42:24 +0000 Subject: [PATCH] Show the total number of Log entries, parameters and notifications --- src/web/objects.php | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/src/web/objects.php b/src/web/objects.php index 33a90e0..e322a04 100644 --- a/src/web/objects.php +++ b/src/web/objects.php @@ -9,7 +9,7 @@ *********************** ** FILE NAME : objects.php ** SYSTEM NAME : Gnucomo - Gnu Computer Monitoring -** VERSION NUMBER : $Revision: 1.2 $ +** VERSION NUMBER : $Revision: 1.3 $ ** ** DESCRIPTION : Objects Administration page. ** Input parameters: action (POST) : empty, 'Create' @@ -29,12 +29,15 @@ /***************************** $Log: objects.php,v $ - Revision 1.2 2003-02-05 09:48:14 arjen + Revision 1.3 2003-02-10 15:42:24 arjen + Show the total number of Log entries, parameters and notifications + + Revision 1.2 2003/02/05 09:48:14 arjen Added display and handling of notifications ******************************/ -// RCSID = "$Id: objects.php,v 1.2 2003-02-05 09:48:14 arjen Exp $"; +// RCSID = "$Id: objects.php,v 1.3 2003-02-10 15:42:24 arjen Exp $"; session_start(); require_once('classes/gnucomo_config.php'); @@ -103,6 +106,12 @@ else echo ""; $obj = 0; + + //The counters are set to zero + $count_logs = 0; + $count_notifications = 0; + $count_parameters = 0; + while ($obj < pg_numrows($res)) { $u = pg_fetch_object($res, $obj); @@ -111,18 +120,21 @@ else $r = pg_fetch_object($r, 0); $nr_logs = $r->count; + $count_logs = $count_logs + $nr_logs; $r = pg_exec ($conn, "SELECT count(paramid) FROM parameter WHERE objectid='" . $u->objectid . "'"); $r = pg_fetch_object($r, 0); $nr_params = $r->count; + $count_parameters = $count_parameters + $nr_params; $r = pg_exec ($conn, "SELECT count(notificationid) FROM notification WHERE objectid='" . $u->objectid . "'"); $r = pg_fetch_object($r, 0); $nr_notifications = $r->count; + $count_notifications = $count_notifications + $nr_notifications; ?> "; + echo ""; + echo ""; + echo ""; echo "

objectname ?> @@ -141,6 +153,12 @@ else


TOTALS
$count_logs Log entries$count_parameters Parameters$count_notifications Notifications
"; } -- 2.11.0