当前位置: 首页>>代码示例>>PHP>>正文


PHP IPSLib::makeNameFormatted方法代码示例

本文整理汇总了PHP中IPSLib::makeNameFormatted方法的典型用法代码示例。如果您正苦于以下问题:PHP IPSLib::makeNameFormatted方法的具体用法?PHP IPSLib::makeNameFormatted怎么用?PHP IPSLib::makeNameFormatted使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IPSLib的用法示例。


在下文中一共展示了IPSLib::makeNameFormatted方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _getMemberNames

 /**
  * Returns possible matches for the string input
  *
  * @access	private
  * @return	void		Outputs to screen
  */
 private function _getMemberNames()
 {
     //-----------------------------------------
     // INIT
     //-----------------------------------------
     $name = $this->convertAndMakeSafe(ipsRegistry::$request['name'], 0);
     //-----------------------------------------
     // 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' => "LOWER(m.members_display_name) LIKE '" . $this->DB->addSlashes($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 = IPSLib::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_thumb_photo'], 'img_w' => $photo['pp_mini_width'], 'img_h' => $photo['pp_mini_height']);
     }
     $this->returnJsonArray($return);
 }
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:37,代码来源:findnames.php

示例2: __f__90e75c2e9e9f8c07c1637ee640ca3292

 function __f__90e75c2e9e9f8c07c1637ee640ca3292($reports = array(), $acts = "", $pages = "", $active = array(), $statuses = array())
 {
     $_ips___x_retval = '';
     foreach ($reports as $report) {
         $_ips___x_retval .= "\n\t\t\t<tr class='" . IPSLib::next($this->registry->templateStriping["reportsTable"]) . "'>\n\t\t\t\t<td class='short altrow'>\n\t\t\t\t\t<a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&amp;module=reports&amp;section=reports&amp;do=process&amp;report_ids[{$report['id']}]={$report['id']}&amp;newstatus=2&amp;k={$this->member->form_hash}", 'public', ''), "", "") . "\" title='{$this->lang->words['change_current_status']}' class='ipbmenu' id='change_status-{$report['id']}'><span id=\"rstat-{$report['id']}\">{$report['status_icon']}</span></a>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<a href=\"{$this->settings['base_url']}&amp;app=core&amp;module=reports&amp;do=show_report&amp;rid={$report['id']}\" title='{$this->lang->words['view_report']}'>{$report['title']}</a>\n\t\t\t\t\t" . (is_array($statuses) && count($statuses) ? "\n\t\t\t\t\t\t<ul class='ipbmenu_content' id='change_status-{$report['id']}_menucontent'>\n\t\t\t\t\t\t\t" . $this->__f__c1c6cfe46bdd613aa1d2b014bf4fb993($reports, $acts, $pages, $active, $statuses, $report) . "\t\t\t\t\t\t</ul>\n\t\t\t\t\t" : "") . "\n\t\t\t\t</td>\n\t\t\t\t<td class='altrow'>\n\t\t\t\t\t" . ($report['section']['url'] ? "\n\t\t\t\t\t\t<a href=\"{$report['section']['url']}\" title='{$this->lang->words['go_to_section']}'>{$report['section']['title']}</a>\n\t\t\t\t\t" : "\n\t\t\t\t\t\t{$report['section']['title']}\n\t\t\t\t\t") . "\n\t\t\t\t</td>\n\t\t\t\t<td class='short'>{$report['num_reports']}</td>\n\t\t\t\t<td class='short altrow'>{$report['num_comments']}</td>\n\t\t\t\t<td class=''>\n\t\t\t\t\t<ul class='last_post'>\n\t\t\t\t\t\t<li><strong>{$this->lang->words['report_updated']}</strong> " . $this->registry->getClass('class_localization')->getDate($report['date_updated'], "tiny", 0) . "</li>\n\t\t\t\t\t\t<li><strong>{$this->lang->words['report_by']}</strong> <a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showuser={$report['updated_by']}", 'public', ''), "{$report['n_updated_seoname']}", "showuser") . "\" title='{$this->lang->words['view_member']}'>" . IPSLib::makeNameFormatted($report['n_updated_by'], $report['member_group_id']) . "</a>" . $this->registry->getClass('output')->getTemplate('global')->user_popup($report['updated_by'], $report['n_updated_seoname']) . "</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</td>\n\t\t\t\t<td class='short altrow'>\n\t\t\t\t\t<input type='checkbox' id='report_check_{$report['id']}' class='input_check checkall' name='report_ids[]' value='{$report['id']}' />\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\n";
     }
     $_ips___x_retval .= '';
     return $_ips___x_retval;
 }
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:9,代码来源:skin_reports.php

示例3: __f__f518b38fad2c76372ddaf8934526cf8f

 function __f__f518b38fad2c76372ddaf8934526cf8f($members, $pages = "", $dropdowns = array(), $defaults = array(), $custom_fields = null, $url = '')
 {
     $_ips___x_retval = '';
     foreach ($members as $member) {
         $_ips___x_retval .= "\n\t\t\t\t\t<li class='lofi_member'>\n\t\t\t\t\t\t<h3>\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']}'>{$member['members_display_name']}</a>\n\t\t\t\t\t\t\t<span class='desc'>( {$this->lang->words['member_posts']}: " . $this->registry->getClass('class_localization')->formatNumber($member['posts']) . " )</span>\n\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t<span class='desc'><strong>" . IPSLib::makeNameFormatted($member['group'], $member['member_group_id']) . "</strong></span><br />\n\t\t\t\t\t\t<span class='desc'>{$this->lang->words['member_joined']} " . $this->registry->getClass('class_localization')->getDate($member['joined'], "joined", 0) . "</span> \n\t\t\t\t\t</li>\n\t\t\t\t\n";
     }
     $_ips___x_retval .= '';
     return $_ips___x_retval;
 }
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:9,代码来源:skin_mlist.php

