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


PHP get_group_members函数代码示例

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


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

示例1: showFormAction

 /**
  * Builds a page with members edit form.
  *
  * @param Request $request Incoming request.
  * @return string Rendered page content.
  * @throws NotFoundException If the operator's group with specified ID is
  *   not found in the system.
  */
 public function showFormAction(Request $request)
 {
     $operator = $this->getOperator();
     $group_id = $request->attributes->getInt('group_id');
     $page = array('groupid' => $group_id, 'errors' => $request->attributes->get('errors', array()));
     $operators = get_operators_list();
     $group = group_by_id($group_id);
     // Check if the group exists
     if (!$group) {
         throw new NotFoundException('The group is not found.');
     }
     $page['formop'] = array();
     $page['currentgroup'] = $group ? htmlspecialchars($group['vclocalname']) : '';
     // Get list of group's members
     $checked_operators = get_group_members($group_id);
     // Prepare the list of all operators
     $page['operators'] = array();
     foreach ($operators as $op) {
         $op['vclocalename'] = $op['vclocalename'];
         $op['vclogin'] = $op['vclogin'];
         $op['checked'] = in_array($op['operatorid'], $checked_operators);
         $page['operators'][] = $op;
     }
     // Set other values and render the page
     $page['stored'] = $request->query->get('stored');
     $page['title'] = getlocal('Members');
     $page['menuid'] = 'groups';
     $page = array_merge($page, prepare_menu($operator));
     $page['tabs'] = $this->buildTabs($request);
     return $this->render('group_members', $page);
 }
开发者ID:abhijitroy07,项目名称:mibew,代码行数:39,代码来源:MembersController.php

示例2: unjoinGroup

function unjoinGroup($group_id, $privacy)
{
    global $db, $current_user;
    if (!is_numeric($group_id)) {
        die;
    }
    //$isMember = isMember($story_id);if($privacy == 'public')
    $sql2 = "delete from " . table_group_member . " where member_user_id = '" . $current_user->user_id . "' and member_group_id = '" . $group_id . "' ";
    $db->query($sql2);
    //member count update decrease
    $member_count = get_group_members($group_id);
    $member_update = "update " . table_groups . " set group_members = '" . $member_count . "' where group_id = '" . $group_id . "' ";
    $db->query($member_update);
}
开发者ID:bendroid,项目名称:pligg-cms,代码行数:14,代码来源:group.php

示例3: getInThisGroupAlsoIN

function getInThisGroupAlsoIN($group, $limit)
{
    $userLimit = 100;
    $members = get_group_members($group->guid, $userLimit, 0);
    $memberIds = array();
    if (!empty($members)) {
        foreach ($members as $member) {
            $memberIds[] = $member->getGUID();
        }
    }
    $in = "r.guid_one IN (" . implode(",", $memberIds) . ")";
    $notIn = "r.guid_two NOT IN (" . $group->guid . ")";
    $groups = elgg_get_entities_from_relationship(array('relationship' => 'member', 'inverse_relationship' => false, 'type' => 'group', 'limit' => $limit, 'offset' => 0, 'count' => false, 'wheres' => array($in, $notIn), 'group_by' => 'r.guid_two', 'order_by' => 'count(r.guid_one) DESC'));
    return $groups;
    /*$content = '';
    	foreach ($groups as $group){
    		$content .= $group->guid;
    	}
    	return $content;*/
}
开发者ID:pingwangcs,项目名称:51zhaohu,代码行数:20,代码来源:functions.php

示例4: tp_get_tag_list

/**
 * get a list of people that can be tagged in an image
 *
 * @param $viewer entity
 * @return array of guid->name for tagging
 */
