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; }
$show['useragent'] = iif($vbulletin->GPC['ua'], true, false); $show['hidden'] = iif($permissions['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canseehidden'], true, false); $show['badlocation'] = iif($permissions['wolpermissions'] & $vbulletin->bf_ugp_wolpermissions['canwhosonlinebad'], true, false); if (is_array($userinfo)) { foreach ($userinfo as $key => $val) { if (!$val['invisible']) { $userinfo["{$key}"] = process_online_location($val, 1); } } } if (is_array($guests)) { foreach ($guests as $key => $val) { $guests["{$key}"] = process_online_location($val, 1); } } convert_ids_to_titles(); $onlinecolspan = 4; $bgclass = 'alt1'; if ($vbulletin->options['enablepms']) { $onlinecolspan++; } if ($vbulletin->options['displayemails'] or $vbulletin->options['enablepms']) { $onlinecolspan++; exec_switch_bg(); $contactclass = $bgclass; } if ($permissions['wolpermissions'] & $vbulletin->bf_ugp_wolpermissions['canwhosonlineip']) { $onlinecolspan++; exec_switch_bg(); $ipclass = $bgclass; }