本文整理汇总了PHP中getTitleArea函数的典型用法代码示例。如果您正苦于以下问题:PHP getTitleArea函数的具体用法?PHP getTitleArea怎么用?PHP getTitleArea使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getTitleArea函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:26,代码来源:htmlfront.php
示例2: tagslist
function tagslist()
{
require_once _base_ . '/lib/lib.table.php';
require_once $GLOBALS['where_framework'] . '/lib/lib.tags.php';
$lang =& DoceboLanguage::createInstance('tags', 'framework');
$id_tag = Get::req('id_tag', DOTY_INT, 0);
$tag_name = Get::req('tag', DOTY_STRING, '');
$filter = Get::req('filter', DOTY_STRING, '');
$nav_bar = new NavBar('ini', Get::sett('visuItem'), 0);
$nav_bar->setLink('index.php?modname=tags&op=tags&id_tag=' . $id_tag);
$ini = $nav_bar->getSelectedElement();
$tags = new Tags('*');
$resources = $tags->getResourceByTags($id_tag, false, false, $ini, Get::sett('visuItem'));
$GLOBALS['page']->add(getTitleArea(array($lang->def('_TAGS')), 'tags') . '<div class="std_block">' . '<div class="tag_list">', 'content');
while (list(, $res) = each($resources['list'])) {
$link = $res['permalink'];
$delim = strpos($link, '?') === false ? '?' : '&';
if (strpos($link, '#') === false) {
$link = $link . $delim . 'sop=setcourse&sop_idc=' . $res['id_course'];
} else {
$link = str_replace('#', $delim . 'sop=setcourse&sop_idc=' . $res['id_course'] . '#', $link);
}
$GLOBALS['page']->add('' . '<h2>' . '<a href="' . $link . '">' . $res['title'] . '</a>' . '</h2>' . '<p>' . $res['sample_text'] . '</p>' . '<div class="tag_cloud">' . '<span>' . $lang->def('_TAGS') . ' : </span>' . '<ul><li>' . implode('</li><li>', $res['related_tags']) . '</li></ul>' . '</div>' . '<br />', 'content');
}
$GLOBALS['page']->add('</div>' . $nav_bar->getNavBar($ini, $resources['count']) . '</div>', 'content');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:26,代码来源:tags.php
示例3: drawCalendar
function drawCalendar()
{
checkPerm('view');
$size = importVar('size', false, 'max');
$width = "90%";
if ($size == "min") {
$width = "200px";
}
addCss('calendar_' . $size);
YuiLib::load('base,dragdrop');
Util::get_js(Get::rel_path('lms') . '/modules/calendar/calendar.js', true, true);
Util::get_js(Get::rel_path('lms') . '/modules/calendar/calendar_helper.js', true, true);
//permissions = permissions granted to the logged user according to his/her level and role
// 2 => can create/delete/modify all events
// 1 => can create/delete/modify only own events
// 0 => can view only
$permissions = 0;
if (checkPerm('mod', true)) {
$permissions = 2;
} elseif (checkPerm('personal', true)) {
$permissions = 1;
}
//mode="edit" => events can be added and edited according to given permissions
//mode="view" => events can only be viewed regardless the permissions
$GLOBALS['page']->add('<script type="text/javascript">' . ' setup_cal( null, ' . '\'lms\', ' . '\'lms\', ' . '\'edit\', ' . '\'' . $permissions . '\', ' . '\'' . Docebo::user()->getIdSt() . '\' ' . ');' . '</script>', 'page_head');
$GLOBALS['page']->add("\n" . getTitleArea(Lang::t('_CALENDAR', 'calendar'), 'calendar') . '<div class="std_block">' . '<div id="displayCalendar" style="clear: both; width:' . $width . '"></div>' . '<div class="nofloat"></div>' . '</div>', 'content');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:27,代码来源:calendar.php
示例4: loadFormAction
function loadFormAction(&$tree, $op)
{
require_once _base_ . '/lib/lib.form.php';
require_once dirname(__FILE__) . '/tree.org_chart.php';
$lang =& DoceboLanguage::createInstance('organization_chart', 'framework');
$out =& $GLOBALS['page'];
$out->add('<link href="templates/standard/style/base-old-treeview.css" rel="stylesheet" type="text/css">', 'page_head');
$out->setWorkingZone('content');
$out->add(getTitleArea($lang->def('_ORG_CHART'), 'org_chart') . '<div class="std_block">' . Form::openForm('org_chart', 'index.php?modname=org_chart&op=org_chart'));
switch ($op) {
case 'newfolder':
$out->add($tree->loadNewFolder());
break;
case 'deletefolder':
$out->add($tree->loadDeleteFolder());
break;
case 'renamefolder':
$out->add($tree->loadRenameFolder());
break;
case 'movefolder':
$out->add($tree->loadMoveFolder());
break;
case 'assign_field':
$out->add($tree->loadAssignField());
break;
}
$out->add(Form::closeForm() . '</div>');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:28,代码来源:org_chart.php
示例5: 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>');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:27,代码来源:admin_configuration.php
示例6: 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');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:9,代码来源:item.php
示例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');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:14,代码来源:class.title.php
示例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');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:50,代码来源:configuration.php
示例9: regset_editregion
function regset_editregion($region_id = FALSE)
{
checkPerm('view');
// [TODO] check write permissions
require_once _base_ . '/lib/lib.form.php';
$out =& $GLOBALS['page'];
$lang =& DoceboLanguage::createInstance('admin_regset', 'framework');
$form = new Form();
$out->setWorkingZone("content");
$out->add(getTitleArea($lang->def("_REGIONAL_SETTINGS"), "regset"));
$out->add("<div class=\"std_block\">\n");
if ($region_id == "") {
$region_id = FALSE;
}
$data = array();
if ($region_id === FALSE) {
// Add
$out->add($form->openForm("regset_form", "index.php?modname=regional_settings&op=insnew"));
$submit_lbl = $lang->def("_INSERT");
$data["region_id"] = $lang->def("_REGION_CODE");
$data["region_desc"] = $lang->def("_DESCRIPTION");
$data["browsercode"] = $lang->def("_BROWSER_CODE");
} else {
// Edit
$out->add($form->openForm("regset_form", "index.php?modname=regional_settings&op=updregion"));
$regset = new RegionalSettingsManager();
$data = $regset->getRegionSettings($region_id);
$data["region_id"] = $region_id;
$data["region_desc"] = $regset->getRegionInfo($region_id, "description");
$data["browsercode"] = $regset->getRegionInfo($region_id, "browsercode");
$submit_lbl = $lang->def("_MOD");
}
$out->add($form->openElementSpace());
$out->add($form->getTextfield($lang->def("_REGION_CODE"), "region_id", "region_id", 100, $data["region_id"]));
$out->add($form->getTextfield($lang->def("_DESCRIPTION"), "region_desc", "region_desc", 255, $data["region_desc"]));
$out->add($form->getTextfield($lang->def("_BROWSER_CODE"), "browsercode", "browsercode", 255, $data["browsercode"]));
displaySettingFields($out, $lang, $form, $data);
if ($region_id !== FALSE) {
$out->add($form->getHidden("old_region_id", "old_region_id", $region_id));
}
$out->add($form->closeElementSpace());
$out->add($form->openButtonSpace());
$out->add($form->getButton('save', 'save', $submit_lbl));
$out->add($form->getButton('undo', 'undo', $lang->def('_UNDO')));
$out->add($form->closeButtonSpace());
//"<br /><br /><input class=\"button\" type=\"submit\" value=\"".$submit_lbl."\" />\n");
$out->add($form->closeForm());
$out->add("</div>\n");
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:49,代码来源:regional_settings.php
示例10: chat
function chat()
{
checkPerm('view');
$lang =& DoceboLanguage::createInstance('chat');
require_once $GLOBALS['where_scs'] . '/lib/lib.chat.php';
$chat_man = new ChatManager();
$id_room = $chat_man->getIdRoom('lms', 'course', $_SESSION['idCourse']);
if (!$id_room) {
require_once $GLOBALS['where_scs'] . '/lib/lib.room.php';
$course_name = $GLOBALS['course_descriptor']->getValue('name');
$rules = array('room_name' => $course_name, 'room_type' => 'course', 'id_source' => $_SESSION['idCourse']);
$id_room = insertRoom($rules);
}
// show only the room of the current course
$chat_man->setRoomFilter(array($id_room));
//$users = $chat_man->getRoomUserOnline('lms', $id_room);
$GLOBALS['page']->add(getTitleArea($lang->def('_CHAT'), 'advice') . '<div class="std_block">' . '<div>' . $lang->def('_CHAT_DESCRIPTION') . '</div><br />' . '<div>' . $chat_man->getOpenChatCommand($lang->def('_OPENCHAT'), $lang->def('_OPENCHAT_WA'), 'lms', $id_room) . '</div>' . '</div>', 'content');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:18,代码来源:chat.php
示例11: mycompetences
function mycompetences(&$url)
{
checkPerm('view');
$html = "";
$html .= getTitleArea(Lang::t('_COMPETENCES'), 'competences');
$html .= '<div class="std_block">';
$cmodel = new CompetencesAdm();
$fmodel = new FunctionalrolesAdm();
$id_user = getLogUserId();
$ucomps = $cmodel->getUserCompetences($id_user);
$rcomps = $fmodel->getUserRequiredCompetences($id_user);
$ucomps_info = $cmodel->getCompetencesInfo(array_keys($ucomps));
$language = getLanguage();
$_typologies = $cmodel->getCompetenceTypologies();
$_types = $cmodel->getCompetenceTypes();
$icon_actv = '<span class="ico-sprite subs_actv"><span>' . Lang::t('_COMPETENCE_OBTAINED', 'competences') . '</span></span>';
$icon_req = '<span class="ico-sprite subs_actv"><span>' . Lang::t('_MANDATORY', 'competences') . '</span></span>';
//*******************
require_once _base_ . '/lib/lib.table.php';
$table = new Table(Get::sett('visuItem'), Lang::t('_COMPETENCES'), Lang::t('_COMPETENCES'));
$style_h = array('', '', 'image', 'image', 'image', 'image', 'image');
$label_h = array(Lang::t('_NAME', 'competences'), Lang::t('_TYPOLOGY', 'competences'), Lang::t('_TYPE', 'standard'), Lang::t('_SCORE', 'competences'), Lang::t('_DATE_LAST_COMPLETE', 'subscribe'), Lang::t('_COMPETENCES_REQUIRED', 'competences'));
$table->addHead($label_h, $style_h);
foreach ($ucomps_info as $id_competence => $cinfo) {
$line = array();
$line[] = $cinfo->langs[$language]['name'];
$line[] = $_typologies[$cinfo->typology];
$line[] = $_types[$cinfo->type];
$line[] = $cinfo->type == 'score' ? '<b>' . $ucomps[$id_competence]->score_got . '</b>' : $icon_actv;
$line[] = Format::date($ucomps[$id_competence]->last_assign_date, 'datetime');
$line[] = array_key_exists($id_competence, $rcomps) ? $icon_req : '';
$table->addBody($line);
}
$html .= $table->getTable();
$html .= '</div>';
$html .= Form::openForm('beck_url', 'index.php');
$html .= Form::openButtonSpace();
$html .= Form::getButton('close', 'close', Lang::t('_CLOSE', 'standard'));
$html .= Form::closeButtonSpace();
$html .= Form::closeform();
cout($html, 'content');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:42,代码来源:mycompetences.php
示例12: renewalpwd
function renewalpwd()
{
require_once _base_ . '/lib/lib.usermanager.php';
$user_manager = new UserManager();
$lang =& DoceboLanguage::createInstance('profile', 'framework');
if ($user_manager->clickSaveElapsed()) {
$error = $user_manager->saveElapsedPassword();
if ($error['error'] != true) {
unset($_SESSION['must_renew_pwd']);
Util::jump_to('index.php?r=elearning/show&sop=unregistercourse');
}
}
$_SESSION['must_renew_pwd'] = 1;
$res = Docebo::user()->isPasswordElapsed();
if ($res == 2) {
$GLOBALS['page']->add(getTitleArea($lang->def('_CHANGEPASSWORD')), 'content');
} else {
$GLOBALS['page']->add(getTitleArea($lang->def('_TITLE_CHANGE')), 'content');
}
$GLOBALS['page']->add('<div class="std_block">' . $user_manager->getElapsedPassword('index.php?modname=profile&op=renewalpwd') . '</div>', 'content');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:21,代码来源:profile.php
示例13: 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');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:23,代码来源:htmlpage.php
示例14: 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');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:32,代码来源:lib.userselector.php
示例15: svSwitch
DataTable_kb_table.refresh();
});
});
function svSwitch(a_elem) {
sUrl = a_elem.href;
var callback = {
success: function(o) { DataTable_kb_table.refresh(); }
};
YAHOO.util.Connect.asyncRequest('POST', sUrl, callback);
};
</script>
<?php
echo getTitleArea(array(Lang::t('_CONTENT_LIBRARY', 'kb')));
?>
<div class="std_block">
<?php
echo $result_message;
?>
<div class="quick_search_form">
<div>
<div class="simple_search_box" id="kb_simple_filter_options" style="display: block;">
<?php
echo Form::openForm('quick_search', 'javascript:;');
echo Form::getInputDropdown('dropdown', 'res_type_dd', 'res_type_dd', $res_type_dd_arr, false, '') . " \n";
echo Form::getInputDropdown('dropdown', 'categorized_filter', 'categorized_filter', $categorized_filter_arr, false, '') . " \n";
echo Form::getInputTextfield("search_t", "filter_text", "filter_text", $filter_text, '', 255, '');
echo Form::getButton("filter_set", "filter_set", Lang::t('_SEARCH', 'standard'), "search_b");
echo Form::getButton("filter_reset", "filter_reset", Lang::t('_RESET', 'standard'), "reset_b");
开发者ID:abhinay100,项目名称:forma_app,代码行数:31,代码来源:show.php
示例16: getTitleArea
<?php
echo getTitleArea(Lang::t('_PUBLIC_ADMIN_MANAGER', 'menu'));
?>
<div class="std_block">
<?php
//--- SEARCH FILTER -------
$this->widget('tablefilter', array('id' => 'adminmanager', 'filter_text' => $filter_text, 'js_callback_set' => 'PublicAdminManagement.setFilter', 'js_callback_reset' => 'PublicAdminManagement.resetFilter'));
//--- TABLE -------
$_columns = array(array('key' => 'userid', 'label' => Lang::t('_USERNAME', 'adminmanager'), 'sortable' => true), array('key' => 'firstname', 'label' => Lang::t('_FIRSTNAME', 'adminmanager'), 'sortable' => true), array('key' => 'lastname', 'label' => Lang::t('_LASTNAME', 'adminmanager'), 'sortable' => true));
$_profile_column = array('key' => 'user_profile', 'label' => Lang::t('_ADMIN_RULES', 'adminrules'), 'sortable' => true, 'formatter' => 'PublicAdminManagement.formatUserProfile');
if ($permissions['assign_profile']) {
$_profile_column['editor'] = 'new YAHOO.widget.DropdownCellEditor({' . 'asyncSubmitter: PublicAdminManagement.asyncSubmitter, ' . 'dropdownOptions:' . $rules_list_js . '})';
}
$_columns[] = $_profile_column;
$_img_users = Get::sprite('subs_users', Lang::t('_ASSIGN_USERS', 'adminmanager'));
$_img_courses = Get::sprite('subs_elem', Lang::t('_COURSES', 'adminmanager'));
$_img_classlocations = Get::sprite('subs_location', Lang::t('_LOCATION', 'adminmanager'));
if ($permissions['assign_users']) {
$_columns[] = array('key' => 'users', 'label' => $_img_users, 'className' => 'img-cell', 'formatter' => 'PublicAdminManagement.formatUsers');
}
if ($permissions['assign_courses']) {
$_columns[] = array('key' => 'courses', 'label' => $_img_courses, 'className' => 'img-cell', 'formatter' => 'PublicAdminManagement.formatCourses');
}
if ($permissions['assign_courses']) {
$_columns[] = array('key' => 'classlocations', 'label' => $_img_classlocations, 'className' => 'img-cell', 'formatter' => 'PublicAdminManagement.formatClasslocations');
}
$this->widget('table', array('id' => 'public_admin_manager_table', 'ajaxUrl' => 'ajax.adm_server.php?r=adm/publicadminmanager/getAdmin&', 'rowsPerPage' => Get::sett('visuItem', 25), 'startIndex' => 0, 'results' => Get::sett('visuItem', 25), 'sort' => 'userid', 'dir' => 'asc', 'columns' => $_columns, 'fields' => array('id_user', 'userid', 'firstname', 'lastname', 'idst_profile', 'user_profile', 'has_users', 'has_courses', 'has_classlocations'), 'generateRequest' => 'PublicAdminManagement.requestBuilder'));
?>
</div>
<script type="text/javascript">
开发者ID:abhinay100,项目名称:forma_app,代码行数:31,代码来源:show.php
示例17: 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&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&op=mod&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
示例18: array
< |
请发表评论