function tp_get_tag_list($viewer)
{
    $friends = get_user_friends($viewer->getGUID(), '', 999, 0);
    $friend_list = array();
    if ($friends) {
        foreach ($friends as $friend) {
            //error_log("friend $friend->name");
            $friend_list[$friend->guid] = $friend->name;
        }
    }
    // is this a group
    $is_group = tp_is_group_page();
    if ($is_group) {
        $group_guid = page_owner();
        $viewer_guid = $viewer->guid;
        $members = get_group_members($group_guid, 999);
        if (is_array($members)) {
            foreach ($members as $member) {
                if ($viewer_guid != $member->guid) {
                    $group_list[$member->guid] = $member->name;
                    //error_log("group $member->name");
                }
            }
            // combine group and friends list
            $intersect = array_intersect_key($friend_list, $group_list);
            $unique_friends = array_diff_key($friend_list, $group_list);
            $unique_members = array_diff_key($group_list, $friend_list);
            //$friend_list = array_merge($friend_list, $group_list);
            //$friend_list = array_unique($friend_list);
            $friend_list = $intersect + $unique_friends + $unique_members;
        }
    }
    asort($friend_list);
    return $friend_list;
}
开发者ID:rijojoy,项目名称:MyIceBerg,代码行数:41,代码来源:tidypics.php

示例5: pleio_api_format_group

function pleio_api_format_group(ElggGroup $group, $user_guid)
{
    $g = pleio_api_export($group, explode(",", "guid,owner_guid,site_guid,name,description"));
    $metadata = pleio_api_get_metadata($group->guid);
    if ($metadata["swordfish_group"]) {
        $g["swordfish"] = $metadata["swordfish_group"];
        $g["name"] .= " [SwordFish]";
    }
    $g["avatar"] = $metadata["icontime"] ? "1" : "0";
    $g["owner_name"] = get_entity($group->owner_guid)->name;
    $g["public"] = $group->membership == ACCESS_PUBLIC ? 1 : 0;
    $g["member"] = is_group_member($g["guid"], $user_guid) ? 1 : 0;
    $g["description"] = trim(strip_tags($g["description"]));
    $g["member_total"] = get_group_members($g["guid"], 0, 0, 0, true);
    $g["has_invitation"] = 0;
    $g["has_pending_membership_request"] = 0;
    if (!$g["member"]) {
        $g["has_invitation"] = check_entity_relationship($group->guid, 'invited', $user_guid) ? 1 : 0;
        $g["has_pending_membership_request"] = check_entity_relationship($user_guid, 'membership_request', $group->guid) ? 1 : 0;
    }
    return $g;
}
开发者ID:appstaat,项目名称:pleio_api,代码行数:22,代码来源:helpers.php

示例6: array

}
?>
           
            
          <tr>
            <td valign="top">
            
            
            <?php 
