• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP friend_list函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中friend_list函数的典型用法代码示例。如果您正苦于以下问题:PHP friend_list函数的具体用法?PHP friend_list怎么用?PHP friend_list使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: loadcache

 }
 $foruminfo = C::t('forum_forum')->fetch($id);
 $grouplevel = $foruminfo['level'];
 loadcache('grouplevels');
 $grouplevel = $_G['grouplevels'][$grouplevel];
 $membermaximum = $grouplevel['specialswitch']['membermaximum'];
 if (!empty($membermaximum)) {
     $curnum = C::t('forum_groupuser')->fetch_count_by_fid($id, -1);
     if ($curnum >= $membermaximum) {
         showmessage('group_member_maximum', '', array('membermaximum' => $membermaximum));
     }
 }
 $groupname = $foruminfo['name'];
 $invitename = lang('group/misc', 'group_join', array('groupname' => $groupname));
 if (!submitcheck('invitesubmit')) {
     $friends = friend_list($_G['uid'], 100);
     if (!empty($friends)) {
         $frienduids = array_keys($friends);
         $inviteduids = array();
         $query = C::t('forum_groupinvite')->fetch_all_inviteuid($id, $frienduids, $_G['uid']);
         foreach ($query as $inviteuser) {
             $inviteduids[$inviteuser['inviteuid']] = $inviteuser['inviteuid'];
         }
         $query = C::t('forum_groupuser')->fetch_all_userinfo($frienduids, $id);
         foreach ($query as $inviteuser) {
             $inviteduids[$inviteuser['uid']] = $inviteuser['uid'];
         }
     }
     $inviteduids = !empty($inviteduids) ? implode(',', $inviteduids) : '';
 } else {
     $uids = $_GET['uids'];
开发者ID:tang86,项目名称:discuz-utf8,代码行数:31,代码来源:misc_invite.php


示例2: loadcache

loadcache('groupindex');
$randgroupdata = $_G['cache']['groupindex']['randgroupdata'];
if ($randgroupdata) {
    foreach ($randgroupdata as $groupid => $rgroup) {
        if ($rgroup['iconstatus']) {
            $randgrouplist[$groupid] = $rgroup;
        }
    }
}
if (count($randgrouplist) > 9) {
    foreach (array_rand($randgrouplist, 9) as $fid) {
        $randgroup[] = $randgrouplist[$fid];
    }
} elseif (count($randgrouplist)) {
    $randgroup = $randgrouplist;
}
require_once libfile('function/friend');
$frienduid = friend_list($_G['uid'], 50);
if ($frienduid && is_array($frienduid)) {
    foreach ($frienduid as $friend) {
        $frienduidarray[] = $friend['fuid'];
    }
    $fids = C::t('forum_groupuser')->fetch_all_fid_by_uids($frienduidarray);
    $query = C::t('forum_forum')->fetch_all_info_by_fids($fids, 0, 9);
    foreach ($query as $group) {
        $icon = get_groupimg($group['icon'], 'icon');
        $friendgrouplist[$group['fid']] = array('fid' => $group['fid'], 'name' => $group['name'], 'icon' => $icon);
    }
}
$navtitle = $_G['username'] . lang('core', 'title_of') . $_G['setting']['navs'][3]['navname'];
include_once template("diy:group/group_my");
开发者ID:lemonstory,项目名称:bbs,代码行数:31,代码来源:group_my.php


示例3: getblockhtml


//.........这里部分代码省略.........
            break;
        case 'feed':
            $do = $blockname;
            if (!IS_ROBOT && ckprivacy('feed', 'view')) {
                require_once libfile('function/feed');
                $query = DB::query("SELECT * FROM " . DB::table('home_feed') . " WHERE uid='{$uid}' ORDER BY dateline DESC LIMIT 0,{$shownum}");
                while ($value = DB::fetch($query)) {
                    if (ckfriend($value['uid'], $value['friend'], $value['target_ids'])) {
                        $html .= mkfeedhtml(mkfeed($value));
                    }
                }
            }
            $contenttagname = 'ul';
            $contentclassname = ' el';
            $html = empty($html) ? '' : $html;
            break;
        case 'thread':
            $do = $blockname;
            if ($_G['setting']['allowviewuserthread'] !== false) {
                $fidsql = empty($_G['setting']['allowviewuserthread']) ? '' : " AND fid IN({$_G[setting][allowviewuserthread]}) ";
                $query = DB::query("SELECT * FROM " . DB::table('forum_thread') . " WHERE authorid='{$uid}' {$fidsql} AND displayorder>='0' ORDER BY tid DESC LIMIT 0,{$shownum}");
                while ($thread = DB::fetch($query)) {
                    if ($thread['author']) {
                        $html .= "<li><a href=\"forum.php?mod=viewthread&tid={$thread['tid']}\" target=\"_blank\">{$thread['subject']}</a></li>";
                    }
                }
            }
            $html = empty($html) ? '' : '<ul class="xl">' . $html . '</ul>';
            break;
        case 'friend':
            $do = $blockname;
            require_once libfile('function/friend');
            $friendlist = array();
            $friendlist = friend_list($uid, $shownum);
            $fuids = array_keys($friendlist);
            getonlinemember($fuids);
            foreach ($friendlist as $key => $value) {
                $classname = $_G['ols'][$value['fuid']] ? 'gol' : '';
                $html .= '<li><a href="home.php?mod=space&uid=' . $value['fuid'] . '" target="_blank"><em class="' . $classname . '"></em>' . avatar($value['fuid'], 'small') . '</a><p><a href="home.php?mod=space&uid=' . $value[fuid] . '" target="_blank">' . $value['fusername'] . '</a></p></li>';
            }
            $html = '<ul class="ml mls cl">' . $html . '</ul>';
            break;
        case 'visitor':
            $do = 'friend';
            $view = 'visitor';
            $query = DB::query("SELECT * FROM " . DB::table('home_visitor') . " WHERE uid='{$uid}' ORDER BY dateline DESC LIMIT 0,{$shownum}");
            $list = $fuids = array();
            while ($value = DB::fetch($query)) {
                $list[] = $value;
                $fuids[] = $value['vuid'];
            }
            getonlinemember($fuids);
            foreach ($list as $value) {
                $html .= "<li>";
                if ($value['vusername'] == '') {
                    $html .= lang('space', 'visitor_anonymity');
                } else {
                    $html .= lang('space', 'visitor_list', array('uid' => $value['vuid'], 'username' => $value['vusername'], 'class' => $_G['ols'][$value['vuid']] ? 'gol' : '', 'avatar' => avatar($value['vuid'], 'small')));
                }
                $html .= "<span class=\"xg2\">" . dgmdate($value['dateline'], 'u', '9999', 'Y-m-d') . "</span>";
                $html .= "</li>";
            }
            $html = '<ul class="ml mls cl">' . $html . '</ul>';
            break;
        case 'share':
            $do = $blockname;
开发者ID:v998,项目名称:discuzx-en,代码行数:67,代码来源:function_space.php


示例4: showmessage

         if (!$magicnum || $magicnum < 0) {
             showmessage('magics_num_invalid');
         } elseif ($magicnum > $magic['num']) {
             showmessage('magics_amount_no_enough');
         }
         usemagic($magic['magicid'], $magic['num'], $magicnum);
         updatemagiclog($magic['magicid'], '2', $magicnum, '0', 0, 'drop');
         showmessage('magics_drop_succeed', 'home.php?mod=magic&action=mybox', array('magicname' => $magic['name'], 'num' => $magicnum), array('locationtime' => true));
     }
 } elseif ($operation == 'give') {
     if ($_G['group']['allowmagics'] < 2) {
         showmessage('magics_nopermission');
     }
     if (!submitcheck('operatesubmit')) {
         include libfile('function/friend');
         $buddyarray = friend_list($_G['uid'], 20);
         include template('home/space_magic_mybox_opreation');
         dexit();
     } else {
         $magicnum = intval($_GET['magicnum']);
         $toname = dhtmlspecialchars(trim($_GET['tousername']));
         if (!$toname) {
             showmessage('magics_username_nonexistence');
         } elseif ($magic['num'] < $magicnum) {
             showmessage('magics_num_invalid');
         }
         $givemessage = dhtmlspecialchars(trim($_GET['givemessage']));
         givemagic($toname, $magic['magicid'], $magicnum, $magic['num'], '0', $givemessage, $magicarray);
     }
 } else {
     showmessage('undefined_action');
开发者ID:softhui,项目名称:discuz,代码行数:31,代码来源:home_magic.php


示例5: getblockhtml


//.........这里部分代码省略.........
                }
            }
            $contenttagname = 'ul';
            $contentclassname = ' el';
            $html = !$html ? '<p class="emp">' . lang('space', 'block_feed_no_content') . '</p>' : $html;
            break;
        case 'thread':
            $do = $blockname;
            $view = 'me';
            $from = 'space';
            if ($_G['setting']['allowviewuserthread'] !== -1) {
                $fidsql = empty($_G['setting']['allowviewuserthread']) ? '' : " AND fid IN({$_G[setting][allowviewuserthread]}) ";
                $viewfids = str_replace("'", '', $_G['setting']['allowviewuserthread']);
                if (!empty($viewfids)) {
                    $viewfids = explode(',', $viewfids);
                }
                foreach (C::t('forum_thread')->fetch_all_by_authorid_displayorder($uid, 0, '>=', null, '', 0, $shownum) as $thread) {
                    if (!empty($viewfids) && $_G['adminid'] != 1 && !in_array($thread['fid'], $viewfids)) {
                        continue;
                    }
                    if ($thread['author']) {
                        $html .= "<li><a href=\"forum.php?mod=viewthread&tid={$thread['tid']}\" target=\"_blank\">{$thread['subject']}</a></li>";
                    }
                }
            }
            $html = !$html ? '<p class="emp">' . lang('space', 'block_thread_no_content') . ($space['self'] ? lang('space', 'block_thread_no_content_publish', $space) : '') . '</p>' : '<ul class="xl">' . $html . '</ul>';
            break;
        case 'friend':
            $do = $blockname;
            $view = 'me';
            $from = 'space';
            require_once libfile('function/friend');
            $friendlist = array();
            $friendlist = friend_list($uid, $shownum);
            $fuids = array_keys($friendlist);
            getonlinemember($fuids);
            foreach ($friendlist as $key => $value) {
                $classname = $_G['ols'][$value['fuid']] ? 'gol' : '';
                $html .= '<li><a href="home.php?mod=space&uid=' . $value['fuid'] . '" target="_blank" class="avt"><em class="' . $classname . '"></em>' . avatar($value['fuid'], 'small') . '</a><p><a href="home.php?mod=space&uid=' . $value[fuid] . '" target="_blank">' . $value['fusername'] . '</a></p></li>';
            }
            $html = !$html ? '<p class="emp">' . lang('space', 'block_friend_no_content') . ($space['self'] ? lang('space', 'block_friend_no_content_publish', $space) : '') . '</p>' : '<ul class="ml mls cl">' . $html . '</ul>';
            break;
        case 'visitor':
            if ($space['self']) {
                $do = 'friend';
                $view = 'visitor';
            }
            $list = $fuids = array();
            foreach (C::t('home_visitor')->fetch_all_by_uid($uid, $shownum) as $value) {
                $list[] = $value;
                $fuids[] = $value['vuid'];
            }
            getonlinemember($fuids);
            foreach ($list as $value) {
                $html .= "<li>";
                if ($value['vusername'] == '') {
                    $html .= lang('space', 'visitor_anonymity');
                } else {
                    $html .= lang('space', 'visitor_list', array('uid' => $value['vuid'], 'username' => $value['vusername'], 'class' => $_G['ols'][$value['vuid']] ? 'gol' : '', 'avatar' => avatar($value['vuid'], 'small')));
                }
                $html .= "<span class=\"xg2\">" . dgmdate($value['dateline'], 'u', '9999', 'Y-m-d') . "</span>";
                $html .= "</li>";
            }
            $html = !$html ? '<p class="emp">' . lang('space', 'block_visitor_no_content') . ($space['self'] ? lang('space', 'block_visitor_no_content_publish', $space) : '') . '</p>' : '<ul class="ml mls cl">' . $html . '</ul>';
            break;
        case 'share':
