*/ $language_file = array('messages','userInfo'); $cidReset=true; require '../inc/global.inc.php'; require_once api_get_path(LIBRARY_PATH).'image.lib.php'; require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php'; require_once api_get_path(LIBRARY_PATH).'social.lib.php'; require_once api_get_path(LIBRARY_PATH).'group_portal_manager.lib.php'; $this_section = SECTION_SOCIAL; $interbreadcrumb[]= array ('url' =>'profile.php','name' => get_lang('Social')); $interbreadcrumb[]= array ('url' =>'#','name' => get_lang('Invitations')); $htmlHeadXtra[] = ''; //jQuery $htmlHeadXtra[] = ''; $htmlHeadXtra[] = ''; $htmlHeadXtra[] = ' '; api_block_anonymous_users(); Display :: display_header($tool_name, 'Groups'); SocialManager::show_social_menu(); echo '
'; echo get_lang('Invitations'); echo '
'; // easy links if (is_array($_GET) && count($_GET)>0) { foreach($_GET as $key => $value) { switch ($key) { case 'accept': $user_role = GroupPortalManager::get_user_group_role(api_get_user_id(), $value); if (in_array($user_role , array(GROUP_USER_PERMISSION_PENDING_INVITATION_SENT_BY_USER,GROUP_USER_PERMISSION_PENDING_INVITATION))) { GroupPortalManager::update_user_role(api_get_user_id(), $value, GROUP_USER_PERMISSION_READER); $show_message = get_lang('UserIsSubscribedToThisGroup'); } else { $show_message = get_lang('UserIsNotSubscribedToThisGroup'); } break 2; case 'deny': // delete invitation GroupPortalManager::delete_user_rel_group(api_get_user_id(), $value); $show_message = get_lang('GroupInvitationWasDeny'); break 2; } } } if (! empty($show_message)){ Display :: display_normal_message($show_message); } $language_variable = get_lang('PendingInvitations'); $language_comment = get_lang('SocialInvitesComment'); //api_display_tool_title($language_variable); ?>
.invitation_confirm { border-top:1px solid #D8DFEA; } .invitation_image { width:110px; } '; if ($number_loop != 0) { echo '

'.get_lang('InvitationReceived').'

'; foreach ($list_get_invitation as $invitation) { $sender_user_id = $invitation['user_sender_id'] ?>
/>
'; if (count($list_get_invitation_sent) > 0 ){ echo '

'.get_lang('InvitationSent').'

'; foreach ($list_get_invitation_sent as $invitation) { $sender_user_id = $invitation['user_receiver_id'];?>
/>
0) { echo '

'.get_lang('GroupsWaitingApproval').'

'; $new_invitation = array(); foreach ($pending_invitations as $invitation) { $invitation['picture_uri'] = ''.$invitation['picture_uri'].''; $invitation['name'] = ''.$invitation['name'].''; $invitation['join'] = ''.get_lang('AcceptInvitation').''; $invitation['deny'] = ''.get_lang('DenyInvitation').''; //$invitation['send_message'] = ''; //$invitation['send_message'] .= Display::return_icon('message_new.png').'  '.get_lang('SendMessage').''; $new_invitation[]=$invitation; } Display::display_sortable_grid('search_users', array(), $new_invitation, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, true, true,false,false,true,true,true,true)); } Display::display_footer(); ?>