[问题]首页在线会员状态图标显示hack 我的改了很多次都没有成功,请男子帮忙,谢谢。我的代码如下,可以帮我改改嘛,我的论坛分 管理员 总版主 版主 VIP会员 会员 隐身会员 客人7个用户组
$loggedins=$DB_site->query("SELECT DISTINCT session.userid,username,invisible,usergroupid FROM session LEFT JOIN user ON (user.userid=session.userid) WHERE session.userid>0 AND session.lastactivity>$datecut ORDER BY invisible ASC, username ASC"); if ($loggedin=$DB_site->fetch_array($loggedins)) { $numberregistered++; if ($loggedin['invisible']==0 or $bbuserinfo['usergroupid']==6) { $numbervisible++; $userid = $loggedin['userid']; if ($loggedin['invisible'] == 1) { // Invisible User but show to Admin $invisibleuser = '*' } else { $invisibleuser = '' } if ($loggedin['usergroupid'] == 6 and $highlightadmin) { $username = "<b><i>$loggedin[username]</i></b>"; } else if (($mod["$userid"] or $loggedin['usergroupid'] == 5) and $highlightadmin) { $username = "<b>$loggedin[username]</b>"; } else { $username = $loggedin['username']; } eval("\$activeusers = \"".gettemplate('forumhome_loggedinuser')."\";"); }
while ($loggedin=$DB_site->fetch_array($loggedins)) { $numberregistered++; $invisibleuser = '' if ($loggedin['invisible']==1 and $bbuserinfo['usergroupid']!=6) { continue; } $numbervisible++; $userid=$loggedin['userid']; if ($loggedin['invisible'] == 1) { // Invisible User but show to Admin $invisibleuser = '*' } if ($loggedin['usergroupid'] == 6 and $highlightadmin) { $username = "<b><i>$loggedin[username]</i></b>"; } else if (($mod["$userid"] or $loggedin['usergroupid'] == 5) and $highlightadmin) { $username = "<b>$loggedin[username]</b>"; } else { $username = $loggedin['username']; } eval("\$activeusers .= \", ".gettemplate('forumhome_loggedinuser')."\";"); } } $DB_site->free_result($loggedins);
$totalonline=$numberregistered+$numberguest; $numberinvisible=$numberregistered-$numbervisible;
$maxusers = explode(' ', trim(gettemplate('maxloggedin', 0, 0)) ); $maxusers[0] = intval($maxusers[0]); if (($maxusers[0] <= $totalonline AND $maxusers[0] > 0) OR sizeof($maxusers) == 1) { $time = time(); $maxloggedin = intval($totalonline) . ' ' . $time; $DB_site->query("UPDATE template SET template='$maxloggedin' WHERE title='maxloggedin'"); $maxusers[0] = $totalonline; $maxusers[1] = $time; } $recordusers = $maxusers[0]; $recorddate = vbdate($dateformat,$maxusers[1]); $recordtime = vbdate($timeformat,$maxusers[1]); eval("\$loggedinusers = \"".gettemplate('forumhome_loggedinusers')."\";"); } |