• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getBackUi函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: intro

function intro($object_poll, $id_param)
{
    //-kb-play-// if(!checkPerm('view', true, 'organization') && !checkPerm('view', true, 'storage')) die("You can't access");
    require_once _base_ . '/lib/lib.form.php';
    require_once $GLOBALS['where_lms'] . '/class.module/track.poll.php';
    require_once $GLOBALS['where_lms'] . '/lib/lib.param.php';
    require_once $GLOBALS['where_lms'] . '/lib/lib.poll.php';
    $lang =& DoceboLanguage::createInstance('poll');
    $id_poll = $object_poll->getId();
    $id_reference = getLoParam($id_param, 'idReference');
    $url_coded = urlencode(serialize($object_poll->back_url));
    $id_track = retriveTrack($id_reference, $id_poll, getLogUserId());
    $poll_man = new PollManagement($id_poll);
    $play_man = new PlayPollManagement($id_poll, getLogUserId(), $id_track, $poll_man);
    $poll_info = $poll_man->getPollAllInfo();
    $page_title = array(Util::str_replace_once('&', '&', $object_poll->back_url) => $lang->def('_TITLE'), $poll_info['title']);
    $GLOBALS['page']->add(getTitleArea($page_title, 'poll') . '<div class="std_block">' . getBackUi(Util::str_replace_once('&', '&amp;', $object_poll->back_url), $lang->def('_BACK')) . '<b>' . $lang->def('_TITLE') . ' : ' . $poll_info['title'] . '</b><br /><br />' . '<span class="text_bold">' . $lang->def('_DESCRIPTION') . ' : </span>' . $poll_info['description'] . '<br /><br />', 'content');
    $GLOBALS['page']->add(Form::openForm('poll_intro', 'index.php?modname=poll&amp;op=play') . Form::getHidden('id_poll', 'id_poll', $id_poll) . Form::getHidden('id_param', 'id_param', $id_param) . Form::getHidden('id_track', 'id_track', $id_track) . Form::getHidden('back_url', 'back_url', $url_coded) . Form::getHidden('next_step', 'next_step', 'play') . '<div class="align_right">', 'content');
    // Actions
    $score_status = $play_man->getStatus();
    $quest_number = $poll_man->getTotalQuestionNumber();
    if ($quest_number == 0) {
        $GLOBALS['page']->add($lang->def('_NO_QUESTION_IN_POLL'), 'content');
    } elseif ($id_track !== false && $score_status == 'valid') {
        $GLOBALS['page']->add($lang->def('_POLL_ALREDY_VOTED'), 'content');
    } else {
        $GLOBALS['page']->add(Form::getButton('begin', 'begin', $lang->def('_POLL_BEGIN')), 'content');
    }
    $GLOBALS['page']->add('</div>' . Form::closeForm() . '</div>', 'content');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:30,代码来源:do.poll.php


示例2: edithtml

function edithtml()
{
    checkPerm('mod');
    require_once _base_ . '/lib/lib.form.php';
    $query = "\r\n\tSELECT textof\r\n\tFROM " . $GLOBALS['prefix_lms'] . "_htmlfront \r\n\tWHERE id_course = '" . $_SESSION['idCourse'] . "'";
    $re_htmlfront = sql_query($query);
    $error = false;
    if (isset($_POST['save'])) {
        if (mysql_num_rows($re_htmlfront) > 0) {
            $upd_query = "\r\n\t\t\tUPDATE " . $GLOBALS['prefix_lms'] . "_htmlfront \r\n\t\t\tSET textof = '" . $_POST['description'] . "'\r\n\t\t\tWHERE id_course = '" . $_SESSION['idCourse'] . "'";
            $re = sql_query($upd_query);
        } else {
            $ins_query = "\r\n\t\t\tINSERT INTO " . $GLOBALS['prefix_lms'] . "_htmlfront \r\n\t\t\t( id_course, textof) VALUES \r\n\t\t\t( \t'" . $_SESSION['idCourse'] . "',\r\n\t\t\t\t'" . $_POST['description'] . "' )";
            $re = sql_query($ins_query);
        }
        if ($re) {
            Util::jump_to('index.php?modname=htmlfront&amp;op=showhtml&amp;saveok=1');
        } else {
            $error = true;
        }
    }
    $lang =& DoceboLanguage::createInstance('htmlfront', 'lms');
    list($textof) = sql_fetch_row($re_htmlfront);
    $title_page = array('index.php?modname=htmlfront&amp;op=showhtml' => $lang->def('_HTMLFRONT'), $lang->def('_MOD'));
    $GLOBALS['page']->add(getTitleArea($title_page, 'htmlfront') . '<div class="std_block">' . getBackUi('index.php?modname=htmlfront&amp;op=showhtml', $lang->def('_BACK')) . ($error ? getErrorUi($lang->def('_ERROR_IN_SAVE')) : '') . Form::openForm('formnotes', 'index.php?modname=htmlfront&amp;op=edithtml') . Form::openElementSpace() . Form::getTextarea($lang->def('_TEXTOF'), 'description', 'description', importVar('description', false, $textof)) . Form::closeElementSpace() . Form::openButtonSpace() . Form::getButton('save', 'save', $lang->def('_SAVE')) . Form::getButton('undo', 'undo', $lang->def('_UNDO')) . Form::closeButtonSpace() . Form::closeForm() . '</div>', 'content');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:26,代码来源:htmlfront.php


示例3: create

 /**
  * function create()
  *
  * @param $back_url	the url where the function retutn at the end of the operation
  * @return nothing
  */
 function create($id_poll, $back_poll)
 {
     if (!sql_query("\r\n\t\tINSERT INTO " . $GLOBALS['prefix_lms'] . "_pollquest \r\n\t\t( id_poll, type_quest, title_quest, sequence, page ) VALUES \r\n\t\t( \t'" . $id_poll . "', \r\n\t\t\t'" . $this->getQuestionType() . "', \r\n\t\t\t'<span class=\"text_bold\">" . Lang::t('_QUEST_BREAK_PAGE') . "</span>',\r\n\t\t\t'" . $this->_getNextSequence($id_poll) . "', \r\n\t\t\t'" . $this->_getPageNumber($id_poll) . "' ) ")) {
         errorCommunication(def('_POLL_ERR_INS_QUEST') . getBackUi(Util::str_replace_once('&', '&amp;', $back_poll), Lang::t('_BACK')));
     }
     Util::jump_to('' . $back_poll);
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:13,代码来源:class.break_page.php


示例4: moditem

 function moditem($object_item)
 {
     //checkPerm('view', false, 'storage');
     require_once _base_ . '/lib/lib.form.php';
     $lang =& DoceboLanguage::createInstance('item');
     $back_coded = htmlentities(urlencode($object_item->back_url));
     list($title, $description) = sql_fetch_row(sql_query("\r\n\tSELECT title, description \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_materials_lesson \r\n\tWHERE author = " . getLogUserId() . " AND idLesson = '" . $object_item->getId() . "'"));
     $GLOBALS['page']->add(getTitleArea($lang->def('_SECTIONNAME_ITEM'), 'item') . '<div class="std_block">' . getBackUi(Util::str_replace_once('&', '&amp;', $object_item->back_url) . '&amp;mod_result=0', $lang->def('_BACK')) . Form::openForm('itemform', 'index.php?modname=item&amp;op=upitem', 'std_form', 'post', 'multipart/form-data') . Form::openElementSpace() . Form::getHidden('idItem', 'idItem', $object_item->getId()) . Form::getHidden('back_url', 'back_url', htmlentities(urlencode($object_item->back_url))) . Form::getTextfield($lang->def('_TITLE'), 'title', 'title', 100, $title) . Form::getFilefield($lang->def('_FILE_MOD'), 'file', 'attach') . Form::getTextarea($lang->def('_DESCRIPTION'), 'description', 'description', $description) . Form::closeElementSpace() . Form::openButtonSpace() . Form::getButton('additem', 'additem', $lang->def('_SAVE')) . Form::closeButtonSpace() . Form::closeForm() . '</div>', 'content');
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:9,代码来源:item.php


示例5: 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&amp;op=play&amp;idCategory=' . $idCategory . '&amp;id_param=' . $id_param . '&amp;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


示例6: edit

 function edit($back_poll)
 {
     $lang =& DoceboLanguage::createInstance('poll');
     require_once _base_ . '/lib/lib.form.php';
     $url_encode = htmlentities(urlencode($back_poll));
     if (isset($_POST['add_question'])) {
         if (!sql_query("\r\n\t\t\tUPDATE " . $GLOBALS['prefix_lms'] . "_pollquest \r\n\t\t\tSET title_quest = '" . $_POST['title_quest'] . "' \r\n\t\t\tWHERE id_quest = '" . $this->id . "'")) {
             errorCommunication($lang->def('_ERR_INS_QUEST') . getBackUi('index.php?modname=question_poll&amp;op=edit&amp;type_quest=' . $this->getQuestionType() . '&amp;id_quest=' . $this->id . '&amp;back_poll=' . $url_encode, $lang->def('_BACK')));
         }
         Util::jump_to('' . $back_poll);
     }
     list($title_quest) = sql_fetch_row(sql_query("\r\n\t\tSELECT title_quest \r\n\t\tFROM " . $GLOBALS['prefix_lms'] . "_pollquest \r\n\t\tWHERE id_quest = '" . $this->id . "'"));
     $GLOBALS['page']->add(getTitleArea($lang->def('_POLL_SECTION'), 'poll') . '<div class="std_block">' . getBackUi(Util::str_replace_once('&', '&amp;', $back_poll), $lang->def('_BACK')) . '<div class="title_big">' . $lang->def('_QUEST_ACRN_' . strtoupper($this->getQuestionType())) . ' - ' . $lang->def('_QUEST_' . strtoupper($this->getQuestionType())) . '</div><br />' . Form::openForm('form_mod_quest', 'index.php?modname=question_poll&amp;op=edit') . Form::openElementSpace() . Form::getHidden('type_quest', 'type_quest', $this->getQuestionType()) . Form::getHidden('id_quest', 'id_quest', $this->id) . Form::getHidden('back_poll', 'back_poll', $url_encode) . Form::getTextarea($lang->def('_POLL_QUEST_TITLE'), 'title_quest', 'title_quest', $title_quest) . Form::closeElementSpace() . Form::openButtonSpace() . Form::getButton('add_question', 'add_question', $lang->def('_SAVE')) . Form::closeButtonSpace() . Form::closeForm() . '</div>', 'content');
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:14,代码来源:class.title.php


示例7: _profileBackUrl

 protected function _profileBackUrl()
 {
     $id_user = Get::req('id_user', DOTY_INT, 0);
     $type = Get::req('type', DOTY_STRING, 'false');
     $from = Get::req('from', DOTY_INT, 0);
     $back_my_friend = Get::req('back', DOTY_INT, 0);
     if ($type !== 'false') {
         if ($from == 0) {
             return getBackUi('index.php?modname=profile&op=profile&id_user=' . $id_user . '&ap=goprofile', Lang::t('_BACK', 'standard'));
         } else {
             return getBackUi('index.php?modname=myfiles&op=myfiles&working_area=' . $type, Lang::t('_BACK', 'standard'));
         }
     }
     if ($back_my_friend) {
         return getBackUi('index.php?modname=myfriends&op=myfriends', Lang::t('_BACK', 'standard'));
     }
     return false;
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:18,代码来源:ProfileLmsController.php


示例8: profileBackUrl

function profileBackUrl()
{
    $lang =& DoceboLanguage::createInstance('profile', 'framework');
    $id_user = importVar('id_user', true, 0);
    $type = importVar('type', false, 'false');
    $from = importVar('from', true, 0);
    $back_my_friend = importVar('back', true, 0);
    if ($type !== 'false') {
        if ($from == 0) {
            return getBackUi('index.php?modname=profile&op=profile&id_user=' . $id_user . '&ap=goprofile', '<< ' . $lang->def('_BACK') . '');
        } else {
            return getBackUi('index.php?modname=myfiles&op=myfiles&working_area=' . $type, '<< ' . $lang->def('_BACK') . '');
        }
    }
    if ($back_my_friend) {
        return getBackUi('index.php?modname=myfriends&op=myfriends', '<< ' . $lang->def('_BACK'));
    }
    return false;
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:19,代码来源:profile.php


示例9: modpage

 function modpage($object_page)
 {
     checkPerm('view', false, 'storage');
     require_once _base_ . '/lib/lib.form.php';
     $lang =& DoceboLanguage::createInstance('htmlpage');
     //retriving info
     list($title, $textof) = sql_fetch_row(sql_query("\r\n\tSELECT title, textof \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_htmlpage \r\n\tWHERE idPage = '" . $object_page->getId() . "'"));
     // recuper gli allegati
     $path = '/appLms/htmlpages/';
     $query = "SELECT * FROM " . $GLOBALS['prefix_lms'] . "_htmlpage_attachment WHERE idpage = " . $object_page->getId();
     $res = mysql_query($query);
     $attachments = array();
     if ($res) {
         while ($row = mysql_fetch_assoc($res)) {
             $attachments[] = array('id' => $row['id'], 'title' => $row['title'], 'file' => $GLOBALS['where_files_relative'] . $path . $row['file']);
         }
     }
     $GLOBALS['page']->add(getTitleArea($lang->def('_SECT_PAGE'), 'htmlpage') . '<div class="std_block">' . getBackUi(Util::str_replace_once('&', '&amp;', $object_page->back_url) . '&amp;mod_result=0', $lang->def('_BACK')) . Form::openForm('pageform', 'index.php?modname=htmlpage&amp;op=uppage', false, false, 'multipart/form-data') . Form::openElementSpace() . Form::getHidden('idPage', 'idPage', $object_page->getId()) . Form::getHidden('back_url', 'back_url', htmlentities(urlencode($object_page->back_url))) . '<script>' . "\n" . 'my_n=1;' . "\n" . 'function delAttachment(id) {' . "\n" . '	document.getElementById(id).style.textDecoration="line-through";' . "\n" . '	document.getElementById(\'iddelattachment\').value = document.getElementById(\'iddelattachment\').value+\';\'+id' . "\n" . '}' . "\n" . 'function addAttachment() {' . "\n" . '	my_file = "attach"+my_n;' . "\n" . '	my_filevalue = \'\';' . "\n" . '	if (document.getElementById(my_file))' . "\n" . '		my_filevalue = document.getElementById(my_file).value;' . "\n" . '	my_html = "' . str_replace(array("\r", "\r\n", "\n"), '', addslashes(Form::getFilefield($lang->def('_UPLOAD'), 'attach%%', 'attach%%'))) . '";' . "\n" . '	if (my_filevalue != \'\') {' . "\n" . '		my_n=my_n+1;' . "\n" . '		my_html = my_html.replace(/%%/gi,my_n);' . "\n" . '		newdiv = document.createElement("div");' . "\n" . '		newdiv.innerHTML = my_html;' . "\n" . '		my_divhtml = document.getElementById(\'attachment_area\');' . "\n" . '		my_divhtml.appendChild(newdiv);' . "\n" . '	}' . "\n" . '}' . "\n" . '</script>' . "\n" . '<div class="std_block">' . Form::getTextfield($lang->def('_TITLE'), 'title', 'title', 150, $title) . Form::getTextarea($lang->def('_TEXTOF'), 'textof', 'textof', $textof), 'content');
     foreach ($attachments as $attachment) {
         $GLOBALS['page']->add("<a id=\"" . $attachment['id'] . "\" href=\"" . $attachment['file'] . "\" target=\"_blank\">" . $attachment['title'] . "</a> (<a href=\"javascript:delAttachment(" . $attachment['id'] . ");\">x</a>)<br/>", 'content');
     }
     $GLOBALS['page']->add('<div id="attachment_area">' . Form::getHidden('iddelattachment', 'iddelattachment', '') . Form::getFilefield($lang->def('_UPLOAD'), 'attach1', 'attach1') . '</div>' . '<a href="javascript:addAttachment();">(+)</a>' . Form::closeElementSpace() . Form::openButtonSpace() . Form::getButton('addhtmlpage', 'addhtmlpage', $lang->def('_SAVE')) . Form::closeButtonSpace() . Form::closeForm() . '', 'content');
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:23,代码来源:htmlpage.php


示例10: showLog

function showLog()
{
    require_once _base_ . '/lib/lib.form.php';
    require_once _base_ . '/lib/lib.table.php';
    $lang =& DoceboLanguage::createInstance('conference', 'lms');
    $id = Get::req('id', DOTY_INT, 0);
    $conference = new Conference_Manager();
    $room_info = $conference->roomInfo($id);
    $acl_man =& Docebo::user()->getAclManager();
    cout(getTitleArea('') . '<div class="std_block">', 'content');
    $room_log = array();
    switch ($room_info['room_type']) {
        case 'teleskill':
            require_once $GLOBALS['where_scs'] . '/lib/lib.teleskill.php';
            $teleskill = new Teleskill_Management();
            $roomid = $teleskill->getRoomId($id);
            if (isset($_POST['update_log'])) {
                $teleskill->updateRoomLog($roomid);
            }
            $room_log = $teleskill->getRoomLog($roomid);
            break;
    }
    $tb = new Table(0, $lang->def('_ROOM_LOG'), $lang->def('_ROOM_LOG'));
    $cont_h = array($lang->def('_FULLNAME'), $lang->def('_ROLE'), $lang->def('_DATE'), $lang->def('_TOTAL_TIME'), $lang->def('_NUMBER_OF_ACCESS'));
    $type_h = array('', '', '', '', '');
    $tb->setColsStyle($type_h);
    $tb->addHead($cont_h);
    foreach ($room_log as $log_row) {
        $user_info = $acl_man->getUser($log_row['idUser'], false);
        $cont = array();
        if ($user_info[ACL_INFO_FIRSTNAME] !== '' && $user_info[ACL_INFO_LASTNAME]) {
            $cont[] = $user_info[ACL_INFO_FIRSTNAME] . ' ' . $user_info[ACL_INFO_LASTNAME] . ' (' . $acl_man->relativeId($user_info[ACL_INFO_USERID]) . ')';
        } elseif ($user_info[ACL_INFO_FIRSTNAME] !== '') {
            $cont[] = $user_info[ACL_INFO_FIRSTNAME] . ' (' . $acl_man->relativeId($user_info[ACL_INFO_USERID]) . ')';
        } elseif ($user_info[ACL_INFO_LASTNAME] !== '') {
            $cont[] = $user_info[ACL_INFO_LASTNAME] . ' (' . $acl_man->relativeId($user_info[ACL_INFO_USERID]) . ')';
        } else {
            $cont[] = $acl_man->relativeId($user_info[ACL_INFO_USERID]);
        }
        $cont[] = $log_row['role'] == 1 ? $lang->def('_USER_ROLE') : $lang->def('_TUTOR_ROLE');
        $cont[] = Format::date($log_row['date'], 'datetime');
        $duration_s = 0;
        $duration_m = 0;
        $duration_h = 0;
        $duration = $log_row['duration'];
        $duration_s = $duration % 60;
        $duration -= $duration_s;
        if ($duration) {
            $duration_m = $duration % 3600 / 60;
            $duration -= $duration_m * 60;
            if ($duration) {
                $duration_h = $duration / 3600;
            }
        }
        $cont[] = $duration_h . ' ' . $lang->def('_HOURS') . ' ' . $duration_m . ' ' . $lang->def('_MINUTS') . ' ' . $duration_s . ' ' . $lang->def('_SECONDS');
        $cont[] = $log_row['access'];
        $tb->addBody($cont);
    }
    $tb->addActionAdd(Form::getButton('update_log', 'update_log', $lang->def('_UPDATE_LOG')));
    cout(Form::openForm('log_table', 'index.php?modname=conference&amp;op=log&amp;id=' . $id) . $tb->getTable() . Form::closeForm() . '<br/>' . getBackUi('index.php?modname=conference&amp;op=history', $lang->def('_BACK')), 'content');
    cout('</div>', 'content');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:62,代码来源:conference.php


示例11: LOSelector

 function LOSelector($module, $back_url)
 {
     $query = "SELECT objectType FROM " . $GLOBALS['prefix_lms'] . "_lo_types";
     $rs = sql_query($query) or die('Table _lo_types not present');
     $out = '<div class="std_block">';
     $out .= '<div class="title">' . Lang::t('_SELECTLO', 'storage', 'lms') . '</div><br />';
     $out .= getBackUi(Util::str_replace_once('&', '&amp;', $back_url), Lang::t('_BACK'));
     $out .= '<form id="LOSelector" method="post" action="index.php?modname=' . $module . '&amp;op=display&amp;' . $this->_getOpCreateLOSel() . '=1" >' . '<input type="hidden" id="authentic_request_lo" name="authentic_request" value="' . Util::getSignature() . '" />';
     $first = TRUE;
     while (list($objectType) = sql_fetch_row($rs)) {
         $out .= '<label for="' . $objectType . '"><img src="' . getPathImage() . 'lobject/' . $objectType . '.gif" alt="' . $objectType . '" ' . 'title="' . $objectType . '" /></label>';
         if ($first) {
             $out .= '<input type="radio" name="radiolo" value="' . $objectType . '" id="' . $objectType . '" checked="true"/>';
         } else {
             $out .= '<input type="radio" name="radiolo" value="' . $objectType . '" id="' . $objectType . '"/>';
         }
         $out .= '<label for="' . $objectType . '">' . Lang::t('_LONAME_' . $objectType) . '</label>' . '<br />';
         $first = FALSE;
     }
     $out .= $this->printState();
     $out .= '<br /><input type="submit" class="button" value="' . Lang::t('_REPOCREATELO') . '" name="' . $this->_getOpCreateLOSel() . '"/>';
     $out .= '</form>';
     $out .= '</div>';
     return $out;
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:25,代码来源:lib.public_report_admin.php


示例12: modnotes

 function modnotes()
 {
     checkPerm('view');
     list($title, $textof) = sql_fetch_row(sql_query("\r\n\tSELECT title, textof \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_notes \r\n\tWHERE  idNotes = '" . $_GET['idNotes'] . "'  AND owner ='" . getLogUserId() . "' AND idCourse='" . $_SESSION['idCourse'] . "'"));
     require_once _base_ . '/lib/lib.form.php';
     $lang =& DoceboLanguage::createInstance('notes', 'lms');
     $page_title = array('index.php?modname=notes&amp;op=notes' => $lang->def('_NOTES'), $lang->def('_MOD_NOTES'));
     $GLOBALS['page']->add(getTitleArea(array(), 'notes') . '<div class="std_block">' . getBackUi('index.php?modname=notes&amp;op=notes', $lang->def('_BACK')) . Form::openForm('formnotes', 'index.php?modname=notes&amp;op=upnotes') . Form::openElementSpace() . Form::getHidden('idNotes', 'idNotes', $_GET['idNotes']) . Form::getTextfield($lang->def('_TITLE'), 'title', 'title', 255, $title) . Form::getTextarea($lang->def('_TEXTOF'), 'description', 'description', $textof) . Form::closeElementSpace() . Form::openButtonSpace() . Form::getButton('save', 'save', $lang->def('_SAVE')) . Form::getButton('undo', 'undo', $lang->def('_UNDO')) . Form::closeButtonSpace() . Form::closeForm() . '</div>', 'content');
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:9,代码来源:notes.php


示例13: edit

 /**
  * this function modify a question
  *
  * @param  string	$back_poll	indicates the return url
  * @return nothing
  *
  * @access public
  * @author Fabio Pirovano ([email protected])
  */
 function edit($back_poll)
 {
     $lang =& DoceboLanguage::createInstance('poll');
     require_once _base_ . '/lib/lib.form.php';
     $url_encode = htmlentities(urlencode($back_poll));
     //manage number of answer
     if (isset($_POST['save_question'])) {
         //update question
         $ins_query = "\r\n\t\t\tUPDATE " . $GLOBALS['prefix_lms'] . "_pollquest\r\n\t\t\tSET id_category = '" . (int) $_POST['id_category'] . "',\r\n\t\t\t\ttype_quest = '" . $this->getQuestionType() . "',\r\n\t\t\t\ttitle_quest = '" . $_POST['title_quest'] . "'\r\n\t\t\tWHERE id_quest = '" . (int) $this->id . "'";
         if (!sql_query($ins_query)) {
             getErrorUi($lang->def('_POLL_ERR_INS_QUEST') . getBackUi('index.php?modname=question_poll&amp;op=edit&amp;type_quest=' . $this->getQuestionType() . '&amp;id_quest=' . $this->id . '&amp;back_poll=' . $url_encode, $lang->def('_BACK')));
         }
         //update answer
         if (!isset($_POST['is_correct'])) {
             $_POST['is_correct'] = -1;
         }
         $min_value = Get::req('min_value', DOTY_INT, 0);
         $max_value = Get::req('max_value', DOTY_INT, 0);
         $step_value = (double) str_replace(',', '.', $_POST['step_value']);
         if ($min_value >= $max_value || $step_value == 0) {
             $GLOBALS['page']->add(getErrorUi($lang->def('_POLL_ERR_INS_ANSWER') . getBackUi(str_replace('&', '&amp;', $back_poll), $lang->def('_BACK'))), 'content');
         } else {
             $del_answer_query = "DELETE FROM " . $GLOBALS['prefix_lms'] . "_pollquestanswer\r\n\t\t\t\t\t\t\t\t\tWHERE id_quest = '" . (int) $this->id . "'";
             if (!sql_query($del_answer_query)) {
                 getErrorUi($lang->def('_POLL_ERR_INS_ANSWER') . getBackUi(str_replace('&', '&amp;', $back_poll), $lang->def('_BACK')));
             } else {
                 $query = "INSERT INTO " . $GLOBALS['prefix_lms'] . "_pollquestanswer" . " (id_quest, answer, sequence)" . " VALUES ('" . $this->id . "', '" . $min_value . "', '0')," . " ('" . $this->id . "', '" . $max_value . "', '1')," . " ('" . $this->id . "', '" . $step_value . "', '2');";
                 if (!sql_query($query)) {
                     getErrorUi($lang->def('_POLL_ERR_INS_ANSWER') . getBackUi(str_replace('&', '&amp;', $back_poll), $lang->def('_BACK')));
                 } else {
                     Util::jump_to($back_poll);
                 }
             }
         }
     }
     //insert form
     require_once _lms_ . '/lib/lib.questcategory.php';
     $categories = Questcategory::getCategory();
     //writing difficult
     //load data
     list($sel_cat, $quest) = sql_fetch_row(sql_query("\r\n\t\tSELECT id_category, title_quest\r\n\t\tFROM " . $GLOBALS['prefix_lms'] . "_pollquest\r\n\t\tWHERE id_quest = '" . (int) $this->id . "'"));
     $re_answer = sql_query("\r\n\t\tSELECT id_answer, answer\r\n\t\tFROM " . $GLOBALS['prefix_lms'] . "_pollquestanswer\r\n\t\tWHERE id_quest = '" . (int) $this->id . "'\r\n\t\tORDER BY sequence");
     $array_answer = array();
     while (list($id_answer, $answer) = sql_fetch_row($re_answer)) {
         $array_answer[] = $answer;
     }
     if (!empty($array_answer)) {
         $min_value = $array_answer[0];
         $max_value = $array_answer[1];
         $step_value = $array_answer[2];
     } else {
         $min_value = '';
         $max_value = '';
         $step_value = '1';
     }
     $GLOBALS['page']->add(getTitleArea($lang->def('_POLL_SECTION'), 'poll') . '<div class="std_block">' . getBackUi(str_replace('&', '&amp;', $back_poll), $lang->def('_BACK')) . '<div class="title_big">' . $lang->def('_QUEST_ACRN_' . strtoupper($this->getQuestionType())) . ' - ' . $lang->def('_QUEST_' . strtoupper($this->getQuestionType())) . '</div><br />' . Form::openForm('form_add_quest', 'index.php?modname=question_poll&amp;op=edit') . Form::openElementSpace() . Form::getHidden('type_quest', 'type_quest', $this->getQuestionType()) . Form::getHidden('id_quest', 'id_quest', $this->id) . Form::getHidden('back_poll', 'back_poll', $url_encode) . Form::getTextarea($lang->def('_POLL_QUEST_TITLE'), 'title_quest', 'title_quest', isset($_POST['title_quest']) ? stripslashes($_POST['title_quest']) : $quest) . Form::getDropdown($lang->def('_CATEGORY'), 'id_category', 'id_category', $categories, isset($_POST['id_category']) ? $_POST['id_category'] : $sel_cat) . '<div class="no_float"></div><br />' . Form::getTextfield($lang->def('_MIN_VALUE'), 'min_value', 'min_value', 255, $min_value) . Form::getTextfield($lang->def('_MAX_VALUE'), 'max_value', 'max_value', 255, $max_value) . Form::getTextfield($lang->def('_STEP_VALUE'), 'step_value', 'step_value', 255, $step_value), 'content');
     $GLOBALS['page']->add(Form::closeElementSpace() . Form::openButtonSpace() . Form::getButton('save_question', 'save_question', $lang->def('_SAVE')) . Form::closeButtonSpace() . Form::closeForm() . '</div>', 'content');
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:67,代码来源:class.doc_valutation.php


示例14: edit

 function edit($back_test)
 {
     $lang =& DoceboLanguage::createInstance('test');
     require_once _base_ . '/lib/lib.form.php';
     $url_encode = htmlentities(urlencode($back_test));
     if (isset($_POST['add_question'])) {
         if (!sql_query("\r\n\t\t\tUPDATE " . $GLOBALS['prefix_lms'] . "_testquest \r\n\t\t\tSET idCategory = '" . (int) $_POST['idCategory'] . "', \r\n\t\t\t\ttitle_quest = '" . $_POST['title_quest'] . "', \r\n\t\t\t\tdifficult = '" . (int) $_POST['difficult'] . "', \r\n\t\t\t\ttime_assigned = '" . (int) $_POST['time_assigned'] . "' \r\n\t\t\tWHERE idQuest = '" . $this->id . "'")) {
             errorCommunication($lang->def('_ERR_INS_QUEST') . getBackUi('index.php?modname=question&amp;op=edit&amp;type_quest=' . $this->getQuestionType() . '&amp;idQuest=' . $this->id . '&amp;back_test=' . $url_encode, $lang->def('_BACK')));
         }
         if (!sql_query("\r\n\t\t\tUPDATE " . $GLOBALS['prefix_lms'] . "_testquestanswer \r\n\t\t\tSET score_correct = '" . $this->_checkScore($_POST['max_score']) . "'\r\n\t\t\tWHERE idQuest = '" . $this->id . "'")) {
             errorCommunication($lang->def('_ERR_INS_QUEST') . getBackUi('index.php?modname=question&amp;op=edit&amp;type_quest=' . $this->getQuestionType() . '&amp;idQuest=' . $this->id . '&amp;back_test=' . $url_encode, $lang->def('_BACK')));
         }
         Util::jump_to('' . $back_test);
     }
     //finding categories
     require_once $GLOBALS['where_lms'] . '/lib/lib.questcategory.php';
     $categories = Questcategory::getCategory();
     //create array of difficult
     $arr_dufficult = array(5 => '5 - ' . $lang->def('_VERY_HARD'), 4 => '4 - ' . $lang->def('_HARD'), 3 => '3 - ' . $lang->def('_DIFFICULT_MEDIUM'), 2 => '2 - ' . $lang->def('_DIFFICULT_EASY'), 1 => '1 - ' . $lang->def('_DIFFICULT_VERYEASY'));
     list($title_quest, $cat_sel, $diff_sel, $sel_time) = sql_fetch_row(sql_query("\r\n\t\tSELECT title_quest, idCategory, difficult, time_assigned \r\n\t\tFROM " . $GLOBALS['prefix_lms'] . "_testquest \r\n\t\tWHERE idQuest = '" . $this->id . "'"));
     list($max_score) = sql_fetch_row(sql_query("\r\n\t\tSELECT score_correct\r\n\t\tFROM " . $GLOBALS['prefix_lms'] . "_testquestanswer \r\n\t\tWHERE idQuest = '" . $this->id . "'"));
     $GLOBALS['page']->add(getTitleArea($lang->def('_TEST_SECTION'), 'test') . '<div class="std_block">' . getBackUi(Util::str_replace_once('&', '&amp;', $back_test), $lang->def('_BACK')) . '<div class="title_big">' . $lang->def('_QUEST_ACRN_' . strtoupper($this->getQuestionType())) . ' - ' . $lang->def('_QUEST_' . strtoupper($this->getQuestionType())) . '</div><br />' . Form::openForm('form_mod_quest', 'index.php?modname=question&amp;op=edit') . Form::openElementSpace() . Form::getHidden('type_quest', 'type_quest', $this->getQuestionType()) . Form::getHidden('idQuest', 'idQuest', $this->id) . Form::getHidden('back_test', 'back_test', $url_encode) . Form::getTextarea($lang->def('_QUESTION'), 'title_quest', 'title_quest', $title_quest), 'content');
     if (count($categories) > 1) {
         $GLOBALS['page']->add(Form::getDropdown($lang->def('_TEST_QUEST_CATEGORY'), 'idCategory', 'idCategory', $categories, isset($_POST['idCategory']) ? $_POST['idCategory'] : $cat_sel), 'content');
     }
     $GLOBALS['page']->add(Form::getDropdown($lang->def('_DIFFICULTY'), 'difficult', 'difficult', $arr_dufficult, $diff_sel) . Form::getTextfield($lang->def('_TEST_QUEST_TIMEASS'), 'time_assigned', 'time_assigned', 5, isset($_POST['time_assigned']) ? $_POST['time_assigned'] : $sel_time, $lang->def('_TEST_QUEST_TIMEASS'), $lang->def('_SECONDS')) . Form::getBreakRow() . Form::getTextfield($lang->def('_MAX_SCORE'), 'max_score', 'max_score', 255, isset($_POST['max_score']) ? $_POST['max_score'] : $max_score, $lang->def('_MAX_SCORE')) . Form::getBreakRow() . Form::closeElementSpace() . Form::openButtonSpace() . Form::getButton('add_question', 'add_question', $lang->def('_SAVE')) . Form::closeButtonSpace() . Form::closeForm() . '</div>', 'content');
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:27,代码来源:class.extended_text.php


示例15: edit

 /**
  * this function manage a field
  *
  * @param  string	$back	indicates the return url
  * @return nothing
  *
  * @access public
  */
 function edit($back)
 {
     $back_coded = htmlentities(urlencode($back));
     $array_lang = array();
     $std_lang =& DoceboLanguage::createInstance('standard');
     $lang =& DoceboLanguage::createInstance('field');
     $array_lang = Docebo::langManager()->getAllLangCode();
     $out =& $GLOBALS['page'];
     if (isset($_POST['undo'])) {
         //undo action
         Util::jump_to($back . '&result=undo');
     }
     if (isset($_POST['save_field_' . $this->getFieldType()])) {
         //insert mandatory translation
         $mand_lang = getLanguage();
         $show_on = '';
         if (isset($_POST['show_on_platform'])) {
             while (list($code, ) = each($_POST['show_on_platform'])) {
                 $show_on .= $code . ',';
             }
         }
         //control if all is ok
         if (!isset($_POST['new_freetext'][$mand_lang])) {
             $out->add(getErrorUi($lang->def('_ERR_MUST_DEF_MANADATORY_TRANSLATION')) . getBackUi($this->getUrl() . '&amp;type_field=' . $this->getFieldType() . '&amp;back=' . $back_coded, $std_lang->def('_BACK')), 'content');
             return;
         }
         if ($_POST['new_freetext'][$mand_lang] == $lang->def('_FIELD_NAME') || trim($_POST['new_freetext'][$mand_lang]) == '') {
             $out->add(getErrorUi($lang->def('_ERR_MUST_DEF_MANADATORY_TRANSLATION')) . getBackUi($this->getUrl() . '&amp;type_field=' . $this->getFieldType() . '&amp;back=' . $back_coded, $std_lang->def('_BACK')), 'content');
             return;
         }
         $existsing_translation = array();
         $re_trans = sql_query("\r\n\t\t\tSELECT lang_code\r\n\t\t\tFROM " . $this->_getMainTable() . "\r\n\t\t\tWHERE id_common = '" . $this->id_common . "'");
         while (list($l_code) = sql_fetch_row($re_trans)) {
             $existsing_translation[$l_code] = 1;
         }
         $use_multilang = isset($_POST['use_multi_lang']) ? 1 : 0;
         $re = true;
         //insert other field
         foreach ($_POST['new_freetext'] as $lang_code => $translation) {
             if (isset($existsing_translation[$lang_code])) {
                 if (!sql_query("\r\n\t\t\t\t\tUPDATE " . $this->_getMainTable() . "\r\n\t\t\t\t\tSET translation = '" . $translation . "',\r\n\t\t\t\t\t\tshow_on_platform = '" . $show_on . "',\r\n\t\t\t\t\t\tuse_multilang = '" . $use_multilang . "'\r\n\t\t\t\t\tWHERE id_common = '" . (int) $this->id_common . "' AND lang_code = '" . $lang_code . "'")) {
                     $re = false;
                 }
             } else {
                 if (!sql_query("\r\n\t\t\t\t\tINSERT INTO " . $this->_getMainTable() . "\r\n\t\t\t\t\t(type_field, id_common, lang_code, translation, show_on_platform, use_multilang) VALUES\r\n\t\t\t\t\t('" . $this->getFieldType() . "', '" . (int) $this->id_common . "', '" . $lang_code . "', '" . $translation . "', '" . $show_on . "', '" . $use_multilang . "') ")) {
                     $re = false;
                 }
             }
         }
         Util::jump_to($back . '&result=' . ($re ? 'success' : 'fail'));
     }
     //load value form database
     $re_trans = sql_query("\r\n\t\tSELECT lang_code, translation, show_on_platform, use_multilang\r\n\t\tFROM " . $this->_getMainTable() . "\r\n\t\tWHERE id_common = '" . $this->id_common . "'");
     while (list($l_code, $trans, $show_on, $db_use_multilang) = sql_fetch_row($re_trans)) {
         $translation[$l_code] = $trans;
         if (!isset($show_on_platform)) {
             $show_on_platform = array_flip(explode(',', $show_on));
         }
         if (!isset($use_multilang)) {
             $use_multilang = $db_use_multilang;
         }
     }
     require_once _base_ . '/lib/lib.form.php';
     $form = new Form();
     $out->setWorkingZone('content');
     $out->add('<div class="std_block">');
     $out->add($form->openForm('create_' . $this->getFieldType(), $this->getUrl()) . $form->openElementSpace() . $form->getHidden('type_field', 'type_field', $this->getFieldType()) . $form->getHidden('id_common', 'id_common', $this->id_common) . $form->getHidden('back', 'back', $back_coded));
     $mand_lang = getLanguage();
     foreach ($array_lang as $k => $lang_code) {
         $out->add($form->getTextfield(($mand_lang == $lang_code ? '<span class="mandatory">*</span>' : '') . $lang_code, 'new_freetext_' . $lang_code, 'new_freetext[' . $lang_code . ']', 255, isset($translation[$lang_code]) ? $translation[$lang_code] : '', $lang_code . ' ' . $lang->def('_FIELD_NAME')));
     }
     $GLOBALS['page']->add($this->getMultiLangCheck($use_multilang), 'content');
     $GLOBALS['page']->add($this->getShowOnPlatformFieldset($show_on_platform), 'content');
     $out->add($form->closeElementSpace() . $form->openButtonSpace() . $form->getButton('save_field', 'save_field_' . $this->getFieldType(), $std_lang->def('_SAVE', 'standard')) . $form->getButton('undo', 'undo', $std_lang->def('_UNDO', 'standard')) . $form->closeButtonSpace() . $form->closeForm());
     $out->add('</div>');
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:84,代码来源:class.freetext.php


示例16: implode

echo Form::openForm('classlocations_selection_form', 'index.php?r=adm/adminmanager/classlocations_set');
echo Form::getHidden('selection', 'selection', implode(",", $selection));
echo Form::getHidden('id_user', 'id_user', $id_user);
//--- SEARCH FILTER -------
$this->widget('tablefilter', array('id' => 'classlocations_filter', 'filter_text' => isset($filter_text) ? $filter_text : "", 'js_callback_set' => 'ClassLocations.setFilter', 'js_callback_reset' => 'ClassLocations.resetFilter'));
//--- TABLE -------
$rel_action_over = '<span class="ma_selected_users">' . '<b id="num_users_selected_top">' . (int) (isset($num_selected) ? $num_selected : '0') . '</b> ' . Lang::t('_SELECTED', 'admin_directory') . '</span>';
$rel_action_bottom = '<span class="ma_selected_users">' . '<b id="num_users_selected_bottom">' . (int) (isset($num_selected) ? $num_selected : '0') . '</b> ' . Lang::t('_SELECTED', 'admin_directory') . '</span>';
$_params = array('id' => 'classlocations_table', 'ajaxUrl' => 'ajax.adm_server.php?r=adm/adminmanager/getclasslocationstabledata', 'rowsPerPage' => Get::sett('visuItem', 25), 'startIndex' => 0, 'results' => Get::sett('visuItem', 25), 'sort' => 'location', 'dir' => 'asc', 'generateRequest' => 'ClassLocations.requestBuilder', 'columns' => array(array('key' => 'location', 'label' => Lang::t('_LOCATION', 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getBadgerTranslation2函数代码示例发布时间:2022-05-15
下一篇:
PHP getAvatar函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap