10-08-2015, 07:42 PMSozin Wrote: Code:$timesearch = TIME_NOW - (int)$mybb->settings['wolcutoff']; $status = $db->fetch_array( $db->query(" SELECT s.sid, s.ip, s.uid, s.time, s.location, s.location1, u.username, u.invisible, u.usergroup, u.displaygroup FROM ".TABLE_PREFIX."sessions s LEFT JOIN ".TABLE_PREFIX."users u ON (s.uid=u.uid) WHERE s.time > '".$timesearch."' AND s.uid ='".$users['uid']."' ") ); $status = empty($status) ? 'Offline' : 'Online'; Put this inside the while loop and use $status in template. *I did not test it.
$timesearch = TIME_NOW - (int)$mybb->settings['wolcutoff']; $status = $db->fetch_array( $db->query(" SELECT s.sid, s.ip, s.uid, s.time, s.location, s.location1, u.username, u.invisible, u.usergroup, u.displaygroup FROM ".TABLE_PREFIX."sessions s LEFT JOIN ".TABLE_PREFIX."users u ON (s.uid=u.uid) WHERE s.time > '".$timesearch."' AND s.uid ='".$users['uid']."' ") ); $status = empty($status) ? 'Offline' : 'Online';
Loading Info...