// START - Wer war in den letzten 24 Stunden online - Code
$stime = time()-(60*60*24);
$query = $db->query("SELECT u.* FROM ".TABLE_PREFIX."users u LEFT JOIN ".TABLE_PREFIX."usergroups g ON (g.gid=u.usergroup) WHERE u.lastactive > $stime ORDER BY u.lastactive DESC");
$todaycomma = '';
$onlinetoday = '';
while($online = $db->fetch_array($query))
{
if($online['invisible'] != "yes" || $mybb->usergroup['canviewwolinvis'] == "yes")
{
if($online['invisible'] == "yes")
{
$invisiblemark = "*";
}
else
{
$invisiblemark = "";
}
$onlinetoday .= $todaycomma."<a href=\"member.php?action=profile&uid=".$online['uid']."\">".format_name($online['username'], $online['usergroup'], $online['displaygroup']).$invisiblemark."</a>; " ;
}
}
$num_visitors = $db->num_rows($db->query("SELECT * FROM ".TABLE_PREFIX."sessions WHERE time > ".$stime.""));
if($num_visitors == "0")
{
$visitors_online_today = "";
}
else
{
$visitors_online_today = "".$num_visitors." Benutzer aktiv in den letzten 24 Stunden, davon folgende Mitglieder:";
}
// ENDE - Wer war in den letzten 24 Stunden online - Code