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


PHP getLogUserId函数代码示例

本文整理汇总了PHP中getLogUserId函数的典型用法代码示例。如果您正苦于以下问题:PHP getLogUserId函数的具体用法?PHP getLogUserId怎么用?PHP getLogUserId使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: presenceTask

 public function presenceTask()
 {
     require_once _base_ . '/lib/lib.form.php';
     YuiLib::load();
     $user_date = $this->model->getUserDateForCourse(getLogUserId(), $_SESSION['idCourse']);
     $date_info = $this->model->getDateInfoForPublicPresence($user_date);
     if ($this->id_date == 0) {
         $this->id_date = isset($date_info[0]['id_date']) ? $date_info[0]['id_date'] : 0;
     }
     $this->model->setIdDate($this->id_date);
     if (isset($_POST['save'])) {
         $this->model->savePresence();
     }
     foreach ($date_info as $info_date) {
         $date_for_dropdown[$info_date['id_date']] = $info_date['code'] . ' - ' . $info_date['name'] . ' (' . Format::date($info_date['date_begin'], 'date') . ')';
     }
     if ($this->id_date == 0) {
         $this->render('presence_empty', array());
     } else {
         $params = array();
         $params['model'] = $this->model;
         $params['dropdown'] = $date_for_dropdown;
         $params['tb'] = $this->model->getPresenceTable();
         $params['test_type'] = $this->model->getTestType();
         $params['date_for_dropdown'] = $date_for_dropdown;
         $this->render('presence', $params);
     }
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:28,代码来源:PresenceLmsController.php

示例2: deleteMessage

 public function deleteMessage($id)
 {
     require_once _adm_ . '/lib/lib.message.php';
     $del_query = "UPDATE %adm_message_user SET deleted = '" . _OPERATION_SUCCESSFUL . "' WHERE idUser='" . getLogUserId() . "' AND idMessage = '" . (int) $id . "'";
     if (!$this->db->query($del_query)) {
         return false;
     }
     $query = "SELECT idMessage FROM %adm_message_user WHERE idMessage = '" . (int) $id . "'";
     $res = $this->db->query($query);
     if ($res && $this->db->num_rows($res) > 0) {
         $query = "SELECT attach FROM %adm_message WHERE idMessage = '" . (int) $id . "'";
         $res = $this->db->query($query);
         list($attach) = $this->db->fetch_row($res);
         if ($attach != '') {
             if (!$this->deleteAttachment($attach)) {
                 return false;
             }
         }
         if (!$this->db->query("DELETE FROM %adm_message_user WHERE idMessage = '" . (int) $id . "'")) {
             return false;
         }
         if (!$this->db->query("DELETE FROM %adm_message WHERE idMessage = '" . (int) $id . "'")) {
             return false;
         }
     }
     return true;
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:27,代码来源:MessageLms.php

示例3: lmsLoginOperation

function lmsLoginOperation()
{
    require_once $GLOBALS['where_lms'] . '/lib/lib.subscribe.php';
    require_once $GLOBALS['where_lms'] . '/lib/lib.preassessment.php';
    $pa_man = new AssessmentList();
    $user_course_as_assessment = $pa_man->getUserAssessmentSubsription(Docebo::user()->getArrSt());
    if (is_array($user_course_as_assessment)) {
        $subs_man = new CourseSubscribe_Management();
        $subs_man->multipleUserSubscribe(getLogUserId(), $user_course_as_assessment['course_list'], $user_course_as_assessment['level_number']);
    }
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:11,代码来源:lib.commonoperations.php

示例4: insfaqcat

 function insfaqcat()
 {
     checkPerm('view', false, 'storage');
     $back_url = urldecode($_POST['back_url']);
     $query_ins = "\r\n\tINSERT INTO " . $GLOBALS['prefix_lms'] . "_faq_cat\r\n\tSET title = '" . (trim($_POST['title']) == '' ? Lang::t('_NOTITLE', 'faq', 'lms') : $_POST['title']) . "',\r\n\t\tdescription = '" . $_POST['description'] . "',\r\n\t\tauthor = '" . (int) getLogUserId() . "'";
     if (!sql_query($query_ins)) {
         $_SESSION['last_error'] = Lang::t('_OPERATION_FAILURECAT', 'faq', 'lms');
         Util::jump_to($back_url . '&create_result=0');
     }
     list($idFaq) = sql_fetch_row(sql_query("SELECT LAST_INSERT_ID()"));
     Util::jump_to($back_url . '&id_lo=' . $idFaq . '&create_result=1');
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:12,代码来源:faq.php

示例5: inslinkcat

 function inslinkcat()
 {
     checkPerm('view', false, 'storage');
     $lang =& DoceboLanguage::createInstance('link');
     $back_url = urldecode($_POST['back_url']);
     $query_ins = "\r\n\tINSERT INTO " . $GLOBALS['prefix_lms'] . "_link_cat\r\n\tSET title = '" . (trim($_POST['title']) == '' ? $lang->def('_NOTITLE') : $_POST['title']) . "',\r\n\t\tdescription = '" . $_POST['description'] . "',\r\n\t\tauthor = '" . (int) getLogUserId() . "'";
     if (!sql_query($query_ins)) {
         $_SESSION['last_error'] = $lang->def('_OPERATION_FAILURE');
         Util::jump_to('' . $back_url . '&create_result=0');
     }
     list($idLink) = sql_fetch_row(sql_query("SELECT LAST_INSERT_ID()"));
     Util::jump_to('' . $back_url . '&id_lo=' . $idLink . '&create_result=1');
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:13,代码来源:link.php

示例6: play

    function play($object_link, $id_param)
    {
        //-kb-play-// if(!checkPerm('view', true, 'organization') && !checkPerm('view', true, 'storage')) die("You can't access");
        $lang =& DoceboLanguage::createInstance('link');
        $idCategory = $object_link->getId();
        $mode = importVar('mode', false, 'link');
        $back_coded = htmlentities(urlencode($object_link->back_url));
        require_once $GLOBALS['where_lms'] . '/lib/lib.param.php';
        $idReference = getLOParam($id_param, 'idReference');
        // NOTE: Track only if $idReference is present
        if ($idReference !== FALSE) {
            require_once $GLOBALS['where_lms'] . '/class.module/track.link.php';
            list($exist, $idTrack) = Track_Link::getIdTrack($idReference, getLogUserId(), $idCategory, TRUE);
            if ($exist) {
                $ti = new Track_Link($idTrack);
                $ti->setDate(date('Y-m-d H:i:s'));
                $ti->status = 'completed';
                $ti->update();
            } else {
                $ti = new Track_Link(false);
                $ti->createTrack($idReference, $idTrack, getLogUserId(), date('Y-m-d H:i:s'), 'completed', 'link');
            }
        }
        list($title) = sql_fetch_row(sql_query("\r\n\tSELECT title \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_link_cat \r\n\tWHERE idCategory = '" . (int) $idCategory . "'"));
        $link = 'index.php?modname=link&op=play&idCategory=' . $idCategory . '&id_param=' . $id_param . '&back_url=' . $back_coded;
        /*$GLOBALS['page']->add('<div id="top" class="std_block">'
        		.'<div class="colum_container">' */
        cout('<div id="top" class="yui-navset yui-navset-top tab_block">
		<ul class="yui-nav">
			<li class="first' . ($mode != 'keyw' ? ' selected' : '') . '">
				<a href="' . $link . '&amp;mode=list">
					<em>' . Lang::t('_SWITCH_TO_LIST', 'link') . '</em>
				</a>
			</li>
			<li' . ($mode == 'keyw' ? ' class="selected"' : '') . '>
				<a href="' . $link . '&amp;mode=keyw">
					<em>' . Lang::t('_SWITCH_TO_KEYWORD', 'link') . '</em>
				</a>
			</li>
		</ul>
		<div class="yui-content">', 'content');
        cout(getBackUi(Util::str_replace_once('&', '&amp;', $object_link->back_url), $lang->def('_BACK')), 'content');
        $GLOBALS['page']->add('<b>' . $lang->def('_TITLE') . ' : ' . $title . '</b><br /><br />' . $lang->def('_LINKIUNNEWWINDOW') . '<br /><br />', 'content');
        if ($mode == 'keyw') {
            displayAsKey($idCategory, $link . '&amp;mode=keyw');
        } else {
            displayAsList($idCategory);
        }
        $GLOBALS['page']->add('<div class="align_center">' . '<a href="#top"><img src="' . getPathImage() . 'standard/up.png" title="' . $lang->def('_BACKTOTOP') . '" />' . $lang->def('_BACKTOTOP') . '</a>' . getBackUi(Util::str_replace_once('&', '&amp;', $object_link->back_url), $lang->def('_BACK')) . '</div>', 'content');
        cout('</div></div>', 'content');
    }
开发者ID:abhinay100,项目名称:forma_app,代码行数:51,代码来源:do.link.php

示例7: insglossary

 function insglossary()
 {
     checkPerm('view', false, 'storage');
     if ($_POST['title'] == "") {
         $_POST['title'] = Lang::t('_NOTITLE', 'glossary');
     }
     $queryIns = "\r\n\tINSERT INTO " . $GLOBALS['prefix_lms'] . "_glossary \r\n\tSET title = '" . $_POST['title'] . "',\r\n\t\tdescription = '" . $_POST['description'] . "',\r\n\t\tauthor = '" . (int) getLogUserId() . "'";
     if (!sql_query($queryIns)) {
         $_SESSION['last_error'] = Lang::t('_OPERATION_FAILURE', 'glossary');
         Util::jump_to(urldecode($_POST['back_url']) . '&create_result=0');
     }
     list($id) = sql_fetch_row(sql_query("SELECT LAST_INSERT_ID()"));
     Util::jump_to(urldecode($_POST['back_url']) . '&id_lo=' . $id . '&create_result=1');
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:14,代码来源:glossary.php

示例8: profile

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=' . getLogUserId(), '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');
    }
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:16,代码来源:profile.php

示例9: instest

function instest()
{
    checkPerm('view', false, 'storage');
    $lang =& DoceboLanguage::createInstance('test');
    if (trim($_POST['title']) == '') {
        $_POST['title'] = $lang->def('_NOTITLE');
    }
    $ins_query = "\r\n\tINSERT INTO " . $GLOBALS['prefix_lms'] . "_test \r\n\t( author, title, description )\r\n\t\tVALUES \r\n\t( '" . (int) getLogUserId() . "', '" . $_POST['title'] . "', '" . $_POST['textof'] . "' )";
    if (!sql_query($ins_query)) {
        $_SESSION['last_error'] = $lang->def('_OPERATION_FAILURE');
        Util::jump_to('' . urldecode($_POST['back_url']) . '&create_result=0');
    }
    list($id_test) = sql_fetch_row(sql_query("SELECT LAST_INSERT_ID()"));
    if ($id_test > 0) {
        Util::jump_to('' . urldecode($_POST['back_url']) . '&id_lo=' . $id_test . '&create_result=1');
    } else {
        Util::jump_to('' . urldecode($_POST['back_url']) . '&create_result=0');
    }
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:19,代码来源:test.php

示例10: play

function play($idResource, $idParams, $back_url)
{
    //if(!checkPerm('view', true, 'organization') && !checkPerm('view', true, 'storage')) die("You can't access");
    //echo ("idResource = ".$idResource."; idParams = ".$idParams."; back_url = ".$back_url);
    list($file) = sql_fetch_row(sql_query("SELECT path" . " FROM " . $GLOBALS['prefix_lms'] . "_materials_lesson" . " WHERE idLesson = '" . $idResource . "'"));
    //recognize mime type
    $expFileName = explode('.', $file);
    $totPart = count($expFileName) - 1;
    require_once $GLOBALS['where_lms'] . '/lib/lib.param.php';
    $idReference = getLOParam($idParams, 'idReference');
    // NOTE: Track only if $idReference is present
    if ($idReference !== FALSE) {
        require_once $GLOBALS['where_lms'] . '/class.module/track.item.php';
        list($exist, $idTrack) = Track_Item::getIdTrack($idReference, getLogUserId(), $idResource, TRUE);
        if ($exist) {
            $ti = new Track_Item($idTrack);
            $ti->setDate(date('Y-m-d H:i:s'));
            $ti->status = 'completed';
            $ti->update();
        } else {
            $ti = new Track_Item(false);
            $ti->createTrack($idReference, $idTrack, getLogUserId(), date('Y-m-d H:i:s'), 'completed', 'item');
        }
    }
    if ($_SESSION['direct_play'] == 1) {
        if (isset($_SESSION['idCourse'])) {
            TrackUser::closeSessionCourseTrack();
            unset($_SESSION['idCourse']);
            unset($_SESSION['idEdition']);
        }
        if (isset($_SESSION['test_assessment'])) {
            unset($_SESSION['test_assessment']);
        }
        if (isset($_SESSION['cp_assessment_effect'])) {
            unset($_SESSION['cp_assessment_effect']);
        }
        $_SESSION['current_main_menu'] = '1';
        $_SESSION['sel_module_id'] = '1';
        $_SESSION['is_ghost'] = false;
    }
    //send file
    sendFile('/appLms/' . Get::sett('pathlesson'), $file, $expFileName[$totPart]);
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:43,代码来源:do.item.php

示例11: mycompetences

function mycompetences(&$url)
{
    checkPerm('view');
    $html = "";
    $html .= getTitleArea(Lang::t('_COMPETENCES'), 'competences');
    $html .= '<div class="std_block">';
    $cmodel = new CompetencesAdm();
    $fmodel = new FunctionalrolesAdm();
    $id_user = getLogUserId();
    $ucomps = $cmodel->getUserCompetences($id_user);
    $rcomps = $fmodel->getUserRequiredCompetences($id_user);
    $ucomps_info = $cmodel->getCompetencesInfo(array_keys($ucomps));
    $language = getLanguage();
    $_typologies = $cmodel->getCompetenceTypologies();
    $_types = $cmodel->getCompetenceTypes();
    $icon_actv = '<span class="ico-sprite subs_actv"><span>' . Lang::t('_COMPETENCE_OBTAINED', 'competences') . '</span></span>';
    $icon_req = '<span class="ico-sprite subs_actv"><span>' . Lang::t('_MANDATORY', 'competences') . '</span></span>';
    //*******************
    require_once _base_ . '/lib/lib.table.php';
    $table = new Table(Get::sett('visuItem'), Lang::t('_COMPETENCES'), Lang::t('_COMPETENCES'));
    $style_h = array('', '', 'image', 'image', 'image', 'image', 'image');
    $label_h = array(Lang::t('_NAME', 'competences'), Lang::t('_TYPOLOGY', 'competences'), Lang::t('_TYPE', 'standard'), Lang::t('_SCORE', 'competences'), Lang::t('_DATE_LAST_COMPLETE', 'subscribe'), Lang::t('_COMPETENCES_REQUIRED', 'competences'));
    $table->addHead($label_h, $style_h);
    foreach ($ucomps_info as $id_competence => $cinfo) {
        $line = array();
        $line[] = $cinfo->langs[$language]['name'];
        $line[] = $_typologies[$cinfo->typology];
        $line[] = $_types[$cinfo->type];
        $line[] = $cinfo->type == 'score' ? '<b>' . $ucomps[$id_competence]->score_got . '</b>' : $icon_actv;
        $line[] = Format::date($ucomps[$id_competence]->last_assign_date, 'datetime');
        $line[] = array_key_exists($id_competence, $rcomps) ? $icon_req : '';
        $table->addBody($line);
    }
    $html .= $table->getTable();
    $html .= '</div>';
    $html .= Form::openForm('beck_url', 'index.php');
    $html .= Form::openButtonSpace();
    $html .= Form::getButton('close', 'close', Lang::t('_CLOSE', 'standard'));
    $html .= Form::closeButtonSpace();
    $html .= Form::closeform();
    cout($html, 'content');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:42,代码来源:mycompetences.php

示例12: inspage

 function inspage()
 {
     checkPerm('view', false, 'storage');
     $back_url = urldecode($_POST['back_url']);
     $insert_query = "\r\n\tINSERT INTO " . $GLOBALS['prefix_lms'] . "_htmlpage\r\n\tSET title = '" . (trim($_POST['title']) == '' ? Lang::t('_NOTITLE', 'htmlpage', 'lms') : $_POST['title']) . "',\r\n\t\ttextof = '" . $_POST['textof'] . "',\r\n\t\tauthor = '" . (int) getLogUserId() . "'";
     if (!sql_query($insert_query)) {
         $_SESSION['last_error'] = Lang::t('_OPERATION_FAILURE', 'htmlpage', 'lms');
         Util::jump_to($back_url . '&create_result=0');
     }
     list($idPage) = sql_fetch_row(sql_query("SELECT LAST_INSERT_ID()"));
     if ($_FILES) {
         $n = 0;
         foreach ($_FILES as $_FILE) {
             $n++;
             $file = save_file($_FILE);
             if ($file) {
                 $insert_query = "INSERT INTO " . $GLOBALS['prefix_lms'] . "_htmlpage_attachment SET file = '" . $file . "', title = '" . trim($_FILE['name']) . "', idpage = " . $idPage;
                 sql_query($insert_query);
             }
         }
     }
     Util::jump_to($back_url . '&id_lo=' . $idPage . '&create_result=1');
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:23,代码来源:htmlpage.php

示例13: setRulesFromScore

 public function setRulesFromScore($score_arr)
 {
     require_once _base_ . '/lib/lib.json.php';
     require_once _lms_ . '/lib/lib.subscribe.php';
     $res = true;
     $where_score_arr = array();
     foreach ($score_arr as $val) {
         $where_score_arr[] = "(category_id = '" . (int) $val['category_id'] . "' " . "AND from_score <= '" . (int) $val['score'] . "' AND to_score >= '" . (int) $val['score'] . "')";
     }
     if (empty($where_score_arr)) {
         return '';
     }
     $fields = "*";
     $qtxt = "SELECT " . $fields . " FROM %lms_assessment_rule\r\n\t\t\tWHERE test_id='" . $this->test_id . "'\r\n\t\t\tAND (" . implode(' OR ', $where_score_arr) . ")\r\n\t\t\tORDER BY from_score ASC";
     $q = $this->db->query($qtxt);
     $json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
     $csm = new CourseSubscribe_Management();
     $cmpman = new CompetencesAdm();
     $feedback_txt = array();
     while ($row = $this->db->fetch_assoc($q)) {
         $course_arr = $json->decode($row['courses_list']);
         $competence_arr = $json->decode($row['competences_list']);
         $feedback_txt[] = $row['feedback_txt'];
         //courses subscriptions - only students are affected
         if (!empty($course_arr) && $_SESSION['levelCourse'] <= 3) {
             $arr_courses = array_keys($course_arr);
             $csm->multipleUserSubscribe(getLogUserId(), $arr_courses, 3);
         }
         //competences assignment - only students are affected
         if (!empty($competence_arr) && $_SESSION['levelCourse'] <= 3) {
             foreach ($competence_arr as $c_id => $data) {
                 if ($data['type'] == 'score') {
                     $score = isset($data['score']) ? $data['score'] : 0;
                     if ($score > 0) {
                         if (!$cmpman->userHasCompetence($c_id, Docebo::user()->getIdst())) {
                             $cmpman->assignCompetenceUsers($c_id, array(Docebo::user()->getIdst() => $score));
                         } else {
                             $cmpman->addScoreToUsers($c_id, array(Docebo::user()->getIdst()), $score);
                         }
                     }
                 } else {
                     if (!$cmpman->userHasCompetence($c_id, Docebo::user()->getIdst())) {
                         $cmpman->assignCompetenceUsers($c_id, array(Docebo::user()->getIdst() => 1));
                     }
                 }
             }
         }
     }
     $output = "";
     if (!empty($feedback_txt)) {
         $output = implode('<br/><br />', $feedback_txt);
     }
     return $output;
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:54,代码来源:lib.assessment_rule.php

示例14: standingsTask

 public function standingsTask()
 {
     $id_game = Get::req('id_game', DOTY_INT, 0);
     $model = new GamesAlms();
     $game = $model->findByPk($id_game, Docebo::user()->getArrSt());
     YuiLib::load('base,charts');
     $this->render('standings', array('game' => $game, 'track' => $model->getUserStandings($game['id_game'], getLogUserId()), 'standings' => $model->getStandings($game['id_game'], 0, 30), 'chart_data' => $this->json->encode($model->getStandingsChartData($game['id_game']))));
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:8,代码来源:GamesLmsController.php

示例15: delnotes

 function delnotes()
 {
     checkPerm('view');
     $lang =& DoceboLanguage::createInstance('notes', 'lms');
     if (isset($_GET['confirm'])) {
         $query = "\r\n\t\tDELETE FROM " . $GLOBALS['prefix_lms'] . "_notes\r\n\t\tWHERE idNotes='" . $_GET['idNotes'] . "' AND owner='" . getLogUserId() . "' AND idCourse='" . $_SESSION['idCourse'] . "'";
         if (!sql_query($query)) {
             Util::jump_to('index.php?modname=notes&op=notes&amp;result=err');
         }
         Util::jump_to('index.php?modname=notes&op=notes&amp;result=ok');
     } else {
         list($title) = sql_fetch_row(sql_query("\r\n\t\tSELECT title\r\n\t\tFROM " . $GLOBALS['prefix_lms'] . "_notes \r\n\t\tWHERE owner = '" . getLogUserId() . "' AND idNotes = '" . (int) $_GET['idNotes'] . "'"));
         $title_page = array('index.php?modname=notes&amp;op=notes' => $lang->def('_NOTES'), $lang->def('_DEL'));
         $GLOBALS['page']->add(getTitleArea($title_page, 'notes') . '<div class="std_block">' . getDeleteUi($lang->def('_AREYOUSURE'), '<span>' . $lang->def('_TITLE') . ' : </span>' . $title, true, 'index.php?modname=notes&amp;op=delnotes&amp;idNotes=' . $_GET['idNotes'] . '&amp;confirm=1', 'index.php?modname=notes&amp;op=notes') . '</div>', 'content');
     }
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:16,代码来源:notes.php


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