<?php
// $Id: mod_stats.php,v 1.8 2003/12/03 20:56:34 rcastley Exp $
/**
* Site Statistics Module
* @package Mambo Open Source
* @Copyright (C) 2000 - 2003 Miro International Pty Ltd
* @ All rights reserved
* @ Mambo Open Source is Free Software
* @ Released under GNU/GPL License : http://www.gnu.org/copyleft/gpl.html
* @version $Revision: 1.8 $
**/

defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

global $mosConfig_offset;

$content ="";
$content .="<b>OS:</b> " .substr(php_uname(),0,7);
$content .="<br /><b>PHP:</b> " .phpversion();
$content .="<br /><b>MySQL:</b> " .mysql_get_server_info();
$content .="<br /><b>"._TIME_STAT.": </b> " .date("H:i",time()+($mosConfig_offset*60*60));

$query="SELECT count(id) AS count_users FROM #__users";
$database->setQuery($query);
$content .="<br /><b>"._MEMBERS_STAT.":</b> " .$database->loadResult();

$query="SELECT sum(hits) as count from #__stats_agents WHERE type='1'";
$database->setQuery($query);
$content .="<br /><b>"._HITS_STAT.":</b> " .$database->loadResult();

$query="SELECT count(id) as count_items from #__content";
$database->setQuery($query);
$content .="<br /><b>"._NEWS_STAT.":</b> ".$database->loadResult();

$query="SELECT count(id) as count_links FROM #__weblinks WHERE published='1'";
$database->setQuery($query);
$content .="<br /><b>"._LINKS_STAT.":</b> ".$database->loadResult();
?>
