Source for file systemstats.php
Documentation is available at systemstats.php
* Collate some stats on the current usage of the system (number of bookings etc)
* @author Stuart Prescott
* @copyright Copyright Stuart Prescott
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
/** Load ancillary functions */
require_once 'inc/typeinfo.php';
* Collate some stats on the current usage of the system (number of bookings etc)
* numbers of rows in each table ($table => $num_rows)
* tables on which stats should be compiled
* Constructor: load up the stats
$tables =
array('users', 'projects', 'instruments', 'bookings');
foreach ($tables as $t) {
* Runs the SQL count(*) query to find out how many rows in the table
* @param string $table the table to query
* Return the stats for the designated table
* @param string $table the table to query
return $this->stats[$table];
* @return string name of the server software
if (! isset
($_SERVER['SERVER_SOFTWARE'])) return "";
return substr($_SERVER['SERVER_SOFTWARE'], 0, strpos($_SERVER['SERVER_SOFTWARE'], '/'));
* @return string version of the server software
if (! isset
($_SERVER['SERVER_SOFTWARE'])) return "";
$slash =
strpos($_SERVER['SERVER_SOFTWARE'], '/');
$version =
substr($_SERVER['SERVER_SOFTWARE'], $slash+
1);
$space =
strpos($version, ' ');
if ($space !==
false) $version =
substr($version, 0, $space);
Documentation generated on Tue, 06 Mar 2007 10:02:00 +0000 by phpDocumentor 1.3.0