Location: PHPKode > projects > Modular Site Manager > htdocs/content/Stats.php
<div align="center">
<? $this->stats(); ?>
<? echo "<strong>Your IP:</strong> ".$REMOTE_ADDR."<br />"; ?>
<? include "agents.php"; ?>
<? include "os2.php"; ?>
<? $load = microtime(); echo "<strong>Load time:</strong> ". number_format ($load,2)."s"; ?><br/>
<?php
$uptime = @exec('uptime');
preg_match("/averages?: ([0-9\.]+),[\s]+([0-9\.]+),[\s]+([0-9\.]+)/",$uptime,$avgs);
$average=$avgs[1]+$avgs[2]+$avgs[3]/3;
$load=$average;
echo '<strong>Server Load:</strong> '.cut($load, 5, "").'<br />';
?>
<strong>Forum Stats:</strong><br />
<?
$mysql = new mysql(DB_FORUM);
$members = mysql_num_rows($mysql->select("ibf_members", NULL, "id"))-1;
echo "<strong>Members: </strong>".$members."<br />\n";
$posts = mysql_num_rows($mysql->select("ibf_posts", NULL, "pid"));
echo "<strong>Posts: </strong>".$posts."<br />\n";
$topics = mysql_num_rows($mysql->select("ibf_topics", NULL, "tid"));
echo "<strong>Topics: </strong>".$topics."<br />\n";
$mysql->close();
unset($mysql);
?>
</div>
Return current item: Modular Site Manager