当前位置: 首页>>代码示例>>PHP>>正文


PHP UserProfile::resolveUsername方法代码示例

本文整理汇总了PHP中UserProfile::resolveUsername方法的典型用法代码示例。如果您正苦于以下问题:PHP UserProfile::resolveUsername方法的具体用法?PHP UserProfile::resolveUsername怎么用?PHP UserProfile::resolveUsername使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UserProfile的用法示例。


在下文中一共展示了UserProfile::resolveUsername方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: approveuser

function approveuser(&$url)
{
    checkPerm('view');
    require_once $GLOBALS['where_framework'] . '/lib/lib.myfriends.php';
    require_once _base_ . '/lib/lib.table.php';
    $lang =& DoceboLanguage::createInstance('myfriends', 'lms');
    $acl_man =& Docebo::user()->getAclManager();
    $my_fr = new MyFriends(getLogUserId());
    if (isset($_GET['id_friend'])) {
        switch ($_GET['action']) {
            case "2":
                $my_fr->addFriend($_GET['id_friend'], MF_APPROVED, '');
                $my_fr->approveFriend($_GET['id_friend']);
                break;
            case "1":
                $my_fr->approveFriend($_GET['id_friend']);
                break;
            case "0":
                $my_fr->refuseFriend($_GET['id_friend']);
                break;
        }
    }
    $users_info = $my_fr->getPendentRequest();
    require_once _base_ . '/lib/lib.user_profile.php';
    $GLOBALS['page']->add(getTitleArea($lang->def('_MY_FRIENDS'), 'myfriends') . '<div class="std_block">', 'content');
    if (!is_array($users_info) || empty($users_info)) {
        Util::jump_to($url->getUrl());
    }
    while (list(, $ui) = each($users_info)) {
        $profile = new UserProfile($ui['id']);
        $profile->init('profile', 'framework', 'modname=myfriends&op=approveuser', 'ap');
        $GLOBALS['page']->add($profile->minimalUserInfo() . '<p class="mf_request">' . $ui['request'] . '</p>', 'content');
        // action line
        $GLOBALS['page']->add('<p class="mf_action_line">' . '<a href="' . $url->getUrl('op=approveuser&id_friend=' . $ui['id']) . '&action=1" ' . '	title="' . $lang->def('_TITLE_APPROVE_FRIEND') . ' : ' . $profile->resolveUsername() . '">"' . $lang->def('_APPROVE_FRIEND') . '"</a> , ' . '<a href="' . $url->getUrl('op=approveuser&id_friend=' . $ui['id']) . '&action=2" ' . '	title="' . $lang->def('_TITLE_APPROVE_FRIEND_ADD_MYLIST') . ' : ' . $profile->resolveUsername() . '">"' . $lang->def('_APPROVE_FRIEND_ADD_TO_MYLIST') . '"</a> , ' . '<a href="' . $url->getUrl('op=approveuser&id_friend=' . $ui['id']) . '&action=0" ' . '	title="' . $lang->def('_TITLE_REFUSE_FRIEND') . ' : ' . $profile->resolveUsername() . '">"' . $lang->def('_REFUSE_FRIEND') . '"</a>' . '</p>', 'content');
    }
    $GLOBALS['page']->add('</div>', 'content');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:37,代码来源:myfriends.php

示例2: dashcourse


//.........这里部分代码省略.........
            if ($ed_info['user_count'] != '' && $ed_info['date_end'] != '0000-00-00' || $ed_info['classrooms'] != '') {
                $html .= '<br />';
            }
            // number of subscription not limited
            /*if($ed_info['max_num_subscribe'] == 0) {
            
            				$html .= str_replace(	array('[user_count]', '[waiting_count]', ' su [max_user]'),
            										array($ed_info['user_count'], $ed_info['waiting'], ''),
            										$lang->def('_USER_EDITION_SUBSCRIBE') );
            			} else {
            
            				// limited number of subscription
            				$html .= str_replace(	array('[user_count]', '[max_subscribe]', '[waiting_count]'),
            										array($ed_info['user_count'], $ed_info['max_num_subscribe'], $ed_info['waiting']),
            										$lang->def('_USER_EDITION_SUBSCRIBE_WITH_MAX') );
            
            				if($ed_info['user_count'] >= $ed_info['max_num_subscribe'] && $ed_info['allow_overbooking'] == '1') {
            
            					// limited number of subscription reached
            					$html .= '<br/>'.$lang->def('_CAN_JOIN_WAITING_LIST');
            				}
            			}
            			if($ed_info['min_num_subscribe'] != 0) {
            				$html .= '<br/>'.str_replace('[min_subscribe]', $cinfo['min_num_subscribe'], $lang->def('_MIN_SUBSCRIBE_FOR_EDITION'));
            			}
            			$html .= '</p>';*/
            // theacher list ----------------------------------------------------------
            if (Get::sett('use_social_courselist') == 'on') {
                if (isset($ed_info['theacher_list']) && is_array($ed_info['theacher_list']) && !empty($ed_info['theacher_list'])) {
                    $html .= '<h3 class="course_teacher_list">' . $lang->def('_THEACER_LIST') . '</h3>' . '<ul class="course_teacher_list">';
                    while (list(, $id_teach) = each($ed_info['theacher_list'])) {
                        $profile = new UserProfile($id_teach);
                        $profile->init('profile', 'framework', '', 'ap');
                        $html .= '<li class="the_course">' . '<a href="' . $url->getUrl('op=showprofile&id_course=' . $cinfo['idCourse'] . '&id_user=' . $id_teach) . '">' . $profile->getUserPhotoOrAvatar('micro') . ' ' . $profile->resolveUsername() . '</a></li>';
                    }
                    $html .= '</ul>';
                }
            }
            $html .= '</li>';
        }
        $html .= '</ul>';
        $html .= '<script type="text/javascript">
			YAHOO.util.Dom.get(\'course_edition_' . $cinfo['idCourse'] . '\').style.display = \'none\';
			YAHOO.util.Dom.get(\'course_edition_' . $cinfo['idCourse'] . '_close\').style.display = \'none\';
		</script>';
    } elseif (Get::sett('use_social_courselist') == 'on') {
        // theacher list ----------------------------------------------------------
        if (isset($cinfo['theacher_list']) && is_array($cinfo['theacher_list']) && !empty($cinfo['theacher_list'])) {
            $html .= '<h3 class="course_teacher_list">' . $lang->def('_THEACER_LIST') . '</h3>' . '<ul class="course_teacher_list">';
            while (list(, $id_teach) = each($cinfo['theacher_list'])) {
                $profile = new UserProfile($id_teach);
                $profile->init('profile', 'framework', '', 'ap');
                $html .= '<li>' . '<a href="' . $url->getUrl('op=showprofile&id_course=' . $cinfo['idCourse'] . '&id_user=' . $id_teach) . '">' . $profile->getUserPhotoOrAvatar('micro') . ' ' . $profile->resolveUsername() . '</a></li>';
            }
            $html .= '</ul>';
        }
    }
    // course related extra option ---------------------------------------------
    if (Get::sett('use_social_courselist') == 'on' || !empty($there_material) || $cinfo['course_demo'] != '') {
        $html .= '<ul class="course_related_actions">';
        if (Get::sett('use_social_courselist') == 'on') {
            $html .= '<li class="course_comment">' . '<a href="javascript:;" onclick="openComment(\'' . $cinfo['idCourse'] . '\'); return false;">' . '<span>' . $lang->def('_COMMENTS') . ' (' . (isset($cinfo['comment_count']) ? $cinfo['comment_count'] : '0') . ')</span></a></li>';
        }
        // the course material -----------------------------------------------------------------
        if (!empty($there_material)) {
            if (count($there_material) == 1) {
开发者ID:abhinay100,项目名称:forma_app,代码行数:67,代码来源:lib.coursecatalogue.php


注:本文中的UserProfile::resolveUsername方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。