#$page_list = array();
if (!empty($page_list)) {
    echo "<table width='100%' border='0' cellspacing='0' cellpadding='5'>\r\r\n          \t<tr>\r\r\n\t\t\t<td class='listheader' width='1%'>&nbsp;</td>\r\r\n           \t<td class='listheader' nowrap>Group &nbsp;<a class='fancybox fancybox.ajax' href='" . base_url() . "user/load_staff_groups_form')' title='Click to add a user'><img src='" . base_url() . "images/add_item.png' border='0'/></a></td>\r\r\n\t\t\t<td class='listheader' nowrap>Comments</td>\r\r\n\t\t\t<td class='listheader' nowrap>Staff</td>\r\r\n\t\t\t<td class='listheader' nowrap>Date Added</td>\r\r\n\t\t\t</tr>";
    $counter = 0;
    foreach ($page_list as $row) {
        #Get number of users in each group
        $staff = get_group_members($this, $row['id']);
        #Show one row at a time
        echo "<tr id='listrow-" . $row['id'] . "' class='listrow' style='" . get_row_color($counter, 2) . "'>\r\r\n\t\t<td class='leftListCell rightListCell' valign='top' nowrap>";
        #if(check_user_access($this,'delete_deal')){
        echo "<a href='javascript:void(0)' onclick=\"asynchDelete('" . base_url() . "user/delete_staff_group/i/" . encryptValue($row['id']) . "', 'Are you sure you want to remove this staff group? \\nThis operation can not be undone. \\nClick OK to confirm, \\nCancel to cancel this operation and stay on this page.','listrow-" . $row['id'] . "');\" title=\"Click to remove this staff group.\"><img src='" . base_url() . "images/delete.png' border='0'/></a>";
        #}
        #if(check_user_access($this,'update_deals')){
        echo " &nbsp;&nbsp; <a class='fancybox fancybox.ajax' href='" . base_url() . "user/load_staff_groups_form/i/" . encryptValue($row['id']) . "' title=\"Click to edit this group's details.\"><img src='" . base_url() . "images/edit.png' border='0'/></a>";
        #}
        #if(check_user_access($this,'update_deals')){
        echo " &nbsp;&nbsp; <a class='fancybox fancybox.ajax' href='" . base_url() . "user/manage_staff_group_rights/i/" . encryptValue($row['id']) . "' title=\"Click to edit this group's rights.\"><img src='" . base_url() . "images/user_group_settings.png' border='0'/></a>";
        #}
        echo "</td>\t\t\r\r\n\t\t\t\t<td valign='top'>" . $row['groupname'] . "</td>\t\t\r\r\n\t\t\t\t<td valign='top'>" . substr($row['comments'], 0, 20) . "..</td>\r\r\n\t\t\t\t<td valign='top'>" . $staff->num_rows() . "</td>\r\r\n\t\t\t\t<td class='rightListCell' valign='top'>" . date("j M, Y", GetTimeStamp($row['dateadded'])) . "</td>\t\t\r\r\n\t\t\t</tr>";
        $counter++;
    }
    echo "<tr>\r\r\n\t\t<td colspan='5' align='right'  class='layer_table_pagination'>" . pagination($this->session->userdata('search_total_results'), $rows_per_page, $current_list_page, base_url() . "user/manage_staff_groups/p/%d", "user-groups-results") . "</td></tr></table>";
开发者ID:nwtug,项目名称:academia,代码行数:31,代码来源:manage_staff_groups_view.php

示例7: getFriendsOf

 /**
  * For compatibility with Friendable
  *
  * @param string $subtype The GUID of a user to check.
  * @param int    $limit   Limit
  * @param int    $offset  Offset
  *
  * @return bool
  * @deprecated 1.9 Use \ElggGroup::getMembers()
  */
 public function getFriendsOf($subtype = "", $limit = 10, $offset = 0)
 {
     elgg_deprecated_notice("\\ElggGroup::getFriendsOf() is deprecated. Use \\ElggGroup::getMembers()", 1.9);
     return get_group_members($this->getGUID(), $limit, $offset);
 }
开发者ID:sephiroth88,项目名称:Elgg,代码行数:15,代码来源:ElggGroup.php

示例8: elgg_view

 * @copyright Curverider Ltd 2008-2009
 * @link http://elgg.com/
 * 
 * @uses $vars['entity'] The user entity
 */
$icon = elgg_view("groups/icon", array('entity' => $vars['entity'], 'size' => 'small'));
//get the membership type
$membership = $vars['entity']->membership;
if ($membership == 2) {
    $mem = elgg_echo("groups:open");
} else {
    $mem = elgg_echo("groups:closed");
}
//for admins display the feature or unfeature option
if ($vars['entity']->featured_group == "yes") {
    $url = $vars['url'] . "action/groups/featured?group_guid=" . $vars['entity']->guid . "&action=unfeature";
    $wording = elgg_echo("groups:makeunfeatured");
} else {
    $url = $vars['url'] . "action/groups/featured?group_guid=" . $vars['entity']->guid . "&action=feature";
    $wording = elgg_echo("groups:makefeatured");
}
$info .= "<div class=\"groupdetails\"><p>" . $mem . " / <b>" . get_group_members($vars['entity']->guid, 10, 0, 0, true) . "</b> " . elgg_echo("groups:member") . "</p>";
//if admin, show make featured option
if (issuperadminloggedin()) {
    $info .= "<p><a href=\"{$url}\">{$wording}</a></p>";
}
$info .= "</div>";
$info .= "<p><b><a href=\"" . $vars['entity']->getUrl() . "\">" . $vars['entity']->name . "</a></b></p>";
$info .= "<p class=\"owner_timestamp\">" . $vars['entity']->briefdescription . "</p>";
// num users, last activity, owner etc
echo elgg_view_listing($icon, $info);
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:31,代码来源:grouplisting.php

示例9: getmyurl

        $main_smarty->assign('group_shared_display', $main_smarty->get_config_vars('PLIGG_Visual_Group_Is_Private'));
        $main_smarty->assign('group_upcoming_display', $main_smarty->get_config_vars('PLIGG_Visual_Group_Is_Private'));
        $main_smarty->assign('group_published_display', $main_smarty->get_config_vars('PLIGG_Visual_Group_Is_Private'));
        $main_smarty->assign('member_display', $main_smarty->get_config_vars('PLIGG_Visual_Group_Is_Private'));
    }
} else {
    $redirect = '';
    $redirect = getmyurl("groups");
    header("Location: {$redirect}");
    die;
}
//displaying group as story
if (isset($requestID)) {
    group_display($requestID);
}
$main_smarty->assign('get_group_members', get_group_members($requestID));
$view = sanitize(sanitize($_REQUEST["view"], 1), 3);
if ($view == '') {
    $view = 'published';
}
$main_smarty->assign('groupview', $view);
if ($view == 'upcoming') {
    $main_smarty->assign('URL_rss_page', getmyurl('rsspage', '', 'queued', $requestID));
} elseif ($view != 'members') {
    $main_smarty->assign('URL_rss_page', getmyurl('rsspage', '', $view, $requestID));
}
$main_smarty->assign('groupview_published', getmyurl('group_story2', $requestTitle, 'published', $requestID));
$main_smarty->assign('groupview_upcoming', getmyurl('group_story2', $requestTitle, 'upcoming', $requestID));
$main_smarty->assign('groupview_sharing', getmyurl('group_story2', $requestTitle, 'shared', $requestID));
$main_smarty->assign('groupview_members', getmyurl('group_story2', $requestTitle, 'members', $requestID));
$main_smarty->assign('group_edit_url', getmyurl('editgroup', $requestID));
开发者ID:pantofla,项目名称:waterfan,代码行数:31,代码来源:group_story.php