开发者ID:dalinhuang,项目名称:healthshop,代码行数:67,代码来源:function_space.php


示例6: getblockhtml


//.........这里部分代码省略.........
                $html .= '<li>' . lang('space', 'block_view_noperm') . '</li>';
            }
            $html = '<div class="content"><ul class="ml mla cl">' . $html . '</ul></div>';
            break;
        case 'feed':
            if (ckprivacy('feed', 'view')) {
                require_once libfile('function/feed');
                $query = DB::query("SELECT * FROM " . DB::table('home_feed') . " WHERE uid='{$uid}' ORDER BY dateline DESC LIMIT 0,{$shownum}");
                while ($value = DB::fetch($query)) {
                    if (ckfriend($value['uid'], $value['friend'], $value['target_ids'])) {
                        $html .= mkfeedhtml(mkfeed($value));
                    }
                }
            }
            $html = empty($html) ? '' : '<ul class="content el">' . $html . '</ul>';
            break;
        case 'thread':
            if ($_G['setting']['allowviewuserthread']) {
                $fidsql = " AND fid IN({$_G[setting][allowviewuserthread]}) ";
            } else {
                $fidsql = '';
            }
            $query = DB::query("SELECT * FROM " . DB::table('forum_thread') . " WHERE authorid='{$uid}' {$fidsql} ORDER BY tid DESC LIMIT 0,{$shownum}");
            while ($thread = DB::fetch($query)) {
                if ($thread['author']) {
                    $html .= "<li><a target=\"_blank\" href=\"forum.php?mod=viewthread&tid={$thread['tid']}\">{$thread['subject']}</a></li>";
                }
            }
            $html = empty($html) ? '' : '<div class="content cl"><ul class="xl">' . $html . '</ul></div>';
            break;
        case 'friend':
            require_once libfile('function/friend');
            $friendlist = array();
            $friendlist = friend_list($uid, $shownum);
            $fuids = array_keys($friendlist);
            getonlinemember($fuids);
            foreach ($friendlist as $key => $value) {
                $classname = $_G['ols'][$value['fuid']] ? 'gol' : '';
                $html .= '<li><a href="home.php?mod=space&uid=' . $value['fuid'] . '" target="_blank"><em class="' . $classname . '"></em>' . avatar($value['fuid'], 'small') . '</a><p><a href="home.php?mod=space&uid=' . $value[fuid] . '" target="_blank">' . $value['fusername'] . '</a></p></li>';
            }
            $html = '<div class="content"><ul class="ml mls cl">' . $html . '</ul></div>';
            break;
        case 'visitor':
            $query = DB::query("SELECT * FROM " . DB::table('home_visitor') . " WHERE uid='{$uid}' ORDER BY dateline DESC LIMIT 0,{$shownum}");
            $list = $fuids = array();
            while ($value = DB::fetch($query)) {
                $list[] = $value;
                $fuids[] = $value['vuid'];
            }
            getonlinemember($fuids);
            foreach ($list as $value) {
                $html .= "<li>";
                if ($value['vusername'] == '') {
                    $html .= lang('space', 'visitor_anonymity');
                } else {
                    $html .= lang('space', 'visitor_list', array('uid' => $value['vuid'], 'username' => $value['vusername'], 'class' => $_G['ols'][$value['vuid']] ? 'gol' : '', 'avatar' => avatar($value['vuid'], 'small')));
                }
                $html .= "<span class=\"xg2\">" . dgmdate($value['dateline'], 'u') . "</span>";
                $html .= "</li>";
            }
            $html = '<div class="content"><ul class="ml mls cl">' . $html . '</ul></div>';
            break;
        case 'share':
            if (ckprivacy('share', 'view')) {
                require_once libfile('function/share');
                $query = DB::query("SELECT * FROM " . DB::table('home_share') . " WHERE uid='{$uid}' ORDER BY dateline DESC LIMIT 0,{$shownum}");
开发者ID:Kingson4Wu,项目名称:php_demo,代码行数:67,代码来源:function_space.php


示例7: libfile

        $nobbname = true;
    }
    if (!$metakeywords) {
        $metakeywords = $_G['setting']['navs'][4]['navname'];
    }
    if (!$metadescription) {
        $metadescription = $_G['setting']['navs'][4]['navname'];
    }
}
//add by zh
$do = $blockname;
$view = 'me';
$from = 'space';
require_once libfile('function/friend');
$friendlist = array();
$friendlist = friend_list($uid, $shownum);
$fuids = array_keys($friendlist);
getonlinemember($fuids);
//add
//好友
$followerlist = C::t('home_follow')->fetch_all_following_by_uid($uid);
foreach ($friendlist as $key => $value) {
    $gzflag = false;
    //add
    $classname = $_G['ols'][$value['fuid']] ? 'gol' : '';
    $friendhtml .= '<li><a href="home.php?mod=space&uid=' . $value['fuid'] . '" target="_blank" class="avt"><em class="' . $classname . '"></em>' . avatar($value['fuid'], 'small') . '</a><p><a href="home.php?mod=space&uid=' . $value[fuid] . '" target="_blank">' . $value['fusername'] . '</a></p>';
    foreach ($followerlist as $k => $val) {
        if ($val['followuid'] == $value['fuid']) {
            $gzflag = true;
            break;
        }
开发者ID:Jaedeok-seol,项目名称:discuz_template,代码行数:31,代码来源:space_home.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP friendlyDate函数代码示例发布时间:2022-05-15
下一篇:
PHP friend_group_list函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap