*/ $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')); //jquery thickbox already called from main/inc/header.inc.php $htmlHeadXtra[] = ' '; api_block_anonymous_users(); Display :: display_header($tool_name, 'Groups'); // 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'); } elseif (in_array($user_role , array(GROUP_USER_PERMISSION_READER, GROUP_USER_PERMISSION_ADMIN, GROUP_USER_PERMISSION_MODERATOR))) { $show_message = get_lang('UserIsAlreadySubscribedToThisGroup'); } 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; } } } $language_variable = get_lang('PendingInvitations'); $language_comment = get_lang('SocialInvitesComment'); echo '
'; echo '
'; //this include the social menu div SocialManager::show_social_menu('invitations'); echo '
'; echo '
'; /////////////////// echo ''; ///////////7 echo '
'; echo '
'; ////////////7 echo ''; Display::display_footer(); ?>