/** * Returns possible matches for the string input * * @return @e void Outputs to screen */ protected function _getMemberNames() { //----------------------------------------- // INIT //----------------------------------------- $name = IPSText::convertUnicode($this->convertAndMakeSafe($this->request['name'], 0), true); $name = IPSText::convertCharsets($name, 'utf-8', IPS_DOC_CHAR_SET); //----------------------------------------- // Check length //----------------------------------------- if (IPSText::mbstrlen($name) < 3) { $this->returnJsonError('requestTooShort'); } //----------------------------------------- // Try query... //----------------------------------------- $this->DB->build(array('select' => 'm.members_display_name, m.name, m.member_id, m.member_group_id', 'from' => array('members' => 'm'), 'where' => "m.members_l_display_name LIKE '" . $this->DB->addSlashes(strtolower($name)) . "%'", 'order' => $this->DB->buildLength('m.members_display_name') . ' ASC', 'limit' => array(0, 15), 'add_join' => array(array('select' => 'p.*', 'from' => array('profile_portal' => 'p'), 'where' => 'p.pp_member_id=m.member_id', 'type' => 'left')))); $this->DB->execute(); //----------------------------------------- // Got any results? //----------------------------------------- if (!$this->DB->getTotalRows()) { $this->returnJsonArray(array()); } $return = array(); while ($r = $this->DB->fetch()) { $photo = IPSMember::buildProfilePhoto($r); $group = IPSMember::makeNameFormatted('', $r['member_group_id']); $return[$r['member_id']] = array('name' => $r['members_display_name'], 'showas' => '<strong>' . $r['members_display_name'] . '</strong> (' . $group . ')', 'img' => $photo['pp_mini_photo'], 'img_w' => $photo['pp_mini_width'], 'img_h' => $photo['pp_mini_height']); } $this->returnJsonArray($return); }
function __f__b02dcf2fa1efeb4a0b49e66f3160d9d5($rows, $links = "", $defaults = array()) { $_ips___x_retval = ''; $__iteratorCount = 0; foreach ($rows as $session) { $__iteratorCount++; $_ips___x_retval .= "\n\t\t\t<tr>\n\t\t\t\t<td class='row1'>\n\t\t\t\t\t<img src='{$session['_memberData']['pp_thumb_photo']}' alt=\"" . sprintf($this->lang->words['users_photo'], $session['_memberData']['members_display_name'] ? $session['_memberData']['members_display_name'] : $this->lang->words['global_guestname']) . "\" width='{$session['_memberData']['pp_thumb_width']}' height='{$session['_memberData']['pp_thumb_height']}' class='photo' />\n\t\t\t\t</td>\n\t\t\t\t<td class='" . IPSLib::next($this->registry->templateStriping["online"]) . "'>\n\t\t\t\t\t" . ($session['member_name'] ? "" . ($session['member_id'] ? "\n\t\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showuser={$session['member_id']}", "public", ''), "{$session['seo_name']}", "showuser") . "' title='{$this->lang->words['view_profile']}'>" . IPSMember::makeNameFormatted($session['member_name'], $session['member_group']) . "</a>\n\t\t\t\t\t\t" : "\n\t\t\t\t\t\t\t" . IPSMember::makeNameFormatted($session['member_name'], $session['member_group']) . "\n\t\t\t\t\t\t") . "" : "\n\t\t\t\t\t\t{$this->lang->words['global_guestname']}\n\t\t\t\t\t") . "\n\t\t\t\t\t" . ($session['login_type'] == 1 ? "" . ($this->memberData['g_access_cp'] ? "*" : "") . "" : "") . "\n\t\t\t\t\t" . ($this->memberData['g_access_cp'] ? "\n\t\t\t\t\t\t<span class='ip'>( {$session['ip_address']} )</span>\n\t\t\t\t\t" : "") . "\n\t\t\t\t</td>\n\t\t\t\t<td class='" . IPSLib::next($this->registry->templateStriping["online"]) . "'>\n\t\t\t\t\t" . (!$session['where_line'] || $session['in_error'] ? "\n\t\t\t\t\t\t{$this->lang->words['board_index']}\n\t\t\t\t\t" : "" . (($session['where_link'] and !$session['where_line_more']) ? "\n\t\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("{$session['where_link']}", "public", ''), "", "") . "'>\n\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t{$session['where_line']} \n\t\t\t\t\t\t" . ($session['where_line_more'] ? " \n\t\t\t\t\t\t\t" . ($session['_whereLinkSeo'] ? "\n\t\t\t\t\t\t\t\t<a href='{$session['_whereLinkSeo']}'>\n\t\t\t\t\t\t\t" : "" . ($session['where_link'] ? "<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("{$session['where_link']}", "public", ''), "", "") . "'>" : "") . "") . "\n\t\t\t\t\t\t\t{$session['where_line_more']}\n\t\t\t\t\t\t\t" . ($session['where_link'] ? "</a>" : "") . "" : "" . ($session['where_link'] ? "</a>" : "") . "") . "") . "\n\t\t\t\t</td>\n\t\t\t\t<td class='" . IPSLib::next($this->registry->templateStriping["online"]) . "'>\n\t\t\t\t\t" . IPSText::htmlspecialchars($this->registry->getClass('class_localization')->getDate($session['running_time'], "long", 1)) . "\n\t\t\t\t</td>\n\t\t\t\t<td class='" . IPSLib::next($this->registry->templateStriping["online"]) . "'>\n\t\t\t\t\t" . (($session['member_id'] and $session['member_name']) ? "<ul class='user_controls clear'>\n\t\t\t\t\t\t\t" . (($this->memberData['member_id'] and $this->memberData['member_id'] != $session['member_id'] && $this->settings['friends_enabled'] and $this->memberData['g_can_add_friends']) ? "" . (IPSMember::checkFriendStatus($session['member_id']) ? "\n\t\t\t\t\t\t\t\t\t<li class='mini_friend_toggle is_friend' id='friend_online_{$session['member_id']}'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=profile&section=friends&do=remove&member_id={$session['member_id']}&secure_key={$this->member->form_hash}", "public", ''), "", "") . "' title='{$this->lang->words['remove_friend']}'>" . $this->registry->getClass('output')->getReplacement("remove_friend") . "</a></li>\n\t\t\t\t\t\t\t\t" : "\n\t\t\t\t\t\t\t\t\t<li class='mini_friend_toggle is_not_friend' id='friend_online_{$session['member_id']}'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=profile&section=friends&do=add&member_id={$session['member_id']}&secure_key={$this->member->form_hash}", "public", ''), "", "") . "' title='{$this->lang->words['add_friend']}'>" . $this->registry->getClass('output')->getReplacement("add_friend") . "</a></li>\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t") . "" : "") . "\n\t\t\t\t\t\t\t" . (($this->memberData['member_id'] and $this->memberData['member_id'] != $session['member_id'] and $this->memberData['g_use_pm'] and $this->memberData['members_disable_pm'] == 0 and IPSLib::moduleIsEnabled('messaging', 'members')) ? "\n\t\t\t\t\t\t\t\t<li class='pm_button' id='pm_online_{$session['member_id']}'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=messaging&section=send&do=form&fromMemberID={$session['member_id']}", "public", ''), "", "") . "' title='{$this->lang->words['pm_member']}'>" . $this->registry->getClass('output')->getReplacement("send_msg") . "</a></li>\n\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t" . (($session['memberData']['has_blog'] and IPSLib::appIsInstalled('blog')) ? "\n\t\t\t\t\t\t\t\t<li><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=blog&module=display&section=blog&show_members_blogs={$session['member_id']}", "public", ''), "", "") . "' title='{$this->lang->words['view_blog']}'>" . $this->registry->getClass('output')->getReplacement("blog_link") . "</a></li>\n\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t" . (($session['memberData']['has_gallery'] and IPSLib::appIsInstalled('gallery')) ? "\n\t\t\t\t\t\t\t\t<li><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=gallery&module=user&section=user&user={$session['member_id']}", "public", ''), "", "") . "' title='{$this->lang->words['view_gallery']}'>" . $this->registry->getClass('output')->getReplacement("gallery_link") . "</a></li>\n\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t</ul>" : "\n\t\t\t\t\t\t<span class='desc'>{$this->lang->words['no_options_available']}</span>\n\t\t\t\t\t") . "\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\n"; } $_ips___x_retval .= ''; unset($__iteratorCount); return $_ips___x_retval; }
function __f__7046da7023dc6898b789bfa2de184ba2($rows, $links = "", $defaults = array()) { $_ips___x_retval = ''; $__iteratorCount = 0; foreach ($rows as $session) { $__iteratorCount++; $_ips___x_retval .= "\r\n\t\t\t\t\t<tr class='" . IPSLib::next($this->registry->templateStriping["online"]) . "'>\r\n\t\t\t\t\t\t<td>" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'userSmallPhoto') ? $this->registry->getClass('output')->getTemplate('global')->userSmallPhoto(array_merge($session['_memberData'], array('alt' => sprintf($this->lang->words['users_photo'], $session['_memberData']['members_display_name'] ? $session['_memberData']['members_display_name'] : $this->lang->words['global_guestname'])))) : '') . "</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t" . ($session['_memberData']['member_id'] ? "\r\n\t\t\t\t\t\t\t\t" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'userHoverCard') ? $this->registry->getClass('output')->getTemplate('global')->userHoverCard(array_merge($session['_memberData'], array('members_display_name' => IPSMember::makeNameFormatted($session['_memberData']['members_display_name'], $session['_memberData']['member_group_id'])))) : '') . "\r\n\t\t\t\t\t\t\t" : "" . ($session['member_name'] ? "\r\n\t\t\t\t\t\t\t\t\t" . IPSMember::makeNameFormatted($session['member_name'], $session['member_group']) . "\r\n\t\t\t\t\t\t\t\t" : "\r\n\t\t\t\t\t\t\t\t\t{$this->lang->words['global_guestname']}\r\n\t\t\t\t\t\t\t\t") . "") . "\r\n\t\t\t\t\t\t\t" . ($session['login_type'] == 1 ? "" . ($this->memberData['g_access_cp'] || $session['_memberData']['member_id'] == $this->memberData['member_id'] ? "*" : "") . "" : "") . "\r\n\t\t\t\t\t\t\t" . ($this->memberData['g_is_supmod'] ? "\r\n\t\t\t\t\t\t\t\t<br />\r\n\t\t\t\t\t\t\t\t<span class='ip desc lighter ipsText_smaller'>({$session['ip_address']})</span>\r\n\t\t\t\t\t\t\t" : "") . "\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t" . (!$session['where_line'] || $session['in_error'] ? "\r\n\t\t\t\t\t\t\t\t{$this->lang->words['board_index']}\r\n\t\t\t\t\t\t\t" : "" . (($session['where_link'] and !$session['where_line_more']) ? "" . ($session['_whereLinkSeo'] ? "\r\n\t\t\t\t\t\t\t\t\t\t<a href='{$session['_whereLinkSeo']}'>\r\n\t\t\t\t\t\t\t\t\t" : "\r\n\t\t\t\t\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("{$session['where_link']}", "public", ''), "", "") . "'>\r\n\t\t\t\t\t\t\t\t\t") . "" : "") . "\r\n\t\t\t\t\t\t\t\t{$session['where_line']} \r\n\t\t\t\t\t\t\t\t" . ($session['where_line_more'] ? " \r\n\t\t\t\t\t\t\t\t\t" . ($session['_whereLinkSeo'] ? "\r\n\t\t\t\t\t\t\t\t\t\t<a href='{$session['_whereLinkSeo']}'>\r\n\t\t\t\t\t\t\t\t\t" : "" . ($session['where_link'] ? "<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("{$session['where_link']}", "public", ''), "", "") . "'>" : "") . "") . "\r\n\t\t\t\t\t\t\t\t\t{$session['where_line_more']}\r\n\t\t\t\t\t\t\t\t\t" . ($session['where_link'] ? "</a>" : "") . "" : "" . ($session['where_link'] ? "</a>" : "") . "") . "") . "\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t" . IPSText::htmlspecialchars($this->registry->getClass('class_localization')->getDate($session['running_time'], "long", 1)) . "\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t" . (($session['member_id'] and $session['member_name']) ? "<ul class='ipsList_inline ipsList_nowrap right'>\r\n\t\t\t\t\t\t\t\t\t" . (($this->memberData['member_id'] and $this->memberData['member_id'] != $session['member_id'] && $this->settings['friends_enabled'] and $this->memberData['g_can_add_friends']) ? "" . (IPSMember::checkFriendStatus($session['member_id']) ? "\r\n\t\t\t\t\t\t\t\t\t\t\t<li class='mini_friend_toggle is_friend' id='friend_online_{$session['member_id']}'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=profile&section=friends&do=remove&member_id={$session['member_id']}&secure_key={$this->member->form_hash}", "public", ''), "", "") . "' title='{$this->lang->words['remove_friend']}' class='ipsButton_secondary'>" . $this->registry->getClass('output')->getReplacement("remove_friend") . "</a></li>\r\n\t\t\t\t\t\t\t\t\t\t" : "\r\n\t\t\t\t\t\t\t\t\t\t\t<li class='mini_friend_toggle is_not_friend' id='friend_online_{$session['member_id']}'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=profile&section=friends&do=add&member_id={$session['member_id']}&secure_key={$this->member->form_hash}", "public", ''), "", "") . "' title='{$this->lang->words['add_friend']}' class='ipsButton_secondary'>" . $this->registry->getClass('output')->getReplacement("add_friend") . "</a></li>\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t") . "" : "") . "\r\n\t\t\t\t\t\t\t\t\t" . (($this->memberData['member_id'] and $this->memberData['member_id'] != $session['member_id'] and $this->memberData['g_use_pm'] and $this->memberData['members_disable_pm'] == 0 and IPSLib::moduleIsEnabled('messaging', 'members')) ? "\r\n\t\t\t\t\t\t\t\t\t\t<li class='pm_button' id='pm_online_{$session['member_id']}'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=messaging&section=send&do=form&fromMemberID={$session['member_id']}", "public", ''), "", "") . "' title='{$this->lang->words['pm_member']}' class='ipsButton_secondary'>" . $this->registry->getClass('output')->getReplacement("send_msg") . "</a></li>\r\n\t\t\t\t\t\t\t\t\t" : "") . "\r\n\t\t\t\t\t\t\t\t\t" . (($session['memberData']['has_blog'] and IPSLib::appIsInstalled('blog')) ? "\r\n\t\t\t\t\t\t\t\t\t\t<li><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=blog&module=display&section=blog&show_members_blogs={$session['member_id']}", "public", ''), "", "") . "' title='{$this->lang->words['view_blog']}' class='ipsButton_secondary'>" . $this->registry->getClass('output')->getReplacement("blog_link") . "</a></li>\r\n\t\t\t\t\t\t\t\t\t" : "") . "\r\n\t\t\t\t\t\t\t\t\t" . (($session['memberData']['has_gallery'] and IPSLib::appIsInstalled('gallery')) ? "\r\n\t\t\t\t\t\t\t\t\t\t<li><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=gallery&user={$session['member_id']}", "public", ''), "{$session['memberData']['members_seo_name']}", "useralbum") . "' title='{$this->lang->words['view_gallery']}' class='ipsButton_secondary'>" . $this->registry->getClass('output')->getReplacement("gallery_link") . "</a></li>\r\n\t\t\t\t\t\t\t\t\t" : "") . "\r\n\t\t\t\t\t\t\t\t</ul>" : "\r\n\t\t\t\t\t\t\t\t<span class='desc'>{$this->lang->words['no_options_available']}</span>\r\n\t\t\t\t\t\t\t") . "\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\r\n"; } $_ips___x_retval .= ''; unset($__iteratorCount); return $_ips___x_retval; }
function __f__d1fd60508c3bedc7e3ac15eb660de8fe($members, $pages = "", $dropdowns = array(), $defaults = array(), $custom_fields = null, $url = '') { $_ips___x_retval = ''; $__iteratorCount = 0; foreach ($members as $member) { $__iteratorCount++; $_ips___x_retval .= "\n\t\t\t<div class='row touch-row' id=\"mem-{$member['member_id']}\">\n\t\t\t\t<div class='icon'>\n\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showuser={$member['member_id']}", "public", ''), "{$member['members_seo_name']}", "showuser") . "' title='{$this->lang->words['view_profile']}'><img src='{$member['pp_mini_photo']}' alt=\"" . sprintf($this->lang->words['users_photo'], $member['members_display_name']) . "\" class='photo' /></a>\t\n\t\t\t\t</div>\n\t\t\t\t<strong><a class='title' href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showuser={$member['member_id']}", "public", ''), "{$member['members_seo_name']}", "showuser") . "' title='{$this->lang->words['view_profile']}'>{$member['members_display_name']}</a></strong>\n\t\t\t\t<br />\n\t\t\t\t<span class='subtext'>" . $this->registry->getClass('class_localization')->formatNumber($member['posts']) . " {$this->lang->words['member_posts']} · {$this->lang->words['member_group']}: " . IPSMember::makeNameFormatted($member['group'], $member['member_group_id']) . "\n\t\t\t\t · <a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&mid={$member['member_id']}", "public", ''), "", "") . "'>" . $this->registry->getClass('output')->getReplacement("find_topics_link") . " {$this->lang->words['gbl_find_my_content']}</a></span>\n\t\t\t</div>\n\t\t\n"; } $_ips___x_retval .= ''; unset($__iteratorCount); return $_ips___x_retval; }
function __f__85f7a2a7de7bd273e202a92898fb0067($options = array(), $chatters = array()) { $_ips___x_retval = ''; $__iteratorCount = 0; foreach ($chatters as $data) { $__iteratorCount++; $_ips___x_retval .= "\n\t\t\t\t\t<li id='user_{$data['user_id']}'>\n\t\t\t\t\t\t<div class='chat-photo'>" . ($data['member']['member_id'] ? "<a target='_blank' href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showuser={$data['member']['member_id']}", "public", ''), "{$data['member']['members_seo_name']}", "showuser") . "\" title='{$this->lang->words['view_profile']}' id='link_{$data['member']['member_id']}' class='ipsUserPhotoLink'>" : "") . "<img src='{$data['member']['pp_mini_photo']}' alt=\"" . sprintf($this->lang->words['users_photo'], $data['member']['members_display_name']) . "\" class='ipsUserPhoto ipsUserPhoto_mini' />" . ($data['member']['member_id'] ? "</a>" : "") . "</div>\n\t\t\t\t\t\t<span class='names ipsPad_half'><a href='#' id='mod_link_{$data['user_id']}' class='chatmodmenu'>" . ($data['member']['members_display_name'] ? "<span title='{$data['member']['members_display_name']}'>" . ($this->settings['ipschat_format_names'] ? "" . IPSMember::makeNameFormatted(IPSText::truncate($data['member']['members_display_name'], 16), $data['member']['member_group_id']) . "" : "" . IPSText::truncate($data['member']['members_display_name'], 16) . "") . "</span>" : "{$data['user_name']}") . "</a></span>\n\t\t\t\t\t</li>\n\t\t\t\t\n"; } $_ips___x_retval .= ''; unset($__iteratorCount); return $_ips___x_retval; }
function __f__79050217f26a5bb7a82436b7e6a3397f($members, $pages = "", $dropdowns = array(), $defaults = array(), $custom_fields = null, $url = '') { $_ips___x_retval = ''; $__iteratorCount = 0; foreach ($members as $member) { $__iteratorCount++; $_ips___x_retval .= "\r\n\t\t\t\t\t\t<li id='member_id_{$member['member_id']}' class='ipsPad clearfix member_entry " . IPSLib::next($this->registry->templateStriping["memberStripe"]) . "'>\r\n\t\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showuser={$member['member_id']}", "public", ''), "{$member['members_seo_name']}", "showuser") . "' title='{$this->lang->words['view_profile']}' class='ipsUserPhotoLink left'><img src='{$member['pp_small_photo']}' alt=\"" . sprintf($this->lang->words['users_photo'], $member['members_display_name']) . "\" class='ipsUserPhoto ipsUserPhoto_medium' /></a>\r\n\t\t\t\t\t\t\t<div class='ipsBox_withphoto'>\r\n\t\t\t\t\t\t\t\t<ul class='ipsList_inline right'>\r\n\t\t\t\t\t\t\t\t\t" . ($this->memberData['g_is_supmod'] == 1 && $member['member_id'] != $this->memberData['member_id'] ? "\r\n\t\t\t\t\t\t\t\t\t\t<li><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=modcp&do=editmember&auth_key={$this->member->form_hash}&mid={$member['member_id']}&pf={$member['member_id']}", "public", ''), "", "") . "' class='ipsButton_secondary'>{$this->lang->words['edit_member']}</a></li>\r\n\t\t\t\t\t\t\t\t\t" : "") . "\r\n\t\t\t\t\t\t\t\t\t" . (($this->memberData['member_id'] and $this->memberData['member_id'] != $member['member_id'] && $this->settings['friends_enabled'] and $this->memberData['g_can_add_friends']) ? "" . (IPSMember::checkFriendStatus($member['member_id']) ? "\r\n\t\t\t\t\t\t\t\t\t\t\t<li class='mini_friend_toggle is_friend' id='friend_mlist_{$member['member_id']}'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=list&module=profile&section=friends&do=remove&member_id={$member['member_id']}&secure_key={$this->member->form_hash}", "public", ''), "", "") . "' title='{$this->lang->words['remove_friend']}' class='ipsButton_secondary'>" . $this->registry->getClass('output')->getReplacement("remove_friend") . "</a></li>\r\n\t\t\t\t\t\t\t\t\t\t" : "\r\n\t\t\t\t\t\t\t\t\t\t\t<li class='mini_friend_toggle is_not_friend' id='friend_mlist_{$member['member_id']}'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=list&module=profile&section=friends&do=add&member_id={$member['member_id']}&secure_key={$this->member->form_hash}", "public", ''), "", "") . "' title='{$this->lang->words['add_friend']}' class='ipsButton_secondary'>" . $this->registry->getClass('output')->getReplacement("add_friend") . "</a></li>\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t") . "" : "") . "\r\n\t\t\t\t\t\t\t\t\t" . (($this->memberData['g_use_pm'] and $this->memberData['members_disable_pm'] == 0 and IPSLib::moduleIsEnabled('messaging', 'members') && $member['member_id'] != $this->memberData['member_id']) ? "\r\n\t\t\t\t\t\t\t\t\t\t<li class='pm_button' id='pm_xxx_{$member['pp_member_id']}'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=list&module=messaging&section=send&do=form&fromMemberID={$member['pp_member_id']}", "public", ''), "", "") . "' title='{$this->lang->words['pm_member']}' class='ipsButton_secondary'>" . $this->registry->getClass('output')->getReplacement("send_msg") . "</a></li>\r\n\t\t\t\t\t\t\t\t\t" : "") . "\r\n\t\t\t\t\t\t\t\t\t<li><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&mid={$member['member_id']}", "public", ''), "", "") . "' title='{$this->lang->words['gbl_find_my_content']}' class='ipsButton_secondary'>" . $this->registry->getClass('output')->getReplacement("find_topics_link") . "</a></li>\r\n\t\t\t\t\t\t\t\t\t" . (($member['has_blog'] and IPSLib::appIsInstalled('blog')) ? "\r\n\t\t\t\t\t\t\t\t\t\t<li><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=blog&module=display&section=blog&show_members_blogs={$member['member_id']}", "public", ''), "", "") . "' title='{$this->lang->words['view_blog']}' class='ipsButton_secondary'>" . $this->registry->getClass('output')->getReplacement("blog_link") . "</a></li>\r\n\t\t\t\t\t\t\t\t\t" : "") . "\r\n\t\t\t\t\t\t\t\t\t" . (($member['has_gallery'] and IPSLib::appIsInstalled('gallery')) ? "\r\n\t\t\t\t\t\t\t\t\t\t<li><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=gallery&user={$member['member_id']}", "public", ''), "{$member['members_seo_name']}", "useralbum") . "' title='{$this->lang->words['view_gallery']}' class='ipsButton_secondary'>" . $this->registry->getClass('output')->getReplacement("gallery_link") . "</a></li>\r\n\t\t\t\t\t\t\t\t\t" : "") . "\r\n\t\t\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t<h3 class='ipsType_subtitle'>\r\n\t\t\t\t\t\t\t\t\t<strong><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showuser={$member['member_id']}", "public", ''), "{$member['members_seo_name']}", "showuser") . "' title='{$this->lang->words['view_profile']}'>{$member['members_display_name']}</a></strong>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t" . ($this->settings['pp_allow_member_rate'] && $this->request['pp_rating_real'] ? "<span class='rating'> \r\n\t\t\t\t\t\t\t\t\t\t\t" . ($member['pp_rating_real'] >= 1 ? "" . $this->registry->getClass('output')->getReplacement("rate_on") . "" : "" . $this->registry->getClass('output')->getReplacement("rate_off") . "") . "" . ($member['pp_rating_real'] >= 2 ? "" . $this->registry->getClass('output')->getReplacement("rate_on") . "" : "" . $this->registry->getClass('output')->getReplacement("rate_off") . "") . "" . ($member['pp_rating_real'] >= 3 ? "" . $this->registry->getClass('output')->getReplacement("rate_on") . "" : "" . $this->registry->getClass('output')->getReplacement("rate_off") . "") . "" . ($member['pp_rating_real'] >= 4 ? "" . $this->registry->getClass('output')->getReplacement("rate_on") . "" : "" . $this->registry->getClass('output')->getReplacement("rate_off") . "") . "" . ($member['pp_rating_real'] >= 5 ? "" . $this->registry->getClass('output')->getReplacement("rate_on") . "" : "" . $this->registry->getClass('output')->getReplacement("rate_off") . "") . "\r\n\t\t\t\t\t\t\t\t\t\t</span>" : "") . "\r\n\t\t\t\t\t\t\t\t</h3>\r\n\t\t\t\t\t\t\t\t" . ($this->settings['reputation_enabled'] && $this->settings['reputation_show_profile'] && $member['pp_reputation_points'] !== null ? "" . ($member['pp_reputation_points'] == 0 || !$member['pp_reputation_points'] ? "\r\n\t\t\t\t\t\t\t\t\t\t<p class='reputation zero ipsType_small left' data-tooltip=\"" . sprintf($this->lang->words['member_has_x_rep'], $member['members_display_name'], $member['pp_reputation_points']) . "\">\r\n\t\t\t\t\t\t\t\t\t" : "") . "\r\n\t\t\t\t\t\t\t\t\t" . ($member['pp_reputation_points'] > 0 ? "\r\n\t\t\t\t\t\t\t\t\t\t<p class='reputation positive ipsType_small left' data-tooltip=\"" . sprintf($this->lang->words['member_has_x_rep'], $member['members_display_name'], $member['pp_reputation_points']) . "\">\r\n\t\t\t\t\t\t\t\t\t" : "") . "\r\n\t\t\t\t\t\t\t\t\t" . ($member['pp_reputation_points'] < 0 ? "\r\n\t\t\t\t\t\t\t\t\t\t<p class='reputation negative ipsType_small left' data-tooltip=\"" . sprintf($this->lang->words['member_has_x_rep'], $member['members_display_name'], $member['pp_reputation_points']) . "\">\r\n\t\t\t\t\t\t\t\t\t" : "") . "\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t<span class='number'>{$member['pp_reputation_points']}</span>\r\n\t\t\t\t\t\t\t\t\t\t</p>" : "") . "\r\n\t\t\t\t\t\t\t\t<span class='desc'>\r\n\t\t\t\t\t\t\t\t\t{$this->lang->words['member_joined']} " . IPSText::htmlspecialchars($this->registry->getClass('class_localization')->getDate($member['joined'], "joined", 0)) . "<br />\r\n\t\t\t\t\t\t\t\t\t" . IPSMember::makeNameFormatted($member['group'], $member['member_group_id']) . " ·\r\n\t\t\t\t\t\t\t\t\t" . ($this->request['sort_key'] == 'members_profile_views' ? "\r\n\t\t\t\t\t\t\t\t\t\t" . $this->registry->getClass('class_localization')->formatNumber($member['members_profile_views']) . " {$this->lang->words['m_views']}\r\n\t\t\t\t\t\t\t\t\t" : "\r\n\t\t\t\t\t\t\t\t\t\t" . $this->registry->getClass('class_localization')->formatNumber($member['posts']) . " {$this->lang->words['member_posts']}\r\n\t\t\t\t\t\t\t\t\t") . "\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</li>\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n"; } $_ips___x_retval .= ''; unset($__iteratorCount); return $_ips___x_retval; }
/** * Returns an array of active users * * @return array */ public function getActiveUserDetails() { $active = array('TOTAL' => 0, 'NAMES' => array(), 'GUESTS' => 0, 'MEMBERS' => 0, 'ANON' => 0); if ($this->settings['show_active'] && $this->memberData['gbw_view_online_lists']) { if (!$this->settings['au_cutoff']) { $this->settings['au_cutoff'] = 15; } //----------------------------------------- // Get the users from the DB //----------------------------------------- $cut_off = $this->settings['au_cutoff'] * 60; $time = time() - $cut_off; $rows = array(); $ar_time = time(); if ($this->memberData['member_id']) { $rows = array($ar_time . '.' . md5(microtime()) => array('id' => 0, 'login_type' => IPSMember::isLoggedInAnon($this->memberData), 'running_time' => $ar_time, 'seo_name' => $this->memberData['members_seo_name'], 'member_id' => $this->memberData['member_id'], 'member_name' => $this->memberData['members_display_name'], 'member_group' => $this->memberData['member_group_id'])); } $this->DB->build(array('select' => 's.id, s.member_id, s.member_name, s.seo_name, s.login_type, s.running_time, s.member_group, s.uagent_type', 'from' => array('sessions' => 's'), 'where' => "running_time > {$time}", 'add_join' => array(array('select' => 'm.member_banned', 'from' => array('members' => 'm'), 'where' => 'm.member_id=s.member_id', 'type' => 'left')))); $this->DB->execute(); //----------------------------------------- // FETCH... //----------------------------------------- while ($r = $this->DB->fetch()) { $rows[$r['running_time'] . '.' . $r['id']] = $r; } krsort($rows); //----------------------------------------- // cache all printed members so we // don't double print them //----------------------------------------- $cached = array(); foreach ($rows as $result) { //----------------------------------------- // Skip Banned //----------------------------------------- if ($result['member_banned']) { continue; } //----------------------------------------- // Bot? //----------------------------------------- if (isset($result['uagent_type']) && $result['uagent_type'] == 'search') { /* Skipping bot? */ if (!$this->settings['spider_active']) { continue; } //----------------------------------------- // Seen bot of this type yet? //----------------------------------------- if (!$cached[$result['member_name']]) { $active['NAMES'][] = IPSMember::makeNameFormatted($result['member_name'], $result['member_group']); $cached[$result['member_name']] = 1; } else { //----------------------------------------- // Yup, count others as guest //----------------------------------------- $active['GUESTS']++; } } else { if (!$result['member_id'] or !$result['member_name']) { $active['GUESTS']++; } else { if (empty($cached[$result['member_id']])) { $cached[$result['member_id']] = 1; $result['member_name'] = IPSMember::makeNameFormatted($result['member_name'], $result['member_group']); /* Reset login type in case the board/group setting got changed */ $result['login_type'] = IPSMember::isLoggedInAnon(array('login_anonymous' => $result['login_type']), $result['member_group']); if ($result['login_type']) { if ($this->memberData['g_access_cp'] || $this->memberData['member_id'] == $result['member_id']) { $active['NAMES'][] = IPSMember::makeProfileLink($result['member_name'], $result['member_id'], $result['seo_name']) . "*"; $active['ANON']++; } else { $active['ANON']++; } } else { $active['MEMBERS']++; $active['NAMES'][] = IPSMember::makeProfileLink($result['member_name'], $result['member_id'], $result['seo_name']); } } } } } $active['TOTAL'] = $active['MEMBERS'] + $active['GUESTS'] + $active['ANON']; $this->users_online = $active['TOTAL']; } $this->lang->words['active_users'] = sprintf($this->lang->words['active_users'], $this->settings['au_cutoff']); return $active; }
/** * Show the ignored users * * @author Matt Mecham * @return string Processed HTML */ public function formIgnoredUsers() { //----------------------------------------- // INIT //----------------------------------------- $final_users = array(); $temp_users = array(); $uid = intval($this->request['uid']); $ignoredUsers = array(); //----------------------------------------- // Do we have incoming? //----------------------------------------- if ($uid) { $newmem = IPSMember::load($uid); $this->request['newbox_1'] = $newmem['members_display_name']; } //----------------------------------------- // Get ignored users //----------------------------------------- $perPage = 25; /* Count */ $count = $this->DB->buildAndFetch(array('select' => 'count(*) as dracula', 'from' => 'ignored_users', 'where' => 'ignore_owner_id=' . $this->memberData['member_id'])); /* Sort out pagination */ $st = intval($this->request['st']) >= 0 ? intval($this->request['st']) : 0; $pagination = $this->registry->output->generatePagination(array('totalItems' => $count['dracula'], 'itemsPerPage' => $perPage, 'currentStartValue' => $st, 'baseUrl' => 'app=core&module=usercp&tab=core&area=ignoredusers')); /* Get em */ $this->DB->build(array('select' => '*', 'from' => 'ignored_users', 'where' => 'ignore_owner_id=' . $this->memberData['member_id'], 'limit' => array($st, $perPage))); $this->DB->execute(); while ($row = $this->DB->fetch()) { $ignoredUsers[$row['ignore_ignore_id']] = $row; } //----------------------------------------- // Get members and check to see if they've // since been moved into a group that cannot // be ignored //----------------------------------------- foreach ($ignoredUsers as $_id => $data) { if (intval($_id)) { $temp_users[] = $_id; } } if (count($temp_users)) { $members = IPSMember::load($temp_users, 'all'); foreach ($members as $m) { $m['g_title'] = IPSMember::makeNameFormatted($this->caches['group_cache'][$m['member_group_id']]['g_title'], $m['member_group_id']); $final_users[$m['member_id']] = IPSMember::buildDisplayData($m); $final_users[$m['member_id']]['ignoreData'] = $ignoredUsers[$m['member_id']]; } } $this->request['newbox_1'] = $this->request['newbox_1'] ? $this->request['newbox_1'] : ''; return $this->registry->getClass('output')->getTemplate('ucp')->membersIgnoredUsersForm($final_users, $pagination); }
/** * Show the who's chatting block on the board index * * @return string HTML output */ public function whosChatting() { //----------------------------------------- // INIT //----------------------------------------- $member_ids = array(); $to_load = array(); //----------------------------------------- // Check module/app //----------------------------------------- if (!IPSLib::appIsInstalled('ipchat') or !$this->settings['ipschat_online']) { return ''; } //----------------------------------------- // Check //----------------------------------------- if (!$this->settings['ipschat_whos_chatting']) { return ''; } $access_groups = explode(",", $this->settings['ipschat_group_access']); $my_groups = array($this->memberData['member_group_id']); if ($this->memberData['mgroup_others']) { $my_groups = array_merge($my_groups, explode(",", IPSText::cleanPermString($this->memberData['mgroup_others']))); } $access_allowed = false; foreach ($my_groups as $group_id) { if (in_array($group_id, $access_groups)) { $access_allowed = 1; break; } } if (!$access_allowed) { return ''; } //----------------------------------------- // Sort and show :D //----------------------------------------- $_guests = array(); if (is_array($this->cache->getCache('chatting')) and count($this->cache->getCache('chatting'))) { foreach ($this->cache->getCache('chatting') as $data) { if ($data['updated'] < time() - 120) { continue; } if ($data['member_id']) { $to_load[$data['member_id']] = $data['member_id']; } else { $_guests[$data['username']] = $data['username']; } } } //----------------------------------------- // Got owt? //----------------------------------------- if (count($to_load)) { $_seenIds = array(); $this->DB->build(array('select' => 'm.member_id, m.members_display_name, m.member_group_id, m.members_seo_name', 'from' => array('members' => 'm'), 'where' => "m.member_id IN(" . implode(",", $to_load) . ")", 'add_join' => array(0 => array('select' => 's.id, s.login_type, s.current_appcomponent', 'from' => array('sessions' => 's'), 'where' => 's.member_id=m.member_id', 'type' => 'left')))); $this->DB->execute(); while ($m = $this->DB->fetch()) { if (in_array($m['member_id'], $_seenIds)) { continue; } //----------------------------------------- // @link http://community.invisionpower.com/tracker/issue-20547-logout-from-the-board-still-shown-the-user-active/ // @see ipchatMemberSync //----------------------------------------- if (!$m['id']) { continue; } $_seenIds[] = $m['member_id']; $_key = $m['members_display_name']; $m['members_display_name'] = IPSMember::makeNameFormatted($m['members_display_name'], $m['member_group_id']); $member_ids[$_key] = "<a href='" . $this->registry->getClass('output')->buildSEOUrl("showuser={$m['member_id']}", 'public', $m['members_seo_name'], 'showuser') . "'>{$m['members_display_name']}</a>"; } } $member_ids = array_merge($_guests, $member_ids); ksort($member_ids); //----------------------------------------- // Got owt? //----------------------------------------- $html = ''; $this->lang->loadLanguageFile(array('public_chat'), 'ipchat'); if (count($member_ids)) { $html = $this->registry->getClass('output')->getTemplate('ipchat')->whoschatting_show(intval(count($member_ids)), $member_ids); } else { if (!$this->settings['ipschat_hide_chatting']) { $html = $this->registry->getClass('output')->getTemplate('ipchat')->whoschatting_empty(); } } return $html; }
/** * Modern profile * * @return @e void [Outputs to screen] */ protected function _viewModern() { //----------------------------------------- // INIT //----------------------------------------- $member_id = intval($this->request['id']) ? intval($this->request['id']) : intval($this->request['MID']); if (!$member_id) { $this->registry->output->showError('profiles_no_member', 10246.0, null, null, 404); } //----------------------------------------- // Grab all data... //----------------------------------------- $member = IPSMember::load($member_id, 'profile_portal,pfields_content,sessions,groups', 'id'); //----------------------------------------- // Can we access? //----------------------------------------- if (!$this->memberData['g_mem_info'] && $this->memberData['member_id'] != $member['member_id']) { $this->registry->output->showError('profiles_off', 10245, null, null, 403); } $tab = substr(IPSText::alphanumericalClean(str_replace('..', '', trim($this->request['tab']))), 0, 20); $firsttab = ''; $friends = array(); $visitors = array(); $comment_perpage = 5; $pips = 0; $default_tab = ''; $tabs = array(); $_tabs = array(); $_positions = array(0 => 0); $_member_ids = array(); $sql_extra = ''; $pass = 0; $mod = 0; $_todays_date = getdate(); $_rCustom = intval($this->request['removeCustomization']); $_dCustom = intval($this->request['disableCustomization']); $time_adjust = $this->settings['time_adjust'] == "" ? 0 : $this->settings['time_adjust']; $board_posts = $this->caches['stats']['total_topics'] + $this->caches['stats']['total_replies']; $seenFiles = array(); /* Removing customization? */ if ($_rCustom and ($member_id == $this->memberData['member_id'] or $this->memberData['g_access_cp'] or $this->memberData['g_is_supmod'] and !$member['g_access_cp']) and $this->request['secure_key'] == $this->member->form_hash) { IPSMember::save($member_id, array('extendedProfile' => array('pp_customization' => serialize(array())))); } else { if ($_rCustom) { $this->registry->output->showError('profile_no_remove_perm', '10246.-1', null, null, 403); } } /* Disable? */ if ($_dCustom and ($this->memberData['g_access_cp'] or $this->memberData['g_is_supmod'] and !$member['g_access_cp']) and $this->request['secure_key'] == $this->member->form_hash) { IPSMember::save($member_id, array('core' => array('bw_disable_customization' => 1))); } else { if ($_dCustom) { $this->registry->output->showError('profile_no_remove_perm', '10246.-1', null, null, 403); } } if (!$member['member_id']) { $this->registry->output->showError('profiles_no_member', 10246, null, null, 404); } /* Member banned or is spammer? */ if (IPSMember::isInactive($member) && !$this->memberData['g_is_supmod']) { $this->registry->output->showError('profiles_not_active', '10246.1', null, null, 403); } //----------------------------------------- // Configure tabs //----------------------------------------- foreach (IPSLib::getEnabledApplications() as $appDir => $app) { /* Path to tabs */ $custom_path = IPSLib::getAppDir($appDir) . '/extensions/profileTabs'; if (is_dir($custom_path)) { foreach (new DirectoryIterator($custom_path) as $f) { if (!$f->isDot() && !$f->isDir()) { $file = $f->getFileName(); if ($file[0] == '.') { continue; } if (preg_match('#\\.conf\\.php$#i', $file)) { $classname = str_replace(".conf.php", "", $file); /* Block the old about me file */ if ($classname == 'aboutme') { continue; } $CONFIG = array(); require $custom_path . '/' . $file; /*noLibHook*/ //------------------------------- // Allowed to use? //------------------------------- if ($CONFIG['plugin_enabled']) { /* Block friends tab if we have disabled friends or friends feature is shut off */ if ($CONFIG['plugin_key'] == 'friends' and (!$member['pp_setting_count_friends'] or !$this->settings['friends_enabled'])) { continue; } $CONFIG['app'] = $appDir; $_position = $this->_getTabPosition($_positions, $CONFIG['plugin_order']); $_tabs[$_position] = $CONFIG; $_positions[] = $_position; } } } } } } ksort($_tabs); foreach ($_tabs as $_pos => $data) { $data['_lang'] = isset($this->lang->words[$data['plugin_lang_bit']]) ? $this->lang->words[$data['plugin_lang_bit']] : $data['plugin_name']; $tabs[$data['plugin_key']] = $data; } if ($tab && @is_file(IPSLib::getAppDir($tabs[$tab]['app']) . '/extensions/profileTabs/' . $tab . '.php')) { $default_tab = $tabs[$tab]['app'] . ':' . $tab; /* Update <title> */ $this->lang->words['page_title_pp'] .= ': ' . $tabs[$tab]['_lang']; } else { $default_tab = 'core:info'; } $friends = $this->_getRandomFriends($member); /* Check USER permalink... */ $this->registry->getClass('output')->checkPermalink($member['members_seo_name'] ? $member['members_seo_name'] : IPSText::makeSeoTitle($member['members_display_name'])); /* Build data */ $member = IPSMember::buildDisplayData($member, array('customFields' => 1, 'cfSkinGroup' => 'profile', 'checkFormat' => 1, 'cfGetGroupData' => 1, 'signature' => 1, 'spamStatus' => 1)); //----------------------------------------- // Recent visitor? //----------------------------------------- if ($member['member_id'] != $this->memberData['member_id'] && !IPSMember::isLoggedInAnon($this->memberData)) { $this->_addRecentVisitor($member, $this->memberData['member_id']); } //----------------------------------------- // DST? //----------------------------------------- if ($member['dst_in_use'] == 1) { $member['time_offset'] += 1; } //----------------------------------------- // Format extra user data //----------------------------------------- $member['_age'] = $member['bday_year'] ? date('Y') - $member['bday_year'] : 0; if ($member['bday_month'] > date('n')) { $member['_age'] -= 1; } else { if ($member['bday_month'] == date('n')) { if ($member['bday_day'] > date('j')) { $member['_age'] -= 1; } } } $member['_local_time'] = $member['time_offset'] != "" ? gmstrftime($this->settings['clock_long'], time() + $member['time_offset'] * 3600 + $time_adjust * 60) : ''; $member['g_title'] = IPSMember::makeNameFormatted($member['g_title'], $member['g_id'], $member['prefix'], $member['suffix']); $member['_bday_month'] = $member['bday_month'] ? $this->lang->words['M_' . $member['bday_month']] : 0; //----------------------------------------- // Visitors //----------------------------------------- if ($member['pp_setting_count_visitors']) { $_pp_last_visitors = unserialize($member['pp_last_visitors']); $_visitor_info = array(); if (is_array($_pp_last_visitors)) { krsort($_pp_last_visitors); $_members = IPSMember::load(array_values($_pp_last_visitors), 'extendedProfile'); foreach ($_members as $_id => $_member) { $_visitor_info[$_id] = IPSMember::buildDisplayData($_member, array('reputation' => 0, 'warn' => 0)); } foreach ($_pp_last_visitors as $_time => $_id) { if (!$_visitor_info[$_id]['members_display_name_short']) { $_visitor_info[$_id] = IPSMember::buildDisplayData(IPSMember::setUpGuest(), array('reputation' => 0, 'warn' => 0)); } $_visitor_info[$_id]['_visited_date'] = ipsRegistry::getClass('class_localization')->getDate($_time, 'TINY'); $_visitor_info[$_id]['members_display_name_short'] = $_visitor_info[$_id]['members_display_name_short'] ? $_visitor_info[$_id]['members_display_name_short'] : $this->lang->words['global_guestname']; $visitors[] = $_visitor_info[$_id]; if (count($visitors) == 5) { break; } } } } //----------------------------------------- // Online location //----------------------------------------- $member = IPSMember::getLocation($member); //----------------------------------------- // Add profile view //----------------------------------------- $this->DB->insert('profile_portal_views', array('views_member_id' => $member['member_id']), true); //----------------------------------------- // Grab default tab... //----------------------------------------- $tab_html = ''; if ($tab) { if (@is_file(IPSLib::getAppDir($tabs[$tab]['app']) . '/extensions/profileTabs/' . $tab . '.php')) { require IPSLib::getAppDir('members') . '/sources/tabs/pluginParentClass.php'; /*noLibHook*/ $classToLoad = IPSLib::loadLibrary(IPSLib::getAppDir($tabs[$tab]['app']) . '/extensions/profileTabs/' . $tab . '.php', 'profile_' . $tab, $tabs[$tab]['app']); $plugin = new $classToLoad($this->registry); $tab_html = $plugin->return_html_block($member); } } //----------------------------------------- // Set description tag //----------------------------------------- $_desc = $member['pp_about_me'] ? $member['pp_about_me'] : $member['signature']; if ($_desc) { $this->registry->output->addMetaTag('description', $member['members_display_name'] . ': ' . IPSText::xssMakeJavascriptSafe(IPSText::getTextClass('bbcode')->stripAllTags($_desc))); } /* Reputation */ if ($this->settings['reputation_protected_groups']) { if (in_array($member['member_group_id'], explode(",", $this->settings['reputation_protected_groups']))) { $this->settings['reputation_show_profile'] = false; } } //----------------------------------------- // Try to "fix" empty custom field groups //----------------------------------------- foreach ($member['custom_fields'] as $group => $mdata) { if ($group != 'profile_info' and $group != 'contact') { if (is_array($member['custom_fields'][$group]) and count($member['custom_fields'][$group])) { $_count = 0; foreach ($member['custom_fields'][$group] as $key => $value) { if ($value) { $_count++; } } if (!$_count) { unset($member['custom_fields'][$group]); } } } else { if ($group == 'contact') { $show_contact = false; foreach ($member['custom_fields'][$group] as $key => $value) { $_val = preg_replace('/<!--(.|\\s)*?-->/', '', $value); if ($_val) { $show_contact = true; break; } } } } } //----------------------------------------- // Format signature //----------------------------------------- if ($member['signature']) { IPSText::getTextClass('bbcode')->parse_html = $member['g_dohtml']; IPSText::getTextClass('bbcode')->parse_nl2br = 1; IPSText::getTextClass('bbcode')->parse_smilies = 0; IPSText::getTextClass('bbcode')->parse_bbcode = 1; IPSText::getTextClass('bbcode')->parsing_section = 'signatures'; IPSText::getTextClass('bbcode')->parsing_mgroup = $member['member_group_id']; IPSText::getTextClass('bbcode')->parsing_mgroup_others = $member['mgroup_others']; $member['signature'] = IPSText::getTextClass('bbcode')->preDisplayParse($member['signature']); $member['signature'] = $this->registry->getClass('output')->getTemplate('global')->signature_separator($member['signature']); } //----------------------------------------- // Format 'About me' //----------------------------------------- if ($member['pp_about_me']) { IPSText::getTextClass('bbcode')->parse_html = $member['g_dohtml']; IPSText::getTextClass('bbcode')->parse_nl2br = 1; IPSText::getTextClass('bbcode')->parse_smilies = 1; IPSText::getTextClass('bbcode')->parse_bbcode = 1; IPSText::getTextClass('bbcode')->parsing_section = 'aboutme'; IPSText::getTextClass('bbcode')->parsing_mgroup = $member['member_group_id']; IPSText::getTextClass('bbcode')->parsing_mgroup_others = $member['mgroup_others']; $member['pp_about_me'] = IPSText::getTextClass('bbcode')->preDisplayParse(IPSText::getTextClass('bbcode')->preDbParse($member['pp_about_me'])); } /* final data */ if ($default_tab == 'core:info') { /* Load status class */ if (!$this->registry->isClassLoaded('memberStatus')) { $classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/classes/member/status.php', 'memberStatus'); $this->registry->setClass('memberStatus', new $classToLoad(ipsRegistry::instance())); } /* Fetch */ $status = $this->registry->getClass('memberStatus')->fetchMemberLatest($member['member_id']); } //----------------------------------------- // Warnings? //----------------------------------------- $warns = array(); if ($member['show_warn']) { if ($member['member_banned']) { $warns['ban'] = 0; $_warn = ipsRegistry::DB()->buildAndFetch(array('select' => 'wl_id', 'from' => 'members_warn_logs', 'where' => "wl_member={$member['member_id']} AND wl_suspend<>0 AND wl_suspend<>-2", 'order' => 'wl_date DESC', 'limit' => 1)); if ($_warn['wl_id']) { $warns['ban'] = $_warn['wl_id']; } } if ($member['temp_ban']) { $warns['suspend'] = 0; $_warn = ipsRegistry::DB()->buildAndFetch(array('select' => 'wl_id', 'from' => 'members_warn_logs', 'where' => "wl_member={$member['member_id']} AND wl_suspend<>0 AND wl_suspend<>-2", 'order' => 'wl_date DESC', 'limit' => 1)); if ($_warn['wl_id']) { $warns['suspend'] = $_warn['wl_id']; } } if ($member['restrict_post']) { $warns['rpa'] = 0; $_warn = ipsRegistry::DB()->buildAndFetch(array('select' => 'wl_id', 'from' => 'members_warn_logs', 'where' => "wl_member={$member['member_id']} AND wl_rpa<>0", 'order' => 'wl_date DESC', 'limit' => 1)); if ($_warn['wl_id']) { $warns['rpa'] = $_warn['wl_id']; } } if ($member['mod_posts']) { $warns['mq'] = 0; $_warn = ipsRegistry::DB()->buildAndFetch(array('select' => 'wl_id', 'from' => 'members_warn_logs', 'where' => "wl_member={$member['member_id']} AND wl_mq<>0", 'order' => 'wl_date DESC', 'limit' => 1)); if ($_warn['wl_id']) { $warns['mq'] = $_warn['wl_id']; } } } //----------------------------------------- // Add to output //----------------------------------------- $this->request['member_id'] = intval($this->request['showuser']); $this->member_name = $member['members_display_name']; $this->output = $this->registry->getClass('output')->getTemplate('profile')->profileModern($tabs, $member, $visitors, $default_tab, $tab_html, $friends, $status, $warns, $show_contact); }
function memberSearchResult($r, $resultAsTitle = false) { $IPBHTML = ""; $IPBHTML .= "<span class='icon'>\n\t" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'userSmallPhoto') ? $this->registry->getClass('output')->getTemplate('global')->userSmallPhoto(array_merge($r, array('_customClass' => 'ipsUserPhoto_medium'))) : '') . "\n</span>\n<div class='result_info'>\n\t<h3>" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'userHoverCard') ? $this->registry->getClass('output')->getTemplate('global')->userHoverCard($r) : '') . "</h3>\n\t<span class='desc lighter breadcrumb'>\n\t\t{$this->lang->words['member_joined']} " . IPSText::htmlspecialchars($this->registry->getClass('class_localization')->getDate($r['joined'], "short", 0)) . "<br />\n\t\t" . IPSMember::makeNameFormatted($r['group'], $r['member_group_id']) . " · " . $this->registry->getClass('class_localization')->formatNumber($r['posts']) . " {$this->lang->words['member_posts']}\n\t</span>\n</div>"; return $IPBHTML; }
function __f__31165f0ae25e57ec43fffe3309bcc3e7($data, $relId) { $_ips___x_retval = ''; $__iteratorCount = 0; foreach ($data as $mid => $data) { $__iteratorCount++; $_ips___x_retval .= "\n <li class='clearfix ipsPad_half " . ($data['like_is_anon'] ? "faded" : "") . "'>\n <a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showuser={$data['member_id']}", "public", ''), "{$data['members_seo_name']}", "showuser") . "' title='{$this->lang->words['view_profile']}' class='ipsUserPhotoLink left'>\n <img src='{$data['pp_small_photo']}' class='ipsUserPhoto ipsUserPhoto_mini' />\n </a>\n <div class='list_content'>\n <a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showuser={$data['member_id']}", "public", ''), "{$data['members_seo_name']}", "showuser") . "' title='{$this->lang->words['view_profile']}'><strong>{$data['members_display_name']}</strong></a>\n <em class='desc'>{$this->lang->words['likeadded']} " . IPSText::htmlspecialchars($this->registry->getClass('class_localization')->getDate($data['rep_date'], "short", 0)) . "</em>\n <p class='desc'>\n " . IPSMember::makeNameFormatted($data['g_title'], $data['g_id']) . "\n </p>\n </div>\n </li>\n \n"; } $_ips___x_retval .= ''; unset($__iteratorCount); return $_ips___x_retval; }
/** * Group row * * @param array Group * @return string HTML */ public function groupsOverviewRow($r = "") { $IPBHTML = ""; //--starthtml--// $r['_can_acp_img'] = $r['_can_acp'] ? 'accept.png' : 'cross.png'; $r['_can_supmod_img'] = $r['_can_supmod'] ? 'accept.png' : 'cross.png'; $r['_title'] = IPSMember::makeNameFormatted($r['g_title'], $r['g_id']); $IPBHTML .= <<<HTML <tr class='ipsControlRow'> <td><img src='{$this->settings['skin_acp_url']}/images/icons/group.png' /></td> <td><a href='{$this->settings['base_url']}&{$this->form_code}&do=edit&id={$r['g_id']}' style='font-weight:bold'>{$r['_title']}</a> <small>({$this->lang->words['g_id']}: {$r['g_id']})</small></td> <td align='center'><img src='{$this->settings['skin_acp_url']}/images/icons/{$r['_can_acp_img']}' alt='-' /></td> <td align='center'><img src='{$this->settings['skin_acp_url']}/images/icons/{$r['_can_supmod_img']}' alt='-' /></td> <td align='center'> HTML; if ($r['g_id'] != $this->settings['guest_group']) { $_extraLink = ''; if ($this->request['showSecondary']) { $_extraLink = "&f_inc_secondary=1"; } $IPBHTML .= <<<HTML \t<a href='{$this->settings['_base_url']}app=members&section=members&module=members#do_results=1&__update=1&f_primary_group={$r['g_id']}{$_extraLink}' title='{$this->lang->words['g_listusers']}'>{$r['count']}</a> HTML; } else { $IPBHTML .= <<<HTML {$r['count']} HTML; } $IPBHTML .= <<<HTML </td>\t\t\t\t\t\t\t\t\t\t\t\t <td class='col_buttons'> \t<ul class='ipsControlStrip'> \t\t<li class='i_edit'><a href='{$this->settings['base_url']}&{$this->form_code}&do=edit&id={$r['g_id']}' title='{$this->lang->words['g_editg']}'>{$this->lang->words['g_editg']}</a></li> HTML; if (!in_array($r['g_id'], array($this->settings['auth_group'], $this->settings['guest_group'], $this->settings['member_group']))) { $IPBHTML .= <<<HTML \t\t<li class='i_delete'><a href='#' onclick='return acp.confirmDelete("{$this->settings['base_url']}&{$this->form_code}&do=delete&_admin_auth_key={$this->registry->getClass('adminFunctions')->_admin_auth_key}&id={$r['g_id']}");' title='{$this->lang->words['g_deleteg']}'>{$this->lang->words['g_deleteg']}</a></li> HTML; } else { $IPBHTML .= <<<HTML \t\t<li class='i_delete disabled'><a href='#' onclick='return false;' title='{$this->lang->words['g_cannotdel']}' title='{$this->lang->words['g_cannotdel']}'>{$this->lang->words['g_cannotdel']}</a></li> HTML; } $IPBHTML .= <<<HTML \t</ul> </td> </tr> HTML; //--endhtml--// return $IPBHTML; }
function __f__cf9e32adedfd3d5b1b2f4c86fd98c614($friends, $pages) { $_ips___x_retval = ''; $__iteratorCount = 0; foreach ($friends as $friend) { $__iteratorCount++; $_ips___x_retval .= "\n\t\t\t" . ($this->request['tab'] == 'pending' ? "<li id='member_id_{$friend['member_id']}' class='ipsPad clearfix member_entry " . IPSLib::next($this->registry->templateStriping["memberStripe"]) . "'>\n\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showuser={$friend['member_id']}", "public", ''), "{$friend['members_seo_name']}", "showuser") . "' title='{$this->lang->words['view_profile']}' class='ipsUserPhotoLink left'><img src='{$friend['pp_small_photo']}' alt=\"" . sprintf($this->lang->words['users_photo'], $friend['members_display_name']) . "\" class='ipsUserPhoto ipsUserPhoto_medium' /></a>\n\t\t\t\t\t<div class='ipsBox_withphoto'>\n\t\t\t\t\t\t<ul class='ipsList_inline right'>\n\t\t\t\t\t\t\t<li><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=profile&section=friends&do=moderate&pp_option=approve&pp_friend_id[{$friend['member_id']}]=1&md5check={$this->member->form_hash}", "public", ''), "", "") . "' title='{$this->lang->words['approve_request']}' class='ipsButton_secondary'>{$this->lang->words['approve_request']}</a></li>\n\t\t\t\t\t\t\t<li><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=profile&section=friends&do=moderate&pp_option=delete&pp_friend_id[{$friend['member_id']}]=1&md5check={$this->member->form_hash}", "public", ''), "", "") . "' title='{$this->lang->words['deny_request']}' class='ipsButton_secondary important'>{$this->lang->words['deny_request']}</a></li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<h3 class='ipsType_subtitle'>\n\t\t\t\t\t\t\t<strong><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showuser={$friend['member_id']}", "public", ''), "{$friend['members_seo_name']}", "showuser") . "' title='{$this->lang->words['view_profile']}'>{$friend['members_display_name']}</a></strong>\n\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t" . ($this->settings['reputation_enabled'] && $this->settings['reputation_show_profile'] ? "" . ($friend['pp_reputation_points'] == 0 || !$friend['pp_reputation_points'] ? "\n\t\t\t\t\t\t\t\t<p class='reputation zero ipsType_small left'>\n\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t" . ($friend['pp_reputation_points'] > 0 ? "\n\t\t\t\t\t\t\t\t<p class='reputation positive ipsType_small left'>\n\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t" . ($friend['pp_reputation_points'] < 0 ? "\n\t\t\t\t\t\t\t\t<p class='reputation negative ipsType_small left'>\n\t\t\t\t\t\t\t" : "") . "\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<span class='number'>{$friend['pp_reputation_points']}</span>\n\t\t\t\t\t\t\t\t</p>" : "") . "\n\t\t\t\t\t\t<span class='desc'>\n\t\t\t\t\t\t\t{$this->lang->words['member_joined']} " . IPSText::htmlspecialchars($this->registry->getClass('class_localization')->getDate($friend['joined'], "joined", 0)) . "<br />\n\t\t\t\t\t\t\t" . IPSMember::makeNameFormatted($friend['group'], $friend['member_group_id']) . " · " . $this->registry->getClass('class_localization')->formatNumber($friend['posts']) . " {$this->lang->words['member_posts']}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</li>" : "<li id='member_id_{$friend['member_id']}' class='ipsPad clearfix member_entry " . IPSLib::next($this->registry->templateStriping["memberStripe"]) . "'>\n\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showuser={$friend['member_id']}", "public", ''), "{$friend['members_seo_name']}", "showuser") . "' title='{$this->lang->words['view_profile']}' class='ipsUserPhotoLink left'><img src='{$friend['pp_small_photo']}' alt=\"" . sprintf($this->lang->words['users_photo'], $friend['members_display_name']) . "\" class='ipsUserPhoto ipsUserPhoto_medium' /></a>\n\t\t\t\t\t<div class='ipsBox_withphoto'>\n\t\t\t\t\t\t<ul class='ipsList_inline right'>\n\t\t\t\t\t\t\t" . ($this->memberData['g_is_supmod'] == 1 && $friend['member_id'] != $this->memberData['member_id'] ? "\n\t\t\t\t\t\t\t\t<li><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=modcp&do=editmember&auth_key={$this->member->form_hash}&mid={$friend['member_id']}&pf={$friend['member_id']}", "public", ''), "", "") . "' class='ipsButton_secondary'>{$this->lang->words['supmod_edit_member']}</a></li>\n\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t" . (($this->memberData['member_id'] and $this->memberData['member_id'] != $friend['member_id'] && $this->settings['friends_enabled'] and $this->memberData['g_can_add_friends']) ? "" . (IPSMember::checkFriendStatus($friend['member_id']) ? "\n\t\t\t\t\t\t\t\t\t<li class='mini_friend_toggle is_friend' id='friend_mlist_{$friend['member_id']}'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=list&module=profile&section=friends&do=remove&member_id={$friend['member_id']}&secure_key={$this->member->form_hash}", "public", ''), "", "") . "' title='{$this->lang->words['remove_friend']}' class='ipsButton_secondary'>" . $this->registry->getClass('output')->getReplacement("remove_friend") . "</a></li>\n\t\t\t\t\t\t\t\t" : "\n\t\t\t\t\t\t\t\t\t<li class='mini_friend_toggle is_not_friend' id='friend_mlist_{$friend['member_id']}'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=list&module=profile&section=friends&do=add&member_id={$friend['member_id']}&secure_key={$this->member->form_hash}", "public", ''), "", "") . "' title='{$this->lang->words['add_friend']}' class='ipsButton_secondary'>" . $this->registry->getClass('output')->getReplacement("add_friend") . "</a></li>\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t") . "" : "") . "\n\t\t\t\t\t\t\t" . (($this->memberData['g_use_pm'] and $this->memberData['members_disable_pm'] == 0 and IPSLib::moduleIsEnabled('messaging', 'members') && $friend['member_id'] != $this->memberData['member_id']) ? "\n\t\t\t\t\t\t\t\t<li class='pm_button' id='pm_xxx_{$friend['pp_member_id']}'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=list&module=messaging&section=send&do=form&fromMemberID={$friend['pp_member_id']}", "public", ''), "", "") . "' title='{$this->lang->words['pm_member']}' class='ipsButton_secondary'>" . $this->registry->getClass('output')->getReplacement("send_msg") . "</a></li>\n\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t<li><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&mid={$friend['member_id']}", "public", ''), "", "") . "' title='{$this->lang->words['gbl_find_my_content']}' class='ipsButton_secondary'>" . $this->registry->getClass('output')->getReplacement("find_topics_link") . "</a></li>\n\t\t\t\t\t\t\t" . (($friend['has_blog'] and IPSLib::appIsInstalled('blog')) ? "\n\t\t\t\t\t\t\t\t<li><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=blog&module=display&section=blog&show_members_blogs={$friend['member_id']}", "public", ''), "", "") . "' title='{$this->lang->words['view_blog']}' class='ipsButton_secondary'>" . $this->registry->getClass('output')->getReplacement("blog_link") . "</a></li>\n\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t" . (($friend['has_gallery'] and IPSLib::appIsInstalled('gallery')) ? "\n\t\t\t\t\t\t\t\t<li><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=gallery&user={$friend['member_id']}", "public", ''), "{$friend['members_seo_name']}", "useralbum") . "' title='{$this->lang->words['view_gallery']}' class='ipsButton_secondary'>" . $this->registry->getClass('output')->getReplacement("gallery_link") . "</a></li>\n\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<h3 class='ipsType_subtitle'>\n\t\t\t\t\t\t\t<strong><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showuser={$friend['member_id']}", "public", ''), "{$friend['members_seo_name']}", "showuser") . "' title='{$this->lang->words['view_profile']}'>{$friend['members_display_name']}</a></strong>\n\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t" . ($this->settings['reputation_enabled'] && $this->settings['reputation_show_profile'] ? "" . ($friend['pp_reputation_points'] == 0 || !$friend['pp_reputation_points'] ? "\n\t\t\t\t\t\t\t\t<p class='reputation zero ipsType_small left'>\n\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t" . ($friend['pp_reputation_points'] > 0 ? "\n\t\t\t\t\t\t\t\t<p class='reputation positive ipsType_small left'>\n\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t" . ($friend['pp_reputation_points'] < 0 ? "\n\t\t\t\t\t\t\t\t<p class='reputation negative ipsType_small left'>\n\t\t\t\t\t\t\t" : "") . "\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<span class='number'>{$friend['pp_reputation_points']}</span>\n\t\t\t\t\t\t\t\t</p>" : "") . "\n\t\t\t\t\t\t<span class='desc'>\n\t\t\t\t\t\t\t{$this->lang->words['member_joined']} " . IPSText::htmlspecialchars($this->registry->getClass('class_localization')->getDate($friend['joined'], "joined", 0)) . "<br />\n\t\t\t\t\t\t\t" . IPSMember::makeNameFormatted($friend['group'], $friend['member_group_id']) . " · " . $this->registry->getClass('class_localization')->formatNumber($friend['posts']) . " {$this->lang->words['member_posts']}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</li>") . "\n\t\t\n"; } $_ips___x_retval .= ''; unset($__iteratorCount); return $_ips___x_retval; }
/** * Returns a list (with buildProfilePhoto set) of users in an application * * @param string $app Application folder/key * @param array $options Array of options to add/override checks for the query * @return @e array Array of found sessions (members, guests, bots, anons) * * <b>Filters:</b> * - cutoff: Specify a different cutoff time rather than using the default setting * - addJoins: Add more joins for the query * - addWhere: Add more checks for the 'where' part of the query (everything is joined with ' AND ') * - overrideWhere: Specify manually the 'where' part of the query, the query must be already compiled * - overrideGroup: if set to true the check against the 'gbw_view_online_lists' group setting is skipped * - skipParsing: If set to true the parseOnlineEntries from coreExtensions is NOT executed * - includeErrors: If set to true the in_error=1 lines are loaded as well from the table * - excludeViewer: If set to true skips loading the row for the current session_id, it is required to load the current member viewing the page as sessions table is not updated at this point yet but only on destruct * * <b>Example Usage:</b> * @code * $onlineUsers = $this->getUsersIn( 'forums', array( 'cutoff' => 90 ) ); * $onlineUsers = $this->getUsersIn( 'forums', array( 'cutoff' => 90, 'addJoins' => array( ... ), 'addWhere' => array( ... ) ) ); * $onlineUsers = $this->getUsersIn( 'forums', array( 'overrideWhere' => "s.current_appcomponent='forums' AND (s.running_time > TIME_A OR s.running_time < TIME_B)" ) ); * @endcode */ public function getUsersIn($app, $options = array()) { /* App we're checking is not even installed? */ if (!IPSLib::appIsInstalled($app, false)) { return array(); } /* Can't view online lists? */ if (empty($options['overrideGroup']) && !$this->memberData['gbw_view_online_lists']) { return array(); } /* Init vars and check options */ $return = array('stats' => array('total' => 0, 'members' => 0, 'guests' => 0, 'bots' => 0, 'anon' => 0), 'rows' => array('members' => array(), 'bots' => array(), 'guests' => array(), 'anon' => array()), 'names' => array()); $cutoff = empty($options['cutoff']) ? $this->settings['au_cutoff'] : $options['cutoff']; $limit = time() - $cutoff * 60; $rows = array(); $NOWJIM = IPS_UNIX_TIME_NOW; $cached = array(); /* Sort joins */ $_joins = array(array('select' => 'm.*', 'from' => array('members' => 'm'), 'where' => 'm.member_id=s.member_id', 'type' => 'left')); if (isset($options['addJoins']) && is_array($options['addJoins']) && count($options['addJoins'])) { $_joins = array_merge($_joins, $options['addJoins']); } /* Sort where.. override? */ if (!empty($options['overrideWhere']) && is_string($options['overrideWhere'])) { $where = $options['overrideWhere']; } else { /* Normal where */ $where = array("s.current_appcomponent='" . $this->DB->addSlashes($app) . "'", 's.running_time > ' . $limit); /* Load error rows? */ if (empty($options['includeErrors'])) { $where[] = 's.in_error=0'; } /* Add more where parts */ if (isset($options['addWhere']) && is_array($options['addWhere']) && count($options['addWhere'])) { $where = array_merge($where, $options['addWhere']); } $where = implode(' AND ', $where); } /* We're a viewer too? Get our session separately */ $_extraWhere = empty($options['excludeViewer']) ? "s.id='{$this->member->session_id}' OR " : ''; /* Dee bee */ $this->DB->build(array('select' => 's.*, s.id as row_session_id', 'from' => array('sessions' => 's'), 'where' => "{$_extraWhere}({$where})", 'add_join' => $_joins)); $this->DB->execute(); while ($session = $this->DB->fetch()) { /* Reset for possible bad joins */ $session['id'] = $session['row_session_id']; /* Update our own session properly? */ if ($session['id'] == $this->member->session_id) { $session = array_merge($session, $this->member->sessionClass()->returnCurrentSession()); } $rows[$session['running_time'] . '.' . $session['id']] = $session; } /* No rows? */ if (!count($rows)) { return $return; } krsort($rows); /* Are we parsing online entries or want only the names */ if (empty($options['skipParsing'])) { /* Process them */ $filename = IPSLib::getAppDir($app) . '/extensions/coreExtensions.php'; if (is_file($filename)) { $classToLoad = IPSLib::loadLibrary($filename, 'publicSessions__' . $app, $app); $loader = new $classToLoad(); if (method_exists($loader, 'parseOnlineEntries')) { $rows = $loader->parseOnlineEntries($rows); } } /* No rows? */ if (!count($rows)) { return $return; } } /* Sort through */ foreach ($rows as $id => $result) { $last_date = $this->registry->getClass('class_localization')->getTime($result['running_time']); /* ROBOT - or DODOT! */ if (strstr($result['id'], '_session')) { $botname = preg_replace('/^(.+?)=/', "\\1", $result['id']); if (!$cached['srch_' . $result['member_name']]) { $result = IPSMember::buildProfilePhoto($result); $result['parsedMemberName'] = $result['member_name']; $return['rows']['bots'][$result['id']] = $result; $return['names'][$result['id']] = $result['parsedMemberName']; $cached['srch_' . $result['member_name']]['count'] = 1; } else { $cached['srch_' . $result['member_name']]['count']++; } $return['stats']['bots']++; } else { if (!$result['member_id']) { $result = IPSMember::buildProfilePhoto(0); $result['parsedMemberName'] = $this->lang->words['global_guestname']; $return['rows']['guests'][$result['id']] = $result; $return['stats']['guests']++; } else { if (empty($cached[$result['member_id']])) { $cached[$result['member_id']] = 1; $result = IPSMember::buildProfilePhoto($result); $result['parsedMemberName'] = IPSMember::makeNameFormatted($result['member_name'], $result['member_group']); /* Reset login type in case the board/group setting got changed */ $result['login_type'] = IPSMember::isLoggedInAnon(array('login_anonymous' => $result['login_type']), $result['member_group_id']); if ($result['login_type']) { if ($this->memberData['g_access_cp'] || $this->memberData['member_id'] == $result['member_id']) { $result['parsedMemberName'] = IPSMember::makeProfileLink($result['parsedMemberName'], $result['member_id'], $result['seo_name']); $result['parsedMemberName'] .= '*'; # Add anonymous asterisk $return['rows']['anon'][$result['id']] = $result; $return['names'][$result['id']] = $result['parsedMemberName']; } $return['stats']['anon']++; } else { $result['parsedMemberName'] = IPSMember::makeProfileLink($result['parsedMemberName'], $result['member_id'], $result['seo_name']); $return['rows']['members'][$result['id']] = $result; $return['names'][$result['id']] = $result['parsedMemberName']; $return['stats']['members']++; } } } } } /* Process bots */ foreach ($cached as $name => $val) { if ($val['count'] && substr($name, 0, 5) == 'srch_') { foreach ($return['rows']['bots'] as $row) { if ($row['parsedMemberName'] == substr($name, 5)) { $return['rows']['bots'][$row['id']]['parsedMemberName'] .= ' (' . $val['count'] . ')'; $return['rows']['bots'][$row['id']]['member_name'] = $return['rows']['bots'][$row['id']]['parsedMemberName']; $return['names'][$row['id']] = $return['rows']['bots'][$row['id']]['parsedMemberName']; break; } } } } $return['stats']['total'] = intval($return['stats']['bots']) + intval($return['stats']['guests']) + intval($return['stats']['anon']) + intval($return['stats']['members']); return $return; }
/** * Regular member loop for member list * * @param array Member data * @param bool Show checkbox * @return string HTML */ public function memberListRow($member, $extraColumn = false) { $IPBHTML = ""; $member['group_title'] = IPSMember::makeNameFormatted($member['group_title'], $member['member_group_id']); if (trim($member['members_display_name']) == '') { $member['members_display_name'] = "<em class='desctext'>{$this->lang->words['sm_nodisplayname']}</em>"; } if (IPSText::mbstrlen($member['email']) > 50) { $_email = htmlspecialchars(substr(html_entity_decode($member['email']), 0, 20)) . '...' . htmlspecialchars(substr(html_entity_decode($member['email']), -25)); $member['email'] = '<span style="border-bottom:1px dotted gray; cursor:pointer" title="' . $member['email'] . "\">" . $_email . '</span>'; } $_extraStyle = $member['member_banned'] ? '_red' : ($member['bw_is_spammer'] ? '_amber' : ''); $_extraText = $member['member_banned'] ? '(' . $this->lang->words['m_f_showbanned'] . ')' : ($member['bw_is_spammer'] ? '(' . $this->lang->words['m_f_showspam'] . ')' : ''); $_serviceImg = ""; if ($member['fb_uid']) { $_serviceImg = "<a href='http://www.facebook.com/profile.php?id={$member['fb_uid']}' target='_blank'><img src='{$this->settings['skin_acp_url']}/images/members/facebook.png' /></a> "; } if ($member['twitter_id']) { $_serviceImg .= "<img src='{$this->settings['skin_acp_url']}/images/members/twitter.png' />"; } $IPBHTML .= <<<HTML \t<tr id='member-{$member['member_id']}' data-mid="{$member['member_id']}" class='member_row {$_extraStyle}'> \t\t<td><a href='{$this->settings['base_url']}&module=members&section=members&do=viewmember&member_id={$member['member_id']}'><img src='{$member['pp_thumb_photo']}' style='width: 30px; height: 30px; border: 1px solid #d8d8d8' /></a></td> \t\t<td class='member_name'><a href='{$this->settings['base_url']}&module=members&section=members&do=viewmember&member_id={$member['member_id']}' class='larger_text'>{$member['members_display_name']}</a></td> \t\t<td>{$_serviceImg} {$member['email']}</td> \t\t<td> \t\t\t{$member['_joined']} \t\t</td> \t\t<td>{$member['group_title']} <span style='color:gray;font-size:0.8em'>{$_extraText}</span></td> \t\t<td><a href='{$this->settings['base_url']}&app=members&module=members&section=tools&do=learn_ip&ip={$member['ip_address']}'>{$member['ip_address']}</a></td> \t\t<td> \t\t\t<p class='member_controls'> \t\t\t\t<a href='#' class='ipsBadge badge_red member_action' data-action='delete' title='{$this->lang->words['form_deletemember']}'>{$this->lang->words['m_but_delete']}</a> HTML; if ($extraColumn) { $IPBHTML .= <<<HTML \t\t<input type='checkbox' /> HTML; } $IPBHTML .= <<<HTML \t\t\t</p> \t\t</td> \t</tr> HTML; //--endhtml--// return $IPBHTML; }
/** * Generate the Poll output * * @return string */ public function _generatePollOutput() { /* Init */ $topicData = $this->registry->getClass('topics')->getTopicData(); $forumData = $this->forumClass->getForumById($topicData['forum_id']); $showResults = 0; $pollData = array(); //----------------------------------------- // Get the poll information... //----------------------------------------- $this->DB->build(array('select' => '*', 'from' => 'polls', 'where' => 'tid=' . $topicData['tid'])); $this->DB->execute(); $poll = $this->DB->fetch(); //----------------------------------------- // check we have a poll //----------------------------------------- if (!$poll['pid']) { return array('html' => '', 'poll' => ''); } //----------------------------------------- // Do we have a poll question? //----------------------------------------- if (!$poll['poll_question']) { $poll['poll_question'] = $topicData['title']; } //----------------------------------------- // Poll only? //----------------------------------------- if ($poll['poll_only'] == 1) { $this->registry->getClass('topics')->setTopicData('poll_only', true); } //----------------------------------------- // Additional Poll Vars //----------------------------------------- $poll['_totalVotes'] = 0; $poll['_memberVoted'] = 0; $memberChoices = array(); //----------------------------------------- // Have we voted in this poll? //----------------------------------------- /* Save a join @link http://community.invisionpower.com/tracker/issue-35773-pollsvoters-voters-table-joining-to-million-plus-rows/ */ if ($poll['poll_view_voters'] and $this->settings['poll_allow_public']) { $this->DB->build(array('select' => 'v.*', 'from' => array('voters' => 'v'), 'where' => 'v.tid=' . $topicData['tid'], 'add_join' => array(array('select' => 'm.*', 'from' => array('members' => 'm'), 'where' => 'm.member_id=v.member_id', 'type' => 'left')))); } else { $this->DB->build(array('select' => '*', 'from' => 'voters', 'where' => 'tid=' . $topicData['tid'])); } $this->DB->execute(); while ($voter = $this->DB->fetch()) { $poll['_totalVotes']++; if ($voter['member_id'] == $this->memberData['member_id']) { $poll['_memberVoted'] = 1; } /* Member choices */ if ($voter['member_choices'] and ($poll['poll_view_voters'] and $this->settings['poll_allow_public'] or $voter['member_id'] == $this->memberData['member_id'])) { $_choices = IPSLib::safeUnserialize($voter['member_choices']); if (is_array($_choices) and count($_choices)) { $memberData = array('member_id' => $voter['member_id'], 'members_seo_name' => $voter['member_id'] == $this->memberData['member_id'] ? $this->memberData['members_seo_name'] : $voter['members_seo_name'], 'members_display_name' => $voter['member_id'] == $this->memberData['member_id'] ? $this->memberData['members_display_name'] : $voter['members_display_name'], 'members_colored_name' => str_replace('"', '\\"', $voter['member_id'] == $this->memberData['member_id'] ? IPSMember::makeNameFormatted($this->memberData['members_display_name'], $this->memberData['member_group_id']) : IPSMember::makeNameFormatted($voter['members_display_name'], $voter['member_group_id'])), '_last' => 0); foreach ($_choices as $_questionID => $data) { foreach ($data as $_choice) { $memberChoices[$_questionID][$_choice][$voter['member_id']] = $memberData; } } } } } //----------------------------------------- // Already Voted //----------------------------------------- if ($poll['_memberVoted']) { $showResults = 1; } //----------------------------------------- // Created poll and can't vote in it //----------------------------------------- if ($poll['starter_id'] == $this->memberData['member_id'] and $this->settings['allow_creator_vote'] != 1) { $showResults = 1; } //----------------------------------------- // Guest, but can view results without voting //----------------------------------------- if (!$this->memberData['member_id'] and $this->settings['allow_result_view']) { $showResults = 1; } //----------------------------------------- // is the topic locked? //----------------------------------------- if ($topicData['state'] == 'closed') { $showResults = 1; } //----------------------------------------- // Can we see the poll before voting? //----------------------------------------- if ($this->settings['allow_result_view'] == 1 and $this->request['mode'] == 'show') { $showResults = 1; } //----------------------------------------- // Stop the parser killing images // 'cos there are too many //----------------------------------------- $tmp_max_images = $this->settings['max_images']; $this->settings['max_images'] = 0; //----------------------------------------- // Parse it //----------------------------------------- $poll_answers = IPSLib::safeUnserialize(stripslashes($poll['choices'])); if (!is_array($poll_answers) or !count($poll_answers)) { $poll_answers = IPSLib::safeUnserialize(preg_replace('!s:(\\d+):"(.*?)";!se', "'s:'.strlen('\$2').':\"\$2\";'", stripslashes($poll['choices']))); } if (!is_array($poll_answers) or !count($poll_answers)) { $poll_answers = ''; } reset($poll_answers); foreach ($poll_answers as $id => $data) { if (!is_array($data['choice']) or !count($data['choice'])) { continue; } //----------------------------------------- // Get the question //----------------------------------------- $pollData[$id]['question'] = $data['question']; $tv_poll = 0; # Get total votes for this question if (is_array($poll_answers[$id]['votes']) and count($poll_answers[$id]['votes'])) { foreach ($poll_answers[$id]['votes'] as $number) { $tv_poll += intval($number); } } //----------------------------------------- // Get the choices for this question //----------------------------------------- foreach ($data['choice'] as $choice_id => $text) { $choiceData = array(); $choice = $text; $voters = array(); # Get total votes for this question -> choice $votes = intval($data['votes'][$choice_id]); if (strlen($choice) < 1) { continue; } if (stristr($choice, '[img') || stristr($choice, '[url') || stristr($text, '[sharedmedia')) { if (!is_object($this->_textParser)) { /* Load parser */ $classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/classes/text/parser.php', 'classes_text_parser'); $this->_textParser = new $classToLoad(); } $choice = $this->_textParser->parsePollTags($choice); } if ($showResults) { $percent = $votes == 0 ? 0 : $votes / $tv_poll * 100; $percent = sprintf('%.2F', $percent); $width = $percent > 0 ? intval($percent * 2) : 0; /* Voters */ if ($memberChoices[$id][$choice_id]) { $voters = $memberChoices[$id][$choice_id]; $_tmp = $voters; $lastDude = array_pop($_tmp); $voters[$lastDude['member_id']]['_last'] = 1; } $pollData[$id]['choices'][$choice_id] = array('votes' => $votes, 'choice' => $choice, 'percent' => $percent, 'width' => $width, 'voters' => $voters); } else { $pollData[$id]['choices'][$choice_id] = array('type' => !empty($data['multi']) ? 'multi' : 'single', 'votes' => $votes, 'choice' => $choice); } } } $_editPoll = $this->registry->getClass('topics')->canEditPost(array('member_id' => $topicData['starter_id'], 'post_date' => $topicData['start_date'])); $html = $this->registry->output->getTemplate('topic')->pollDisplay($poll, $topicData, $forumData, $pollData, $showResults, $_editPoll); $this->settings['max_images'] = $tmp_max_images; return array('html' => $html, 'poll' => $poll); }
/** * Check if search term is found in groups language file or in the group_cache.g_title * * @param string Search term * @param array Existing search results * @return array New search results */ protected function _checkGroups($term, $results) { if (!$this->registry->getClass('class_permissions')->checkPermission('groups_edit', 'members', 'groups')) { $results['groups'] = array(); return $results; } $term = strtolower($term); $this->registry->class_localization->loadLanguageFile(array('admin_groups'), 'members'); $this->registry->class_localization->loadLanguageFile(array('admin_forums'), 'forums'); $this->registry->class_localization->loadLanguageFile(array('admin_gallery'), 'gallery'); $this->registry->class_localization->loadLanguageFile(array('admin_blog'), 'blog'); $this->registry->class_localization->loadLanguageFile(array('admin_downloads'), 'downloads'); foreach ($this->lang->words as $k => $v) { if (strpos($k, 'gf_') !== false and strpos($v, $term) !== false) { IPSDebug::fireBug('info', array('Group key found: ' . $k . ': ' . $v)); $results['groupLangs'] = true; break; } } /* Now check group names */ $groups = $this->cache->getCache('group_cache'); if (is_array($groups) and count($groups)) { foreach ($groups as $id => $data) { $_term = preg_quote($term, '#'); if (preg_match("#" . $_term . "#i", $data['g_title'])) { $results['groups'][] = array('name' => IPSMember::makeNameFormatted($data['g_title'], $data['g_id']), 'url' => $this->settings['_base_url'] . "&app=members&module=groups&section=groups&do=edit&id=" . $data['g_id']); } } } return $results; }
function __f__03348d49387c54d06860e9bca2537c8d($options = array(), $chatters = array()) { $_ips___x_retval = ''; $__iteratorCount = 0; foreach ($chatters as $data) { $__iteratorCount++; $_ips___x_retval .= "\n\t\t\t\t<li id='user_{$data['user_id']}'>\n\t\t\t\t\t<div class='chat-photo'>" . ($data['member']['member_id'] ? "<a target='_blank' href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showuser={$data['member']['member_id']}", "public", ''), "{$data['member']['members_seo_name']}", "showuser") . "\" title='{$this->lang->words['view_profile']}' id='link_{$data['member']['member_id']}' class='ipsUserPhotoLink'>" : "") . "<img src='{$data['member']['pp_mini_photo']}' alt=\"" . sprintf($this->lang->words['users_photo'], $data['member']['members_display_name']) . "\" class='ipsUserPhoto ipsUserPhoto_mini' />" . ($data['member']['member_id'] ? "</a>" : "") . "</div>\n\t\t\t\t\t<span class='names'>" . ($data['member']['members_display_name'] ? "<span title='{$data['member']['members_display_name']}'>" . ($this->settings['ipschat_format_names'] ? "" . IPSMember::makeNameFormatted(IPSText::truncate($data['member']['members_display_name'], 16), $data['member']['member_group_id']) . "" : "" . IPSText::truncate($data['member']['members_display_name'], 16) . "") . "</span>" : "{$data['user_name']}") . "</span>\n\t\t\t\t\t\n\t\t\t\t\t<ul class='kickmenu' id='mod_link_{$data['user_id']}_menucontent'>\n\t\t\t\t\t\t" . ($data['user_id'] != $options['userId'] ? "" . ($options['moderator'] ? "\n\t\t\t\t\t\t\t\t<li><a href='#' title='{$this->lang->words['chat_kick_user']}' class='kick_user' id='kick_user_{$data['user_id']}'>{$this->lang->words['mobile_kick']}</a></li>\n\t\t\t\t\t\t\t\t<li><a href='#' title='{$this->lang->words['chat_ban_user']}' class='ban_user' id='ban_user_{$data['user_id']}_{$data['member']['member_id']}'>{$this->lang->words['mobile_ban']}</a></li>\n\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t" . ($options['private'] ? "\n\t\t\t\t\t\t\t\t<li><a href='#' title='{$this->lang->words['mobile_start_private']}' class='priv_user' id='priv_user_{$data['user_id']}_{$data['member']['member_id']}'>{$this->lang->words['mobile_start_private']}</a></li>\n\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t" . (($data['member']['member_id'] and isset($this->memberData['_ignoredUsers'][$data['member']['member_id']]) and $this->memberData['_ignoredUsers'][$data['member']['member_id']]['ignore_chats'] or !$data['member']['member_id'] and $this->memberData['_ignoredUsers']['g_' . $data['user_id']]['ignore_chats']) ? "\n\t\t\t\t\t\t\t\t<li><a href='#' title='{$this->lang->words['mobile_unignore_private']}' class='unblock_user' id='block_user_{$data['user_id']}_{$data['member']['member_id']}'>{$this->lang->words['mobile_unignore_private']}</a></li>\n\t\t\t\t\t\t\t" : "\n\t\t\t\t\t\t\t\t<li><a href='#' title='{$this->lang->words['mobile_ignore_private']}' class='block_user' id='block_user_{$data['user_id']}_{$data['member']['member_id']}'>{$this->lang->words['mobile_ignore_private']}</a></li>\n\t\t\t\t\t\t\t") . "" : "<li><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("module=ipschat&section=chat&do=leave&room={$options['roomId']}&user={$options['userId']}&access_key={$options['accessKey']}&secure_key={$this->member->form_hash}" . ($this->request['_popup'] ? "&popup=1" : "") . "", "publicWithApp", ''), "", "") . "' title='{$this->lang->words['leave_room']}' id='leave_room'>{$this->lang->words['leave_room']}</a></li>") . "\n\t\t\t\t\t</ul>\n\t\t\t\t</li>\n\t\t\t\n"; } $_ips___x_retval .= ''; unset($__iteratorCount); return $_ips___x_retval; }
function __f__37b2bd1e81fb7a788cd3634df5fb5f57($type, $members, $pagelinks = '') { $_ips___x_retval = ''; $__iteratorCount = 0; foreach ($members as $member) { $__iteratorCount++; $_ips___x_retval .= "\n\t\t\t\t\t\t<li id='member_id_{$member['member_id']}' class='ipsPad clearfix member_entry " . IPSLib::next($this->registry->templateStriping["memberStripe"]) . "'>\n\t\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showuser={$member['member_id']}", "public", ''), "{$member['members_seo_name']}", "showuser") . "' title='{$this->lang->words['view_profile']}' class='ipsUserPhotoLink left'><img src='{$member['pp_small_photo']}' alt=\"" . sprintf($this->lang->words['users_photo'], $member['members_display_name']) . "\" class='ipsUserPhoto ipsUserPhoto_medium' /></a>\n\t\t\t\t\t\t\t<div class='ipsBox_withphoto'>\n\t\t\t\t\t\t\t\t<ul class='ipsList_inline right'>\n\t\t\t\t\t\t\t\t\t" . ($this->memberData['g_is_supmod'] == 1 && $member['member_id'] != $this->memberData['member_id'] ? "\n\t\t\t\t\t\t\t\t\t\t<li><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=modcp&do=editmember&auth_key={$this->member->form_hash}&mid={$member['member_id']}&pf={$member['member_id']}", "public", ''), "", "") . "' class='ipsButton_secondary'>{$this->lang->words['edit_member']}</a></li>\n\t\t\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t\t\t" . ($member['show_warn'] ? "\n\t\t\t\t\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=profile&section=warnings&member={$member['member_id']}", "public", ''), "", "") . "' id='warn_link_modcp_{$member['member_id']}' title='{$this->lang->words['warn_view_history']}' class='ipsButton_secondary'>{$this->lang->words['warn_view_history']}</a>\n\t\t\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t\t\t" . (($this->memberData['g_use_pm'] and $this->memberData['members_disable_pm'] == 0 and IPSLib::moduleIsEnabled('messaging', 'members') && $member['member_id'] != $this->memberData['member_id']) ? "\n\t\t\t\t\t\t\t\t\t\t<li class='pm_button' id='pm_xxx_{$member['pp_member_id']}'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=list&module=messaging&section=send&do=form&fromMemberID={$member['pp_member_id']}", "public", ''), "", "") . "' title='{$this->lang->words['pm_member']}' class='ipsButton_secondary'>" . $this->registry->getClass('output')->getReplacement("send_msg") . "</a></li>\n\t\t\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t\t\t<li><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&mid={$member['member_id']}", "public", ''), "", "") . "' title='{$this->lang->words['gbl_find_my_content']}' class='ipsButton_secondary'>" . $this->registry->getClass('output')->getReplacement("find_topics_link") . "</a></li>\n\t\t\t\t\t\t\t\t\t" . (($member['has_blog'] and IPSLib::appIsInstalled('blog')) ? "\n\t\t\t\t\t\t\t\t\t\t<li><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=blog&module=display&section=blog&show_members_blogs={$member['member_id']}", "public", ''), "", "") . "' title='{$this->lang->words['view_blog']}' class='ipsButton_secondary'>" . $this->registry->getClass('output')->getReplacement("blog_link") . "</a></li>\n\t\t\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t\t\t" . (($member['has_gallery'] and IPSLib::appIsInstalled('gallery')) ? "\n\t\t\t\t\t\t\t\t\t\t<li><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=gallery&user={$member['member_id']}", "public", ''), "{$member['members_seo_name']}", "useralbum") . "' title='{$this->lang->words['view_gallery']}' class='ipsButton_secondary'>" . $this->registry->getClass('output')->getReplacement("gallery_link") . "</a></li>\n\t\t\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<h3 class='ipsType_subtitle'>\n\t\t\t\t\t\t\t\t\t<strong>" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'userHoverCard') ? $this->registry->getClass('output')->getTemplate('global')->userHoverCard($member) : '') . "</strong>\n\t\t\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t\t\t" . ($this->settings['reputation_enabled'] && $this->settings['reputation_show_profile'] ? "" . ($member['pp_reputation_points'] == 0 || !$member['pp_reputation_points'] ? "\n\t\t\t\t\t\t\t\t\t\t<p class='reputation zero ipsType_small left'>\n\t\t\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t\t\t" . ($member['pp_reputation_points'] > 0 ? "\n\t\t\t\t\t\t\t\t\t\t<p class='reputation positive ipsType_small left'>\n\t\t\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t\t\t" . ($member['pp_reputation_points'] < 0 ? "\n\t\t\t\t\t\t\t\t\t\t<p class='reputation negative ipsType_small left'>\n\t\t\t\t\t\t\t\t\t" : "") . "\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t<span class='number'>{$member['pp_reputation_points']}</span>\n\t\t\t\t\t\t\t\t\t\t</p>" : "") . "\n\t\t\t\t\t\t\t\t<span class='desc'>\n\t\t\t\t\t\t\t\t\t{$this->lang->words['member_joined']} " . IPSText::htmlspecialchars($this->registry->getClass('class_localization')->getDate($member['joined'], "joined", 0)) . "<br />\n\t\t\t\t\t\t\t\t\t" . IPSMember::makeNameFormatted($member['group'], $member['member_group_id']) . " · <strong>{$this->lang->words['modqueued_til']}: " . (in_array($type, array('modposts', 'suspended', 'restrictposts')) ? "<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=profile&section=warnings&member={$member['member_id']}&_tab=warn&type=minus", "public", ''), "", "") . "'>" : "") . "<em>{$member['_language']}</em>" . (in_array($type, array('modposts', 'suspended', 'restrictposts')) ? "</a>" : "") . "</strong>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\n"; } $_ips___x_retval .= ''; unset($__iteratorCount); return $_ips___x_retval; }
/** * Lookup IP address info * * @return @e string */ protected function _doLookup() { //----------------------------------------- // INIT //----------------------------------------- $exactMatch = 1; $finalIPString = trim($this->request['ip']); $startVal = intval($this->request['st']); $ipTool = $this->request['iptool']; //----------------------------------------- // Remove trailing periods //----------------------------------------- if (strstr($finalIPString, '*')) { $exactMatch = 0; $finalIPString = preg_replace("/^(.+?)\\*(.+?)?\$/", "\\1", $finalIPString) . '%'; } //----------------------------------------- // H'okay, what have we been asked to do? // (that's a metaphorical "we" in a rhetorical question) //----------------------------------------- if ($ipTool == 'resolve') { $resolved = @gethostbyaddr($finalIPString); if ($resolved == "") { return $this->registry->getClass('output')->getTemplate('modcp')->membersModIPForm($this->request['ip'], $this->registry->getClass('output')->getTemplate('modcp')->inlineModIPMessage($this->lang->words['cp_no_matches'])); } else { return $this->registry->getClass('output')->getTemplate('modcp')->membersModIPForm($this->request['ip'], $this->registry->getClass('output')->getTemplate('modcp')->inlineModIPMessage(sprintf($this->lang->words['ip_resolve_result'], $finalIPString, $resolved))); } } else { if ($ipTool == 'members') { $sql = $exactMatch ? "ip_address='{$finalIPString}'" : "ip_address LIKE '{$finalIPString}'"; if (!$this->memberData['g_access_cp']) { $sql .= "AND g.g_access_cp != 1"; } $total_possible = $this->DB->buildAndFetch(array('select' => 'count(m.member_id) as max', 'from' => array('members' => 'm'), 'where' => $sql, 'add_join' => array(array('from' => array('groups' => 'g'), 'type' => 'left', 'where' => 'g.g_id=m.member_group_id')))); if ($total_possible['max'] < 1) { return $this->registry->getClass('output')->getTemplate('modcp')->membersModIPForm($this->request['ip'], $this->registry->getClass('output')->getTemplate('modcp')->inlineModIPMessage($this->lang->words['cp_no_matches'])); } $pages = $this->registry->getClass('output')->generatePagination(array('totalItems' => $total_possible['max'], 'itemsPerPage' => 20, 'currentStartValue' => $startVal, 'baseUrl' => "app=core&module=modcp&tab=iplookup&fromapp=members&_do=submit&iptool=members&ip=" . $this->request['ip'])); $this->DB->build(array('select' => 'm.name, m.members_display_name, m.members_seo_name, m.member_id, m.ip_address, m.posts, m.joined, m.member_group_id', 'from' => array('members' => 'm'), 'where' => 'm.' . $sql, 'order' => "m.joined DESC", 'limit' => array($startVal, 20), 'add_join' => array(array('select' => 'g.g_access_cp', 'from' => array('groups' => 'g'), 'type' => 'left', 'where' => 'g.g_id=m.member_group_id')))); $this->DB->execute(); while ($row = $this->DB->fetch()) { $row['joined'] = $this->registry->getClass('class_localization')->getDate($row['joined'], 'JOINED'); $row['groupname'] = IPSMember::makeNameFormatted($this->caches['group_cache'][$row['member_group_id']]['g_title'], $row['member_group_id']); $members[$row['member_id']] = $row; } return $this->registry->getClass('output')->getTemplate('modcp')->membersModIPForm($this->request['ip'], $this->registry->getClass('output')->getTemplate('modcp')->membersModIPFormMembers($pages, $members)); } else { $sql = $exactMatch ? "p.ip_address='{$finalIPString}'" : "p.ip_address LIKE '{$finalIPString}'"; //----------------------------------------- // Get forums we can view //----------------------------------------- $aforum = $this->registry->getClass('class_forums')->fetchSearchableForumIds(); if (count($aforum) < 1) { return $this->registry->getClass('output')->getTemplate('modcp')->membersModIPForm($this->request['ip'], $this->registry->getClass('output')->getTemplate('modcp')->inlineModIPMessage($this->lang->words['cp_no_matches'])); } $the_forums = implode(",", $aforum); $count = $this->DB->buildAndFetch(array('select' => 'COUNT(*) as total', 'from' => array('posts' => 'p'), 'where' => "t.forum_id IN({$the_forums}) AND {$sql}", 'add_join' => array(array('from' => array('topics' => 't'), 'where' => 't.tid=p.topic_id', 'type' => 'left')))); //----------------------------------------- // Do we have any results? //----------------------------------------- if (!$count['total']) { return $this->registry->getClass('output')->getTemplate('modcp')->membersModIPForm($this->request['ip'], $this->registry->getClass('output')->getTemplate('modcp')->inlineModIPMessage($this->lang->words['cp_no_matches'])); } //----------------------------------------- // Pages //----------------------------------------- $pageLinks = $this->registry->getClass('output')->generatePagination(array('totalItems' => $count['total'], 'itemsPerPage' => 10, 'currentStartValue' => $startVal, 'baseUrl' => "app=core&module=modcp&tab=iplookup&fromapp=members&_do=submit&iptool=posts&ip=" . $this->request['ip'])); $results = array(); $this->DB->build(array('select' => 'p.*', 'from' => array('posts' => 'p'), 'where' => "t.forum_id IN({$the_forums}) AND {$sql}", 'limit' => array($startVal, 10), 'order' => 'p.pid DESC', 'add_join' => array(array('select' => 't.forum_id, t.title_seo', 'from' => array('topics' => 't'), 'where' => 't.tid=p.topic_id', 'type' => 'left'), array('select' => 'm.*', 'from' => array('members' => 'm'), 'where' => 'm.member_id=p.author_id', 'type' => 'left'), array('select' => 'pp.*', 'from' => array('profile_portal' => 'pp'), 'where' => 'pp.pp_member_id=m.member_id', 'type' => 'left'), array('select' => 'pf.*', 'from' => array('pfields_content' => 'pf'), 'where' => 'pf.member_id=m.member_id', 'type' => 'left')))); $outer = $this->DB->execute(); while ($row = $this->DB->fetch($outer)) { //----------------------------------------- // Parse the member //----------------------------------------- $row = IPSMember::buildDisplayData($row, array('reputation' => 0, 'warn' => 0)); //----------------------------------------- // Parse the post //----------------------------------------- IPSText::getTextClass('bbcode')->parse_smilies = $row['use_emo']; IPSText::getTextClass('bbcode')->parse_html = ($this->registry->class_forums->allForums[$row['forum_id']]['use_html'] and $this->caches['group_cache'][$row['member_group_id']]['g_dohtml'] and $row['post_htmlstate']) ? 1 : 0; IPSText::getTextClass('bbcode')->parse_nl2br = $row['post_htmlstate'] == 2 ? 1 : 0; IPSText::getTextClass('bbcode')->parse_bbcode = $this->registry->class_forums->allForums[$row['forum_id']]['use_ibc']; IPSText::getTextClass('bbcode')->parsing_section = 'topics'; IPSText::getTextClass('bbcode')->parsing_mgroup = $row['member_group_id']; IPSText::getTextClass('bbcode')->parsing_mgroup_others = $row['mgroup_others']; $row['post'] = IPSText::getTextClass('bbcode')->preDisplayParse($row['post']); $results[] = $row; } return $this->registry->getClass('output')->getTemplate('modcp')->membersModIPForm($this->request['ip'], $this->registry->getClass('output')->getTemplate('modcp')->membersModIPFormPosts($count['total'], $pageLinks, $results)); } } }
/** * Returns the list of online users * * @param string $api_key Authentication Key * @param string $api_module Module * @param string $sep_character Separator character * @return string xml */ public function fetchOnlineUsers($api_key, $api_module, $sep_character = ',') { //----------------------------------------- // INIT //----------------------------------------- $api_key = IPSText::md5Clean($api_key); $api_module = IPSText::parseCleanValue($api_module); //----------------------------------------- // Authenticate //----------------------------------------- if ($this->__authenticate($api_key, $api_module, 'fetchOnlineUsers') !== FALSE) { //----------------------------------------- // Add log //----------------------------------------- $this->addLogging($api_key); if (!ipsRegistry::$settings['au_cutoff']) { ipsRegistry::$settings['au_cutoff'] = 15; } $cut_off = ipsRegistry::$settings['au_cutoff'] * 60; $time = time() - $cut_off; $rows = array(); $ar_time = time(); $this->registry->DB()->build(array('select' => '*', 'from' => 'sessions', 'where' => "running_time > {$time}")); $this->registry->DB()->execute(); //----------------------------------------- // FETCH... //----------------------------------------- while ($r = $this->registry->DB()->fetch()) { $rows[$r['running_time'] . '.' . $r['id']] = $r; } krsort($rows); //----------------------------------------- // cache all printed members so we // don't double print them //----------------------------------------- $cached = array(); foreach ($rows as $result) { $last_date = ipsRegistry::getClass('class_localization')->getTime($result['running_time']); //----------------------------------------- // Bot? //----------------------------------------- if (isset($result['uagent_type']) && $result['uagent_type'] == 'search') { //----------------------------------------- // Seen bot of this type yet? //----------------------------------------- if (!$cached[$result['member_name']]) { $active['NAMES'][] = $result['member_name']; $cached[$result['member_name']] = 1; } else { //----------------------------------------- // Yup, count others as guest //----------------------------------------- $active['GUESTS']++; } } else { if (!$result['member_id'] or !$result['member_name']) { $active['GUESTS']++; } else { if (empty($cached[$result['member_id']])) { $cached[$result['member_id']] = 1; $result['member_name'] = IPSMember::makeNameFormatted($result['member_name'], $result['member_group']); /* Reset login type in case the board/group setting got changed */ $result['login_type'] = IPSMember::isLoggedInAnon(array('login_anonymous' => $result['login_type']), $result['member_group']); if ($result['login_type']) { if ($this->registry->member()->getProperty('g_access_cp')) { $active['NAMES'][] = "<a href='" . $this->registry->getClass('output')->buildSEOUrl("showuser={$result['member_id']}", 'public', $result['seo_name'], 'showuser') . "' title='{$last_date}'>{$result['member_name']}</a>*"; $active['ANON']++; } else { $active['ANON']++; } } else { $active['MEMBERS']++; $active['NAMES'][] = "<a href='" . $this->registry->getClass('output')->buildSEOUrl("showuser={$result['member_id']}", 'public', $result['seo_name'], 'showuser') . "' title='{$last_date}'>{$result['member_name']}</a>"; } } } } } $active['TOTAL'] = $active['MEMBERS'] + $active['GUESTS'] + $active['ANON']; //----------------------------------------- // Return info //----------------------------------------- $this->classApiServer->apiSendReply($active); exit; } }
function __f__1cf6af88e7d6275896d661b4fc4a044b($rows) { $_ips___x_retval = ''; $__iteratorCount = 0; foreach ($rows as $member) { $__iteratorCount++; $_ips___x_retval .= "\n\t\t\t\t\t<li id='member_id_{$member['member_id']}' class='general_box clear member_entry " . IPSLib::next($this->registry->templateStriping["memberStripe"]) . "'>\n\t\t\t\t\t\t<h3 class='bar'>" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'userHoverCard') ? $this->registry->getClass('output')->getTemplate('global')->userHoverCard($member) : '') . "</h3>\n\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showuser={$member['member_id']}", "public", ''), "{$member['members_seo_name']}", "showuser") . "' title='{$this->lang->words['view_profile']}'><img src='{$member['pp_small_photo']}' width='{$member['pp_small_width']}' height='{$member['pp_small_height']}' alt=\"" . sprintf($this->lang->words['users_photo'], $member['members_display_name']) . "\" class='photo' /></a>\t\n\t\t\t\t\t\n\t\t\t\t\t\t<dl class='info'>\n\t\t\t\t\t\t\t<dt class='clear'>{$this->lang->words['member_joined']}:</dt>\n\t\t\t\t\t\t\t<dd>" . IPSText::htmlspecialchars($this->registry->getClass('class_localization')->getDate($member['joined'], "joined", 0)) . "</dd>\n\t\t\t\t\t\t\t<dt class='clear'>{$this->lang->words['member_group']}:</dt>\n\t\t\t\t\t\t\t<dd>" . IPSMember::makeNameFormatted($member['group'], $member['member_group_id']) . "</dd>\n\t\t\t\t\t\t\t<dt class='clear'>{$this->lang->words['age_suffix']}:</dt>\n\t\t\t\t\t\t\t<dd>" . ($member['age'] ? "{$member['age']}" : "<em>{$this->lang->words['age_not_avail']}</em>") . "</dd>\n\t\t\t\t\t\t</dl>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<ul class='user_controls clear'>\n\t\t\t\t\t\t\t" . (($this->memberData['member_id'] and $this->memberData['member_id'] != $member['member_id'] && $this->settings['friends_enabled'] and $this->memberData['g_can_add_friends']) ? "" . (IPSMember::checkFriendStatus($member['member_id']) ? "\n\t\t\t\t\t\t\t\t\t<li class='mini_friend_toggle is_friend' id='friend_mlist_{$member['member_id']}'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=list&module=profile&section=friends&do=remove&member_id={$member['member_id']}&secure_key={$this->member->form_hash}", "public", ''), "", "") . "' title='{$this->lang->words['remove_friend']}'>" . $this->registry->getClass('output')->getReplacement("remove_friend") . "</a></li>\n\t\t\t\t\t\t\t\t" : "\n\t\t\t\t\t\t\t\t\t<li class='mini_friend_toggle is_not_friend' id='friend_mlist_{$member['member_id']}'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=list&module=profile&section=friends&do=add&member_id={$member['member_id']}&secure_key={$this->member->form_hash}", "public", ''), "", "") . "' title='{$this->lang->words['add_friend']}'>" . $this->registry->getClass('output')->getReplacement("add_friend") . "</a></li>\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t") . "" : "") . "\n\t\t\t\t\t\t\t" . (($this->memberData['g_use_pm'] and $this->memberData['members_disable_pm'] == 0 and IPSLib::moduleIsEnabled('messaging', 'members') && $member['member_id'] != $this->memberData['member_id']) ? "\n\t\t\t\t\t\t\t\t<li class='pm_button' id='pm_xxx_{$member['pp_member_id']}'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=list&module=messaging&section=send&do=form&fromMemberID={$member['pp_member_id']}", "public", ''), "", "") . "' title='{$this->lang->words['pm_member']}'>" . $this->registry->getClass('output')->getReplacement("send_msg") . "</a></li>\n\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t<li><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=user_activity&mid={$member['member_id']}", "public", ''), "", "") . "' title='{$this->lang->words['gbl_find_my_content']}'>" . $this->registry->getClass('output')->getReplacement("find_topics_link") . "</a></li>\n\t\t\t\t\t\t\t" . (($member['has_blog'] and IPSLib::appIsInstalled('blog')) ? "\n\t\t\t\t\t\t\t\t<li><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=blog&module=display&section=blog&show_members_blogs={$member['member_id']}", "public", ''), "", "") . "' title='{$this->lang->words['view_blog']}'>" . $this->registry->getClass('output')->getReplacement("blog_link") . "</a></li>\n\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t" . (($member['has_gallery'] and IPSLib::appIsInstalled('gallery')) ? "\n\t\t\t\t\t\t\t\t<li><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=gallery&module=user&section=user&user={$member['member_id']}", "public", ''), "", "") . "' title='{$this->lang->words['view_gallery']}'>" . $this->registry->getClass('output')->getReplacement("gallery_link") . "</a></li>\n\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t" . ($this->settings['pp_allow_member_rate'] ? "<p class='rating'> \n\t\t\t\t\t\t\t\t" . ($member['pp_rating_real'] >= 1 ? "" . $this->registry->getClass('output')->getReplacement("rate_on") . "" : "" . $this->registry->getClass('output')->getReplacement("rate_off") . "") . "" . ($member['pp_rating_real'] >= 2 ? "" . $this->registry->getClass('output')->getReplacement("rate_on") . "" : "" . $this->registry->getClass('output')->getReplacement("rate_off") . "") . "" . ($member['pp_rating_real'] >= 3 ? "" . $this->registry->getClass('output')->getReplacement("rate_on") . "" : "" . $this->registry->getClass('output')->getReplacement("rate_off") . "") . "" . ($member['pp_rating_real'] >= 4 ? "" . $this->registry->getClass('output')->getReplacement("rate_on") . "" : "" . $this->registry->getClass('output')->getReplacement("rate_off") . "") . "" . ($member['pp_rating_real'] >= 5 ? "" . $this->registry->getClass('output')->getReplacement("rate_on") . "" : "" . $this->registry->getClass('output')->getReplacement("rate_off") . "") . "\n\t\t\t\t\t\t\t</p>" : "") . "\n\t\t\t\t\t\t\n\t\t\t\t\t\t" . ($this->settings['reputation_enabled'] && $this->settings['reputation_show_profile'] ? "" . ($member['pp_reputation_points'] == 0 || !$member['pp_reputation_points'] ? "\n\t\t\t\t\t\t\t\t<p class='reputation zero'>\n\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t" . ($member['pp_reputation_points'] > 0 ? "\n\t\t\t\t\t\t\t\t<p class='reputation positive'>\n\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t" . ($member['pp_reputation_points'] < 0 ? "\n\t\t\t\t\t\t\t\t<p class='reputation negative'>\n\t\t\t\t\t\t\t" : "") . "\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<span class='number'>{$this->lang->words['reputation']}: {$member['pp_reputation_points']}</span>\n\t\t\t\t\t\t\t\t</p>" : "") . "\t\t\t\t\t\t\n\t\t\t\t\t</li>\n\t\t\t\t\n"; } $_ips___x_retval .= ''; unset($__iteratorCount); return $_ips___x_retval; }