示例4: __f__bbeb34120594dcbbf1392e3622a54dac

 function __f__bbeb34120594dcbbf1392e3622a54dac($rows, $links = "", $defaults = array(), $our_mgroups = array())
 {
     $_ips___x_retval = '';
     foreach ($rows as $session) {
         $_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=\"{$session['_memberData']['members_display_name']}{$this->lang->words['users_photo']}\" 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']}'>" . IPSLib::makeNameFormatted($session['member_name'], $session['member_group']) . "</a>" . $this->registry->getClass('output')->getTemplate('global')->user_popup($session['member_id'], $session['seo_name']) . "\n\t\t\t\t\t\t" : "\n\t\t\t\t\t\t\t" . IPSLib::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['is_bot'] and $this->settings['spider_anon']) ? "" . ($this->memberData['g_access_cp'] ? "\n\t\t\t\t\t\t\t*\n\t\t\t\t\t\t" : "") . "" : "" . ($session['login_type'] == 1 ? "" . ((!$this->settings['disable_admin_anon'] and $this->memberData['g_access_cp']) ? "\n\t\t\t\t\t\t\t\t*\n\t\t\t\t\t\t\t" : "") . "" : "") . "") . "\n\t\t\t\t\t" . (($this->memberData['g_access_cp'] and !$this->settings['disable_online_ip']) ? "\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'] ? "\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'] ? "&nbsp;\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" . $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&amp;module=profile&amp;section=friends&amp;do=remove&amp;member_id={$session['member_id']}&amp;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&amp;module=profile&amp;section=friends&amp;do=add&amp;member_id={$session['member_id']}&amp;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&amp;module=messaging&amp;section=send&amp;do=form&amp;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&amp;module=display&amp;section=blog&amp;mid={$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&amp;module=user&amp;section=user&amp;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 .= '';
     return $_ips___x_retval;
 }
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:9,代码来源:skin_online.php

示例5: _generateActiveUserData

 /**
  * Generate active user data
  *
  * @access	private
  * @return	array 	Array of data (not the most helpful description ever. Sorry
  * @author	Matt
  */
 private function _generateActiveUserData()
 {
     //-----------------------------------------
     // INIT
     //-----------------------------------------
     $ar_time = time();
     $cached = array();
     $guests = array();
     $cut_off = $this->settings['au_cutoff'] != "" ? $this->settings['au_cutoff'] * 60 : 900;
     $time = time() - $cut_off;
     $active = array('guests' => 0, 'anon' => 0, 'members' => 0, 'names' => array());
     $rows = array($ar_time => array('login_type' => substr($this->memberData['login_anonymous'], 0, 1), 'id' => $this->member->session_id, 'location' => 'sf', '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']));
     //-----------------------------------------
     // Get the users
     //-----------------------------------------
     $this->DB->build(array('select' => 's.member_id, s.member_name, s.member_group, s.id, s.login_type, s.location, s.running_time, s.uagent_type, s.seo_name', 'from' => array('sessions' => 's'), 'where' => "s.location_2_type='forum' AND s.location_2_id={$this->forum['id']} AND s.running_time > {$time}\tAND s.in_error=0", 'add_join' => array(array('type' => 'left', 'select' => 't.forum_id', 'where' => 't.tid=s.location_1_id', 'from' => array('topics' => 't')))));
     $this->DB->execute();
     //-----------------------------------------
     // FETCH...
     //-----------------------------------------
     while ($r = $this->DB->fetch()) {
         $rows[$r['running_time'] . '.' . $r['id']] = $r;
     }
     krsort($rows);
     //-----------------------------------------
     // PRINT...
     //-----------------------------------------
     foreach ($rows as $result) {
         $result['member_name'] = IPSLib::makeNameFormatted($result['member_name'], $result['member_group']);
         $last_date = $this->registry->getClass('class_localization')->getTime($result['running_time']);
         if ($result['member_id'] == 0 or !$result['member_name']) {
             if (in_array($result['id'], $guests)) {
                 continue;
             }
             //-----------------------------------------
             // Bot?
             //-----------------------------------------
             if ($result['uagent_type'] == 'search') {
                 /* Skipping bot? */
                 if (!$this->settings['spider_active']) {
                     continue;
                 }
                 //-----------------------------------------
                 // Seen bot of this type yet?
                 //-----------------------------------------
                 if (!$cached[$result['member_name']]) {
                     if ($this->settings['spider_anon']) {
                         if ($this->memberData['g_access_cp']) {
                             $active['names'][] = array('id' => $result['member_id'], 'name' => $result['member_name'], 'seo' => $result['seo_name']);
                         }
                     } else {
                         $active['names'][] = array('id' => $result['member_id'], 'name' => $result['member_name'], 'seo' => $result['seo_name']);
                     }
                     $cached[$result['member_name']] = 1;
                 } else {
                     $active['guests']++;
                     $guests[] = $result['id'];
                 }
             } else {
                 $active['guests']++;
                 $guests[] = $result['id'];
             }
         } else {
             if (empty($cached[$result['member_id']])) {
                 $cached[$result['member_id']] = 1;
                 $p_start = "";
                 $p_end = "";
                 $p_title = sprintf($this->lang->words['au_reading'], $last_date);
                 if (strstr($result['current_module'], 'post') and $result['member_id'] != $this->memberData['member_id']) {
                     $p_start = "<span class='activeuserposting'>";
                     $p_end = "</span>";
                     $p_title = sprintf($this->lang->words['au_posting'], $last_date);
                 }
                 if (!$this->settings['disable_anonymous'] and $result['login_type']) {
                     if ($this->memberData['g_access_cp'] and $this->settings['disable_admin_anon'] != 1) {
                         $active['names'][] = array('id' => $result['member_id'], 'name' => $result['member_name'] . '*', 'p_start' => $p_start, 'p_title' => $p_title, 'p_end' => $p_end, 'seo' => $result['seo_name']);
                         $active['anon']++;
                     } else {
                         $active['anon']++;
                     }
                 } else {
                     $active['members']++;
                     $active['names'][] = array('id' => $result['member_id'], 'name' => $result['member_name'], 'p_start' => $p_start, 'p_title' => $p_title, 'p_end' => $p_end, 'seo' => $result['seo_name']);
                 }
             }
         }
     }
     $active['_done'] = 1;
     return $active;
 }
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:97,代码来源:forums.php

