本文整理汇总了PHP中Invitation::get_pending_invitations方法的典型用法代码示例。如果您正苦于以下问题:PHP Invitation::get_pending_invitations方法的具体用法?PHP Invitation::get_pending_invitations怎么用?PHP Invitation::get_pending_invitations使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Invitation
的用法示例。
在下文中一共展示了Invitation::get_pending_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;
}
示例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']);
示例3: foreach
$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;
foreach ($pending as $pe) {
$pending_invitation[$i]['user_email'] = $pe['inv_user_email'];
$i++;
}
}
if (isset($_POST['submit'])) {
}
$login_name = $user->login_name;
$first_name = $user->first_name;
$last_name = $user->last_name;
$email = $user->email;
$user_picture = $user->picture;
if ($user->picture) {