Exemplo n.º 1
0
function profile()
{
    checkPerm('view');
    require_once $GLOBALS['where_lms'] . '/lib/lib.lms_user_profile.php';
    $lang =& DoceboLanguage::createInstance('profile', 'framework');
    $profile = new LmsUserProfile(getLogUserId());
    $profile->init('profile', 'framework', 'modname=profile&op=profile&id_user='******'ap');
    if (checkPerm('mod', true)) {
        $profile->enableEditMode();
    }
    if (Get::sett('profile_only_pwd') == 'on') {
        $GLOBALS['page']->add($profile->getTitleArea() . $profile->getHead() . $profile->performAction(false, 'mod_password') . profileBackUrl() . $profile->getFooter(), 'content');
    } else {
        $GLOBALS['page']->add($profile->getTitleArea() . $profile->getHead() . $profile->performAction() . profileBackUrl() . $profile->getFooter(), 'content');
    }
}
Exemplo n.º 2
0
function showprofile()
{
    require_once $GLOBALS['where_lms'] . '/lib/lib.course.php';
    require_once $GLOBALS['where_lms'] . '/lib/lib.lms_user_profile.php';
    $lang =& DoceboLanguage::createInstance('catalogue');
    $lang =& DoceboLanguage::createInstance('course');
    $id_user = importVar('id_user');
    $id_course = importVar('id_course');
    $man_course = new Man_Course();
    $course = $man_course->getCourseInfo($id_course);
    $profile = new LmsUserProfile($id_user);
    $profile->init('profile', 'framework', 'modname=login&op=showprofile&id_course' . $id_course . '&id_user='******'ap');
    $GLOBALS['page']->add(getTitleArea($lang->def('_NAME', 'catalogue'), 'catalogue') . '<div class="std_block">' . getBackUi('index.php?modname=login&amp;op=courselist&amp;id_parent=' . $course['idCategory'], $lang->def('_BACK')), 'content');
    $GLOBALS['page']->add('<p class="category_path">' . '<b>' . $lang->def('_CATEGORY_PATH') . ' :</b> ' . $man_course->getCategoryPath($course['idCategory'], $lang->def('_MAIN_CATEGORY'), $lang->def('_TITLE_CATEGORY_JUMP'), 'index.php?modname=login&amp;op=courselist', 'id_parent') . ' &gt; ' . $course['name'] . '</p>' . $profile->getProfile(getLogUserId()) . '</div>', 'content');
}
Exemplo n.º 3
0
 function addSubscription()
 {
     checkPerm('view');
     require_once _base_ . '/lib/lib.form.php';
     $action = importVar('action', true, 0);
     $id_event = importVar('id_event', true, 0);
     $lang =& DoceboLanguage::createInstance('reservation');
     $out = $GLOBALS['page'];
     $out->setWorkingZone('content');
     $man_res = new Man_Reservation();
     if (isset($_POST['save_profile'])) {
         $confirm = importVar('confirm', true, 0);
         if ($confirm) {
             require_once $GLOBALS['where_lms'] . '/lib/lib.lms_user_profile.php';
             $out->add(getTitleArea('_RESERVATION_PROFILE_MODIFY') . '<div class="std_block">', 'content');
             $profile = new LmsUserProfile(getLogUserId(), true);
             $profile->init('subscription', 'lms', 'modname=reservation&op=add_subscription&id_event=' . $id_event . '&confirm=1&from=2&id_user='******'ap');
             $out->add($profile->getTitleArea() . $profile->getHead() . $profile->performAction() . $profile->getFooter() . '</div>', 'content');
         }
     } elseif (isset($_GET['confirm'])) {
         $confirm = importVar('confirm', true, 0);
         if ($confirm) {
             require_once $GLOBALS['where_lms'] . '/lib/lib.lms_user_profile.php';
             $out->add(getTitleArea($lang->def('_RESERVATION_PROFILE_MODIFY')) . '<div class="std_block">', 'content');
             $out->add($lang->def('_CONFIRM_DATA') . '<br/>');
             $profile = new LmsUserProfile(getLogUserId(), true);
             $profile->init('subscription', 'lms', 'modname=reservation&op=add_subscription&id_event=' . $id_event . '&confirm=1&from=2&id_user='******'ap');
             //$profile->enableEditMode();
             $out->add($profile->getTitleArea() . $profile->getHead() . $profile->performAction() . $profile->getFooter() . '</div>', 'content');
         }
     } else {
         $event_info = $man_res->getEventInfo($id_event);
         $out->add(getTitleArea($lang->def('_ADD_SUBSCRIPTION_TITLE'), '', $lang->def('_EVENT')) . '<div class="std_block">' . getModifyUi($lang->def('_AREYOUSURE_ADD_SUBSCRIPTION'), $event_info[EVENT_TITLE], true, 'index.php?modname=reservation&amp;op=add_subscription&amp;id_event=' . $id_event . '&amp;confirm=1&amp;ap=mod_profile&amp;from=2', 'index.php?modname=reservation&amp;op=reservation') . '</div>', 'content');
     }
 }
