<?php
echo '<div class="phdr">Statistika</div><div class="menu">';
$users = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `lastdate` > '" . (time() - 300) . "'"), 0); 
$guests  = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_sessions` WHERE `lastdate` > '" . (time() - 300) ."'"), 0); 
$online=$users+$guests; 
echo ''. 
'<a href="/users/index.php?act=online">Foydalanuvchilar:  '.$users.'</a><br/>'. 
'<a href="/users/index.php?act=online&mod=guest">Mehmonlar:  '.$guests.'</a><br/>';
echo '<b>Hammasi:</b>  '. $online.'</div>'; ?>