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


PHP Form::getDropdown方法代码示例

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


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

示例1: newsletter

function newsletter()
{
    //access control
    //-TP// funAdminAccess('OP');
    checkPerm('view');
    require_once _base_ . '/lib/lib.form.php';
    $out =& $GLOBALS['page'];
    $out->setWorkingZone("content");
    $lang =& DoceboLanguage::createInstance('admin_newsletter', 'framework');
    YuiLib::load();
    addJs($GLOBALS['where_framework_relative'] . '/modules/newsletter/', 'newsletter.js');
    $form = new Form();
    $out->add(getTitleArea($lang->def("_NEWSLETTER"), "newsletter"));
    $p_size = intval(ini_get('post_max_size'));
    $u_size = intval(ini_get('upload_max_filesize'));
    $max_kb = $p_size < $u_size ? $p_size : $u_size;
    $max = ' (Max. ' . $max_kb . ' Mb) ';
    $out->add('<script>' . 'var _DEL=\'' . $lang->def('_DEL') . '\';' . 'var _ATTACHMENT=\'' . $lang->def('_ATTACHMENT') . '\';' . 'var _MAX=\'' . $max . '\';' . '</script>');
    $out->add("<div class=\"std_block\">\n");
    $acl_manager = Docebo::user()->getAclManager();
    $user_info = $acl_manager->getUser(Docebo::user()->getIdSt(), false);
    $myemail = $user_info[ACL_INFO_EMAIL];
    if (isset($err) && $err != "") {
        $out->add("<b><span class=\"fontRed\">{$err}</span><br />\n");
    }
    $out->add($form->openForm("newsletter_form", "index.php?modname=public_newsletter_admin&amp;op=initsend"));
    $out->add($form->openElementSpace());
    $out->add($form->getTextfield($lang->def("_SENDER"), "fromemail", "fromemail", 255, $myemail));
    $out->add($form->getTextfield($lang->def("_SUBJECT"), "sub", "sub", 255, ""));
    $out->add($form->getTextarea($lang->def("_DESCRIPTION"), "msg", "msg", ""));
    $lang_list = Docebo::langManager()->getAllLangCode();
    //array_unshift($lang_list, $lang->def("_DEFAULT"), $lang->def("_ALL"));
    $lang_list = array(_ANY_LANG_CODE => $lang->def("_ALL")) + $lang_list;
    $out->add('<div id="file">' . $form->getHidden('file_number', 'file_number', '1') . '<div id="div_file_1">' . $form->getFilefield($lang->def('_ATTACHMENT'), 'file_1', 'file_1', '', '', '<a href="#" onclick="delFile(\'1\'); return false;"><span id="rem_span">' . $lang->def('_DEL') . '</span><a>') . '</div>' . '</div>' . '<br/><a href="#" onclick="addFile(); return false;"><span id="add_span">' . $lang->def('_ADD') . '</span></a>');
    $out->add($form->getDropdown($lang->def("_LANGUAGE"), "sel_lang", "sel_lang", $lang_list));
    $out->add($form->getRadio($lang->def("_EMAIL"), "send_type_email", "send_type", "email", true));
    $out->add($form->getRadio($lang->def("_SEND_SMS"), "send_type_sms", "send_type", "sms", false));
    $out->add($form->closeElementSpace());
    $out->add($form->openButtonSpace());
    $out->add($form->getButton('send', 'send', $lang->def('_SEND')));
    $out->add($form->closeButtonSpace());
    $out->add($form->closeForm());
    $out->add("</div>\n");
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:44,代码来源:public_newsletter_admin.php

示例2: printPageWithElement

 public function printPageWithElement($id, $canonical_name)
 {
     require_once _base_ . '/lib/lib.form.php';
     $lang =& DoceboLanguage::createInstance('configuration', 'framework');
     $reSetting = sql_query("\r\n\t\t\tSELECT *\r\n\t\t\tFROM " . $this->table . "\r\n\t\t\tWHERE name like '" . $canonical_name . "'");
     list($plugin_id, $name, $title, $code, $category, $version, $author, $link, $priority, $description, $active) = sql_fetch_row($reSetting);
     $active_option = array('1' => $lang->def('_ACTIVE_PLUGIN'), '0' => $lang->def('_NOT_ACTIVE_PLUGIN'));
     $priority_option = array_keys($this->plugins);
     $active = empty($active) ? 0 : 1;
     echo '<h2>' . $title . '</h2>' . Form::openElementSpace() . Form::getHidden('active_tab_' . $plugin_id, 'active_tab', $plugin_id);
     echo Form::getLineBox($lang->def('_PLUGIN_AUTHOR'), $author);
     echo Form::getLineBox($lang->def('_PLUGIN_LINK'), $link);
     echo Form::getLineBox($lang->def('_PLUGIN_DESCR'), $description);
     echo Form::getLineBox($lang->def('_PLUGIN_CATEGORY'), $category);
     echo Form::getLineBox($lang->def('_PLUGIN_VERSION'), $version);
     echo Form::getDropdown($lang->def('_PLUGIN_PRIORITY'), strtolower("priority_" . $canonical_name), 'priority[' . $plugin_id . ']', $priority_option, $id);
     echo Form::getDropdown($lang->def('_ACTIVE_STATUS'), strtolower($canonical_name), 'active[' . $plugin_id . ']', $active_option, $active);
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:18,代码来源:PluginAdm.php

示例3: mycertificate

function mycertificate(&$url)
{
    checkPerm('view');
    require_once _lms_ . '/lib/lib.course.php';
    require_once _base_ . '/lib/lib.table.php';
    $lang =& DoceboLanguage::createInstance('profile', 'framework');
    $lang =& DoceboLanguage::createInstance('course', 'lms');
    $lang =& DoceboLanguage::createInstance('certificate', 'lms');
    $admin_level = Docebo::user()->getUserLevelId();
    $show_preview = true;
    //($admin_level == ADMIN_GROUP_ADMIN || $admin_level == ADMIN_GROUP_GODADMIN);
    $title = $lang->def('_MY_CERTIFICATE', 'certificate');
    $html = getTitleArea($title, 'mycertificate') . '<div class="std_block">';
    //--- draw time periods dropdown ---------------------------------------------
    $period_start = '';
    $period_end = '';
    //extract checking period
    $p_model = new TimeperiodsAlms();
    $year = date("Y");
    $p_list = array("0" => $lang->def('_ALL'));
    $p_selected = Get::req('selected_period', DOTY_INT, 0);
    $p_data = $p_model->getTimePeriods('', true);
    if (count($p_data) > 0) {
        foreach ($p_data as $obj) {
            $p_list[$obj->id_period] = Format::date($obj->start_date, 'date') . ' - ' . Format::date($obj->end_date, 'date');
            if ($p_selected == $obj->id_period) {
                $period_start = $obj->start_date;
                $period_end = $obj->end_date;
            }
        }
    }
    if (!array_key_exists($p_selected, $p_list)) {
        $p_selected = 0;
        $period_start = '';
        $period_end = '';
    }
    //date dropdown
    $onchange = ' onchange="javascript:this.form.submit();"';
    $html_filter_cert = '' . Form::openForm('selected_period_form_cert', $url->getUrl()) . Form::openElementSpace() . Form::getDropdown(Lang::t('_TIME_PERIODS', 'menu'), 'selected_period_cert', 'selected_period', $p_list, $p_selected, '', '', $onchange) . Form::closeElementSpace() . Form::getHidden('current_tab_cert', 'current_tab', Get::req('current_tab', DOTY_STRING, 'cert')) . Form::getHidden('is_filtering_cert', 'is_filtering_cert', 1) . Form::closeForm();
    $html_filter_meta = '' . Form::openForm('selected_period_form_meta', $url->getUrl()) . Form::openElementSpace() . Form::getDropdown(Lang::t('_TIME_PERIODS', 'menu'), 'selected_period_meta', 'selected_period', $p_list, $p_selected, '', '', $onchange) . Form::closeElementSpace() . Form::getHidden('current_tab_meta', 'current_tab', Get::req('current_tab', DOTY_STRING, 'meta')) . Form::getHidden('is_filtering_meta', 'is_filtering_meta', 1) . Form::closeForm();
    //----------------------------------------------------------------------------
    $cert = new Certificate();
    /*
     * Print certificates tables, subdivided by year and course type
     */
    $html_cert = '';
    $tb_cert = new Table(0);
    $cont_h = array($lang->def('_YEAR', 'standard'), $lang->def('_COURSE_CODE', 'course'), $lang->def('_COURSE', 'course'), $lang->def('_CERTIFICATE_NAME', 'course'), $lang->def('_DATE_END', 'course'));
    //if ($show_preview) $cont_h[] = '<img src="'.getPathImage('lms').'certificate/preview.gif" alt="'.$lang->def('_PREVIEW').'" />';
    //$cont_h[] = '<img src="'.getPathImage('lms').'certificate/certificate.gif" alt="'.$lang->def('_ALT_TAKE_A_COPY').'" />';
    if ($show_preview) {
        $cont_h[] = '<span class="ico-sprite subs_view"><span>' . $lang->def('_PREVIEW') . '"</span></span>';
    }
    $cont_h[] = '<span class="ico-sprite subs_pdf"><span>' . $lang->def('_ALT_TAKE_A_COPY') . '</span></span>';
    $type_h = array('img-cell', '', '', 'align-center', 'align-center', 'img-cell', 'img-cell');
    if ($show_preview) {
        $type_h[] = 'nowarp';
    }
    $type_h[] = 'nowarp';
    $tb_cert->setColsStyle($type_h);
    $tb_cert->addHead($cont_h);
    $available_cert = $cert->certificateForCourses(false, false);
    $released = $cert->certificateReleased(Docebo::user()->getIdST());
    $query_courses = "" . " SELECT c.idCourse, c.code, c.name, u.status AS user_status, c.course_type, c.permCloseLO " . " FROM %lms_course AS c JOIN %lms_courseuser AS u ON (c.idCourse = u.idCourse) " . " WHERE u.idUser = '" . Docebo::user()->getIdST() . "' " . ($period_start != '' ? " AND u.date_complete >= '" . $period_start . "' " : "") . ($period_end != '' ? " AND u.date_complete <= '" . $period_end . "' " : "") . " ORDER BY u.date_complete DESC, u.status DESC ";
    $course_list = sql_query($query_courses);
    $arr_courses = array();
    $arr_courses_ids = array();
    while ($obj = sql_fetch_object($course_list)) {
        $arr_courses[$obj->course_type][] = array($obj->idCourse, $obj->code, $obj->name, $obj->user_status, $obj->permCloseLO);
        $arr_courses_ids[] = $obj->idCourse;
    }
    $arr_course_types = getCourseTypes();
    $table_displayed = false;
    //extract certificates details and availability by courses ids
    $arr_courses_ids = array_unique($arr_courses_ids);
    $arr_certificates_availability = array();
    $arr_certificates_details = array();
    if (count($arr_courses_ids) > 0) {
        $query = "SELECT id_certificate, id_course, available_for_status " . " FROM " . $GLOBALS['prefix_lms'] . "_certificate_course" . " WHERE id_course IN (" . implode(",", $arr_courses_ids) . ")";
        //." WHERE id_certificate = '".$id_cert."'"
        //." AND id_course IN (".implode(",", $arr_courses_ids).")";
        $res = sql_query($query);
        while (list($id_certificate, $id_course, $available_for_status) = sql_fetch_row($res)) {
            $arr_certificates_availability[$id_course][$id_certificate] = $available_for_status;
        }
        $cont = array();
        $query = "SELECT idCourse, date_inscr, date_first_access, date_complete, status" . " FROM %lms_courseuser WHERE idUser = '" . Docebo::user()->getIdST() . "'" . " AND idCourse IN (" . implode(",", $arr_courses_ids) . ") " . ($period_start != '' ? " AND date_complete >= '" . $period_start . "' " : "") . ($period_end != '' ? " AND date_complete <= '" . $period_end . "' " : "");
        $res = sql_query($query);
        while (list($id_course, $date_inscr, $date_begin, $date_end, $status) = sql_fetch_row($res)) {
            $arr_certificate_details[$id_course] = array($date_inscr, $date_begin, $date_end, $status);
        }
    }
    //order arr_courses by key
    ksort($arr_courses);
    $years = array();
    foreach ($arr_courses as $course_type => $course_data) {
        if (in_array($course_type, array_keys($arr_course_types))) {
            //$html .= '';
            $tb = new Table(0);
            $tb->setColsStyle($type_h);
//.........这里部分代码省略.........
开发者ID:abhinay100,项目名称:forma_app,代码行数:101,代码来源:mycertificate.php

示例4: modTransaction

function modTransaction()
{
    require_once _base_ . '/lib/lib.table.php';
    require_once _base_ . '/lib/lib.form.php';
    require_once _base_ . '/lib/lib.dialog.php';
    require_once _lms_ . '/lib/lib.course.php';
    require_once _lms_ . '/lib/lib.date.php';
    $lang =& DoceboLanguage::createInstance('transaction');
    $acl_man = Docebo::user()->getAclManager();
    $man_transaction = new Man_Transaction();
    $course_man = new Man_Course();
    $date_man = new DateManager();
    $id_transaction = Get::req('id', DOTY_INT, 0);
    $transaction_info = $man_transaction->getTransactionInfo($id_transaction);
    if (isset($_POST['update'])) {
        $payment_status = Get::req('payment_status', DOTY_INT, 0);
        $course_status = Get::req('course_status', DOTY_INT, 0);
        $note = Get::req('note', DOTY_MIXED, '');
        if ($man_transaction->updateTransaction($id_transaction, $payment_status, $course_status, $note)) {
            if (isset($_POST['confirm'])) {
                $activations = array();
                foreach ($_POST['confirm'] as $id => $n) {
                    list($id_course, $id_date) = explode('_', $id);
                    if ($id_date != 0) {
                        $activations[$id_course]['dates'][$id_date] = $id_date;
                    } else {
                        $activations[$id_course] = $id_course;
                    }
                }
                if ($man_transaction->activateCourses($id_transaction, $transaction_info['id_user'], $activations)) {
                    Util::jump_to('index.php?modname=transaction&op=transaction&res=ok');
                }
            } else {
                Util::jump_to('index.php?modname=transaction&op=transaction&res=ok');
            }
        }
        Util::jump_to('index.php?modname=transaction&op=transaction&res=err_up');
    }
    $array_title = array('index.php?modname=transaction&amp;op=transaction' => $lang->def('_TRANSACTION'), $lang->def('_MOD_TRANSACTION'));
    //Status info & note
    $array_payment_status = array('-1' => $lang->def('_CANCELLED'), '0' => $lang->def('_WAITING_PAYMENT'), '1' => $lang->def('_PARTIAL_PAID'), '2' => $lang->def('_PAID'));
    $array_course_status = array('-1' => $lang->def('_CANCELLED'), '0' => $lang->def('_NO_COURSE_ACTIVATED'), '1' => $lang->def('_SOME_COURSE_ACTIVATED'), '2' => $lang->def('_ALL_COURSE_ACTIVATED'));
    cout(getTitleArea($array_title) . '<div class="std_block">' . Form::openForm('transaction_info', 'index.php?modname=transaction&amp;op=mod&amp;id=' . $id_transaction) . Form::openElementSpace() . Form::getDropdown($lang->def('_PAYMENT_STATUS_FILTER'), 'payment_status', 'payment_status', $array_payment_status, $transaction_info['payment_status']) . Form::getDropdown($lang->def('_COURSE_STATUS_FILTER'), 'course_status', 'course_status', $array_course_status, $transaction_info['course_status']) . Form::getSimpleTextarea($lang->def('_NOTES'), 'note', 'note', $transaction_info['note']) . Form::closeElementSpace());
    //User info
    $user_info = $acl_man->getUser($transaction_info['id_user'], false);
    $tb_user = new Table(0, $lang->def('_USER_INFO'), $lang->def('_USER_INFO'));
    $cont_h = array($lang->def('_USERNAME'), $lang->def('_FIRSTNAME'), $lang->def('_LASTNAME'), $lang->def('_EMAIL'));
    $type_h = array('', '', '', '');
    $tb_user->setColsStyle($type_h);
    $tb_user->addHead($cont_h);
    $tb_user->addBody(array($acl_man->relativeId($user_info[ACL_INFO_USERID]), $user_info[ACL_INFO_FIRSTNAME], $user_info[ACL_INFO_LASTNAME], $user_info[ACL_INFO_EMAIL]));
    cout('<br />' . $tb_user->getTable());
    //Payment info if we need it
    //Product info
    $tb_product = new Table(0, $lang->def('_PRODUCT_INFO'), $lang->def('_PRODUCT_INFO'));
    $cont_h = array($lang->def('_CODE'), $lang->def('_NAME'), $lang->def('_DATE_BEGIN'), $lang->def('_DATE_END'), $lang->def('_COURSE_PRIZE'), $lang->def('_CONFIRM_COURSE'));
    $type_h = array('', '', '', '', '', '');
    $tb_product->setColsStyle($type_h);
    $tb_product->addHead($cont_h);
    $transaction_course = $man_transaction->getTransactionCourses($id_transaction);
    foreach ($transaction_course as $id_course => $details) {
        if (is_array($details)) {
            foreach ($details['dates'] as $id_date) {
                $date_info = $date_man->getDateInfo($id_date);
                $checked = false;
                $other = '';
                if ($man_transaction->controlActivation($id_transaction, $id_course, $id_date)) {
                    $checked = true;
                    $other = 'disabled="disabled"';
                }
                $tb_product->addBody(array($date_info['code'], $date_info['name'], Format::date($date_info['date_begin']), Format::date($date_info['date_end']), $date_info['price'], Form::getInputCheckbox($id_course . '_' . $id_date, 'confirm[' . $id_course . '_' . $id_date . ']', 1, $checked, $other)));
            }
        } else {
            $course_info = $course_man->getCourseInfo($id_course);
            $checked = false;
            $other = '';
            if ($man_transaction->controlActivation($id_transaction, $id_course)) {
                $checked = true;
                $other = 'disabled="disabled"';
            }
            $tb_product->addBody(array($course_info['code'], $course_info['name'], $course_info['date_begin'] !== '0000-00-00' ? Format::date($course_info['date_begin'], 'date') . ($course_info['hour_begin'] !== '-1' ? $course_info['hour_begin'] : '') : '', $course_info['date_end'] !== '0000-00-00' ? Format::date($course_info['date_end'], 'date') . ($course_info['hour_end'] !== '-1' ? $course_info['hour_end'] : '') : '', $course_info['prize'] == '' ? '0' : $course_info['prize'], Form::getInputCheckbox($id_course . '_0', 'confirm[' . $id_course . '_0]', 1, $checked, $other)));
        }
    }
    cout('<br />' . $tb_product->getTable() . Form::openButtonSpace() . Form::getButton('update', 'update', $lang->def('_UPDATE')) . Form::getButton('back_mod', 'back_mod', $lang->def('_BACK')) . Form::closeButtonSpace() . Form::closeForm());
    cout('</div>');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:86,代码来源:transaction.php

示例5: function

			wmode: "opaque",
			style: {
				padding: 20,
				animationEnabled: false,
				border: {color: 0x000000, size: 1},
        font: {name: "Arial", color: 0x000000, size: 12},
				xAxis: {labelRotation: 45}
			}
		});

		return Chart;
	}

	var $D = YAHOO.util.Dom;
	var $E = YAHOO.util.Event;

	$E.onDOMReady(function(e) {
		$E.addListener("chapter_chart_select", "change", function(e) {
			$D.get("id_user").value = this.value;
			$D.get("chapter_chart_form").submit();
		});
	});
</script>
<div>
	<?php 
echo Form::getDropdown(Lang::t('_USER', 'course_charts'), 'chapter_chart_select', 'chapter_chart_select', $users_list, $selected_user);
echo Form::openForm('chapter_chart_form', $form_url);
echo Form::getHidden('id_user', 'id_user', $selected_user);
echo Form::closeForm();
?>
</div>
开发者ID:abhinay100,项目名称:forma_app,代码行数:31,代码来源:show_chapter_chart.php

示例6: 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

示例7: array

echo Form::getButton("filter_reset", "filter_reset", Lang::t('_RESET', 'standard'), "reset_b");
?>
		</div>
		<a id="advanced_search" class="advanced_search" href="javascript:;"><?php 
echo Lang::t("_ADVANCED_SEARCH", 'standard');
?>
</a>
		<div id="advanced_search_options" class="advanced_search_options" style="display: <?php 
echo $is_active_advanced_filter ? 'block' : 'none';
?>
">
			<?php 
//filter inputs
$orgchart_after = '<br />' . Form::getInputCheckbox('filter_descendants', 'filter_descendants', 1, $filter_descendants ? true : false, "") . '&nbsp;<label for="filter_descendants">' . Lang::t('_ORG_CHART_INHERIT', 'organization_chart') . '</label>';
echo Form::getDropdown(Lang::t('_DIRECTORY_MEMBERTYPETREE', 'admin_directory'), 'filter_orgchart', 'filter_orgchart', $orgchart_list, (int) $filter_orgchart, $orgchart_after);
echo Form::getDropdown(Lang::t('_GROUPS', 'standard'), 'filter_groups', 'filter_groups', $groups_list, (int) $filter_groups);
//buttons
echo Form::openButtonSpace();
echo Form::getButton('set_advanced_filter', false, Lang::t('_SEARCH', 'standard'));
echo Form::getButton('reset_advanced_filter', false, Lang::t('_UNDO', 'standard'));
echo Form::closeButtonSpace();
?>
		</div>
	</div>
</div>
<?php 
$columns = array(array('key' => 'userid', 'label' => Lang::t('_USERNAME', 'standard'), 'sortable' => true, 'formatter' => 'CourseStats.useridFormatter', 'className' => 'min-cell'), array('key' => 'fullname', 'label' => Lang::t('_NAME', 'standard'), 'sortable' => true, 'formatter' => 'CourseStats.fullnameFormatter', 'className' => 'min-cell'), array('key' => 'level', 'label' => Lang::t('_LEVEL', 'standard'), 'sortable' => true, 'className' => 'min-cell'), array('key' => 'status', 'label' => Lang::t('_STATUS', 'standard'), 'sortable' => true, 'className' => 'min-cell', 'editor' => 'CourseStats.statusEditor'));
foreach ($lo_list as $lo) {
    $icon = '(' . $lo->type . ')';
    //'<img alt="'.$lo->type.'" title="'.$lo->type.'" src="'.getPathImage().'lobject/'.$lo->type.'.gif" />';
    $link = '';
开发者ID:abhinay100,项目名称:forma_app,代码行数:31,代码来源:show.php

示例8: getUserInfoModUi

 /**
  * gui for user info management
  */
 function getUserInfoModUi()
 {
     require_once _base_ . '/lib/lib.form.php';
     require_once _base_ . '/lib/lib.preference.php';
     $this->loadUserData($this->_user_profile->getIdUser());
     $preference = new UserPreferences($this->_user_profile->getIdUser());
     $html = '<div class="up_user_info">' . '<div class="up_name">' . $this->resolveUsername(false, $this->_user_profile->getIdUser()) . '</div>';
     // user standard info -----------------------------------------------------------------
     $html .= Form::openForm('mod_up', $this->_url_man->getUrl($this->_varname_action . '=saveinfo'), false, false, 'multipart/form-data');
     if ($this->_user_profile->godMode()) {
         $html .= Form::getTextfield($this->_lang->def('_USERNAME'), 'up_userid', 'up_userid', '255', Get::req('up_userid', DOTY_MIXED, $this->acl_man->relativeId($this->user_info[ACL_INFO_USERID]), true));
     } else {
         $html .= Form::getLineBox($this->_lang->def('_USERNAME'), $this->acl_man->relativeId($this->user_info[ACL_INFO_USERID]));
     }
     $html .= Form::getTextfield($this->_lang->def('_LASTNAME'), 'up_lastname', 'up_lastname', '255', Get::req('up_lastname', DOTY_MIXED, $this->user_info[ACL_INFO_LASTNAME], true)) . Form::getTextfield($this->_lang->def('_FIRSTNAME'), 'up_firstname', 'up_firstname', '255', Get::req('up_firstname', DOTY_MIXED, $this->user_info[ACL_INFO_FIRSTNAME], true)) . Form::getTextfield($this->_lang->def('_EMAIL'), 'up_email', 'up_email', '255', Get::req('up_email', DOTY_MIXED, $this->user_info[ACL_INFO_EMAIL], true));
     // user extra field ------------------------------------------------------------------
     $html .= $this->getPlayField();
     $html .= $preference->getModifyMask('ui.');
     if ($this->_user_profile->godMode()) {
         $acl_man =& Docebo::user()->getAclManager();
         $html .= Form::getPassword(Lang::t('_NEW_PASSWORD', 'register'), 'up_new_pwd', 'up_new_pwd', '255');
         $html .= Form::getPassword(Lang::t('_RETYPE_PASSWORD', 'register'), 'up_repeat_pwd', 'up_repeat_pwd', '255');
         if (Docebo::user()->getUserLevelId() == ADMIN_GROUP_GODADMIN && Get::cur_plat() === 'framework') {
             $html .= Form::getCheckBox(Lang::t('_FORCE_PASSWORD_CHANGE', 'admin_directory'), 'force_changepwd', 'force_changepwd', 1, $this->user_info[ACL_INFO_FORCE_CHANGE]);
         }
         $lv_lang =& DoceboLanguage::createInstance('admin_directory', 'framework');
         if (Docebo::user()->getUserLevelId() == ADMIN_GROUP_GODADMIN) {
             $level_list = array(ADMIN_GROUP_GODADMIN => $lv_lang->def('_DIRECTORY_' . ADMIN_GROUP_GODADMIN), ADMIN_GROUP_ADMIN => $lv_lang->def('_DIRECTORY_' . ADMIN_GROUP_ADMIN), ADMIN_GROUP_PUBLICADMIN => $lv_lang->def('_DIRECTORY_' . ADMIN_GROUP_PUBLICADMIN), ADMIN_GROUP_USER => $lv_lang->def('_DIRECTORY_' . ADMIN_GROUP_USER));
         } else {
             $level_list = array(ADMIN_GROUP_USER => $lv_lang->def('_DIRECTORY_' . ADMIN_GROUP_USER));
         }
         $html .= Form::getDropdown($this->_lang->def('_LEVEL'), 'up_level', 'up_level', $level_list, $acl_man->getUserLevelId($this->_user_profile->getIdUser()));
     }
     // Social ------------------------------------------------------------------
     /* $html.=Form::getTextfield(	$this->_lang->def('_FACEBOOK_ID'),
     										'facebook_id',
     										'facebook_id',
     										'255',
     										Get::req('facebook_id', DOTY_MIXED, $this->user_info[ACL_INFO_FACEBOOK_ID], true ) );
     
     		$html.=Form::getTextfield(	$this->_lang->def('_TWITTER_ID'),
     										'twitter_id',
     										'twitter_id',
     										'255',
     										Get::req('twitter_id', DOTY_MIXED, $this->user_info[ACL_INFO_TWITTER_ID], true ) );
     
     		$html.=Form::getTextfield(	$this->_lang->def('_LINKEDIN_ID'),
     										'linkedin_id',
     										'linkedin_id',
     										'255',
     										Get::req('linkedin_id', DOTY_MIXED, $this->user_info[ACL_INFO_LINKEDIN_ID], true ) );
     
     		$html.=Form::getTextfield(	$this->_lang->def('_GOOGLE_ID'),
     										'google_id',
     										'google_id',
     										'255',
     										Get::req('google_id', DOTY_MIXED, $this->user_info[ACL_INFO_GOOGLE_ID], true ) ); */
     //signature --------------------------------------------------------------------------
     $html .= Form::getTextarea($this->_lang->def('_SIGNATURE'), 'up_signature', 'up_signature', Get::req('up_signature', DOTY_MIXED, $this->user_info[ACL_INFO_SIGNATURE], true));
     if (isset($_GET['modname']) && $_GET['modname'] == 'reservation') {
         $html .= Form::openButtonSpace() . Form::getButton('save', 'save', $this->_lang->def('_SAVE')) . Form::getButton('undo_profile', 'undo_profile', $this->_lang->def('_UNDO')) . Form::closeButtonSpace();
         $html .= Form::closeForm() . '</div>';
     } else {
         $html .= Form::openButtonSpace() . Form::getButton('save', 'save', $this->_lang->def('_SAVE')) . Form::getButton('undo', 'undo', $this->_lang->def('_UNDO')) . Form::closeButtonSpace();
         $html .= Form::closeForm() . '</div>';
     }
     return $html;
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:71,代码来源:lib.user_profile.php

示例9: isset

 *  - $competence_langs: name and description of the competence in the languages of the platform
 *  - $competence_typology:
 *  - $competence_type:
 *  - $competence_score:
 *  - $competence_expiration:
 *
 */
if (isset($id_competence)) {
    $_form_id = 'mod_competence_form';
    $_form_action = 'index.php?r=adm/competences/mod_competence_action';
} else {
    $_form_id = 'add_competence_form';
    $_form_action = 'index.php?r=adm/competences/add_competence_action';
}
echo Form::openForm($_form_id, $_form_action);
echo Form::getDropdown(Lang::t('_CATEGORY', 'competences'), 'id_category', 'id_category', $competence_categories, isset($id_category) && (int) $id_category > 0 ? (int) $id_category : '0');
//edit name and description in all languages (in a TabView widget)
echo '<div id="competence_langs_tab" class="yui-navset">';
$_tabview_titles = '<ul class="yui-nav">';
$_tabview_contents = '<div class="yui-content">';
$_langs = Docebo::langManager()->getAllLanguages(true);
foreach ($_langs as $_lang_code => $_lang_data) {
    $_name = isset($competence_langs[$_lang_code]) ? $competence_langs[$_lang_code]['name'] : "";
    $_desc = isset($competence_langs[$_lang_code]) ? $competence_langs[$_lang_code]['description'] : "";
    //echo Form::getOpenFieldset($_lang_data['description']);
    $_tabview_titles .= '<li' . ($_lang_code == getLanguage() ? ' class="selected"' : '') . '>' . '<a href="#langs_tab_' . $_lang_code . '"><em>' . $_lang_code . ($_name == '' && isset($id_competence) ? ' (*)' : '') . '</em></a></li>';
    $_tabview_contents .= '<div id="langs_tab_' . $_lang_code . '">';
    $_tabview_contents .= Form::getTextfield(Lang::t('_NAME', 'standard'), 'name_' . $_lang_code, 'name[' . $_lang_code . ']', 255, $_name);
    $_tabview_contents .= Form::getTextarea(Lang::t('_DESCRIPTION', 'standard'), 'description_' . $_lang_code, 'description[' . $_lang_code . ']', $_desc);
    $_tabview_contents .= '</div>';
    //echo Form::getCloseFieldset();
开发者ID:abhinay100,项目名称:forma_app,代码行数:31,代码来源:competence_editmask.php

示例10: modEvent

 function modEvent()
 {
     checkPerm('view');
     require_once _base_ . '/lib/lib.form.php';
     $id_event = importVar('id_event', true, 0);
     $lang =& DoceboLanguage::createInstance('reservation');
     $out = $GLOBALS['page'];
     $out->setWorkingZone('content');
     $man_res = new Man_Reservation();
     if (isset($_GET['confirm'])) {
         $confirm = importVar('confirm', true, 0);
         $id_course = importVar('id_course', true, 0);
         $id_laboratory = importVar('id_laboratory', true, 0);
         $id_category = importVar('id_category', true, 0);
         $title = importVar('title', false, '');
         $description = importVar('description', false, '');
         $date = importVar('date', false, '');
         $max_user = importVar('max_user', true, 0);
         $deadline = importVar('deadline', false, '');
         $from_time_h = importVar('from_time_h', false, '');
         $from_time_m = importVar('from_time_m', false, '');
         $to_time_h = importVar('to_time_h', false, '');
         $to_time_m = importVar('to_time_m', false, '');
         $date = Format::dateDb($date, 'date');
         $deadline = Format::dateDb($deadline, 'date');
         $from_time = $from_time_h . ':' . $from_time_m . ':00';
         $to_time = $to_time_h . ':' . $to_time_m . ':00';
         if ($date < date('Y-m-d') || $date < $deadline || $deadline < date('Y-m-d')) {
             Util::jump_to('index.php?modname=reservation&op=mod_event&amp;id_event=' . $id_event . '&amp;error=date');
         }
         if ($from_time >= $to_time) {
             Util::jump_to('index.php?modname=reservation&op=mod_event&amp;id_event=' . $id_event . '&amp;error=time');
         }
         if ($confirm) {
             $result = $man_res->modEvent($id_event, $id_course, $id_laboratory, $id_category, $title, $description, $date, $max_user, $deadline, $from_time, $to_time);
         }
         if ($result) {
             Util::jump_to('index.php?modname=reservation&op=reservation&active_tab=subscribed_user');
         }
         Util::jump_to('index.php?modname=reservation&op=mod_event&amp;id_event=' . $id_event . '&amp;error=laboratory');
     }
     $out->add(getTitleArea($lang->def('_SAVE'), '', $lang->def('_EVENT')) . '<div class="std_block">');
     $error = importVar('error', false, '');
     if ($error !== '') {
         switch ($error) {
             case 'date':
                 $out->add(getErrorUi($lang->def('_WRONG_DATE')));
                 break;
             case 'time':
                 $out->add(getErrorUi($lang->def('_WRONG_TIME')));
                 break;
             case 'laboratory':
                 $out->add(getErrorUi($lang->def('_LOCATION_BUSY')));
                 break;
         }
     }
     $event = array();
     $event = $man_res->getEventInfo($id_event);
     $date = Format::date($event[EVENT_DATE], 'date');
     $deadline = Format::date($event[EVENT_DEADLINE], 'date');
     $from_time_h = $event[EVENT_FROM_TIME][0] . $event[EVENT_FROM_TIME][1];
     $from_time_m = $event[EVENT_FROM_TIME][3] . $event[EVENT_FROM_TIME][4];
     $to_time_h = $event[EVENT_TO_TIME][0] . $event[EVENT_TO_TIME][1];
     $to_time_m = $event[EVENT_TO_TIME][3] . $event[EVENT_TO_TIME][4];
     $out->add(Form::openForm('form_event', 'index.php?modname=reservation&amp;op=mod_event&amp;confirm=1') . Form::openElementSpace() . Form::getHidden('id_event', 'id_event', $event[EVENT_ID]) . Form::getHidden('id_course', 'id_course', $event[EVENT_ID_COURSE]) . Form::getTextfield($lang->def('_TITLE'), 'title', 'title', 255, $event[EVENT_TITLE]) . Form::getTextarea($lang->def('_DESCRIPTION'), 'description', 'description', $event[EVENT_DESCRIPTION]) . Form::getDropdown($lang->def('_LOCATION'), 'id_laboratory', 'id_laboratory', $man_res->getLaboratories(), $event[EVENT_ID_LABORATORY]) . Form::getDropdown($lang->def('_CATEGORY'), 'id_category', 'id_category', $man_res->getCategory(), $event[EVENT_ID_CATEGORY]) . Form::getDateField($lang->def('_DATE'), 'date', 'date', $date) . Form::getDateField($lang->def('_DEADLINE'), 'deadline', 'deadline', $deadline) . Form::getTextfield($lang->def('_MAX_USER'), 'max_user', 'max_user', 255, $event[EVENT_MAX_USER]) . Form::getLineBox($lang->def('_FROM_TIME'), Form::getInputDropdown('', 'from_time_h', 'from_time_h', $man_res->getHours(), $from_time_h, false) . ' : ' . Form::getInputDropdown('', 'from_time_m', 'from_time_m', $man_res->getMinutes(), $from_time_m, false)) . Form::getLineBox($lang->def('_TO_TIME'), Form::getInputDropdown('', 'to_time_h', 'to_time_h', $man_res->getHours(), $to_time_h, false) . ' : ' . Form::getInputDropdown('', 'to_time_m', 'to_time_m', $man_res->getMinutes(), $to_time_m, false)) . Form::closeElementSpace() . Form::openButtonSpace() . Form::getButton('mod_event', 'mod_event', $lang->def('_SAVE')) . Form::getButton('undo', 'undo', $lang->def('_UNDO')) . Form::closeButtonSpace() . Form::closeForm());
     $out->add('</div>', 'content');
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:67,代码来源:reservation.php

示例11: modroom

 function modroom()
 {
     require_once _base_ . '/lib/lib.form.php';
     require_once $GLOBALS['where_scs'] . '/lib/lib.room.php';
     $lang =& DoceboLanguage::createInstance('admin_config', 'scs');
     $out =& $GLOBALS['page'];
     $id_room = importVar('id_room', true, 0);
     $rules = getRoomRules($id_room);
     $out->setWorkingZone('content');
     $out->add(getTitleArea($lang->def('_ROOM_MAN'), 'admin_conf') . '<div class="std_block">');
     $room_types = array("course" => $lang->def('_COURSE'), "private" => $lang->def('_PRIVATE'), "public" => $lang->def('_PUBLIC'));
     $out->add(Form::openForm('rules_admin', 'index.php?modname=room&amp;op=updroom') . Form::openElementSpace() . Form::getHidden('id_room', 'id_room', $id_room) . Form::getTextfield($lang->def('_ROOM_NAME'), 'rules_room_name', 'rules[room_name]', 255, $rules['room_name']) . Form::getDropdown($lang->def('_ROOM_TYPE'), 'rules_room_type', 'rules[room_type]', $room_types, $rules['room_type']));
     reset($rules);
     while (list($var_name, $var_value) = each($rules)) {
         if (substr($var_name, 0, 6) == 'enable') {
             $out->add(maskMultiple($var_name, $var_value));
         }
     }
     $out->add(Form::closeElementSpace() . Form::openButtonSpace() . Form::getButton('save', 'save', $lang->def('_SAVE')) . Form::getButton('undo', 'undo', $lang->def('_UNDO')) . Form::closeButtonSpace() . Form::closeForm());
     $out->add('</div>');
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:21,代码来源:room.php

示例12: function

			var callback = {
				success: function(o) {
					// we get this back from lib.lang.php
					var res =YAHOO.lang.JSON.parse(o.responseText);
					YAHOO.util.Dom.get('intro_txt').innerHTML=res['intro'];
					YAHOO.util.Dom.get('intro_title').innerHTML=res['title'];
					YAHOO.util.Dom.get('btn_next').innerHTML=res['btn'];
				}
			};

			var sUrl ='index.php?set_lang='+lang;

			YAHOO.util.Connect.asyncRequest('GET', sUrl, callback);
		});

	});
</script>


<div class="lang_sel_box">
<?php 
echo Form::getDropdown(Lang::t('_LANGUAGE') . ':', 'language', 'language', Lang::getLanguageList('language'), Lang::getSelLang());
?>

</div><div class="no_float"></div>

<div id="intro_txt">
<?php 
echo _INSTALLER_INTRO_TEXT;
?>
</div>
开发者ID:abhinay100,项目名称:forma_app,代码行数:31,代码来源:Step1.php

示例13: writePollReport

function writePollReport($id_poll, $id_param, $back_url, $mvc = false)
{
    require_once _lms_ . '/lib/lib.param.php';
    require_once _lms_ . '/lib/lib.poll.php';
    $poll_man = new PollManagement($id_poll);
    $report_man = new ReportPollManagement();
    $poll_info = $poll_man->getPollAllInfo();
    $valid_track = $report_man->getAllTrackId($id_poll, 'valid');
    $tot_tracks = $report_man->getHowMuchStat($id_poll, 'valid');
    // save page track info
    $quest_sequence_number = $poll_man->getInitQuestSequenceNumberForPage(1);
    $query_question = $report_man->getQuestions($id_poll);
    $treeview_value = str_replace('treeview_selected_' . $_SESSION['idCourse'], '', array_search($poll_info['title'], $_POST));
    $editions_filter = Get::req('poll_editions_filter', DOTY_INT, -1);
    if (Get::req('del_filter', DOTY_STRING, '') != '') {
        $editions_filter = -1;
    }
    $output = "";
    $str = (!$mvc ? '<div class="std_block">' : '') . '<div class="test_answer_space">';
    if ($mvc) {
        $output .= $str;
    } else {
        cout($str, 'content');
    }
    //--- filter on edition ------------------------------------------------------
    //retrieve editions
    $query = "SELECT * FROM %lms_course_editions WHERE id_course = " . (int) $_SESSION['idCourse'];
    $res = sql_query($query);
    //is there any edition ?
    if (sql_num_rows($res) > 0) {
        $arr_editions = array(-1 => Lang::t('_FILTEREDITIONSELECTONEOPTION', 'stats', 'lms'));
        //list of editions for the dropdown, in the format: "[code] name (date_begin - date_end)"
        while ($einfo = sql_fetch_object($res)) {
            $_label = '';
            if ($einfo->code != '') {
                $_label .= '[' . $einfo->code . '] ';
            }
            if ($einfo->name != '') {
                $_label .= $einfo->neme;
            }
            if (($einfo->date_begin != '' || $einfo->date_begin != '0000-00-00') && ($einfo->date_end != '' || $einfo->date_end != '0000-00-00')) {
                $_label .= ' (' . Format::date($einfo->date_begin, 'date') . ' - ' . Format::date($einfo->date_end, 'date') . ')';
            }
            if ($_label == '') {
                //...
            }
            $arr_editions[$einfo->id_edition] = $_label;
        }
        //draw editions dropdown and filter
        $str = Form::openForm('tree_filter_form', 'index.php?modname=stats&amp;op=statcourse') . Form::getHidden('seq_0.' . $treeview_value, 'treeview_selected_' . $_SESSION['idCourse'] . $treeview_value, $poll_info['title']) . Form::getHidden('treeview_selected_' . $_SESSION['idCourse'], 'treeview_selected_' . $_SESSION['idCourse'], $treeview_value) . Form::getHidden('treeview_state_' . $_SESSION['idCourse'], 'treeview_state_' . $_SESSION['idCourse'], $_POST['treeview_state_' . $_SESSION['idCourse']]) . Form::openElementSpace() . Form::getDropdown(Lang::t('_FILTEREDITIONSELECTTITLE', 'stats', 'lms'), 'poll_editions_filter', 'poll_editions_filter', $arr_editions, $editions_filter) . Form::openButtonSpace() . Form::getButton('filter', 'filter', Lang::t('_SEARCH', 'stats', 'lms')) . Form::getButton('del_filter', 'del_filter', Lang::t('_DEL_FILTER', 'stats', 'lms')) . Form::closeButtonSpace() . Form::closeElementSpace() . Form::closeForm();
        if ($mvc) {
            $output .= $str;
        } else {
            cout($str, 'content');
        }
    }
    //------------------------------------------------------------------------------
    $user = array();
    $tracks = array();
    if ($editions_filter > 0) {
        $query = "SELECT idUser FROM %lms_courseuser " . " WHERE idCourse = '" . (int) $_SESSION['idCourse'] . "' AND edition_id = '" . $editions_filter . "'";
        $res = sql_query($query);
        while (list($idUser) = sql_fetch_row($res)) {
            $users[] = $idUser;
        }
        if (count($users) > 0) {
            $query_traks = "SELECT id_track " . " FROM %lms_polltrack " . " WHERE id_user IN (" . implode(', ', $users) . ") ";
            $result_traks = sql_query($query_traks);
            while (list($id_traks) = sql_fetch_row($result_traks)) {
                $tracks[$id_traks] = $id_traks;
            }
        }
    }
    if (!empty($tracks)) {
        $valid_track = array_intersect($valid_track, $tracks);
    } elseif ($editions_filter != -1) {
        $valid_track = array();
        $valid_track[] = 0;
    }
    if (empty($valid_track)) {
        $valid_track[] = 0;
    }
    $tot_tracks = count($valid_track);
    //----------------------------------------------------------------------------
    // Get question from database
    $re_question = sql_query($query_question);
    if (isset($_POST['export'])) {
        $export = true;
        $filename = 'stats_' . str_replace(' ', '_', $poll_info['title']) . '_' . date("Y\\_m\\_d") . '.csv';
        $filetext = '';
    } else {
        $export = false;
    }
    while (list($idQuest, $type_quest, $type_file, $type_class) = sql_fetch_row($re_question)) {
        require_once _lms_ . '/modules/question_poll/' . $type_file;
        $quest_obj = eval("return new {$type_class}( {$idQuest} );");
        if ($export) {
            $filetext .= $quest_obj->export_CSV($quest_sequence_number, $tot_tracks, $valid_track);
            $filetext .= "\r\n";
        } else {
//.........这里部分代码省略.........
开发者ID:abhinay100,项目名称:forma_app,代码行数:101,代码来源:do.poll.php

示例14: isset

<?php

Get::title(array('index.php?r=' . $base_link_course . '/show' => Lang::t('_COURSE', 'course'), 'index.php?r=' . $base_link_classroom . '/classroom&id_course=' . $model->getIdCourse() => Lang::t('_CLASSROOM', 'course'), Lang::t('_ADD', 'course')));
if (isset($err_avail)) {
    echo UIFeedback::error(Lang::t($err_avail, 'course'));
}
?>
<div class="std_block">

<?php 
echo Form::openForm('add_date', 'index.php?r=' . $base_link_classroom . '/addclassroom&amp;id_course=' . $model->getIdCourse()) . Form::getHidden('step', 'step', '2') . Form::openElementSpace() . Form::getTextfield(Lang::t('_CODE', 'course'), 'code', 'code', 255, isset($_POST['code']) ? $_POST['code'] : $course_info['code']) . Form::getTextfield(Lang::t('_NAME', 'course'), 'name', 'name', 255, isset($_POST['name']) ? $_POST['name'] : $course_info['name']) . Form::getTextarea(Lang::t('_DESCRIPTION', 'course'), 'description', 'description', isset($_POST['description']) ? stripslashes(stripslashes($_POST['description'])) : stripslashes($course_info['description'])) . Form::getTextfield(Lang::t('_MEDIUM_TIME', 'course'), 'medium_time', 'medium_time', 255, isset($_POST['medium_time']) ? $_POST['medium_time'] : $course_info['mediumTime']) . Form::getTextfield(Lang::t('_MAX_NUM_SUBSCRIBE', 'course'), 'max_par', 'max_par', 255, isset($_POST['max_par']) ? $_POST['max_par'] : '') . Form::getTextfield(Lang::t('_COURSE_PRIZE', 'course'), 'price', 'price', 255, isset($_POST['price']) ? $_POST['price'] : '') . Form::getDropdown(Lang::t('_STATUS', 'course'), 'status', 'status', $model->getStatusForDropdown(), isset($_POST['status']) ? $_POST['status'] : '') . Form::getDropdown(Lang::t('_FINAL_SCORE', 'course'), 'test', 'test', $model->getTestTypeForDropdown(), isset($_POST['test']) ? $_POST['test'] : '') . '<div class="form_line_l">' . '<p><label for="overbooking" class="floating">' . Lang::t('_ALLOW_OVERBOOKING', 'course') . '</label></p>' . Form::getInputCheckbox('overbooking', 'overbooking', 1, isset($_POST['overbooking']) && $_POST['overbooking'] == 1 ? true : false, false) . '</div>' . Form::getDatefield(Lang::t('_SUBSCRIPTION_DATE_BEGIN', 'course'), 'sub_start_date', 'sub_start_date', isset($_POST['sub_start_date']) ? $_POST['sub_start_date'] === '00-00-0000' ? '' : $_POST['sub_start_date'] : '') . Form::getDatefield(Lang::t('_SUBSCRIPTION_DATE_END', 'course'), 'sub_end_date', 'sub_end_date', isset($_POST['sub_end_date']) ? $_POST['sub_end_date'] === '00-00-0000' ? '' : $_POST['sub_end_date'] : '') . Form::getDatefield(Lang::t('_UNSUBSCRIBE_DATE_LIMIT', 'course'), 'unsubscribe_date_limit', 'unsubscribe_date_limit', isset($_POST['unsubscribe_date_limit']) ? $_POST['unsubscribe_date_limit'] === '00-00-0000' ? '' : $_POST['unsubscribe_date_limit'] : '') . '<div id="date_container">';
?>

<div id="calendar_container" class="form_line_l"></div>

<?php 
$date_string = '';
$start_mounth = '';
if (isset($_POST['date_selected']) && !empty($_POST['date_selected'])) {
    $array_day = explode(',', $_POST['date_selected']);
    $first = true;
    if (count($array_day) > 0) {
        for ($i = 0; $i < count($array_day); $i++) {
            if ($first) {
                $first = false;
                $start_mounth = (int) substr($array_day[$i], 5, 2) . '/' . substr($array_day[$i], 0, 4);
                $date_string .= (int) substr($array_day[$i], 5, 2) . '/' . (int) substr($array_day[$i], 8, 2) . '/' . substr($array_day[$i], 0, 4);
            } else {
                $date_string .= ',' . (int) substr($array_day[$i], 5, 2) . '/' . (int) substr($array_day[$i], 8, 2) . '/' . substr($array_day[$i], 0, 4);
            }
        }
开发者ID:abhinay100,项目名称:forma_app,代码行数:31,代码来源:add_step_1.php

示例15: getModifyMask

 /**
  * @param string	$base_path 		if specified load only preference form this base_path
  * @param bool		$only_visible 	if true only the visible
  *
  * @return string	the code for the mod mask
  */
 function getModifyMask($base_path = false, $only_visible = true, $separate_output = false)
 {
     require_once _base_ . '/lib/lib.form.php';
     $lang =& DoceboLanguage::createInstance('preferences', 'framework');
     $preferences = $this->_up_db->getFullPreferences($this->id_user, $only_visible, false, $base_path);
     $html = array();
     while (list(, $pref) = each($preferences)) {
         // Navigation trought the preferences
         // array( 'path_name', 'label', 'default_value', 'type', 'visible', 'load_at_startup', 'user_value' )
         switch ($pref['type']) {
             case "language":
                 //drop down language
                 $lang_sel = $this->getLanguage();
                 $langs_var = Docebo::langManager()->getAllLangCode();
                 $langs = array();
                 foreach ($langs_var as $k => $v) {
                     $langs[$k] = $v;
                 }
                 /* XXX: remove when alll lang ready*/
                 $html[$pref['path_name']] = Form::getDropdown($lang->def($pref['label']), $this->base_name . '_' . $pref['path_name'], $this->base_name . '[' . $pref['path_name'] . ']', $langs, array_search($lang_sel, $langs));
                 break;
             case "template":
                 //drop down template
                 $templ_sel = $this->getTemplate();
                 $templ = getTemplateList();
                 $html[$pref['path_name']] = Form::getDropdown($lang->def($pref['label']), $this->base_name . '_' . $pref['path_name'], $this->base_name . '[' . $pref['path_name'] . ']', $templ, array_search($templ_sel, $templ));
                 break;
             case "hteditor":
                 //drop down hteditor
                 $ht_edit = getHTMLEditorList();
                 $html[$pref['path_name']] = Form::getDropdown($lang->def($pref['label']), $this->base_name . '_' . $pref['path_name'], $this->base_name . '[' . $pref['path_name'] . ']', $ht_edit, $pref['user_value'] ? $pref['user_value'] : $pref['default_value']);
                 break;
             case "layout_chooser":
                 //drop down hteditor
                 $layout = array('left' => Lang::t('_LAYOUT_LEFT'), 'over' => Lang::t('_LAYOUT_OVER'), 'right' => Lang::t('_LAYOUT_RIGHT'));
                 $html[$pref['path_name']] = Form::getDropdown($lang->def($pref['label']), $this->base_name . '_' . $pref['path_name'], $this->base_name . '[' . $pref['path_name'] . ']', $layout, $pref['user_value'] ? $pref['user_value'] : $pref['default_value']);
                 break;
             case "enum":
                 //on off
                 $value = $pref['user_value'] ? $pref['user_value'] : $pref['default_value'];
                 $html[$pref['path_name']] = Form::openFormLine() . Form::getInputCheckbox($this->base_name . '_' . $pref['path_name'] . '_on', $this->base_name . '[' . $pref['path_name'] . ']', 'on', $value == 'on', '') . ' ' . Form::getLabel($this->base_name . '_' . $pref['path_name'] . '_on', $lang->def($pref['label'])) . Form::closeFormLine();
                 break;
                 //string or int
             //string or int
             default:
                 $html[$pref['path_name']] = Form::getTextfield($lang->def($pref['label']), $this->base_name . '_' . $pref['path_name'], $this->base_name . '[' . $pref['path_name'] . ']', '65535', $pref['user_value'] ? $pref['user_value'] : $pref['default_value']);
         }
     }
     return $separate_output ? $html : implode("", $html) . '<div class="nofloat"></div>';
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:56,代码来源:lib.preference.php


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