Exemplo n.º 4
0
 public function show()
 {
     if (!defined("LMS")) {
         checkRole('/lms/course/public/profile/view', false);
     } else {
         checkPerm('view', false, 'profile', 'lms');
     }
     require_once _lms_ . '/lib/lib.lms_user_profile.php';
     $id_user = Docebo::user()->getIdST();
     $profile = new LmsUserProfile($id_user);
     $profile->init('profile', 'framework', 'r=lms/profile/show', 'ap');
     //'modname=profile&op=profile&id_user='******'/lms/course/public/profile/mod', true);
     } else {
         $_check = checkPerm('mod', true, 'profile', 'lms');
     }
     if ($_check) {
         $profile->enableEditMode();
     }
     //view part
     if (Get::sett('profile_only_pwd') == 'on') {
         echo $profile->getTitleArea();
         echo $profile->getHead();
         echo $profile->performAction(false, 'mod_password');
         echo $this->_profileBackUrl();
         echo $profile->getFooter();
     } else {
         echo $profile->getTitleArea();
         echo $profile->getHead();
         echo $profile->performAction();
         echo $this->_profileBackUrl();
         echo $profile->getFooter();
     }
 }
Exemplo n.º 5
0
function viewprofile()
{
    checkPerm('view');
    require_once _base_ . '/lib/lib.usermanager.php';
    $lang =& DoceboLanguage::createInstance('forum');
    $id_message = importVar('idMessage');
    $ini = importVar('ini', true, 1);
    $idThread = importVar('idThread', true, 1);
    list($id_thread, $idst_user) = sql_fetch_row(sql_query("\r\n\tSELECT idThread, author\r\n\tFROM " . $GLOBALS['prefix_lms'] . "_forummessage\r\n\tWHERE idMessage = '" . $id_message . "'"));
    require_once $GLOBALS['where_lms'] . '/lib/lib.lms_user_profile.php';
    $lang =& DoceboLanguage::createInstance('profile', 'framework');
    $profile = new LmsUserProfile($idst_user);
    $profile->init('profile', 'framework', 'modname=forum&op=viewprofile&idMessage=' . $id_message . '&ini=' . $ini, 'ap');
    $GLOBALS['page']->add($profile->getTitleArea() . $profile->getHead() . forumBackUrl() . $profile->performAction() . $profile->getFooter(), 'content');
}
Exemplo n.º 6
0
 function viewprofile()
 {
     checkPerm('view_info');
     $lang =& DoceboLanguage::createInstance('course');
     require_once $GLOBALS['where_lms'] . '/lib/lib.lms_user_profile.php';
     $profile = new LmsUserProfile(importVar('id_user', true, 0));
     $profile->init('profile', 'framework', 'modname=course&op=profile&infocourse', 'ap');
     $GLOBALS['page']->add(getTitleArea(array('index.php?modname=course&amp;op=infocourse' => $lang->def('_INFO') . ': ' . $GLOBALS['course_descriptor']->getValue('name'), $profile->resolveUsername()), 'infocourse') . '<div class="std_block">' . $profile->performAction() . getBackUi('index.php?modname=course&amp;op=infocourse', $lang->def('_BACK')) . '</div>', 'content');
 }