function fetch_user_location_array($userinfo) { global $vbulletin; $datecut = TIMENOW - $vbulletin->options['cookietimeout']; if (($userinfo['invisible'] == 0 or $userinfo['userid'] == $vbulletin->userinfo['userid'] or $vbulletin->userinfo['permissions']['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canseehidden']) and $vbulletin->options['WOLenable'] and $vbulletin->userinfo['permissions']['wolpermissions'] & $vbulletin->bf_ugp_wolpermissions['canwhosonline'] and ($userinfo['lastactivity'] > $datecut and $userinfo['lastvisit'] != $user['lastactivity']) and $location = $vbulletin->db->query_first("SELECT location, badlocation FROM " . TABLE_PREFIX . "session WHERE userid = {$userinfo['userid']} AND lastactivity > {$datecut} ORDER BY lastactivity DESC LIMIT 1")) { $userinfo['location'] = $location['location']; $userinfo['badlocation'] = $location['badlocation']; $userinfo = process_online_location($userinfo); convert_ids_to_titles(); $userinfo = construct_online_bit($userinfo); } return $userinfo; }
function fetch_user_location_array($userinfo) { global $vbulletin; $datecut = TIMENOW - $vbulletin->options['cookietimeout']; if (($userinfo['invisible'] == 0 OR $userinfo['userid'] == $vbulletin->userinfo['userid'] OR $vbulletin->userinfo['permissions']['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canseehidden']) AND // Check if user is hidden $vbulletin->options['WOLenable'] AND // Is WOL enabled? ($vbulletin->userinfo['permissions']['wolpermissions'] & $vbulletin->bf_ugp_wolpermissions['canwhosonline']) AND // Does viewing user have WOL access? ($userinfo['lastactivity'] > $datecut AND $userinfo['lastvisit'] != $user['lastactivity']) AND // Is user actually online? $location = $vbulletin->db->query_first("SELECT location, badlocation FROM " . TABLE_PREFIX . "session WHERE userid = $userinfo[userid] AND lastactivity > $datecut ORDER BY lastactivity DESC LIMIT 1")) { $userinfo['location'] = $location['location']; $userinfo['badlocation'] = $location['badlocation']; $userinfo = process_online_location($userinfo); convert_ids_to_titles(); $userinfo = construct_online_bit($userinfo); } return $userinfo; }
if (!$val['invisible']) { $onlinebits .= construct_online_bit($val, 1); $numbervisible++; } else { $numberinvisible++; } } } $numberguests = 0; if (is_array($guests)) { foreach ($guests as $key => $val) { if ($val['activity'] == 'logout' and $val['badlocation'] == 0) { continue; } $numberguests++; $onlinebits .= construct_online_bit($val, 1); } } $totalonline = $numbervisible + $numberguests; // ### MAX LOGGEDIN USERS ################################ if (intval($vbulletin->maxloggedin['maxonline']) <= $totalonline) { $vbulletin->maxloggedin['maxonline'] = $totalonline; $vbulletin->maxloggedin['maxonlinedate'] = TIMENOW; build_datastore('maxloggedin', serialize($vbulletin->maxloggedin), 1); } $recordusers = $vbulletin->maxloggedin['maxonline']; $recorddate = vbdate($vbulletin->options['dateformat'], $vbulletin->maxloggedin['maxonlinedate'], true); $recordtime = vbdate($vbulletin->options['timeformat'], $vbulletin->maxloggedin['maxonlinedate']); $currenttime = vbdate($vbulletin->options['timeformat']); $metarefresh = ''; $show['refresh'] = false;