示例10: group_tools_menu_entity_handler

function group_tools_menu_entity_handler($hook, $type, $return_value, $params)
{
    $entity = $params["entity"];
    if (elgg_in_context("widgets_groups_show_members") && elgg_instanceof($entity, "group")) {
        // number of members
        $num_members = get_group_members($entity->guid, 10, 0, 0, true);
        $members_string = elgg_echo('groups:member');
        $options = array('name' => 'members', 'text' => $num_members . ' ' . $members_string, 'href' => false, 'priority' => 200);
        $return_value[] = ElggMenuItem::factory($options);
        return $return_value;
    }
}
开发者ID:remy40,项目名称:gvrs,代码行数:12,代码来源:hooks.php

示例11: header

    header("Location: signin.php");
    exit(0);
}
if (!isset($_GET['id'])) {
    // um
    header('Status: 404');
    die('missing id');
}
$db = connect_db();
if (!is_member($db, get_logged_in_user_id(), $_REQUEST['id'])) {
    header("Status: 403 Forbidden");
    exit("403 Forbidden");
}
$user_groups = get_user_groups($db, get_logged_in_user_id());
$group = get_group($db, $_GET['id']);
$members = get_group_members($db, $_GET['id']);
?>

<!DOCTYPE html>
<html>
  <head>
    <title> Members Editing | Study Group Finder </title>
    <script src="js/jquery-1.12.1.min.js" type="text/javascript"></script>
    <script>
        function reload(id){
            self.location="members_edit.php?id="+id;
        }
    </script>
    <?php 
include 'includes/_head.html';
?>
开发者ID:magical,项目名称:cs290-project,代码行数:31,代码来源:members_edit.php

示例12: main

/**
 * Update permissions according to what ECM says.
 */
function main()
{
    $url = ECM_URL . '/api/bindings/' . ECM_EXTERNAL_APP . '/groups';
    logln("Fetching data from {$url}...");
    $groups = fetch_ecm_data($url);
    logln("Fetched " . sizeof($groups) . " groups");
    foreach ($groups as $g) {
        $group_id = (int) $g['group'];
        logln("Updating group {$group_id}...");
        $new_members = $g['members'];
        $old_members = get_group_members($group_id);
        $members_to_remove = array_diff($old_members, $new_members);
        $members_to_add = array_diff($new_members, $old_members);
        update_group($group_id, $members_to_remove, $members_to_add);
    }
}
开发者ID:i5okie,项目名称:ecm,代码行数:19,代码来源:phpbb3_sync.php

