VBsupport перешел с домена .ORG на родной .RU
Ура!
Пожалуйста, обновите свои закладки - VBsupport.ru
Блок РКН снят, форум доступен на всей территории России, включая новые терртории, без VPN
На форуме введена премодерация ВСЕХ новых пользователей
Почта с временных сервисов, типа mailinator.com, gawab.com и/или прочих, которые предоставляют временный почтовый ящик без регистрации и/или почтовый ящик для рассылки спама, отслеживается и блокируется, а так же заносится в спам-блок форума, аккаунты удаляются
Если вы хотите приобрести какой то скрипт/продукт/хак из каталогов перечисленных ниже: Каталог модулей/хаков
Ещё раз обращаем Ваше внимание: всё, что Вы скачиваете и устанавливаете на свой форум, Вы устанавливаете исключительно на свой страх и риск.
Сообщество vBSupport'а физически не в состоянии проверять все стили, хаки и нули, выкладываемые пользователями.
Помните: безопасность Вашего проекта - Ваша забота. Убедительная просьба: при обнаружении уязвимостей или сомнительных кодов обязательно отписывайтесь в теме хака/стиля
Спасибо за понимание
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"))
{
...
// ###################### Start whereonline #######################
function process_online_location($userinfo, $doall = 0)
{
global $vbulletin, $limitlower, $limitupper;
global $albumids, $attachmentids, $calendarids, $eventids, $forumids, $infractionids, $pictureids;
global $pmids, $postids, $searchids, $socialgroupids, $threadids, $userids;
static $count;
$count++;
if ($doall == 1 AND ($count > $limitupper OR $count < $limitlower))
{
return $userinfo;
}
// ################################################## Showthread
switch($filename)
{
case 'login.php':
if (in_array($values['do'], array('lostpw', 'emailpassword', 'resetpassword')))
{
$userinfo['activity'] = 'lostpw';
}
else if ($values['do'] == 'logout')
{
$userinfo['activity'] = 'logout';
}
else
{
$userinfo['activity'] = 'login';
}
break;
case 'showpost.php':
$userinfo['activity'] = 'showpost';
break;
case 'showthread.php':
if (isset($values['goto']) AND $values['goto'] == 'lastpost')
{
$userinfo['activity'] = 'forumdisplay';
}
else
{
$userinfo['activity'] = 'showthread';
}
break;
case 'forumdisplay.php':
$userinfo['activity'] = 'forumdisplay';
break;
case 'attachment.php':
$userinfo['activity'] = 'attachment';
break;
case '/':
case '':
case 'cron.php': // this shouldn't occur but just to be sane
case $vbulletin->options['forumhome'] . '.php':
$userinfo['activity'] = 'index';
break;
case 'online.php':
$userinfo['activity'] = 'online';
break;
case 'search.php':
if ($values['getnew'] == 'true')
{
$userinfo['activity'] = 'searchnew';
}
else
{
$userinfo['activity'] = 'search';
}
break;
case 'newreply.php':
$userinfo['activity'] = 'newreply';
break;
case 'newattachment.php':
$userinfo['activity'] = 'manageattachment';
break;
case 'newthread.php':
$userinfo['activity'] = 'newthread';
break;
case 'sendmessage.php':
if ($values['do'] == 'mailmember' OR $values['do'] == 'domailmember')
{
$userinfo['activity'] = 'mail';
}
else if ($values['do'] == '' OR $values['do'] == 'contactus' OR $values['do'] == 'docontactus')
{
$userinfo['activity'] = 'contactus';
}
else if ($values['do'] == 'sendtofriend' OR $values['do'] == 'dosendtofriend')
{
$userinfo['activity'] = 'sendto';
}
else if ($values['do'] == 'im')
{
switch($values['type'])
{
case 'aim':
$userinfo['activity'] = 'aim';
break;
case 'icq':
$userinfo['activity'] = 'icq';
break;
case 'yahoo':
$userinfo['activity'] = 'yahoo';
break;
case 'msn':
case '':
$userinfo['activity'] = 'msn';
break;
case 'skype':
$userinfo['activity'] = 'skype';
break;
}
}
break;
case 'profile.php':
if ($values['do'] == 'editprofile' OR $values['do'] == 'updateprofile')
{
$userinfo['activity'] = 'editprofile';
}
else if ($values['do'] == 'editoptions' OR $values['do'] == 'updateoptions')
{
$userinfo['activity'] = 'editoptions';
}
else if ($values['do'] == 'editpassword' OR $values['do'] == 'updatepassword')
{
$userinfo['activity'] = 'editpassword';
}
else if ($values['do'] == 'editsignature' OR $values['do'] == 'updatesignature')
{
$userinfo['activity'] = 'editsignature';
}
else if ($values['do'] == 'editavatar' OR $values['do'] == 'updateavatar')
{
$userinfo['activity'] = 'editavatar';
}
else if ($values['do'] == 'editprofilepic' OR $values['do'] == 'updateprofilepic')
{
$userinfo['activity'] = 'editprofilepic';
}
else if ($values['do'] == 'markread')
{
$userinfo['activity'] = 'markread';
}
else if ($values['do'] == 'editusergroups' OR $values['do'] == 'leavegroup' OR $values['do'] == 'joingroup')
{
// Need to modify the joingroup action to support detailed information on the group being joined for admins
$userinfo['activity'] = 'usergroup';
}
else if (in_array($values['do'], array('updatelist', 'removelist', 'doremovelist', 'buddylist', 'ignorelist')))
{
$userinfo['activity'] = 'buddyignore';
}
else if (in_array($values['do'], array('addlist', 'doaddlist')))
{
if ($values['userlist'] == 'ignore')
{
$userinfo['activity'] = 'addignore';
}
else if (in_array($values['userlist'], array('buddy', 'friend')))
{
$userinfo['activity'] = 'addbuddy';
}
else
{
$userinfo['activity'] = 'buddyignore';
}
}
else if ($values['do'] == 'editattachments' OR $values['do'] == 'deleteattachments')
{
$userinfo['activity'] = 'attachments';
}
else
{
$userinfo['activity'] = 'usercp';
}
break;
case 'member.php':
$userinfo['activity'] = 'getinfo';
break;
case 'showgroups.php':
$userinfo['activity'] = 'showgroups';
break;
case 'editpost.php':
$userinfo['activity'] = 'edit';
break;
case 'private.php':
$userinfo['activity'] = 'pm';
$userinfo['pmid'] = $values['pmid'];
break;
case 'subscription.php':
if ($values['do'] == 'viewsubscription' OR $values['do'] == 'dostuff' OR $values['do'] == '')
{
$userinfo['activity'] = 'subscription';
}
else if ($values['do'] == 'addsubscription' OR $values['do'] == 'doaddsubscription')
{
if (isset($values['threadid']))
{
$userinfo['activity'] = 'addsubthread';
}
else
{
$userinfo['activity'] = 'addsubforum';
}
}
else if ($values['do'] == 'removesubscription' OR $values['do'] == 'usub')
{
if ($values['type'] == 'allthread')
{
$userinfo['activity'] = 'remsubthread';
}
else
{
$userinfo['activity'] = 'remsubforum';
}
}
else if ($values['do'] == 'editfolders' OR $values['do'] == 'doeditfolders')
{
$userinfo['activity'] = 'subfolders';
}
break;
case 'payments.php':
$userinfo['activity'] = 'payments';
break;
case 'misc.php':
if ($values['do'] == 'showsmilies' OR $values['do'] == 'getsmilies')
{
$userinfo['activity'] = 'showsmilies';
}
else if ($values['do'] == 'showavatars')
{
$userinfo['activity'] = 'showavatars';
}
else if ($values['do'] == 'bbcode')
{
$userinfo['activity'] = 'bbcode';
}
else if ($values['do'] == 'whoposted')
{
$userinfo['activity'] = 'whoposted';
}
else if ($values['do'] == 'showattachments')
{
$userinfo['activity'] = 'showattachments';
}
else
{
$userinfo['activity'] = 'index'; // where are they?
}
break;
case 'poll.php':
$userinfo['activity'] = 'polls';
break;
case 'postings.php':
$userinfo['activity'] = 'postings';
break;
case 'member_inlinemod.php':
$userinfo['activity'] = 'member_inlinemod';
break;
case 'group_inlinemod.php':
$userinfo['activity'] = 'group_inlinemod';
break;
case 'inlinemod.php':
$userinfo['activity'] = 'inlinemod';
break;
case 'memberlist.php':
if ($values['do'] == 'search' OR $values['do'] == 'getall')
{
$userinfo['activity'] = 'memberlistsearch';
}
else
{
$userinfo['activity'] = 'memberlist';
}
break;
case 'register.php':
if ($values['do'] == 'requestemail' OR $values['do'] == 'emailcode')
{
$userinfo['activity'] = 'requestemail';
}
else if ($values['a'] == 'ver' OR $values['do'] == 'activate' OR $values['a'] == 'act')
{
$userinfo['activity'] = 'activate';
}
else
{
$userinfo['activity'] = 'register';
}
break;
case 'usercp.php':
$userinfo['activity'] = 'usercp';
break;
case 'converse.php':
$userinfo['activity'] = 'converse';
break;
case 'calendar.php':
if (empty($values['do']) OR $values['do'] == 'displayweek')
{
$userinfo['activity'] = 'calendarweek';
$userinfo['week'] = $values['week'];
}
else if ($values['do'] == 'displaymonth')
{
$userinfo['month'] = $values['month'];
$userinfo['year'] = $values['year'];
$userinfo['activity'] = 'calendarmonth';
}
else if ($values['do'] == 'displayyear')
{
$userinfo['activity'] = 'calendaryear';
$userinfo['year'] = $values['year'];
}
else if ($values['do'] == 'getday')
{
$userinfo['activity'] = 'calendarday';
$userinfo['day'] = $values['day'];
}
else if ($values['do'] == 'getinfo')
{
$userinfo['activity'] = 'calendarevent';
}
else if ($values['do'] == 'add')
{
if ($values['recur'])
{
$userinfo['activity'] = 'calendaraddrecur';
}
else
{
$userinfo['activity'] = 'calendaradd';
}
}
else if ($values['do'] == 'edit' OR $values['do'] == 'manage')
{
$userinfo['activity'] = 'calendaredit';
}
else if ($values['do'] == 'viewreminder' OR $values['do'] == 'addreminder' OR $values['do'] == 'dodeletereminder' OR $values['do'] == 'deletereminder')
{
$userinfo['activity'] = 'calreminder';
}
break;
case 'infraction.php':
switch($values['do'])
{
case '':
case 'report':
case 'update':
$userinfo['activity'] = 'infractionreport';
break;
case 'reverse':
$userinfo['activity'] = 'infractionreverse';
break;
case 'view':
$userinfo['activity'] = 'infractionview';
break;
}
break;
case 'moderation.php':
switch($values['do'])
{
case '':
case 'viewthreads':
if ($values['type'] == 'deleted')
{
$userinfo['activity'] = 'modcp_deletedthreads';
}
else
{
$userinfo['activity'] = 'modcp_moderatedthreads';
}
break;
case 'viewposts':
if ($values['type'] == 'deleted')
{
$userinfo['activity'] = 'modcp_deletedposts';
}
else
{
$userinfo['activity'] = 'modcp_moderatedposts';
}
break;
case 'viewvms':
if ($values['type'] == 'deleted')
{
$userinfo['activity'] = 'modcp_deletedvms';
}
else
{
$userinfo['activity'] = 'modcp_moderatedvms';
}
break;
case 'viewgms':
if ($values['type'] == 'deleted')
{
$userinfo['activity'] = 'modcp_deletedgms';
}
else
{
$userinfo['activity'] = 'modcp_moderatedgms';
}
break;
case 'viewpcs':
if ($values['type'] == 'deleted')
{
$userinfo['activity'] = 'modcp_deletedpcs';
}
else
{
$userinfo['activity'] = 'modcp_moderatedpcs';
}
break;
case 'viewpics':
$userinfo['activity'] = 'modcp_moderatedpictures';
break;
}
break;
case 'moderator.php':
switch($values['do'])
{
case 'useroptions':
case 'move':
case 'prune':
$userinfo['activity'] = 'admincp';
break;
case 'modposts':
case 'modattach':
$userinfo['activity'] = 'modcp';
}
break;
case 'usernote.php':
if ($values['do'] == 'newnote')
{
$userinfo['activity'] = 'newusernote';
}
else
{
$userinfo['activity'] = 'usernote';
}
break;
case 'group.php':
switch ($values['do'])
{
case 'join':
case 'dojoin':
$userinfo['activity'] = 'socialgroups_join';
break;
case 'leave':
case 'doleave':
$userinfo['activity'] = 'socialgroups_leave';
break;
case 'edit':
case 'doedit':
$userinfo['activity'] = 'socialgroups_edit';
break;
case 'delete':
case 'dodelete':
$userinfo['activity'] = 'socialgroups_delete';
break;
case 'create':
case 'docreate':
$userinfo['activity'] = 'socialgroups_create';
break;
case '':
case 'view':
$userinfo['activity'] = 'socialgroups_view';
break;
case 'viewmembers':
$userinfo['activity'] = 'socialgroups_memberlist';
break;
default:
$userinfo['activity'] = 'socialgroups_list';
break;
}
break;
case 'groupsubscription.php':
$userinfo['activity'] = 'socialgroups_subscriptions';
break;
case 'reputation.php':
$userinfo['activity'] = 'reputation';
break;
case 'faq.php':
$userinfo['activity'] = 'faq';
break;
case 'announcement.php':
$userinfo['activity'] = 'announcement';
break;
case 'report.php':
$userinfo['activity'] = 'report';
break;
case 'joinrequests.php':
$userinfo['activity'] = 'joinrequests';
break;
case 'threadrate.php':
$userinfo['activity'] = 'threadrate';
break;
case 'printthread.php':
$userinfo['activity'] = 'printthread';
break;
case 'archive':
$userinfo['activity'] = 'archive';
break;
case '/robots.txt':
$userinfo['activity'] = 'spider';
break;
case 'posthistory.php':
$userinfo['activity'] = 'posthistory';
break;
case 'threadtag.php':
$userinfo['activity'] = 'tags';
break;
case 'tags.php':
$userinfo['activity'] = 'tag_list';
break;
case 'visitormessage.php':
{
switch ($values['do'])
{
case 'message':
{
$userinfo['activity'] = 'visitormessage_posting';
}
break;
case 'deletemessage':
{
$userinfo['activity'] = 'visitormessage_delete';
}
break;
case 'viewip':
{
$userinfo['activity'] = 'viewingipaddress';
}
break;
case 'report':
case 'sendemail':
{
$userinfo['activity'] = 'visitormessage_reporting';
}
break;
}
}
break;
case 'album.php':
{
switch ($values['do'])
{
case 'killalbum':
{
$userinfo['activity'] = 'album_delete';
}
break;
case 'updatealbum':
case 'editalbum':
{
$userinfo['activity'] = 'album_edit_album';
}
break;
case 'addalbum':
{
$userinfo['activity'] = 'album_new_album';
}
break;
case 'editpictures':
case 'updatepictures':
{
$userinfo['activity'] = 'album_edit_picture';
}
break;
case 'addpictures':
case 'uploadpictures':
{
$userinfo['activity'] = 'album_upload';
}
break;
case 'unread':
{
$userinfo['activity'] = 'album_unread_comments';
}
break;
case 'moderated':
{
$userinfo['activity'] = 'album_moderated_comments';
}
break;
// ###################### Start getidsonline #######################
function convert_ids_to_titles()
{
global $vbulletin;
global $albumids, $attachmentids, $calendarids, $eventids, $forumids, $infractionids, $pmids, $postids, $searchids, $socialgroupids, $threadids, $userids;
global $wol_album, $wol_attachment, $wol_calendar, $wol_event, $wol_inf, $wol_pm, $wol_post, $wol_search, $wol_socialgroup, $wol_thread, $wol_user;
if ($attachmentids)
{
$postidquery = $vbulletin->db->query_read_slave("
SELECT postid, attachmentid
FROM " . TABLE_PREFIX . "attachment
WHERE attachmentid IN (0$attachmentids)
");
while ($postidqueryr = $vbulletin->db->fetch_array($postidquery))
{
$postids .= ',' . $postidqueryr['postid'];
$wol_attachment["$postidqueryr[attachmentid]"] = $postidqueryr['postid'];
}
}
if ($postids)
{
$postidquery = $vbulletin->db->query_read_slave("
SELECT threadid, postid
FROM " . TABLE_PREFIX . "post
WHERE postid IN (0$postids)
");
while ($postidqueryr = $vbulletin->db->fetch_array($postidquery))
{
$threadids .= ',' . $postidqueryr['threadid'];
$wol_post["$postidqueryr[postid]"] = $postidqueryr['threadid'];
}
}
if ($socialgroupids)
{
$socialgroups = $vbulletin->db->query_read_slave("
SELECT name, groupid
FROM " . TABLE_PREFIX . "socialgroup
WHERE groupid IN (0$socialgroupids)
");
while ($socialgroup = $vbulletin->db->fetch_array($socialgroups))
{
$wol_socialgroup["$socialgroup[groupid]"]['name'] = $socialgroup['name'];
}
}
if ($albumids)
{
$albums = $vbulletin->db->query_read_slave("
SELECT album.title, album.albumid, album.state, album.userid
FROM " . TABLE_PREFIX . "album AS album
LEFT JOIN " . TABLE_PREFIX . "profileblockprivacy AS profileblockprivacy ON
(profileblockprivacy.userid = album.userid AND profileblockprivacy.blockid = 'albums')
WHERE album.albumid IN (0$albumids)
AND (profileblockprivacy.requirement = 0 OR profileblockprivacy.requirement IS NULL)
");
while ($album = $vbulletin->db->fetch_array($albums))
{
$wol_album["$album[albumid]"] = $album;
}
}
if ($threadids)
{
$threadresults = $vbulletin->db->query_read_slave("
SELECT thread.title, thread.prefixid, thread.threadid, thread.forumid, thread.postuserid, thread.visible
" . iif($vbulletin->options['threadpreview'] > 0, ",post.pagetext AS preview") . "
" . iif($vbulletin->options['threadsubscribed'] AND $vbulletin->userinfo['userid'], ", NOT ISNULL(subscribethread.subscribethreadid) AS issubscribed") . "
FROM " . TABLE_PREFIX . "thread AS thread
" . iif($vbulletin->options['threadpreview'] > 0, "LEFT JOIN " . TABLE_PREFIX . "post AS post ON(post.postid = thread.firstpostid)") . "
" . iif($vbulletin->options['threadsubscribed'] AND $vbulletin->userinfo['userid'], " LEFT JOIN " . TABLE_PREFIX . "subscribethread AS subscribethread ON(subscribethread.threadid = thread.threadid AND subscribethread.userid = " . $vbulletin->userinfo['userid'] . " AND canview = 1)") . "
WHERE thread.threadid IN (0$threadids)
");
while ($threadresult = $vbulletin->db->fetch_array($threadresults))
{
$wol_thread["$threadresult[threadid]"]['title'] = $threadresult['title'];
$wol_thread["$threadresult[threadid]"]['prefixid'] = $threadresult['prefixid'];
$wol_thread["$threadresult[threadid]"]['forumid'] = $threadresult['forumid'];
$wol_thread["$threadresult[threadid]"]['postuserid'] = $threadresult['postuserid'];
$wol_thread["$threadresult[threadid]"]['isdeleted'] = ($threadresult['visible'] == 2) ? true : false;
$wol_thread["$threadresult[threadid]"]['visible'] = ($threadresult['visible'] == 1) ? true : false;
$wol_thread["$threadresult[threadid]"]['issubscribed'] = $threadresult['issubscribed'];
// format thread preview if there is one
$userperms = fetch_permissions($threadresult['forumid']);
if (!empty($threadresult['preview']) AND $vbulletin->options['threadpreview'] > 0 AND ($userperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads']))
{
// Get Buddy List
$buddy = array();
if (trim($vbulletin->userinfo['buddylist']))
{
$buddylist = preg_split('/( )+/', trim($vbulletin->userinfo['buddylist']), -1, PREG_SPLIT_NO_EMPTY);
foreach ($buddylist AS $buddyuserid)
{
$buddy["$buddyuserid"] = 1;
}
}
DEVDEBUG('buddies: ' . implode(', ', array_keys($buddy)));
// Get Ignore Users
$ignore = array();
if (trim($vbulletin->userinfo['ignorelist']))
{
$ignorelist = preg_split('/( )+/', trim($vbulletin->userinfo['ignorelist']), -1, PREG_SPLIT_NO_EMPTY);
foreach ($ignorelist AS $ignoreuserid)
{
if (!$buddy["$ignoreuserid"])
{
$ignore["$ignoreuserid"] = 1;
}
}
}
DEVDEBUG('ignored users: ' . implode(', ', array_keys($ignore)));
if ($calendarids)
{
$calendarresults = $vbulletin->db->query_read_slave("
SELECT calendarid, title
FROM " . TABLE_PREFIX . "calendar
WHERE calendarid IN (0$calendarids)
");
while ($calendarresult = $vbulletin->db->fetch_array($calendarresults))
{
$wol_calendar["$calendarresult[calendarid]"] = $calendarresult['title'];
}
}
if ($infractionids)
{
$infractions = $vbulletin->db->query_read_slave("
SELECT infractionid, userid
FROM " . TABLE_PREFIX . "infraction
WHERE infractionid IN (0$infractionids)
");
while ($infraction = $vbulletin->db->fetch_array($infractions))
{
$wol_inf["$infraction[infractionid]"]['userid'] = $infraction['userid'];
$userids .= ',' . $infraction['userid'];
}
}
if ($eventids)
{
$eventresults = $vbulletin->db->query_read_slave("
SELECT eventid, title, userid, calendarid
FROM " . TABLE_PREFIX . "event
WHERE eventid IN (0$eventids)
");
while ($eventresult = $vbulletin->db->fetch_array($eventresults))
{
$wol_event["$eventresult[eventid]"]['title'] = $eventresult['title'];
$wol_event["$eventresult[eventid]"]['calendarid'] = $eventresult['calendarid'];
$wol_event["$eventresult[eventid]"]['postuserid'] = $eventresult['userid'];
}
}
if ($pmids AND ($vbulletin->userinfo['permissions']['wolpermissions'] & $vbulletin->bf_ugp_wolpermissions['canwhosonlinefull']))
{
$pmresults = $vbulletin->db->query_read_slave("
SELECT pmtext.fromuserid, pm.pmid
FROM " . TABLE_PREFIX . "pm AS pm
LEFT JOIN " . TABLE_PREFIX . "pmtext AS pmtext ON (pm.pmtextid = pmtext.pmtextid)
WHERE pmid IN (0$pmids)
");
while ($pmresult = $vbulletin->db->fetch_array($pmresults))
{
$wol_pm["$pmresult[pmid]"] = $pmresult['fromuserid'];
if ($searchids AND ($vbulletin->userinfo['permissions']['wolpermissions'] & $vbulletin->bf_ugp_wolpermissions['canwhosonlinefull']))
{
$searchresults = $vbulletin->db->query_read_slave("
SELECT searchid, search.userid, query, searchuser, user.userid AS targetuserid
FROM " . TABLE_PREFIX . "search AS search
LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.username = search.searchuser)
WHERE searchid IN (0$searchids)
");
while ($searchresult = $vbulletin->db->fetch_array($searchresults))
{
if ($searchresult['searchuser'])
{
if (!$searchresult['targetuserid']) // usernames are stored straight in search and htmlspecialchars_uni in user so we have to query for any non-matches
{
$result = $vbulletin->db->query_first_slave("
SELECT userid AS targetuserid
FROM " . TABLE_PREFIX . "user
WHERE username = '" . $vbulletin->db->escape_string(htmlspecialchars_uni($searchresult['searchuser'])) . "'
");
}
if ($result['targetuserid'])
{
$searchresult['targetuserid'] = $result['targetuserid'];
}
if ($searchresult['targetuserid'])
{
$userids .= ",$searchresult[targetuserid]";
}
}
$wol_search["$searchresult[searchid]"] = $searchresult;
}
}
if ($userids AND ($vbulletin->userinfo['permissions']['wolpermissions'] & $vbulletin->bf_ugp_wolpermissions['canwhosonlinefull']))
{
$userresults = $vbulletin->db->query_read_slave("
SELECT userid, username, IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid
FROM " . TABLE_PREFIX . "user AS user
WHERE userid IN (0$userids)
");
while ($userresult = $vbulletin->db->fetch_array($userresults))
{
fetch_musername($userresult);
$wol_user["$userresult[userid]"] = $userresult['musername'];
}
}