database, "SELECT statvalue FROM object_statistics WHERE objectid=CAST('" . $objectid . "' AS BIGINT) AND statname='parameters'"); $stat = pg_fetch_object($r, 0); $this->nr_parameters = $stat->statvalue; $r = pg_exec ($this->database, "SELECT statvalue FROM object_statistics WHERE objectid=CAST('" . $objectid . "' AS BIGINT) AND statname='removed_parameters'"); $stat = pg_fetch_object($r, 0); $this->removed_parameters = $stat->statvalue; // Gather statistics on notifications $r = pg_exec ($this->database, "SELECT statvalue FROM object_statistics WHERE objectid=CAST('" . $objectid . "' AS BIGINT) AND statname='notifications'"); $stat = pg_fetch_object($r, 0); $this->nr_notifications = $stat->statvalue; $r = pg_exec ($this->database, "SELECT statvalue FROM object_statistics WHERE objectid=CAST('" . $objectid . "' AS BIGINT) AND statname='closed_notifications'"); $stat = pg_fetch_object($r, 0); $this->closed_notifications = $stat->statvalue; // Gather statistics on log entries $r = pg_exec ($this->database, "SELECT statvalue FROM object_statistics WHERE objectid=CAST('" . $objectid . "' AS BIGINT) AND statname='logs'"); $stat = pg_fetch_object($r, 0); $this->nr_logs = $stat->statvalue; } function Body() { clientscripts(); echo "

Objects Administration


"; if (isset($_POST['action']) && $_POST['action'] == 'Create' && !empty($_POST['objectname'])) { pg_exec($this->database, "INSERT INTO object (objectname, log_count, parameter_count, notification_count) VALUES ('" . $_POST['objectname'] . "', '0', '0', '0')"); } if (isset($_POST['action']) && $_POST['action'] == 'Remove' && !empty($_POST['objectname'])) { pg_exec($this->database, "DELETE FROM object WHERE objectname='" . $_POST['objectname'] . "'"); } $res = pg_exec($this->database, "SELECT objectid,objectname, log_count, notification_count FROM object ORDER BY objectname"); ?> GatherStatistics($u->objectid); $count_parameters += $this->nr_parameters; $removed_parameters += $this->removed_parameters; $count_logs = $count_logs + $this->nr_logs; //$nr_notifications = $u->notification_count; $count_notifications += $this->nr_notifications; $closed_notifications += $this->closed_notifications; ?> "; echo ""; echo ""; echo ""; echo "
ObjectLog entries ParametersNotifications

objectname ?>
objectid'> $this->nr_logs " ?> objectid'>" . $this->nr_parameters . " (" . $this->removed_parameters . " removed)" ?> objectid'>" . $this->nr_notifications . " (" . $this->closed_notifications . " closed)" ?>


TOTALS
$count_logs$count_parameters ($removed_parameters removed)$count_notifications ($closed_notifications closed)
"; ?>

Create new object:

Object's name (FQDN):

Showpage(); ?>