<?PHP

include_once('minimum_init.php');

$onlinecount = $osDB->getOne('SELECT count(ou.userid) as onlineusers FROM ! ou, ! as user where ou.userid <> ifnull(?,-1) and ou.userid = user.id and user.allow_viewonline = ? and ou.lastactivitytime > ?', array( ONLINE_USERS_TABLE, USER_TABLE, $_SESSION['UserId'], '1', (time()-120) ) );

echo '|||onlinecount|:|<a href="onlineusers.php">'.get_lang('online_users').'&nbsp;'.$onlinecount.'</a>'."|||statsonlinecounter|:|".$onlinecount;
?>