本文整理汇总了PHP中SocialManager::get_list_invitation_of_friends_by_user_id方法的典型用法代码示例。如果您正苦于以下问题:PHP SocialManager::get_list_invitation_of_friends_by_user_id方法的具体用法?PHP SocialManager::get_list_invitation_of_friends_by_user_id怎么用?PHP SocialManager::get_list_invitation_of_friends_by_user_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SocialManager
的用法示例。
在下文中一共展示了SocialManager::get_list_invitation_of_friends_by_user_id方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_lang
$user_feeds = SocialManager::get_user_feeds($user_id);
if (!empty($user_feeds)) {
$social_rss_block = Display::panel($user_feeds, get_lang('RSSFeeds'));
}
// Productions
$production_list = UserManager::build_production_list($user_id);
// Images uploaded by course
$file_list = '';
if (is_array($course_list_code) && count($course_list_code) > 0) {
foreach ($course_list_code as $course) {
$file_list .= UserManager::get_user_upload_files_by_course($user_id, $course['code'], $resourcetype = 'images');
}
}
$count_pending_invitations = 0;
if (!isset($_GET['u']) || isset($_GET['u']) && $_GET['u'] == api_get_user_id()) {
$pending_invitations = SocialManager::get_list_invitation_of_friends_by_user_id(api_get_user_id());
$list_get_path_web = SocialManager::get_list_web_path_user_invitation_by_user_id(api_get_user_id());
$count_pending_invitations = count($pending_invitations);
}
if (!empty($production_list) || !empty($file_list) || $count_pending_invitations > 0) {
//Pending invitations
if (!isset($_GET['u']) || isset($_GET['u']) && $_GET['u'] == api_get_user_id()) {
if ($count_pending_invitations > 0) {
$invitations = '<div><h3>' . get_lang('PendingInvitations') . '</h3></div>';
for ($i = 0; $i < $count_pending_invitations; $i++) {
$user_invitation_id = $pending_invitations[$i]['user_sender_id'];
$invitations .= '<div id="dpending_' . $user_invitation_id . '" class="friend_invitations">';
$invitations .= '<div style="float:left;width:60px;" >';
$invitations .= '<img style="margin-bottom:5px;"' . ' src="' . $list_get_path_web[$i]['dir'] . '/' . $list_get_path_web[$i]['file'] . '"' . ' width="60px">';
$invitations .= '</div>';
$invitations .= '<div style="padding-left:70px;">';
示例2: api_get_user_id
} else {
$show_message = Display::return_message(get_lang('UserIsNotSubscribedToThisGroup'), 'warning');
}
break 2;
case 'deny':
// delete invitation
$usergroup->delete_user_rel_group(api_get_user_id(), $value);
$show_message = Display::return_message(get_lang('GroupInvitationWasDeny'));
break 2;
}
}
}
$social_left_content = SocialManager::show_social_menu('invitations');
$social_right_content = '<div id="id_response" align="center"></div>';
$user_id = api_get_user_id();
$list_get_invitation = SocialManager::get_list_invitation_of_friends_by_user_id($user_id);
$list_get_invitation_sent = SocialManager::get_list_invitation_sent_by_user_id($user_id);
$pending_invitations = $usergroup->get_groups_by_user($user_id, GROUP_USER_PERMISSION_PENDING_INVITATION);
$number_loop = count($list_get_invitation);
$total_invitations = $number_loop + count($list_get_invitation_sent) + count($pending_invitations);
if ($total_invitations == 0 && count($_GET) <= 0) {
$social_right_content .= '<div class="span8"><a class="btn" href="search.php">' . get_lang('TryAndFindSomeFriends') . '</a></div>';
}
if ($number_loop != 0) {
$social_right_content .= '<div class="span8">' . Display::page_subheader(get_lang('InvitationReceived')) . '</div>';
foreach ($list_get_invitation as $invitation) {
$sender_user_id = $invitation['user_sender_id'];
$userInfo = api_get_user_info($sender_user_id);
$social_right_content .= '<div id="id_' . $sender_user_id . '" class="invitation_confirm span8">';
$picture = UserManager::get_user_picture_path_by_id($sender_user_id, 'web', false, true);
$friends_profile = SocialManager::get_picture_user($sender_user_id, $picture['file'], 92);