示例13: event_calendar_add_personal_events_from_group

function event_calendar_add_personal_events_from_group($event_guid, $group_guid)
{
    $members = get_group_members($group_guid, 100000);
    foreach ($members as $member) {
        $member_id = $member->getGUID();
        event_calendar_add_personal_event($event_guid, $member_id);
    }
}
开发者ID:lionding2009,项目名称:Elgg-Event-Calendar,代码行数:8,代码来源:model.php

示例14: elgg_view

 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
 * @author Curverider Ltd
 * @copyright Curverider Ltd 2008-2010
 * @link http://elgg.com/
 *
 * @uses $vars['entity'] The user entity
 */
$icon = elgg_view("groups/icon", array('entity' => $vars['entity'], 'size' => 'tiny'));
//get the membership type
$membership = $vars['entity']->membership;
if ($membership == 2) {
    $mem = elgg_echo("groups:open");
} else {
    $mem = elgg_echo("groups:closed");
}
$info .= "<p class='entity_subtext groups'>" . $mem . " / <b>" . get_group_members($vars['entity']->guid, 10, 0, 0, true) . "</b> " . elgg_echo("groups:member");
//for admins only - display the feature or unfeature option
if (isadminloggedin()) {
    if ($vars['entity']->featured_group == "yes") {
        $url = elgg_add_action_tokens_to_url($vars['url'] . "action/groups/featured?group_guid=" . $vars['entity']->guid . "&action=unfeature");
        $wording = elgg_echo("groups:makeunfeatured");
    } else {
        $url = elgg_add_action_tokens_to_url($vars['url'] . "action/groups/featured?group_guid=" . $vars['entity']->guid . "&action=feature");
        $wording = elgg_echo("groups:makefeatured");
    }
    // display 'make featured' option
    $info .= "<br /><a href=\"{$url}\">{$wording}</a>";
}
$info .= "</p>";
$info .= "<p class='entity_title'><a href=\"" . $vars['entity']->getUrl() . "\">" . $vars['entity']->name . "</a></p>";
$info .= "<p class='entity_subtext'>" . $vars['entity']->briefdescription . "</p>";
开发者ID:adamboardman,项目名称:Elgg,代码行数:31,代码来源:grouplisting.php

示例15: print_comments

function print_comments($rec_id)
{
    $query = "SELECT concat(usr.ugr_FirstName,' ',usr.ugr_LastName) as Realname, cmt_Added, cmt_Text\n\t          FROM recThreadedComments\n\t\t\t  LEFT JOIN sysUGrps usr ON usr.ID = cmt_OwnerUgrpID\n\t          WHERE cmt_RecID = {$rec_id}\n\t          AND ! cmt_Deleted\n\t          ORDER BY cmt_Added";
    $res = mysql_query($query);
    if (mysql_num_rows($res) > 0) {
        print "<h3>Comments</h3>\n";
        while ($row = mysql_fetch_assoc($res)) {
            print "<p>" . $row["Realname"] . " - " . $row["cmt_Added"] . "</p>\n";
            print "<p>" . $row["cmt_Text"] . "</p>\n";
        }
    }
}
mysql_connection_select(DATABASE);
if ($groupID) {
    $gres = mysql_query("select grp.ugr_Name from sysUGrps grp where grp.ugr_ID = {$groupID}");
    $row = mysql_fetch_assoc($gres);
    $grp_name = $row["ugr_Name"];
    print "<h1>Blog report for group {$grp_name}</h1>\n";
    print_heading($date);
    $members = get_group_members($groupID);
    foreach ($members as $member) {
        print_blog_entries($member["id"], $member["firstname"] . " " . $member["lastname"], $date);
    }
} else {
    $ures = mysql_query("select concat(usr.ugr_FirstName,' ',usr.ugr_LastName) as Realname from sysUGrps usr usr where usr.ugr_ID = {$userID}");
    $row = mysql_fetch_assoc($ures);
    $usr_name = $row["Realname"];
    print "<h1>Blog report for user {$usr_name}</h1>\n";
    print_heading($date);
    print_blog_entries($userID, $usr_name, $date);
}
开发者ID:HeuristNetwork,项目名称:heurist,代码行数:31,代码来源:reportForUGrpBlog.php


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