本文整理汇总了PHP中Form::closeButtonSpace方法的典型用法代码示例。如果您正苦于以下问题:PHP Form::closeButtonSpace方法的具体用法?PHP Form::closeButtonSpace怎么用?PHP Form::closeButtonSpace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Form
的用法示例。
在下文中一共展示了Form::closeButtonSpace方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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&op=showhtml&saveok=1');
} else {
$error = true;
}
}
$lang =& DoceboLanguage::createInstance('htmlfront', 'lms');
list($textof) = sql_fetch_row($re_htmlfront);
$title_page = array('index.php?modname=htmlfront&op=showhtml' => $lang->def('_HTMLFRONT'), $lang->def('_MOD'));
$GLOBALS['page']->add(getTitleArea($title_page, 'htmlfront') . '<div class="std_block">' . getBackUi('index.php?modname=htmlfront&op=showhtml', $lang->def('_BACK')) . ($error ? getErrorUi($lang->def('_ERROR_IN_SAVE')) : '') . Form::openForm('formnotes', 'index.php?modname=htmlfront&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');
}
示例2: getAddEditForm
public function getAddEditForm($form_url, $data)
{
$this->loadJs();
$res = '';
$e = false;
if ($data['rule_id'] > 0) {
$e = true;
}
$res .= Form::openForm('main_form', $form_url);
$res .= Form::openElementSpace() . Form::getTextfield(Lang::t('_FROM', 'test'), 'from_score', 'from_score', 11, $e ? $data['from_score'] : '') . Form::getTextfield(Lang::t('_TO', 'test'), 'to_score', 'to_score', 11, $e ? $data['to_score'] : '') . '<br />' . '<p class="section_title">' . Lang::t('_COMPETENCES', 'test') . '</p>' . '<div id="competence_box"></div>' . '<div class="form_line_l">
<p><label for="input_add_competence" class="floating">' . Lang::t('_NAME', 'test') . '</label></p>
<div class="form_autocomplete_container">
<input type="text" maxlength="255" value="" name="input_add_competence" id="input_add_competence" class="textfield">
<a href="" id="link_add_competence"><img alt="' . Lang::t('_ADD', 'test') . '" src="' . getPathImage() . 'standard/add.png" class="valing-middle"></a>
<div id="box_autocomplete_competence"></div>
</div>
</div>' . '<br />' . '<p class="section_title">' . Lang::t('_COURSES', 'test') . '</p>' . '<div id="course_box"></div>' . '<div class="form_line_l">
<p><label for="input_add_course" class="floating">' . Lang::t('_NEW_COURSE', 'test') . '</label></p>
<div class="form_autocomplete_container">
<input type="text" maxlength="255" value="" name="input_add_course" id="input_add_course" class="textfield">
<a href="" id="link_add_course"><img alt="' . Lang::t('_ADD', 'test') . '" src="' . getPathImage() . 'standard/add.png" class="valing-middle"></a>
<div id="box_autocomplete_course"></div>
</div>
</div>' . '<br /><br />' . Form::getTextarea(Lang::t('_FEEDBACK_TEXT', 'test'), 'feedback_txt', 'feedback_txt', $e ? $data['feedback_txt'] : '') . Form::getHidden('rule_id', 'rule_id', (int) $data['rule_id']) . Form::getHidden('competences_list', 'competences_list', '') . Form::getHidden('courses_list', 'courses_list', '') . Form::getHidden('test_id', 'test_id', (int) $data['test_id']) . Form::getHidden('category_id', 'category_id', (int) $data['category_id']) . Form::getHidden('save', 'save', '1') . Form::closeElementSpace() . Form::openButtonSpace() . Form::getButton('btn_save', 'btn_save', Lang::t('_SAVE', 'test')) . Form::getButton('btn_cancel', 'btn_cancel', Lang::t('_UNDO', 'test')) . Form::closeButtonSpace();
$res .= Form::closeForm();
$res .= '<script type="text/javascript">
var course_ac_url="' . Get::rel_path('adm') . '/ajax.adm_server.php?mn=course&plf=lms&op=course_autocomplete&results=20' . '";
var competence_ac_url="' . Get::rel_path('adm') . '/ajax.adm_server.php?r=adm/competences/competences_autocomplete' . '";
var lang={"remove_item": "' . Lang::t('_DEL', 'test') . '"};
var course_arr=' . ($e && !empty($data['courses_list']) ? $data['courses_list'] : '{}') . ';
var competence_arr=' . ($e && !empty($data['competences_list']) ? $data['competences_list'] : '{}') . ';
</script>';
return $res;
}
示例3: adminConf
function adminConf()
{
require_once _base_ . '/lib/lib.form.php';
$lang =& DoceboLanguage::createInstance('admin_config', 'scs');
$out =& $GLOBALS['page'];
$out->setWorkingZone('content');
$out->add(getTitleArea($lang->def('_ADMIN_CONF'), 'admin_conf') . '<div class="std_block">');
if (isset($_POST['save'])) {
$query_update = "UPDATE " . $GLOBALS['prefix_scs'] . "_rules_admin SET ";
if (isset($_POST['rules'])) {
while (list($var_name, $new_value) = each($_POST['rules'])) {
$query_update .= " {$var_name} = '" . $new_value . "',";
}
$re = sql_query(substr($query_update, 0, -1));
}
if ($re) {
$out->add(getResultUi($lang->def('_MOD_OK')));
} else {
$out->add(getErrorUi($lang->def('_MOD_ERR')));
}
}
$query_rules_admin = "\r\n\tSELECT server_status, \r\n\t\tenable_recording_function, enable_advice_insert, enable_write, enable_chat_recording, \r\n\t\tenable_private_subroom, enable_public_subroom, \r\n\t\tenable_drawboard_watch, enable_drawboard_write, \r\n\t\tenable_audio, enable_webcam, enable_stream_watch, enable_strem_write, enable_remote_desktop \r\n\tFROM " . $GLOBALS['prefix_scs'] . "_rules_admin";
$re_rules_admin = sql_query($query_rules_admin);
$rules = mysql_fetch_array($re_rules_admin);
$out->add(Form::openForm('rules_admin', 'index.php?modname=admin_configuration&op=conf') . Form::openElementSpace() . Form::getOpenCombo($lang->def('_SERVER_STATUS')) . Form::getInputRadio('rules_server_status_yes', 'rules[server_status]', 'yes', $rules['server_status'] == 'yes', '') . ' ' . Form::getLabel('', $lang->def('_YES'), 'label_padded') . ' ' . Form::getInputRadio('rules_server_status_no', 'rules[server_status]', 'no', $rules['server_status'] == 'no', '') . ' ' . Form::getLabel('', $lang->def('_NO'), 'label_padded') . ' ' . Form::getCloseCombo() . maskMultiple('enable_recording_function', $rules['enable_recording_function']) . maskMultiple('enable_advice_insert', $rules['enable_advice_insert']) . maskMultiple('enable_write', $rules['enable_write']) . maskMultiple('enable_chat_recording', $rules['enable_chat_recording']) . maskMultiple('enable_private_subroom', $rules['enable_private_subroom']) . maskMultiple('enable_public_subroom', $rules['enable_public_subroom']) . maskMultiple('enable_drawboard_watch', $rules['enable_drawboard_watch']) . maskMultiple('enable_drawboard_write', $rules['enable_drawboard_write']) . maskMultiple('enable_audio', $rules['enable_audio']) . maskMultiple('enable_webcam', $rules['enable_webcam']) . maskMultiple('enable_stream_watch', $rules['enable_stream_watch']) . maskMultiple('enable_strem_write', $rules['enable_strem_write']) . maskMultiple('enable_remote_desktop', $rules['enable_remote_desktop']) . 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>');
}
示例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('&', '&', $object_item->back_url) . '&mod_result=0', $lang->def('_BACK')) . Form::openForm('itemform', 'index.php?modname=item&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');
}
示例5: list_element_certificate
function list_element_certificate()
{
checkPerm('view');
require_once _base_ . '/lib/lib.form.php';
require_once _base_ . '/lib/lib.table.php';
$mod_perm = checkPerm('mod', true);
$id_certificate = importVar('id_certificate', true);
// create a language istance for module admin_certificate
$lang =& DoceboLanguage::createInstance('certificate', 'lms');
$out =& $GLOBALS['page'];
$out->setWorkingZone('content');
$form = new Form();
$page_title = array('index.php?modname=pcertificate&op=certificate' => $lang->def('_TITLE_CERTIFICATE'), $lang->def('_STRUCTURE_CERTIFICATE'));
$out->add(getTitleArea($page_title, 'certificate') . '<div class="std_block">' . getBackUi('index.php?modname=pcertificate&op=certificate', $lang->def('_BACK')));
if (isset($_GET['result'])) {
switch ($_GET['result']) {
case "ok":
$out->add(getResultUi($lang->def('_OPERATION_SUCCESSFUL')));
break;
case "err":
$out->add(getErrorUi($lang->def('_OPERATION_FAILURE')));
break;
case "err_del":
$out->add(getErrorUi($lang->def('_OPERATION_FAILURE')));
break;
}
}
$query_structure = "\r\n\tSELECT cert_structure, orientation, bgimage\r\n\tFROM " . $GLOBALS['prefix_lms'] . "_certificate \r\n\tWHERE id_certificate = '" . (int) $id_certificate . "'";
list($structure, $orientation, $bgimage) = sql_fetch_row(sql_query($query_structure));
$out->add('<div class="std_block">');
$out->add(getInfoUi($lang->def('_CERTIFICATE_WARNING')));
$out->add($form->openForm('structure_certificate', 'index.php?modname=pcertificate&op=savecertificate', false, false, 'multipart/form-data'));
$out->add($form->openElementSpace() . $form->getTextarea($lang->def('_STRUCTURE_CERTIFICATE'), 'structure', 'structure', $structure) . '<p><b>' . $lang->def('_ORIENTATION') . '</b></p>' . $form->getRadio($lang->def('_PORTRAIT'), 'portrait', 'orientation', 'P', $orientation == 'P') . $form->getRadio($lang->def('_LANDSCAPE'), 'landscape', 'orientation', 'L', $orientation == 'L') . $form->getExtendedFilefield($lang->def('_BACK_IMAGE'), 'bgimage', 'bgimage', $bgimage) . $form->closeElementSpace() . $form->openButtonSpace() . $form->getHidden('id_certificate', 'id_certificate', $id_certificate) . $form->getButton('save_structure', 'save_structure', $lang->def('_SAVE')) . $form->getButton('undo', 'undo', $lang->def('_UNDO')) . $form->closeButtonSpace() . $form->closeForm());
$tb = new Table(0, $lang->def('_TAG_LIST_CAPTION'), $lang->def('_TAG_LIST_SUMMARY'));
$tb->setColsStyle(array('', ''));
$tb->addHead(array($lang->def('_TAG_CODE'), $lang->def('_TAG_DESCRIPTION')));
//search query of certificates tag
$query_format_tag = "\r\n\tSELECT file_name, class_name \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_certificate_tags ";
$re_certificate_tags = sql_query($query_format_tag);
while (list($file_name, $class_name) = sql_fetch_row($re_certificate_tags)) {
if (file_exists($GLOBALS['where_lms'] . '/lib/certificate/' . $file_name)) {
require_once $GLOBALS['where_lms'] . '/lib/certificate/' . $file_name;
$instance = new $class_name(0, 0);
$this_subs = $instance->getSubstitutionTags();
foreach ($this_subs as $tag => $description) {
$tb->addBody(array($tag, $description));
}
// end foreach
}
// end if
}
$out->add($tb->getTable());
$out->add('</div>');
}
示例6: modpoll
function modpoll()
{
checkPerm('view', false, 'storage');
$lang =& DoceboLanguage::createInstance('poll');
require_once _base_ . '/lib/lib.form.php';
$id_poll = importVar('id_poll', true, 0);
$back_url = urldecode(importVar('back_url'));
$url_encode = htmlentities(urlencode($back_url));
list($poll_title, $textof) = sql_fetch_row(sql_query("\r\n\tSELECT title, description\r\n\tFROM " . $GLOBALS['prefix_lms'] . "_poll\r\n\tWHERE id_poll = '" . $id_poll . "'"));
$GLOBALS['page']->add(getTitleArea($lang->def('_POLL_SECTION'), 'poll') . '<div class="std_block">' . getBackUi('index.php?modname=poll&op=modpollgui&id_poll=' . $id_poll . '&back_url=' . $url_encode, $lang->def('_BACK')) . Form::OpenForm('addpoll_form', 'index.php?modname=poll&op=uppoll') . Form::openElementSpace() . Form::getHidden('id_poll', 'id_poll', $id_poll) . Form::getHidden('back_url', 'back_url', $url_encode) . Form::getTextfield($lang->def('_TITLE'), 'title', 'title', '255', $poll_title) . Form::getTextarea($lang->def('_DESCRIPTION'), 'textof', 'textof', $textof) . Form::closeElementSpace() . Form::openButtonSpace() . Form::getButton('button_ins', 'button_ins', $lang->def('_SAVE')) . Form::closeButtonSpace() . Form::closeForm() . '</div>', 'content');
}
示例7: 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&op=edit&type_quest=' . $this->getQuestionType() . '&id_quest=' . $this->id . '&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('&', '&', $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&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');
}
示例8: config
function config()
{
checkPerm('view');
require_once _base_ . '/lib/lib.tab.php';
require_once _base_ . '/lib/lib.form.php';
require_once _adm_ . '/class/class.conf.php';
$lang =& DoceboLanguage::createInstance('configuration', 'framework');
$active_tab = importVar('active_tab', false, 1);
//instance class-------------------------------------------
$conf = new Config_Framework();
$groups = $conf->getRegroupUnit();
cout(getTitleArea($lang->def('_CONFIGURATION')) . '<div class="std_block">');
//save page if require
if (isset($_POST['save_config'])) {
if ($conf->saveElement($active_tab)) {
cout(getResultUi($lang->def('_OPERATION_SUCCESSFUL')));
} else {
cout(getErrorUi($lang->def('_ERROR_IN_SAVE')));
}
}
cout('<div id="global_conf" class="yui-navset">' . '<ul class="yui-nav">');
while (list($id, $name) = each($groups)) {
// print the tab list
cout('<li' . ($id == $active_tab ? ' class="selected"' : '') . '><a href="#tab_g_' . $id . '"><em>' . $name['name'] . '</em></a></li>');
}
reset($groups);
cout('</ul>' . '<div class="yui-content">');
while (list($id, $name) = each($groups)) {
// print the tab content
cout('<div id="tab_g_' . $id . '">' . '<h2>' . $name['name'] . '</h2>' . '<p style="padding:4px">' . $name['descr'] . '</p>' . Form::openForm('conf_option_' . $id, 'index.php?modname=configuration&op=config') . Form::openElementSpace() . Form::getHidden('active_tab_' . $id, 'active_tab', $id));
switch ($id) {
case SMS_GROUP:
cout(show_sms_panel($lang) . '<br />');
break;
default:
cout('<br />');
}
cout('' . $conf->getPageWithElement($id) . Form::closeElementSpace() . Form::openButtonSpace() . Form::getButton('save_config_' . $id, 'save_config', $lang->def('_SAVE')) . Form::getButton('undo_' . $id, 'undo', $lang->def('_UNDO')) . Form::closeButtonSpace() . Form::CloseForm() . '<br />' . '</div>');
}
cout('<script type="text/javascript">
var targets = YAHOO.util.Selector.query("span[id^=tt_target]");
new YAHOO.widget.Tooltip("tooltip_info",
{ context:targets,
effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.20}
});
</script>', 'scripts');
reset($groups);
cout('</div>' . '<div style="clear:left"> </div>' . '</div>' . '</div>');
cout('<script type="text/javascript">' . "\tnew YAHOO.widget.TabView('global_conf', {orientation:'left'});" . '</script>', 'scripts');
}
示例9: mycompetences
function mycompetences(&$url)
{
checkPerm('view');
$html = "";
$html .= getTitleArea(Lang::t('_COMPETENCES'), 'competences');
$html .= '<div class="std_block">';
$cmodel = new CompetencesAdm();
$fmodel = new FunctionalrolesAdm();
$id_user = getLogUserId();
$ucomps = $cmodel->getUserCompetences($id_user);
$rcomps = $fmodel->getUserRequiredCompetences($id_user);
$ucomps_info = $cmodel->getCompetencesInfo(array_keys($ucomps));
$language = getLanguage();
$_typologies = $cmodel->getCompetenceTypologies();
$_types = $cmodel->getCompetenceTypes();
$icon_actv = '<span class="ico-sprite subs_actv"><span>' . Lang::t('_COMPETENCE_OBTAINED', 'competences') . '</span></span>';
$icon_req = '<span class="ico-sprite subs_actv"><span>' . Lang::t('_MANDATORY', 'competences') . '</span></span>';
//*******************
require_once _base_ . '/lib/lib.table.php';
$table = new Table(Get::sett('visuItem'), Lang::t('_COMPETENCES'), Lang::t('_COMPETENCES'));
$style_h = array('', '', 'image', 'image', 'image', 'image', 'image');
$label_h = array(Lang::t('_NAME', 'competences'), Lang::t('_TYPOLOGY', 'competences'), Lang::t('_TYPE', 'standard'), Lang::t('_SCORE', 'competences'), Lang::t('_DATE_LAST_COMPLETE', 'subscribe'), Lang::t('_COMPETENCES_REQUIRED', 'competences'));
$table->addHead($label_h, $style_h);
foreach ($ucomps_info as $id_competence => $cinfo) {
$line = array();
$line[] = $cinfo->langs[$language]['name'];
$line[] = $_typologies[$cinfo->typology];
$line[] = $_types[$cinfo->type];
$line[] = $cinfo->type == 'score' ? '<b>' . $ucomps[$id_competence]->score_got . '</b>' : $icon_actv;
$line[] = Format::date($ucomps[$id_competence]->last_assign_date, 'datetime');
$line[] = array_key_exists($id_competence, $rcomps) ? $icon_req : '';
$table->addBody($line);
}
$html .= $table->getTable();
$html .= '</div>';
$html .= Form::openForm('beck_url', 'index.php');
$html .= Form::openButtonSpace();
$html .= Form::getButton('close', 'close', Lang::t('_CLOSE', 'standard'));
$html .= Form::closeButtonSpace();
$html .= Form::closeform();
cout($html, 'content');
}
示例10: additem
function additem($object_item)
{
//checkPerm( 'view', FALSE, 'storage' );
$lang =& DoceboLanguage::createInstance('scorm', 'lms');
require_once _base_ . '/lib/lib.form.php';
$form = new Form();
//area title
$GLOBALS['page']->add(getTitleArea($lang->getLangText('_SCORMIMGSECTION'), 'scorm', $lang->getLangText('_SCORMSECTIONNAME')));
$GLOBALS['page']->add('<div class="std_block">' . getBackUi(Util::str_replace_once('&', '&', $object_item->back_url) . '&create_result=0', $lang->getLangText('_BACK_TOLIST')));
$GLOBALS['page']->add(Form::getFormHeader($lang->def('_SCORM_ADD_FORM')));
$GLOBALS['page']->add($form->openForm("scormform", "index.php?modname=scorm&op=insitem", false, false, 'multipart/form-data'));
$GLOBALS['page']->add($form->openElementSpace());
$GLOBALS['page']->add($form->getHidden("back_url", "back_url", htmlentities(urlencode($object_item->back_url))));
$GLOBALS['page']->add($form->getFilefield($lang->getLangText('_CONTENTPACKAGE'), "attach", "attach"));
$GLOBALS['page']->add($form->getCheckbox($lang->getLangText('_SCORMIMPORTRESOURCES'), "lesson_resources", "lesson_resources", "import"));
$GLOBALS['page']->add($form->closeElementSpace());
$GLOBALS['page']->add($form->openButtonSpace());
$GLOBALS['page']->add($form->getButton("scorm_add_submit", "scorm_add_submit", $lang->getLangText('_SCORMLOAD')));
$GLOBALS['page']->add($form->closeButtonSpace());
$GLOBALS['page']->add($form->closeForm() . '</div>');
}
示例11: 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('&', '&', $object_page->back_url) . '&mod_result=0', $lang->def('_BACK')) . Form::openForm('pageform', 'index.php?modname=htmlpage&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');
}
示例12: loadSelector
/**
* Display the user/group/orgchart/fncrole selector
* @param string $url the url of the page, used for the form
* @param string $title the main title for the page (will be passed to a getTitleArea function
* @param string $text extra text to display
* @param bool $selector_mode if true the main div and page title will be drawed by the selector
* @param string $id the id for the form that will contain the selector
*/
public function loadSelector($url, $title = false, $text = '', $selector_mode = TRUE, $id = FALSE)
{
$res = '';
$id = empty($id) ? 'main_selector' : $id;
$us_util = new UserSelectorUtil();
if ($selector_mode && $title != false) {
$res .= getTitleArea($title);
$res .= '<div class="std_block">';
}
$res .= Form::openForm($id . '_form', $url);
if (is_array($this->_extra_form) && !empty($this->_extra_form)) {
$res .= implode("\n", $this->_extra_form);
}
$res .= Util::widget('userselector', array('id' => $id, 'show_user_selector' => $this->show_user_selector, 'show_group_selector' => $this->show_group_selector, 'show_orgchart_selector' => $this->show_orgchart_selector, 'show_fncrole_selector' => $this->show_fncrole_selector, 'initial_selection' => $this->selection, 'admin_filter' => true, 'learning_filter' => $this->learning_filter, 'use_suspended' => $this->use_suspended, 'nFields' => $this->nFields !== FALSE ? $this->nFields : 3), true);
$res .= Form::openButtonSpace();
$res .= Form::getButton('okselector', 'okselector', Lang::t('_SAVE', 'standard'));
$res .= Form::getButton('cancelselector', 'cancelselector', Lang::t('_UNDO', 'standard'));
$res .= Form::closeButtonSpace();
$res .= Form::closeForm();
if ($selector_mode) {
$res .= '</div>';
}
cout($res, 'content');
}
示例13: ioTask_UITaskRun
function ioTask_UITaskRun(&$module, $action)
{
checkPerm('view');
require_once _base_ . '/lib/lib.form.php';
$connMgr =& $module->get_connMgr();
$lang =& $module->get_lang();
$out =& $module->get_out();
$form = new Form();
$dimport = new DoceboImport();
$params = $connMgr->get_task_byname(key($action));
$task_name = $params[CONNMGR_TASK_NAME];
$out->setWorkingZone('content');
$out->add(getTitleArea($lang->def('_TASKS'), 'iotask'));
$out->add('<div class="std_block">');
$out->add($form->getFormHeader($lang->def('_TASK_RUNNED')));
$out->add($form->openForm('task_delete', 'index.php?modname=iotask&op=display&gotab=tasks'));
$out->add($form->openElementSpace());
$out->add($form->getHidden('task_name', 'task_name', $task_name));
$report = $dimport->execute_task($task_name);
if (!is_array($report)) {
$out->add($report);
} else {
$out->add($form->getLineBox($lang->def('_TASK_INSERTED'), $report[0]['inserted']));
$out->add($form->getLineBox($lang->def('_OPERATION_SUCCESSFUL'), $report[0]['removed']));
$out->add($form->getLineBox($lang->def('_OPERATION_FAILURE'), count($report) - 1));
foreach ($report as $index => $elem_report) {
if ($index !== 0) {
$out->add($index . ' - ' . '(' . implode(', ', $report[$index][0]) . ')' . ' - ' . $report[$index][1]);
}
}
}
$out->add($form->closeElementSpace());
$out->add($form->openButtonSpace());
$out->add($form->getButton('close', 'close', $lang->def('_CLOSE')));
$out->add($form->closeButtonSpace());
$out->add($form->closeForm());
$out->add('</div>');
}
示例14: getTitleArea
<?php
echo getTitleArea(Lang::t('_MYCOURSES_FIELDMASK_TITLE', 'catalogue'));
?>
<div class="std_block">
<?php
$m_fields = $field_manager->getUserMandatoryFields($user_idst);
echo '<p>' . Lang::t('_MYCOURSES_FIELDMASK_INTEST', 'catalogue') . '</p>' . Form::openForm('request_compile', 'index.php?r=elearning/fields');
foreach ($m_fields as $id_field => $m_field) {
echo $field_manager->playFieldForUser($user_idst, $id_field, false, true);
}
echo Form::openButtonSpace() . Form::getButton('save', 'save', Lang::t('_SAVE')) . Form::closeButtonSpace() . Form::closeForm();
?>
</div>
示例15: create_report_cols
function create_report_cols()
{
checkPerm('mod');
require_once _base_ . '/lib/lib.form.php';
$ref =& $_SESSION['report_tempdata']['columns_filter_category'];
if (isset($_POST['columns_filter'])) {
$ref = $_POST['columns_filter'];
}
$lang =& DoceboLanguage::createInstance('report');
$obj_report = openreport();
$obj_report->back_url = 'index.php?modname=public_report_admin&op=create_type';
$obj_report->jump_url = 'index.php?modname=public_report_admin&op=create_cols';
$obj_report->next_url = 'index.php?modname=public_report_admin&op=create_save';
//page title
$page_title = getTitleArea(array('index.php?modname=public_report_admin&op=reportlist' => $lang->def('_REPORT'), 'index.php?modname=public_report_admin&op=create_name' => $lang->def('_NEW'), 'index.php?modname=public_report_admin&op=create_rows' => $lang->def('_REPORT_SEL_ROWS'), 'index.php?modname=public_report_admin&op=create_type' => $lang->def('_REPORT_SEL_COLUMNS'), $lang->def('_REPORT_COLUMNS'))) . '<div class="std_block">';
//. getBackUi($obj_report->back_url, $lang->def('_BACK'), 'content');
if ($obj_report->useStandardTitle_Columns()) {
$GLOBALS['page']->add($page_title, 'content');
$GLOBALS['page']->add(Form::openForm('report_columns_form', str_replace('&', '&', $obj_report->jump_url)), 'content');
} else {
//this is used just to pass std title string to object functions, who may use it
$obj_report->page_title = $page_title;
}
$output = $obj_report->get_columns_filter($_SESSION['report_tempdata']['columns_filter_category']);
$GLOBALS['page']->add($output, 'content');
if ($obj_report->useStandardTitle_Columns()) {
$GLOBALS['page']->add(Form::openButtonSpace() . Form::getBreakRow() . Form::getButton('pre_filter', 'pre_filter', $lang->def('_SHOW_NOSAVE', 'report')) . Form::getButton('ok_filter', 'import_filter', $lang->def('_SAVE_BACK', 'report')) . Form::getButton('show_filter', 'show_filter', $lang->def('_SAVE_SHOW', 'report')) . Form::getButton('undo_filter', 'undo_filter', $lang->def('_UNDO', 'report')) . Form::closeButtonSpace() . Form::closeForm(), 'content');
$GLOBALS['page']->add('</div>', 'content');
//close std_block div
}
}