'profile.php','name' => get_lang('SocialNetwork')); $interbreadcrumb[]= array ('url' =>'#','name' => get_lang('MyFiles')); $htmlHeadXtra[] = ''; $show_message = null; $usergroup = new UserGroup(); // easy links if (is_array($_GET) && count($_GET)>0) { foreach($_GET as $key => $value) { switch ($key) { case 'accept': $user_role = $usergroup->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))) { $usergroup->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 $usergroup->delete_user_rel_group(api_get_user_id(), $value); $show_message = get_lang('GroupInvitationWasDeny'); break 2; } } } $social_left_content = SocialManager::show_social_menu('myfiles'); $actions = null; if (isset($_GET['cidReq'])){ $actions = ''.Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('Documents').' ('.get_lang('Course').')').''; } $social_right_content = '
'; $social_right_content .= ''; $social_right_content .= '
'; $app['title'] = get_lang('Social'); $tpl = $app['template']; $tpl->assign('social_left_content', $social_left_content); $tpl->assign('social_right_content', $social_right_content); $tpl->assign('actions', $actions); $tpl->assign('message', $show_message); $social_layout = $tpl->get_template('layout/social_layout.tpl'); $tpl->display($social_layout);