Location: PHPKode > projects > PHPEcho CMS > modules/statistics/index.php
<?php
/*  +--------------------------------------------
*   |
*   |     Product:       PHPEchoCMS
*   |     Author:        Anas Husseini
*   |     License:       GPL
*   |     Last updated:  21.03.07
*   |     For version:   2.0  
*   |     Desc:          Statistics module
*   |        
*   +--------------------------------------------
*/

if( !@$BASE_LOAD )
{
    die('Application error.');
}

$mlang = $core->getlang ("statistics");

$allvisits = query ("select `allusers_visits` from `".PREFIX."settings`", 2);
$uservisits = query ("select `user_visits` from `".PREFIX."users` where `username`='".$_SESSION['username']."'", 2);
$os = query ("select * from `".PREFIX."statistics_os`", 1);
$browser = query ("select * from `".PREFIX."statistics_browser`", 1);

echo "<font size='3'><b>".$mlang['001']."</b></font><br><br>";
echo $mlang['003'].$uservisits."<br>";
echo $mlang['002'].$allvisits."<br>";
echo $mlang['007']."<script>document.write(navigator.platform)</script><br>";
echo $mlang['008']."<script>document.write(navigator.appCodeName)</script><br><br>";

echo "<table width='60%' class='border'>";
echo "<tr><td width='80%' class='title'><b>".$mlang['004']."</b></td><td class='title'><b><center>".$mlang['005']."</center></b></td></tr>";
$x = 0;
while ($o = mysql_fetch_array($os))
{
	echo "<tr><td class='table".$x."'>".$o['os']."</td>";
	echo "<td class='table".$x."'><center>".$o['counts']."</center></td></tr>";
	$x = ($x + 1) % 2;
}
echo "</table><br>";

echo "<table width='60%' class='border'>";
echo "<tr><td width='80%' class='title'><b>".$mlang['006']."</b></td><td class='title'><b><center>".$mlang['005']."</center></b></td></tr>";
$x = 0;
while ($b = mysql_fetch_array($browser))
{
	echo "<tr><td class='table".$x."'>".$b['browser']."</td>";
	echo "<td class='table".$x."'><center>".$b['counts']."</center></td></tr>";
	$x = ($x + 1) % 2;
}
echo "</table><br>";

?>
Return current item: PHPEcho CMS