示例6: buildDisplayData

 /**
  * Parse a member for display
  *
  * @access	public
  * @param	mixed	Either array of member data, or member ID to self load
  * @param	array 	Array of flags to parse: 'signature', 'customFields', 'avatar', 'warn'
  * @return	array 	Parsed member data
  */
 public static function buildDisplayData($member, $_parseFlags = array())
 {
     $_NOW = IPSDebug::getMemoryDebugFlag();
     //-----------------------------------------
     // Figure out parse flags
     //-----------------------------------------
     $parseFlags = array('signature' => isset($_parseFlags['signature']) ? $_parseFlags['signature'] : 0, 'customFields' => isset($_parseFlags['customFields']) ? $_parseFlags['customFields'] : 0, 'avatar' => isset($_parseFlags['avatar']) ? $_parseFlags['avatar'] : 1, 'warn' => isset($_parseFlags['warn']) ? $_parseFlags['warn'] : 1, 'cfSkinGroup' => isset($_parseFlags['cfSkinGroup']) ? $_parseFlags['cfSkinGroup'] : '', 'cfGetGroupData' => isset($_parseFlags['cfGetGroupData']) ? $_parseFlags['cfGetGroupData'] : '', 'cfLocation' => isset($_parseFlags['cfLocation']) ? $_parseFlags['cfLocation'] : '', 'checkFormat' => isset($_parseFlags['checkFormat']) ? $_parseFlags['checkFormat'] : 0);
     if (isset($_parseFlags['__all__'])) {
         foreach ($parseFlags as $k => $v) {
             $parseFlags[$k] = 1;
         }
         $parseFlags['cfSkinGroup'] = '';
     }
     //-----------------------------------------
     // Load the member?
     //-----------------------------------------
     if (!is_array($member) and ($member == intval($member) and $member > 0)) {
         $member = self::load($member, 'all');
     }
     if (!$member['member_group_id']) {
         $member['member_group_id'] = ipsRegistry::$settings['guest_group'];
     }
     /* Unpack bitwise if required */
     if (!isset($member['bw_is_spammer'])) {
         $member = self::buildBitWiseOptions($member);
     }
     //-----------------------------------------
     // INIT
     //-----------------------------------------
     $rank_cache = ipsRegistry::cache()->getCache('ranks');
     $group_cache = ipsRegistry::cache()->getCache('group_cache');
     $group_name = IPSLib::makeNameFormatted($group_cache[$member['member_group_id']]['g_title'], $member['member_group_id']);
     $pips = 0;
     $topic_id = intval(isset(ipsRegistry::$request['t']) ? ipsRegistry::$request['t'] : 0);
     $forum_id = intval(isset(ipsRegistry::$request['f']) ? ipsRegistry::$request['f'] : 0);
     //-----------------------------------------
     // SEO Name
     //-----------------------------------------
     $member['members_seo_name'] = self::fetchSeoName($member);
     //-----------------------------------------
     // Avatar
     //-----------------------------------------
     if ($parseFlags['avatar']) {
         $member['avatar'] = self::buildAvatar($member);
     }
     $member['_group_formatted'] = $group_name;
     //-----------------------------------------
     // Ranks
     //-----------------------------------------
     if (is_array($rank_cache) and count($rank_cache)) {
         foreach ($rank_cache as $k => $v) {
             if ($member['posts'] >= $v['POSTS']) {
                 if (!isset($member['title']) || $member['title'] === '' || is_null($member['title'])) {
                     $member['title'] = $v['TITLE'];
                 }
                 $pips = $v['PIPS'];
                 break;
             }
         }
     }
     //-----------------------------------------
     // Group image
     //-----------------------------------------
     $member['member_rank_img'] = '';
     $member['member_rank_img_i'] = '';
     if ($group_cache[$member['member_group_id']]['g_icon']) {
         $_img = $group_cache[$member['member_group_id']]['g_icon'];
         if (substr($_img, 0, 4) != 'http') {
             $_img = ipsRegistry::$settings['_original_base_url'] . '/' . ltrim($_img, '/');
         }
         $member['member_rank_img_i'] = 'img';
         $member['member_rank_img'] = $_img;
     } else {
         if ($pips) {
             if (is_numeric($pips)) {
                 for ($i = 1; $i <= $pips; ++$i) {
                     $member['member_rank_img_i'] = 'pips';
                     $member['member_rank_img'] .= ipsRegistry::getClass('output')->getReplacement('pip_pip');
                 }
             } else {
                 $member['member_rank_img_i'] = 'img';
                 $member['member_rank_img'] = ipsRegistry::$settings['public_dir'] . 'style_extra/team_icons/' . $pips;
             }
         }
     }
     //-----------------------------------------
     // Spammer status
     //-----------------------------------------
     $member['spamStatus'] = NULL;
     $member['spamImage'] = NULL;
     $moderator = ipsRegistry::member()->getProperty('forumsModeratorData');
     if (isset($moderator[$forum_id]['bw_flag_spammers']) and $moderator[$forum_id]['bw_flag_spammers'] or ipsRegistry::member()->getProperty('g_is_supmod') == 1) {
//.........这里部分代码省略.........
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:101,代码来源:core.php

示例7: _viewModern


//.........这里部分代码省略.........
     /* 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));
     //-----------------------------------------
     // Recent visitor?
     //-----------------------------------------
     if ($member['member_id'] != $this->memberData['member_id']) {
         list($be_anon, $loggedin) = explode('&', $this->memberData['login_anonymous']);
         if (!$be_anon) {
             $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'] = IPSLib::makeNameFormatted($member['g_title'], $member['g_id'], $member['prefix'], $member['suffix']);
     $member['_posts_day'] = 0;
     $member['_total_pct'] = 0;
     $member['_bday_month'] = $member['bday_month'] ? $this->lang->words['M_' . $member['bday_month']] : 0;
     //-----------------------------------------
     // BIO
     //-----------------------------------------
     $member['pp_bio_content'] = IPSText::getTextClass('bbcode')->stripBadWords($member['pp_bio_content']);
     $member['pp_bio_content'] = IPSText::wordwrap($member['pp_bio_content'], '25', ' ');
     if (!$this->settings['disable_profile_stats']) {
         $posts = $this->DB->buildAndFetch(array('select' => "COUNT(*) as total_posts", 'from' => "posts", 'where' => "author_id=" . $member['member_id']));
         $member['posts'] = $posts['total_posts'];
         //-----------------------------------------
         // Total posts
         //-----------------------------------------
         if ($member['posts'] and $board_posts) {
             $member['_posts_day'] = round($member['posts'] / ((time() - $member['joined']) / 86400), 2);
             # Fix the issue when there is less than one day
             $member['_posts_day'] = $member['_posts_day'] > $member['posts'] ? $member['posts'] : $member['_posts_day'];
             $member['_total_pct'] = sprintf('%.2f', $member['posts'] / $board_posts * 100);
         }
         $member['_posts_day'] = floatval($member['_posts_day']);
         //-----------------------------------------
         // Most active in
         //-----------------------------------------
         $favorite = $this->DB->buildAndFetch(array('select' => 'COUNT(p.author_id) as f_posts', 'from' => array('posts' => 'p'), 'where' => 'p.author_id=' . $member['member_id'] . ' AND ' . $this->registry->permissions->buildPermQuery('i'), 'order' => 'f_posts DESC', 'group' => 't.forum_id', 'add_join' => array(array('select' => 't.forum_id', 'from' => array('topics' => 't'), 'where' => 't.tid=p.topic_id'), array('from' => array('permission_index' => 'i'), 'where' => "i.perm_type='forum' AND i.perm_type_id=t.forum_id"))));
         $member['favorite_id'] = $favorite['forum_id'];
         $member['_fav_posts'] = $favorite['f_posts'];
         if ($member['posts']) {
             $member['_fav_percent'] = round($favorite['f_posts'] / $member['posts'] * 100);
         }
     }
     //-----------------------------------------
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:67,代码来源:view.php

示例8: members_list

    /**
     * List of members
     *
     * @access	public
     * @param	array 		Members
     * @param	string		Pages
     * @return	string		HTML
     */
    public function members_list($members, $pages = '')
    {
        $IPBHTML = "";
        //--starthtml--//
        //-----------------------------------------
        // BADGE STYLEE
        //-----------------------------------------
        $IPBHTML .= <<<HTML
{$pages}
<br style='clear: both' />
<div class='acp-box'>
\t<h3>{$this->lang->words['sm_members']}</h3>
<table class='alternate_rows double_pad'>
\t<tr>
\t\t<th style='width: 5%'></th>
\t\t<th style='width: 30%'>{$this->lang->words['list__dn']}</th>
\t\t<th style='width: 25%'>{$this->lang->words['list__email']}</th>
\t\t<th style='width: 20%'>{$this->lang->words['list__group']}</th>
\t\t<th style='width: 20%'>{$this->lang->words['list__ip']}</th>
\t</tr>
HTML;
        if (count($members)) {
            foreach ($members as $member) {
                $member['group_title'] = IPSLib::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>";
                }
                $_extraStyle = $member['member_banned'] ? ' class="_red"' : ($member['bw_is_spammer'] ? ' class="_amber"' : '');
                $_extraText = $member['member_banned'] ? '(' . $this->lang->words['m_f_showbanned'] . ')' : ($member['bw_is_spammer'] ? '(' . $this->lang->words['m_f_showspam'] . ')' : '');
                $IPBHTML .= <<<HTML
\t\t\t<tr id='member-{$member['member_id']}'{$_extraStyle}>
\t\t\t\t<td><a href='{$this->settings['base_url']}&amp;module=members&amp;section=members&amp;do=viewmember&amp;member_id={$member['member_id']}'><img src='{$member['pp_thumb_photo']}' style='width: 30px; height: 30px; border: 1px solid #d8d8d8' /></a></td>\t\t\t
\t\t\t\t<td class='member_name'><a href='{$this->settings['base_url']}&amp;module=members&amp;section=members&amp;do=viewmember&amp;member_id={$member['member_id']}'>{$member['members_display_name']}</a></td>
\t\t\t\t<td>{$member['email']}</td>
\t\t\t\t<td>{$member['group_title']} <span style='color:gray;font-size:0.8em'>{$_extraText}</span></td>
\t\t\t\t<td><a href='{$this->settings['base_url']}&amp;app=members&amp;module=members&amp;section=tools&amp;do=learn_ip&amp;ip={$member['ip_address']}'>{$member['ip_address']}</a></td>
\t\t\t</tr>
HTML;
            }
        } else {
            $IPBHTML .= <<<HTML
<td style='padding: 10px;' colspan='8'>
\t\t{$this->lang->words['sm_nomemfound']}
</td>
\t
HTML;
        }
        $IPBHTML .= <<<HTML
</table>
 </table>
</div>
<br style='clear: both' />
{$pages}
HTML;
        //--endhtml--//
        return $IPBHTML;
    }
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:65,代码来源:cp_skin_member.php

示例9: _viewQueue


//.........这里部分代码省略.........
         case 'posts':
             $col = 'm.posts';
             break;
         case 'joined':
             $col = 'm.joined';
             break;
     }
     //-----------------------------------------
     // Pages...
     //-----------------------------------------
     $links = $this->registry->output->generatePagination(array('totalItems' => $cnt, 'itemsPerPage' => 75, 'currentStartValue' => $st, 'baseUrl' => $this->settings['base_url'] . "&amp;{$this->form_code}&amp;do={$type}&amp;ord={$ord}&amp;filter={$filter}"));
     //-----------------------------------------
     // Print...
     //-----------------------------------------
     if ($cnt > 0) {
         switch ($type) {
             case 'validating':
                 $this->DB->build(array('select' => 'v.*', 'from' => array('validating' => 'v'), 'where' => "v.lost_pass=0 AND m.member_group_id=" . $this->settings['auth_group'] . $q_extra, 'order' => $col . ' ' . $ord, 'limit' => array($st, 75), 'add_join' => array(array('select' => 'm.name, m.member_group_id, m.members_display_name, m.ip_address, m.member_id, m.email, m.posts, m.joined', 'from' => array('members' => 'm'), 'where' => 'm.member_id=v.member_id', 'type' => 'left'))));
                 break;
             case 'locked':
                 $this->DB->build(array('select' => 'm.member_group_id, m.members_display_name, m.ip_address, m.member_id, m.email, m.posts, m.joined, m.failed_logins, m.failed_login_count', 'from' => 'members m', 'where' => "m.failed_login_count >= " . intval($this->settings['ipb_bruteforce_attempts']), 'order' => $col . ' ' . $ord, 'limit' => array($st, 75)));
                 break;
             case 'banned':
                 $this->DB->build(array('select' => 'm.member_group_id, m.members_display_name, m.ip_address, m.member_id, m.email, m.posts, m.joined, m.failed_logins, m.failed_login_count', 'from' => array('members' => 'm'), 'where' => "m.member_banned=1", 'order' => $col . ' ' . $ord, 'limit' => array($st, 75), 'add_join' => array(array('select' => 'g.g_title', 'from' => array('groups' => 'g'), 'where' => 'g.g_id=m.member_group_id', 'type' => 'left'))));
                 break;
             case 'spam':
                 $this->DB->build(array('select' => 'm.*', 'from' => array('members' => 'm'), 'where' => IPSBWOptions::sql('bw_is_spammer', 'm.members_bitoptions', 'members', 'global', 'has'), 'order' => $col . ' ' . $ord, 'limit' => array($st, 75), 'add_join' => array(array('select' => 'g.g_title', 'from' => array('groups' => 'g'), 'where' => 'g.g_id=m.member_group_id', 'type' => 'left'))));
                 break;
         }
         $this->DB->execute();
         while ($r = $this->DB->fetch()) {
             $r['_joined'] = ipsRegistry::getClass('class_localization')->getDate($r['joined'], 'TINY');
             $r['members_display_name'] = $r['members_display_name'] ? $r['members_display_name'] : $this->lang->words['t_deletedmem'];
             $r['group_title'] = IPSLib::makeNameFormatted($this->caches['group_cache'][$r['member_group_id']]['g_title'], $r['member_group_id']);
             switch ($type) {
                 case 'validating':
                     $r['_coppa'] = $r['coppa_user'] ? $this->lang->words['t_coppa'] : '';
                     //-----------------------------------------
                     // Sort out 'where'
                     //-----------------------------------------
                     $r['_where'] = $r['lost_pass'] ? $this->lang->words['t_lostpass'] : ($r['new_reg'] ? $this->lang->words['t_userval'] : ($r['email_chg'] ? $this->lang->words['t_emailchange'] : $this->lang->words['t_na']));
                     if (isset($r['email_chg']) and $r['email_chg']) {
                         $r['_where'] .= " (<a href='" . $this->settings['base_url'] . "{$this->form_code}&amp;do=unappemail&amp;mid={$r['member_id']}'>{$this->lang->words['t_unapprove']}</a>)";
                     }
                     if ($r['new_reg'] and ($r['user_verified'] == 1 or $this->settings['reg_auth_type'] == 'admin')) {
                         $r['_where'] = $this->lang->words['t_adminval'];
                     }
                     //-----------------------------------------
                     // How long ago did this start?
                     //-----------------------------------------
                     $r['_hours'] = floor((time() - $r['entry_date']) / 3600);
                     $r['_days'] = intval($r['_hours'] / 24);
                     $r['_rhours'] = intval($r['_hours'] - $r['_days'] * 24);
                     //-----------------------------------------
                     // Format time
                     //-----------------------------------------
                     $r['_entry'] = ipsRegistry::getClass('class_localization')->getDate($r['entry_date'], 'TINY');
                     break;
                 case 'locked':
                     //-----------------------------------------
                     // Sort out lovely locked info
                     //-----------------------------------------
                     $used_ips = array();
                     $this_attempt = array();
                     $oldest = 0;
                     $newest = 0;
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:67,代码来源:tools.php

示例10: getActiveUserDetails

 /**
  * Returns an array of active users
  *
  * @access	public
  * @return	array
  **/
 public function getActiveUserDetails()
 {
     $active = array('TOTAL' => 0, 'NAMES' => array(), 'GUESTS' => 0, 'MEMBERS' => 0, 'ANON' => 0);
     if ($this->settings['show_active']) {
         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' => substr($this->memberData['login_anonymous'], 0, 1), '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' => 'id, member_id, member_name, seo_name, login_type, running_time, member_group, uagent_type', 'from' => 'sessions', 'where' => "running_time > {$time}"));
         $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) {
             $last_date = $this->registry->getClass('class_localization')->getTime($result['running_time']);
             //-----------------------------------------
             // 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']]) {
                     if ($this->settings['spider_anon']) {
                         if ($this->memberData['g_access_cp']) {
                             $active['NAMES'][] = IPSLib::makeNameFormatted($result['member_name'], $result['member_group']);
                         }
                     } else {
                         $active['NAMES'][] = IPSLib::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'] = IPSLib::makeNameFormatted($result['member_name'], $result['member_group']);
                         if (!$this->settings['disable_anonymous'] and $result['login_type']) {
                             if ($this->memberData['g_access_cp'] and $this->settings['disable_admin_anon'] != 1) {
                                 $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'];
         $this->users_online = $active['TOTAL'];
     }
     $this->lang->words['active_users'] = sprintf($this->lang->words['active_users'], $this->settings['au_cutoff']);
     return $active;
 }
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:93,代码来源:boards.php

示例11: fetchOnlineUsers

 /**
  * Returns the list of online users
  * 
  * @access	public
  * @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) {
         $cut_off = ipsRegistry::$settings['au_cutoff'] * 60;
         $time = time() - $cut_off;
         $rows = array();
         $ar_time = time();
         $this->registry->DB()->build(array('select' => 'id, member_id, member_name, seo_name, login_type, running_time, member_group, uagent_type', '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']]) {
                     if (ipsRegistry::$settings['spider_anon']) {
                         if ($this->registry->member()->getProperty('g_access_cp')) {
                             $active['NAMES'][] = $result['member_name'];
                         }
                     } else {
                         $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'] = IPSLib::makeNameFormatted($result['member_name'], $result['member_group']);
                         if (!ipsRegistry::$settings['disable_anonymous'] and $result['login_type']) {
                             if ($this->registry->member()->getProperty('g_access_cp') and ipsRegistry::$settings['disable_admin_anon'] != 1) {
                                 $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;
     }
 }
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:92,代码来源:api.php

示例12: groupsOverviewRow

    /**
     * Group row
     *
     * @access	public
     * @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'] = IPSLib::makeNameFormatted($r['g_title'], $r['g_id']);
        $IPBHTML .= <<<HTML
<tr>
  <td><img src='{$this->settings['skin_acp_url']}/_newimages/icons/group.png' border='0' class='ipbmenu' /></td>
  <td style='font-weight:bold'><a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=edit&amp;id={$r['g_id']}'>{$r['_title']}</a></td>
  <td align='center'><img src='{$this->settings['skin_acp_url']}/_newimages/icons/{$r['_can_acp_img']}' border='0' alt='-' class='ipd' /></td>
  <td align='center'><img src='{$this->settings['skin_acp_url']}/_newimages/icons/{$r['_can_supmod_img']}' border='0' alt='-' class='ipd' /></td>
  <td align='center'>
HTML;
        if ($r['g_id'] != $this->settings['auth_group'] and $r['g_id'] != $this->settings['guest_group']) {
            $IPBHTML .= <<<HTML
\t<a href='{$this->settings['_base_url']}app=members&amp;section=members&amp;module=members&amp;__update=1&amp;f_primary_group={$r['g_id']}' 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 align='right'>
  \t<img id="menu{$r['g_id']}" src='{$this->settings['skin_acp_url']}/_newimages/menu_open.png' border='0' alt='{$this->lang->words['a_options']}' class='ipbmenu' />
\t<ul class='acp-menu' id='menu{$r['g_id']}_menucontent'>
\t\t<li class='icon edit'><a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=edit&amp;id={$r['g_id']}'>{$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='icon delete'><a href='#' onclick='return acp.confirmDelete("{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=delete&amp;_admin_auth_key={$this->registry->getClass('adminFunctions')->_admin_auth_key}&amp;id={$r['g_id']}");'>{$this->lang->words['g_deleteg']}</a></li>
HTML;
        } else {
            $IPBHTML .= <<<HTML
\t\t<li class='icon delete'>{$this->lang->words['g_cannotdel']}</li>
HTML;
        }
        $IPBHTML .= <<<HTML
\t\t
\t</ul>
  </td>
</tr>
HTML;
        //--endhtml--//
        return $IPBHTML;
    }
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:56,代码来源:cp_skin_groups.php

示例13: executePlugin

 /**
  * Execute the plugin and return the HTML to show on the page.  
  * Can be called from ACP or front end, so the plugin needs to setup any appropriate lang files, skin files, etc.
  *
  * @access	public
  * @param	array 				Block data
  * @return	string				Block HTML to display or cache
  */
 public function executePlugin($block)
 {
     $data = array();
     //-----------------------------------------
     // Reset login form lang if needed
     //-----------------------------------------
     if (!$this->memberData['member_id']) {
         $uses_name = $uses_email = false;
         foreach ($this->cache->getCache('login_methods') as $method) {
             if ($method['login_user_id'] == 'username') {
                 $uses_name = true;
             }
             if ($method['login_user_id'] == 'email') {
                 $uses_email = true;
             }
         }
         if ($uses_name and $uses_email) {
             $this->lang->words['enter_name'] = $this->lang->words['welcome_name_and_email'];
         } else {
             if ($uses_email) {
                 $this->lang->words['enter_name'] = $this->lang->words['welcome_useremail'];
             }
         }
     } else {
         $topics = $this->DB->buildAndFetch(array('select' => 'COUNT(*) as total', 'from' => 'topics', 'where' => 'starter_id=' . $this->memberData['member_id']));
         $posts = $this->DB->buildAndFetch(array('select' => 'COUNT(*) as total', 'from' => 'posts', 'where' => 'author_id=' . $this->memberData['member_id']));
         $newTopics = $this->DB->buildAndFetch(array('select' => 'COUNT(*) as total', 'from' => 'topics', 'where' => 'start_date > ' . $this->memberData['last_visit']));
         $newPosts = $this->DB->buildAndFetch(array('select' => 'COUNT(*) as total', 'from' => 'posts', 'where' => 'post_date > ' . $this->memberData['last_visit']));
         $newFriends = $this->DB->buildAndFetch(array('select' => 'COUNT(*) as total', 'from' => 'profile_friends', 'where' => 'friends_approved=0 AND friends_friend_id=' . $this->memberData['member_id']));
         $newComments = $this->DB->buildAndFetch(array('select' => 'COUNT(*) as total', 'from' => 'profile_comments', 'where' => 'comment_approved=0 AND comment_for_member_id=' . $this->memberData['member_id']));
         $board_posts = $this->caches['stats']['total_topics'] + $this->caches['stats']['total_replies'];
         $_posts_day = 0;
         if ($posts['total'] and $board_posts) {
             $_posts_day = round($posts['total'] / ((time() - $this->memberData['joined']) / 86400), 2);
             # Fix the issue when there is less than one day
             $_posts_day = $_posts_day > $posts['total'] ? $posts['total'] : $_posts_day;
         }
         $_posts_day = floatval($_posts_day);
         //-----------------------------------------
         // Get the data not already available...
         //-----------------------------------------
         $data = array('topics' => $topics['total'], 'posts' => $posts['total'], 'avg_posts' => $_posts_day, 'new_topics' => $newTopics['total'], 'new_posts' => $newPosts['total'], 'new_friends' => $newFriends['total'], 'new_comments' => $newComments['total']);
     }
     $group_cache = $this->cache->getCache('group_cache');
     $data['group'] = IPSLib::makeNameFormatted($group_cache[$this->memberData['member_group_id']]['g_title'], $this->memberData['member_group_id']);
     //-----------------------------------------
     // Reputation
     //-----------------------------------------
     if (!ipsRegistry::isClassLoaded('repCache')) {
         require_once IPS_ROOT_PATH . 'sources/classes/class_reputation_cache.php';
         ipsRegistry::setClass('repCache', new classReputationCache());
     }
     $this->memberData['pp_reputation_points'] = $this->memberData['pp_reputation_points'] ? $this->memberData['pp_reputation_points'] : 0;
     $this->memberData['author_reputation'] = ipsRegistry::getClass('repCache')->getReputation($this->memberData['pp_reputation_points']);
     $pluginConfig = $this->returnPluginInfo();
     $templateBit = $pluginConfig['templateBit'] . '_' . $block['block_id'];
     return $this->registry->output->getTemplate('ccs')->{$templateBit}($block['block_name'], $data);
 }
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:66,代码来源:plugin.php

示例14: _getStats

 /**
  * Builds the "who's viewing" strip
  *
  * @access	private
  * @param	integer  Section ID
  * @return	string
  */
 private function _getStats($id = 1)
 {
     //-----------------------------------------
     // INIT
     //-----------------------------------------
     $ar_time = time();
     $cached = array();
     $guests = array();
     $active = array('guests' => 0, 'anon' => 0, 'members' => 0, 'names' => array());
     $rows = array($ar_time => array('login_type' => substr($this->memberData['login_anonymous'], 0, 1), 'running_time' => $ar_time, 'id' => $this->member->session_id, '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']));
     //-----------------------------------------
     // Process users active in this forum
     //-----------------------------------------
     if ($this->settings['no_au_topic'] != 1) {
         //-----------------------------------------
         // Get the users
         //-----------------------------------------
         $cut_off = $this->settings['au_cutoff'] != "" ? $this->settings['au_cutoff'] * 60 : 900;
         $this->DB->build(array('select' => 's.member_id, s.member_name, s.member_group, s.id, s.login_type, s.location, s.running_time, s.uagent_type, s.current_module, s.seo_name', 'from' => 'sessions s', 'where' => "current_appcomponent='core' AND current_module='reports' AND running_time > {$cut_off}"));
         $this->DB->execute();
         //-----------------------------------------
         // FETCH...
         //-----------------------------------------
         while ($r = $this->DB->fetch()) {
             $rows[$r['running_time'] . '.' . $r['id']] = $r;
         }
         krsort($rows);
         //-----------------------------------------
         // PRINT...
         //-----------------------------------------
         foreach ($rows as $result) {
             $result['member_name'] = IPSLib::makeNameFormatted($result['member_name'], $result['member_group']);
             $last_date = $this->registry->class_localization->getTime($result['running_time']);
             if ($result['member_id'] == 0 or !$result['member_name']) {
                 if (in_array($result['id'], $guests)) {
                     continue;
                 }
                 //-----------------------------------------
                 // Bot?
                 //-----------------------------------------
                 if ($result['uagent_type'] == 'search') {
                     //-----------------------------------------
                     // Seen bot of this type yet?
                     //-----------------------------------------
                     if (!$cached[$result['member_name']]) {
                         if ($this->settings['spider_anon']) {
                             if ($this->memberData['g_access_cp']) {
                                 $active['names'][] = array('id' => $result['member_id'], 'name' => $result['member_name'], 'seo' => $result['seo_name']);
                             }
                         } else {
                             $active['names'][] = array('id' => $result['member_id'], 'name' => $result['member_name'], 'seo' => $result['seo_name']);
                         }
                         $cached[$result['member_name']] = 1;
                     } else {
                         $active['guests']++;
                         $guests[] = $result['id'];
                     }
                 } else {
                     $active['guests']++;
                     $guests[] = $result['id'];
                 }
             } else {
                 if (empty($cached[$result['member_id']])) {
                     $cached[$result['member_id']] = 1;
                     $p_start = "";
                     $p_end = "";
                     $p_title = sprintf($this->lang->words['au_reading'], $last_date);
                     if (strstr($result['current_module'], 'post') and $result['member_id'] != $this->memberData['member_id']) {
                         $p_start = "<span class='activeuserposting'>";
                         $p_end = "</span>";
                         $p_title = sprintf($this->lang->words['au_posting'], $last_date);
                     }
                     if (!$this->settings['disable_anonymous'] and $result['login_type']) {
                         if ($this->memberData['g_access_cp'] and $this->settings['disable_admin_anon'] != 1) {
                             $active['names'][] = array('id' => $result['member_id'], 'name' => $result['member_name'] . '*', 'p_start' => $p_start, 'p_title' => $p_title, 'p_end' => $p_end, 'seo' => $result['seo_name']);
                             $active['anon']++;
                         } else {
                             $active['anon']++;
                         }
                     } else {
                         $active['members']++;
                         $active['names'][] = array('id' => $result['member_id'], 'name' => $result['member_name'], 'p_start' => $p_start, 'p_title' => $p_title, 'p_end' => $p_end, 'seo' => $result['seo_name']);
                     }
                 }
             }
         }
         //$active['active_users_title']   = sprintf( $this->lang->words['active_users_title']  , ($active['members'] + $active['guests'] + $active['anon'] ) );
         //$active['active_users_detail']  = sprintf( $this->lang->words['active_users_detail'] , $active['guests'],$active['anon'] );
         $active['active_users_members'] = sprintf($this->lang->words['active_users_members'], $active['members']);
         return $active;
     }
 }
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:99,代码来源:reports.php

示例15: formIgnoredUsers

 /**
  * Show the ignored users
  *
  * @access	public
  * @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
     //-----------------------------------------
     $this->DB->build(array('select' => '*', 'from' => 'ignored_users', 'where' => 'ignore_owner_id=' . $this->memberData['member_id']));
     $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'] = IPSLib::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);
 }
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:52,代码来源:usercpForms.php


注:本文中的IPSLib::makeNameFormatted方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。