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


PHP Invitation::get_accepted_invitations方法代码示例

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


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

示例1: render

 function render()
 {
     // invite status
     // if we have array of collection ids then find the invitation of each collection (group)
     if (is_array($this->collection_id_array) && count($this->collection_id_array) > 0) {
         $accepted = Invitation::get_accepted_invitations($_SESSION['user']['id'], '-1', $this->collection_id_array);
     } else {
         $accepted = Invitation::get_accepted_invitations($_SESSION['user']['id']);
     }
     $accepted_invitation = array();
     if (!empty($accepted)) {
         $i = 0;
         foreach ($accepted as $ac) {
             $inv_user = new User();
             $inv_user->load((int) $ac['inv_user_id']);
             $accepted_invitation[$i]['user_name'] = $inv_user->login_name;
             $accepted_invitation[$i]['first_name'] = $inv_user->first_name;
             $accepted_invitation[$i]['last_name'] = $inv_user->last_name;
             $accepted_invitation[$i]['picture'] = $inv_user->picture;
             $accepted_invitation[$i]['user_id'] = $inv_user->user_id;
             $i++;
         }
     }
     // if we have array of collection ids then find the invitation of each collection (group)
     if (is_array($this->collection_id_array) && count($this->collection_id_array) > 0) {
         $pending = Invitation::get_pending_invitations($_SESSION['user']['id'], '-1', $this->collection_id_array);
     } else {
         $pending = Invitation::get_pending_invitations($_SESSION['user']['id']);
     }
     $pending_invitation = array();
     if (!empty($pending)) {
         $i = 0;
         foreach ($pending as $pe) {
             $pending_invitation[$i]['user_email'] = $pe['inv_user_email'];
             $i++;
         }
     }
     $this->accepted_invitation = $accepted_invitation;
     $this->pending_invitation = $pending_invitation;
     $this->inner_HTML = $this->generate_inner_html();
     $content = parent::render();
     return $content;
 }
开发者ID:CivicCommons,项目名称:oldBellCaPA,代码行数:43,代码来源:InvitationStatusModule.php

示例2: count

 if (Group::is_admin((int) $group->collection_id, (int) $_SESSION['user']['id'])) {
     $is_admin = TRUE;
     if ($group->is_moderated || $group->reg_type == $group->REG_MODERATED) {
         $total_in_mod_queue = count($group->get_moderation_queue('content')) + count($group->get_moderation_queue('user'));
     }
     $invs = Invitation::get_all((int) $_SESSION['user']['id'], $group->collection_id);
     foreach ($invs as $i) {
         if ($i['status'] == 0) {
             $pending[] = $i['id'];
         } elseif ($i['status'] == 1) {
             $accepted[] = $i['id'];
         }
     }
 } else {
     $pending = Invitation::get_pending_invitations($group->collection_id, $_SESSION['user']['id']);
     $accepted = Invitation::get_accepted_invitations($group->collection_id, $_SESSION['user']['id']);
 }
 $members = count($group->get_members());
 //print_r($pending);exit;
 for ($i = 0; $i < count($accepted); $i++) {
     $inv = Invitation::load((string) $accepted[$i]);
     //print_r($inv);exit;
     $accepted_invitations[$i]['id'] = $accepted[$i];
     if ($inv->inv_username) {
         $accepted_invitations[$i]['user'] = '<a href="user.php?uid=' . $inv->inv_user_id . '">' . $inv->inv_username . '</a>';
     } else {
         $accepted_invitations[$i]['user'] = $inv->inv_user_first_name . ' ' . $inv->inv_user_last_name . ' Email: <a href="mailto:' . $inv->inv_email . '">' . $inv->inv_email . '</a>';
     }
     $accepted_invitations[$i]['sent_by'] = '<a href="user.php?uid=' . $inv->user_id . '">' . $inv->username . '</a>';
     $accepted_invitations[$i]['time'] = invitation_date($inv->inv_data['sent_on']);
 }
开发者ID:CivicCommons,项目名称:oldBellCaPA,代码行数:31,代码来源:groupinvite.php

示例3: User

    $my_page = FALSE;
}
if ($_SESSION['user']['id']) {
    $logged_in_id = $_SESSION['user']['id'];
} else {
    $logged_in_id = -1;
}
$user = new User();
try {
    $user->load((int) $uid);
} catch (PAException $e) {
    $msg = "Error occured in retreiving user information\n";
    $msg .= "<br><center><font color=\"red\">" . $e->message . "</font></center>";
    $error = TRUE;
}
$accepted = Invitation::get_accepted_invitations($_SESSION['user']['id']);
if (!empty($accepted)) {
    $i = 0;
    foreach ($accepted as $ac) {
        $user_info = User::get_user_data($ac['inv_user_email']);
        $accepted_invitation[$i]['user_name'] = $user_info['login_name'];
        $accepted_invitation[$i]['first_name'] = $user_info['first_name'];
        $accepted_invitation[$i]['last_name'] = $user_info['last_name'];
        $accepted_invitation[$i]['picture'] = $user_info['picture'];
        $accepted_invitation[$i]['user_id'] = $user_info['user_id'];
        $i++;
    }
}
$pending = Invitation::get_pending_invitations($_SESSION['user']['id']);
if (!empty($pending)) {
    $i = 0;
开发者ID:CivicCommons,项目名称:oldBellCaPA,代码行数:31,代码来源:invitation_status.php


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