本文整理汇总了PHP中Get::sprite方法的典型用法代码示例。如果您正苦于以下问题:PHP Get::sprite方法的具体用法?PHP Get::sprite怎么用?PHP Get::sprite使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Get
的用法示例。
在下文中一共展示了Get::sprite方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: groupCodeList
function groupCodeList()
{
require_once _base_ . '/lib/lib.form.php';
require_once _base_ . '/lib/lib.table.php';
$lang =& DoceboLanguage::createInstance('code');
$code_manager = new CodeManager();
$tot_group_code = $code_manager->getCodeGroupNumber();
cout(getTitleArea($lang->def('_CODE')) . '<div class="std_block">');
$result = Get::req('result', DOTY_STRING, '');
if (isset($_GET['activation'])) {
$query = "UPDATE " . $GLOBALS['prefix_fw'] . "_setting" . " SET param_value = 'on'" . " WHERE param_name = 'use_code_module'";
if (sql_query($query)) {
Util::jump_to('index.php?modname=code&op=list&result=ok');
} else {
Util::jump_to('index.php?modname=code&op=list&result=err');
}
}
if (Get::cfg('use_code_module') === 'off') {
cout(getResultUi('<a href="index.php?modname=code&op=list&activation=true">' . $lang->def('_MODULE_NOT_ACTIVATED') . '</a>'));
}
switch ($result) {
case 'ok':
UIFeedback::info($lang->def('_OPERATION_SUCCESSFUL'));
break;
case 'err':
UIFeedback::error($lang->def('_OPERATION_FAILURE'));
break;
}
if ($tot_group_code) {
$tb = new Table('20');
$tb->initNavBar('ini', 'link');
$ini = $tb->getSelectedElement();
$cont_h = array($lang->def('_TITLE'), $lang->def('_DESCRIPTION'), $lang->def('_CODE_USED_NUMBER'), Get::sprite('subs_csv', Lang::t('_CODE', 'course')), Get::sprite('subs_add', Lang::t('_GENERATE_CODE', 'course')), Get::sprite('subs_import', Lang::t('_IMPORT', 'course')), Get::sprite('subs_elem', Lang::t('_COURSES', 'course')), Get::sprite('subs_users', Lang::t('_ASSIGN_USERS', 'course')), Get::sprite('subs_mod', Lang::t('_MOD', 'course')), Get::sprite('subs_del', Lang::t('_DEL', 'course')));
$type_h = array('', '', 'min-cell', 'image', 'image', 'image', 'image', 'image', 'image', 'image');
$tb->setColsStyle($type_h);
$tb->addHead($cont_h);
$array_group_code = $code_manager->getCodeGroupsList($ini);
foreach ($array_group_code as $group_code_info) {
$cont = array();
$cont[] = $group_code_info['title'];
$cont[] = $group_code_info['description'];
$cont[] = $group_code_info['code_used'];
$cont[] = '<a href="index.php?modname=code&op=code_list&id_code_group=' . $group_code_info['id_code_group'] . '">' . Get::sprite('subs_csv', Lang::t('_CODE', 'course')) . '</a>';
$cont[] = '<a href="index.php?modname=code&op=generate_code&id_code_group=' . $group_code_info['id_code_group'] . '">' . Get::sprite('subs_add', Lang::t('_GENERATE_CODE', 'course')) . '</a>';
$cont[] = '<a href="index.php?modname=code&op=import_code&id_code_group=' . $group_code_info['id_code_group'] . '">' . Get::sprite('subs_import', Lang::t('_IMPORT', 'course')) . '</a>';
$cont[] = '<a href="index.php?modname=code&op=assign_course&id_code_group=' . $group_code_info['id_code_group'] . '">' . Get::sprite('subs_elem' . ($group_code_info['course_associated'] ? '' : '_grey'), Lang::t('_COURSES', 'course')) . '</a>';
$cont[] = '<a href="index.php?modname=code&op=assign_tree&id_code_group=' . $group_code_info['id_code_group'] . '">' . Get::sprite('subs_users' . ($group_code_info['folder_associated'] ? '' : '_grey'), Lang::t('_ASSIGN_USERS', 'course')) . '</a>';
$cont[] = '<a href="index.php?modname=code&op=mod_group_code&id_code_group=' . $group_code_info['id_code_group'] . '">' . Get::sprite('subs_mod', Lang::t('_MOD', 'course')) . '</a>';
$cont[] = '<a href="index.php?modname=code&op=del_group_code&id_code_group=' . $group_code_info['id_code_group'] . '">' . Get::sprite('subs_del', Lang::t('_DEL', 'course')) . '</a>';
$tb->addBody($cont);
}
$tb->addActionAdd('<a href="index.php?modname=code&op=add_group_code">' . '<img src="' . getPathImage() . 'standard/add.png" alt="' . $lang->def('_ADD') . '" />' . $lang->def('_ADD') . '</a>');
cout($tb->getTable() . $tb->getNavBar($ini, $tot_group_code));
setupHrefDialogBox('a[href*=del_group_code]');
} else {
cout($lang->def('_NO_CONTENT') . '<br/>' . '<a href="index.php?modname=code&op=add_group_code">' . '<img src="' . getPathImage() . 'standard/add.png" alt="' . $lang->def('_ADD') . '" />' . $lang->def('_ADD') . '</a>');
}
cout('</div>');
}
示例2: array
$languages = array('_ROOT' => Get::sett('title_kb_tree', Lang::t('_CATEGORY', 'kb')), '_YES' => Lang::t('_CONFIRM', 'organization_chart'), '_NO' => Lang::t('_UNDO', 'organization_chart'), '_LOADING' => Lang::t('_LOADING', 'standard'), '_NEW_FOLDER_NAME' => Lang::t('_ORGCHART_ADDNODE', 'organization_chart'), '_AREYOUSURE' => Lang::t('_AREYOUSURE', 'organization_chart'), '_NAME' => Lang::t('_NAME', 'standard'), '_MOD' => Lang::t('_MOD', 'standard'), '_DEL' => Lang::t('_DEL', 'standard'));
$params = array('id' => 'kbtree', 'ajaxUrl' => 'ajax.adm_server.php?r=alms/kb/gettreedata', 'treeClass' => 'KbFolderTree', 'treeFile' => Get::rel_path('lms') . '/admin/views/kb/kbfoldertree.js', 'languages' => $languages, 'initialSelectedNode' => (int) $selected_node, 'rootActions' => '', 'show' => 'tree', 'dragDrop' => true);
if ($permissions['add']) {
$params['rel_action'] = '<a class="ico-wt-sprite subs_add" id="add_kb_folder" href="ajax.adm_server.php?r=alms/kb/addfolder_dialog&id=' . (int) $selected_node . '" ' . ' title="' . Lang::t('_ORGCHART_ADDNODE', 'organization_chart') . '">' . '<span>' . Lang::t('_ORGCHART_ADDNODE', 'organization_chart') . '</span>' . '</a>';
/**
* Add folder dialog
*/
$this->widget('dialog', array('id' => 'add_folder_dialog', 'dynamicContent' => true, 'ajaxUrl' => 'function() { return YAHOO.util.Dom.get("add_kb_folder").href; }', 'dynamicAjaxUrl' => true, 'callback' => 'KbManagement.addFolderCallback', 'callEvents' => array(array('caller' => 'add_kb_folder', 'event' => 'click'))));
}
$this->widget('tree', $params);
?>
</div>
<div class="panel_right_big">
<?php
$columns = array(array('key' => 'r_name', 'label' => Lang::t('_NAME', 'kb'), 'sortable' => true), array('key' => 'r_type', 'label' => Lang::t('_TYPE', 'kb'), 'sortable' => true, 'className' => 'img-cell'), array('key' => 'r_env', 'label' => Lang::t('_ENVIRONMENT', 'kb'), 'sortable' => true), array('key' => 'r_env_parent', 'label' => Lang::t('_CONTAINED_IN', 'kb'), 'sortable' => false), array('key' => 'r_lang', 'label' => Lang::t('_LANGUAGE', 'kb'), 'sortable' => true), array('key' => 'tags', 'label' => Lang::t('_TAGS', 'kb'), 'sortable' => false));
if ($permissions['mod']) {
$_title_categorize = Lang::t('_MOD', 'kb');
$_title_users = Lang::t('_SET_VISIBLE_TO_EVERYONE', 'kb');
$_sprite_categorize = Get::sprite('subs_categorize', $_title_categorize, $_title_categorize);
$_sprite_users = Get::sprite('subs_users', $_title_users, $_title_users);
$columns[] = array('key' => 'edit', 'label' => $_sprite_categorize, 'formatter' => 'frm_edit', 'className' => 'img-cell');
$columns[] = array('key' => 'force_visible', 'label' => $_sprite_users, 'formatter' => 'fv_switch', 'className' => 'img-cell');
}
$_title_play = Lang::t('_PLAY', 'kb');
$_sprite_play = Get::sprite('subs_play', $_title_play, $_title_play);
$columns[] = array('key' => 'play', 'label' => $_sprite_play, 'formatter' => 'frm_play', 'className' => 'img-cell');
$this->widget('table', array('id' => 'kb_table', 'ajaxUrl' => 'ajax.adm_server.php?r=alms/kb/getlist', 'rowsPerPage' => Get::sett('visuItem', 25), 'startIndex' => 0, 'results' => Get::sett('visuItem', 25), 'sort' => 'r_name', 'dir' => 'asc', 'generateRequest' => 'KbManagement.requestBuilder', 'events' => array('postRenderEvent' => 'function () { lb.init(); }'), 'columns' => $columns, 'fields' => array('res_id', 'r_name', 'r_type', 'r_env', 'r_env_parent', 'r_lang', 'tags', 'edit', 'force_visible', 'is_mobile', 'is_categorized')));
?>
</div>
<div class="nofloat"></div>
</div>
示例3: addslashes
}
var post = "&id_user=" + id_user + "&idst_profile=" + new_value + "&old_value=" + old_value;
var url = "ajax.adm_server.php?r=adm/publicadminmanager/update_profile";
YAHOO.util.Connect.asyncRequest("POST", url, editorCallback, post);
}
}
PublicAdminManagement.init({
filterText: "<?php
echo $filter_text;
?>
",
noProfileIcon: '<?php
echo addslashes(Get::sprite('fd_notice', Lang::t('_NONE', 'adminrules')));
?>
',
langs: {
_NONE: "<?php
echo Lang::t('_NONE', 'adminrules');
?>
",
_USERS_ASSOCIATION: "<?php
echo Lang::t('_ASSIGN_USERS', 'adminmanager');
?>
",
_COURSES: "<?php
echo Lang::t('_COURSES', 'adminmanager');
?>
",
示例4: catlist
/**
* @version $Id: catalogue.php 573 2006-08-23 09:38:54Z fabio $
* @category Course managment
* @author Fabio Pirovano <fabio [at] docebo [dot] com>
*/
function catlist()
{
checkPerm('view');
require_once _base_ . '/lib/lib.table.php';
$lang =& DoceboLanguage::createInstance('catalogue', 'lms');
$out =& $GLOBALS['page'];
$mod_perm = checkPerm('mod', true);
$title_area = array($lang->def('_CATALOGUE'));
// Retriving data
if (Docebo::user()->getUserLevelId() != ADMIN_GROUP_GODADMIN) {
$all_courses = false;
require_once _base_ . '/lib/lib.preference.php';
$adminManager = new AdminPreference();
$admin_courses = $adminManager->getAdminCourse(Docebo::user()->getIdST());
if (isset($admin_courses['course'][0])) {
$all_courses = true;
}
if (isset($admin_courses['course'][-1])) {
require_once _lms_ . '/lib/lib.catalogue.php';
$cat_man = new Catalogue_Manager();
$admin_courses['catalogue'] = $cat_man->getUserAllCatalogueId(Docebo::user()->getIdSt());
}
if ($all_courses) {
$query_catalogue = "\r\n\t\t\tSELECT idCatalogue, name, description\r\n\t\t\tFROM " . $GLOBALS['prefix_lms'] . "_catalogue\r\n\t\t\tWHERE 1\r\n\t\t\tORDER BY name";
} elseif (empty($admin_courses['catalogue'])) {
$query_catalogue = "\r\n\t\t\tSELECT idCatalogue, name, description\r\n\t\t\tFROM " . $GLOBALS['prefix_lms'] . "_catalogue\r\n\t\t\tWHERE 0\r\n\t\t\tORDER BY name";
} else {
$query_catalogue = "\r\n\t\t\tSELECT idCatalogue, name, description\r\n\t\t\tFROM " . $GLOBALS['prefix_lms'] . "_catalogue\r\n\t\t\tWHERE idCatalogue IN (" . implode(',', $admin_courses['catalogue']) . ")\r\n\t\t\tORDER BY name";
}
} else {
$query_catalogue = "\r\n\t\tSELECT idCatalogue, name, description\r\n\t\tFROM " . $GLOBALS['prefix_lms'] . "_catalogue\r\n\t\tORDER BY name";
}
$re_catalogue = sql_query($query_catalogue);
// Table
$tb_catalogue = new Table(0, false, $lang->def('_CATALOGUE_SUMMARY'));
// Table intestation
$type_h = array('', '', 'image');
$cont_h = array($lang->def('_NAME'), $lang->def('_DESCRIPTION'), '<img src="' . getPathImage('fw') . 'standard/modelem.png" alt="' . $lang->def('_MOD') . '" />');
if ($mod_perm) {
$type_h[] = 'image';
$cont_h[] = '<img src="' . getPathImage('fw') . 'standard/moduser.png" alt="' . $lang->def('_ASSIGN_USERS') . '" />';
//--- new: subscription action ---------------------------------------------
$type_h[] = 'image';
$cont_h[] = '<span class="ico-sprite subs_plus"><span>' . $lang->def('_SUBSCRIBE') . '</span></span>';
//--------------------------------------------------------------------------
$type_h[] = 'image';
$type_h[] = 'image';
$cont_h[] = '<img src="' . getPathImage('fw') . 'standard/edit.png" alt="' . $lang->def('_MOD') . '" />';
if (!Get::cfg('demo_mode')) {
$cont_h[] = '<img src="' . getPathImage('fw') . 'standard/delete.png" alt="' . $lang->def('_DEL') . '" />';
}
}
$tb_catalogue->setColsStyle($type_h);
$tb_catalogue->addHead($cont_h);
// Table content
while (list($id, $name, $description) = sql_fetch_row($re_catalogue)) {
$length = 100;
$description = Util::purge($description);
//strip html tags
$description = stripslashes($description);
$description = html_entity_decode($description, ENT_QUOTES, "UTF-8");
if (strlen($description) > $length) {
$description = substr($description, 0, $length);
}
$description = htmlentities($description, ENT_QUOTES, "UTF-8");
if (courses_count($id) != '0') {
$cont = array($name, $description, '<a href="index.php?modname=catalogue&op=entrylist&id=' . $id . '" ' . 'title="' . $lang->def('_MOD_ENTRY_CATALOGUE') . ' : ' . strip_tags($name) . '">' . '<img src="' . getPathImage('fw') . 'standard/modelem.png" alt="' . $lang->def('_MOD') . ' : ' . strip_tags($name) . '" /></a>');
} else {
$cont = array($name, $description, '<a href="index.php?modname=catalogue&op=entrylist&id=' . $id . '">' . Get::sprite('fd_notice', Lang::t('_MOD_ENTRY_CATALOGUE', 'catalogue') . ' : ' . strip_tags($name)) . '</a>');
}
if ($mod_perm) {
$cont[] = '<a href="index.php?modname=catalogue&op=modcatalogueassoc&load=1&id_catalogue=' . $id . '" ' . 'title="' . $lang->def('_ASSIGN_USERS') . ' : ' . strip_tags($name) . '">' . '<img src="' . getPathImage('fw') . 'standard/moduser.png" alt="' . $lang->def('_ASSIGN_USERS') . ' : ' . strip_tags($name) . '" /></a>';
//--- new: subscription action -------------------------------------------
$cont[] = '<a class="ico-sprite subs_plus" href="index.php?r=alms/subscription/cataloguesubscribeusers&id_catalogue=' . $id . '" ' . 'title="' . $lang->def('_SUBSCRIBE') . ' : ' . strip_tags($name) . '">' . '<span>' . $lang->def('_SUBSCRIBE') . '</span></a>';
//------------------------------------------------------------------------
$cont[] = '<a href="index.php?modname=catalogue&op=modcatalogue&id=' . $id . '" ' . 'title="' . $lang->def('_MOD') . ' : ' . strip_tags($name) . '">' . '<img src="' . getPathImage('fw') . 'standard/edit.png" alt="' . $lang->def('_MOD') . ' : ' . strip_tags($name) . '" /></a>';
if (!Get::cfg('demo_mode')) {
$cont[] = '<a href="index.php?modname=catalogue&op=delcatalogue&id=' . $id . '" ' . 'title="' . $lang->def('_DEL') . ' : ' . strip_tags($name) . '">' . '<img src="' . getPathImage('fw') . 'standard/delete.png" alt="' . $lang->def('_DEL') . ' : ' . strip_tags($name) . '" /></a>';
}
}
$tb_catalogue->addBody($cont);
}
require_once _base_ . '/lib/lib.dialog.php';
setupHrefDialogBox('a[href*=delcatalogue]');
// Action for new catalogue
if ($mod_perm) {
$tb_catalogue->addActionAdd('<a href="index.php?modname=catalogue&op=newcatalogue" title="' . $lang->def('_NEW_CATALOGUE') . '">' . '<img src="' . getPathImage('fw') . 'standard/add.png" alt="' . $lang->def('_ADD') . '" />' . $lang->def('_NEW_CATALOGUE') . '</a>');
}
$out->add(getTitleArea($title_area, 'catalogue') . '<div class="std_block">', 'content');
/*if(isset($_POST['result']))
switch($_POST['result']) {
case "ok" : $out->add(getResultUi($lang->def('_OPERATION_SUCCESSFUL')), 'content'); break;
case "err" : $out->add(getErrorUi($lang->def('_OPERATION_ERROR')), 'content'); break;
}*/
switch (Get::req('result', DOTY_ALPHANUM, '')) {
//.........这里部分代码省略.........
示例5: getTitleArea
<?php
echo getTitleArea(Lang::t('_LABELS', 'label'));
?>
<div class="std_block">
<?php
$_columns = array(array('key' => 'title', 'label' => Lang::t('_TITLE', 'label')), array('key' => 'description', 'label' => Lang::t('_DESCRIPTION', 'label')));
if ($permissions['mod']) {
$_columns[] = array('key' => 'move_up', 'label' => '<span class="ico-sprite subs_up" title="' . Lang::t('_MOVE_UP', 'label') . '"><span>' . Lang::t('_MOVE_UP', 'label') . '</span></span>', 'className' => 'img-cell', 'formatter' => 'Labels.upFormatter');
$_columns[] = array('key' => 'move_down', 'label' => '<span class="ico-sprite subs_down" title="' . Lang::t('_MOVE_DOWN', 'label') . '"><span>' . Lang::t('_MOVE_DOWN', 'label') . '</span></span>', 'className' => 'img-cell', 'formatter' => 'Labels.downFormatter');
$_columns[] = array('key' => 'mod', 'label' => '<span class="ico-sprite subs_mod" title="' . Lang::t('_MOD', 'label') . '"><span>' . Lang::t('_MOD', 'label') . '</span></span>', 'className' => 'img-cell');
}
if ($permissions['del']) {
$_columns[] = array('key' => 'del', 'label' => Get::sprite('subs_del', Lang::t('_DEL', 'label')), 'formatter' => 'doceboDelete', 'className' => 'img-cell');
}
$_params = array('id' => 'label_table', 'ajaxUrl' => 'ajax.adm_server.php?r=alms/label/getLabels', 'rowsPerPage' => Get::sett('visuItem', 25), 'startIndex' => 0, 'results' => Get::sett('visuItem', 25), 'sort' => '', 'columns' => $_columns, 'fields' => array('id_common_label', 'title', 'description', 'position', 'sequence', 'mod', 'del'), 'delDisplayField' => 'title', 'events' => array('beforeRenderEvent' => 'function() {
var rlist = YAHOO.util.Selector.query("a[id^=move_]");
for (var i=0; i<rlist.length; i++) YAHOO.util.Event.purgeElement(rlist[i]);
}', 'postRenderEvent' => 'function() {
var rlist = YAHOO.util.Selector.query("a[id^=move_]");
YAHOO.util.Event.addListener(rlist, "click", Labels.move_label);
}'));
if ($permissions['add']) {
$_params['rel_actions'] = '<a class="ico-wt-sprite subs_add" href="index.php?r=alms/label/add"><span>' . Lang::t('_ADD', 'standard') . '</span></a>';
}
$this->widget('table', $_params);
?>
</div>
<script type="text/javascript">
var Labels = {
move_label: function(e) {
示例6: getBackUi
<?php
Get::title(array('index.php?r=' . $base_link_course . '/show' => Lang::t('_COURSE', 'course'), Lang::t('_CLASSROOM', 'course') . ' : ' . $course_name));
?>
<div class="std_block">
<?php
echo getBackUi('index.php?r=' . $base_link_course . '/show', Lang::t('_BACK', 'course'));
$_columns = array(array('key' => 'code', 'label' => Lang::t('_CODE', 'course'), 'sortable' => true), array('key' => 'name', 'label' => Lang::t('_NAME', 'course'), 'sortable' => true), array('key' => 'status', 'label' => Lang::t('_STATUS', 'course'), 'sortable' => true, 'formatter' => 'statusFormatter'), array('key' => 'date_begin', 'label' => Lang::t('_DATE_BEGIN', 'course'), 'sortable' => true), array('key' => 'date_end', 'label' => Lang::t('_DATE_END', 'course'), 'sortable' => true), array('key' => 'classroom', 'label' => Lang::t('_CLASSROOM', 'course')), array('key' => 'students', 'label' => Lang::t('_STUDENTS', 'coursereport'), 'className' => 'img-cell'));
if ($permissions['subscribe']) {
$_columns[] = array('key' => 'subscription', 'label' => Get::sprite('subs_users', Lang::t('_SUBSCRIPTION', 'course')), 'className' => 'img-cell');
Docebo::user()->preference->getAdminPreference('admin_rules.course_presence_admin') === 'on' && Docebo::user()->getUserLevelId() !== ADMIN_GROUP_GODADMIN || Docebo::user()->getUserLevelId() === ADMIN_GROUP_GODADMIN ? $_columns[] = array('key' => 'presence', 'label' => Lang::t('_ATTENDANCE', 'course'), 'className' => 'img-cell') : '';
}
if ($permissions['mod']) {
$_columns[] = array('key' => 'mod', 'label' => Get::img('standard/edit.png', Lang::t('_MOD', 'course')), 'className' => 'img-cell');
}
if ($permissions['del'] && !Get::cfg('demo_mode')) {
$_columns[] = array('key' => 'del', 'label' => Get::img('standard/delete.png', Lang::t('_DEL', 'course')), 'formatter' => 'doceboDelete', 'className' => 'img-cell');
}
$_params = array('id' => 'classroom_edition_table', 'ajaxUrl' => 'ajax.adm_server.php?r=' . $base_link_classroom . '/getclassroomedition&id_course=' . $model->getIdCourse() . '&', 'rowsPerPage' => Get::sett('visuItem', 25), 'startIndex' => 0, 'results' => Get::sett('visuItem', 25), 'sort' => 'name', 'dir' => 'asc', 'columns' => $_columns, 'fields' => array('id_date', 'code', 'name', 'status', 'date_begin', 'date_end', 'classroom', 'students', 'num_subscribe', 'subscription', 'presence', 'mod', 'del'), 'show' => 'table', 'editorSaveEvent' => '');
if ($permissions['add']) {
$_params['rel_actions'] = '<a class="ico-wt-sprite subs_add" href="index.php?r=' . $base_link_classroom . '/addclassroom&id_course=' . $model->getIdCourse() . '"><span>' . Lang::t('_ADD', 'subscribe') . '</span></a>';
}
$this->widget('table', $_params);
echo getBackUi('index.php?r=' . $base_link_course . '/show', Lang::t('_BACK', 'course'));
?>
</div>
<script type="text/javascript">
var StatusList = {
<?php
$conds = array();
$list = $this->model->getStatusForDropdown();
示例7: function
close: true,
visible: false,
fixedcenter: false,
constraintoviewport: false,
draggable: true,
hideaftersubmit: false,
isDynamic: true,
ajaxUrl: this.href,
confirmOnly: false,
renderEvent: function() { this.center(); },
destroyEvent: function() {},
callback: function() {
this.destroy();
}
});
oDialog.call(this, e);
});
}
}
</script>
<?php
echo getTitleArea(Lang::t('_ADMIN_RULES', 'adminrules'));
?>
<div class="std_block">
<?php
echo $result_message;
$add_url = 'ajax.adm_server.php?r=adm/adminrules/addGroup';
$rel_action = '<a class="ico-wt-sprite subs_add" href="' . $add_url . '" title="' . Lang::t('_ADD', 'standard') . '"><span>' . Lang::t('_ADD', 'standard') . '</span></a>';
$this->widget('table', array('id' => 'admin_rules_table', 'ajaxUrl' => 'ajax.adm_server.php?r=adm/adminrules/getGroups&', 'rowsPerPage' => Get::sett('visuItem', 25), 'startIndex' => 0, 'results' => Get::sett('visuItem', 25), 'sort' => 'groupid', 'dir' => 'asc', 'columns' => array(array('key' => 'groupid', 'label' => Lang::t('_NAME', 'adminrules'), 'sortable' => true, 'editor' => 'new YAHOO.widget.TextboxCellEditor({asyncSubmitter: saveData})'), array('key' => 'special', 'label' => Get::sprite('subs_conf', Lang::t('_SPECIAL_SETTING', 'adminrules')), 'className' => 'img-cell'), array('key' => 'menu', 'label' => Get::sprite('subs_elem', Lang::t('_EDIT_SETTINGS', 'adminrules')), 'className' => 'img-cell'), array('key' => 'lang', 'label' => Get::sprite('subs_lang', Lang::t('_LANG_SETTING', 'adminrules')), 'className' => 'img-cell'), array('key' => 'admin_manage', 'label' => Get::sprite('subs_users', Lang::t('_MANAGE_SUBSCRIPTION', 'adminrules')), 'className' => 'img-cell'), array('key' => 'del', 'label' => Get::sprite('subs_del', Lang::t('_DEL', 'standard')), 'formatter' => 'doceboDelete', 'className' => 'img-cell')), 'fields' => array('id', 'idst', 'groupid', 'special', 'menu', 'lang', 'admin_manage', 'del'), 'stdSelection' => false, 'rel_actions' => $rel_action, 'delDisplayField' => 'groupid', 'events' => array('beforeRenderEvent' => 'AdminProfile.beforeRenderEvent', 'postRenderEvent' => 'AdminProfile.postRenderEvent'), 'delDisplayField' => 'groupid'));
?>
</div>
示例8: metaCertificate
/**
* @package DoceboLms
* @version $Id: meta_certificate.php,v 1
* @author Marco Valloni <marco [at] docebo [dot] com>
*/
function metaCertificate()
{
checkPerm('view');
require_once _base_ . '/lib/lib.form.php';
require_once _base_ . '/lib/lib.table.php';
$mod_perm = checkPerm('mod', true);
$lang =& DoceboLanguage::createInstance('certificate', 'lms');
$out =& $GLOBALS['page'];
$out->setWorkingZone('content');
$tb = new Table(Get::sett('visuItem'), $lang->def('_META_CERTIFICATE_CAPTION'), $lang->def('_META_CERTIFICATE_SUMMARY'));
$tb->initNavBar('ini', 'link');
$tb->setLink("index.php?modname=meta_certificate&op=meta_certificate");
$ini = $tb->getSelectedElement();
$form = new Form();
if (isset($_POST['toggle_filter'])) {
unset($_POST['filter_text']);
}
//search query of certificates
$query_certificate = "\r\n\tSELECT id_certificate, code, name, description\r\n\tFROM " . $GLOBALS['prefix_lms'] . "_certificate" . " WHERE meta = 1";
if (isset($_POST['filter'])) {
if ($_POST['filter_text'] !== '') {
$query_certificate .= " AND ( name LIKE '%" . $_POST['filter_text'] . "%'" . " OR code LIKE '%" . $_POST['filter_text'] . "%' )";
}
}
$query_certificate .= " ORDER BY id_certificate\r\n\tLIMIT {$ini}," . Get::sett('visuItem');
$query_certificate_tot = "\r\n\tSELECT COUNT(*)\r\n\tFROM " . $GLOBALS['prefix_lms'] . "_certificate";
$re_certificate = sql_query($query_certificate);
list($tot_certificate) = sql_fetch_row(sql_query($query_certificate_tot));
$type_h = array('', '', '', 'image', 'image');
$cont_h = array($lang->def('_CODE'), $lang->def('_NAME'), $lang->def('_DESCRIPTION'));
if ($mod_perm) {
$cont_h[] = Lang::t('_TEMPLATE', 'certificate');
}
$cont_h[] = '<img src="' . getPathImage() . 'standard/view.png" alt="' . $lang->def('_PREVIEW') . '" />';
if ($mod_perm) {
$cont_h[] = Get::img('standard/moduser.png', Lang::t('_TITLE_ASSIGN_META_CERTIFICATE', 'certificate'));
$type_h[] = 'image';
$cont_h[] = Get::sprite('subs_print', Lang::t('_TITLE_CREATE_META_CERTIFICATE', 'certificate'));
$type_h[] = 'image';
$cont_h[] = '<img src="' . getPathImage() . 'standard/edit.png" title="' . $lang->def('_MOD') . '" ' . 'alt="' . $lang->def('_MOD') . '" />';
$type_h[] = 'image';
$cont_h[] = '<img src="' . getPathImage() . 'standard/delete.png" title="' . $lang->def('_DEL') . '" ' . 'alt="' . $lang->def('_DEL') . '"" />';
$type_h[] = 'image';
}
$tb->setColsStyle($type_h);
$tb->addHead($cont_h);
while (list($id_certificate, $code, $name, $descr) = sql_fetch_row($re_certificate)) {
$title = strip_tags($name);
$cont = array($code, $name, Util::cut($descr));
if ($mod_perm) {
$cont[] = '<a href="index.php?modname=meta_certificate&op=elemmetacertificate&id_certificate=' . $id_certificate . '" ' . 'title="' . Lang::t('_TEMPLATE', 'certificate') . '">' . Lang::t('_TEMPLATE', 'certificate') . '</a>';
}
$cont[] = '<a href="index.php?modname=meta_certificate&op=preview&id_certificate=' . $id_certificate . '">' . '<img src="' . getPathImage() . 'standard/view.png" alt="' . $lang->def('_PREVIEW') . ' : ' . $title . '" /></a>';
if ($mod_perm) {
$cont[] = '<a href="index.php?modname=meta_certificate&op=assign&id_certificate=' . $id_certificate . '" ' . 'title="' . $lang->def('_TITLE_ASSIGN_META_CERTIFICATE') . ' : ' . $name . '">' . Get::img('standard/moduser.png', Lang::t('_TITLE_ASSIGN_META_CERTIFICATE', 'certificate')) . '</a>';
/*
$cont[] = '<a href="index.php?modname=meta_certificate&op=create&id_certificate='.$id_certificate.'" '
.'title="'.$lang->def('_TITLE_CREATE_META_CERTIFICATE').' : '.$name.'">'
.Get::img('course/certificate.png', Lang::t('_TITLE_CREATE_META_CERTIFICATE', 'certificate'))
.'</a>';*/
$cont[] = Get::sprite_link('subs_print', 'index.php?modname=meta_certificate&op=create&id_certificate=' . $id_certificate, Lang::t('_TITLE_CREATE_META_CERTIFICATE', 'certificate'));
$cont[] = '<a href="index.php?modname=meta_certificate&op=modmetacertificate&id_certificate=' . $id_certificate . '" ' . 'title="' . $lang->def('_MOD') . ' : ' . $name . '">' . '<img src="' . getPathImage() . 'standard/edit.png" alt="' . $lang->def('_MOD') . ' : ' . $title . '" /></a>';
$cont[] = '<a href="index.php?modname=meta_certificate&op=delmetacertificate&id_certificate=' . $id_certificate . '" ' . 'title="' . $lang->def('_DEL') . ' : ' . $name . '">' . '<img src="' . getPathImage() . 'standard/delete.png" alt="' . $lang->def('_DEL') . ' : ' . $title . '" /></a>';
}
$tb->addBody($cont);
}
require_once _base_ . '/lib/lib.dialog.php';
setupHrefDialogBox('a[href*=delmetacertificate]');
if ($mod_perm) {
$tb->addActionAdd('<a class="ico-wt-sprite subs_add" href="index.php?modname=meta_certificate&op=addmetacertificate" title="' . $lang->def('_NEW_CERTIFICATE') . '"><span>' . $lang->def('_NEW_CERTIFICATE') . '</span></a>');
}
$out->add(getTitleArea($lang->def('_TITLE_META_CERTIFICATE'), 'certificate') . '<div class="std_block">');
$out->add($form->openForm('certificate_filter', 'index.php?modname=meta_certificate&op=meta_certificate') . '<div class="quick_search_form">
<div>
<div class="simple_search_box">' . Form::getInputTextfield("search_t", "filter_text", "filter_text", Get::req('filter_text', DOTY_MIXED, ''), '', 255, '') . Form::getButton("filter", "filter", Lang::t('_SEARCH', 'standard'), "search_b") . Form::getButton("toggle_filter", "toggle_filter", Lang::t('_RESET', 'standard'), "reset_b") . '</div>
</div>
</div>' . $form->closeForm());
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;
}
}
$out->add($tb->getTable() . $tb->getNavBar($ini, $tot_certificate) . '</div>');
}
示例9: feedbackman
function feedbackman()
{
checkPerm('view', false, 'storage');
$res = '';
require_once _lms_ . '/lib/lib.questcategory.php';
require_once _lms_ . '/lib/lib.assessment_rule.php';
$id_test = Get::gReq('idTest', DOTY_INT, 0);
$back_url = urldecode(Get::gReq('back_url', DOTY_STRING));
$url_encode = htmlentities(urlencode($back_url));
$back_link_url = 'index.php?modname=test&op=modtestgui&idTest=' . $id_test . '&back_url=' . $url_encode;
$url_base = 'index.php?modname=test&idTest=' . $id_test . '&back_url=' . $url_encode . '&op=';
$categories = Questcategory::getTestQuestionsCategories($id_test);
unset($categories[0]);
$categories[0] = Lang::t('_TEST_TOTAL_SCORE', 'test');
$res .= getTitleArea(array($back_link_url => Lang::t('_TEST_SECTION', 'test'), Lang::t('_FEEDBACK_MANAGEMENT', 'test')), 'test') . '<div class="std_block">' . getBackUi($back_link_url, Lang::t('_BACK'));
if (empty($categories)) {
$res .= Lang::t('_NO_CATEGORIES_AVAILABLE');
} else {
$asrule = new AssessmentRuleManager($id_test);
$data = $asrule->getRules();
$first = TRUE;
foreach ($categories as $cat_id => $category) {
if ($first) {
$first = FALSE;
} else {
$res .= '<br /><br />';
}
$res .= '<p>' . ($cat_id > 0 ? Lang::t('_TEST_QUEST_CATEGORY', 'test') . ': ' : '') . '<b>' . $category . '</b></p>';
if (isset($data[$cat_id])) {
$tb = new Table(0, false);
$tb->addHead(array(Lang::t('_SCORE', 'test'), Lang::t('_FEEDBACK_TEXT', 'test'), Get::sprite('subs_mod', Lang::t('_MOD', 'standard'), Lang::t('_MOD', 'standard')), Get::sprite('subs_del', Lang::t('_DEL', 'standard'), Lang::t('_DEL', 'standard'))), array('', '', 'image', 'image'));
foreach ($data[$cat_id] as $row) {
$row_ln = array();
$row_ln[] = $row['from_score'] . ' - ' . $row['to_score'];
$row_ln[] = $row['feedback_txt'];
$row_ln[] = '<a class="ico-sprite subs_mod" href="' . $url_base . 'editfbkrule&item_id=' . $row['rule_id'] . '"><span></span></a>';
$row_ln[] = '<a id="del_rule_' . $row['rule_id'] . '" class="ico-sprite subs_del" href="' . $url_base . 'delfbkrule&item_id=' . $row['rule_id'] . '"><span></span></a>';
$tb->addBody($row_ln);
}
//$tb->addActionAdd('<a href="'.$url_base.'addfbkrule&cat_id='.$cat_id.'" class="ico-wt-sprite subs_add"><span>'.Lang::t('_ADD', 'test').'</span></a>');
$res .= $tb->getTable();
}
$res .= '<div class="table-container-below">' . '<a href="' . $url_base . 'addfbkrule&cat_id=' . $cat_id . '" class="ico-wt-sprite subs_add"><span>' . Lang::t('_ADD', 'test') . '</span></a>' . '</div>';
}
}
$res .= getBackUi($back_link_url, Lang::t('_BACK')) . '</div>';
require_once _base_ . '/lib/lib.dialog.php';
setupHrefDialogBox('a[id^=del_rule_]');
$GLOBALS['page']->add($res, 'content');
}
示例10: view_report_certificate
//.........这里部分代码省略.........
}
//$where .= " AND ".$aval_status." ".($only_released==1 ? "<" : ">=")." cu.status ";
list($aval_status) = sql_fetch_row(sql_query("SELECT available_for_status FROM " . $tcc . " " . " WHERE id_certificate='" . (int) $id_certificate . "' AND id_course='" . (int) $id_course . "'"));
switch ($aval_status) {
case AVS_ASSIGN_FOR_ALL_STATUS:
$aval_status = " 1 ";
break;
case AVS_ASSIGN_FOR_STATUS_INCOURSE:
$aval_status = " cu.status = " . _CUS_BEGIN . " ";
break;
case AVS_ASSIGN_FOR_STATUS_COMPLETED:
$aval_status = " cu.status = " . _CUS_END . " ";
break;
}
list($totalrows) = sql_fetch_row(sql_query("SELECT COUNT(*) " . " FROM ( " . $tu . " JOIN " . $tcu . " ON (u.idst = cu.idUser) ) LEFT JOIN " . $tca . " " . " ON ( ca.id_course = cu.idCourse AND ca.id_user=cu.idUser ) " . " WHERE (ca.id_certificate='" . (int) $id_certificate . "' OR ca.id_certificate IS NULL) AND " . $aval_status . " " . " AND cu.idCourse='" . (int) $id_course . "' " . $where));
$query = "SELECT u.userid, u.firstname, u.lastname, cu.date_complete, ca.on_date, cu.idUser as id_user, cu.status " . " FROM ( " . $tu . " JOIN " . $tcu . " ON (u.idst = cu.idUser) ) LEFT JOIN " . $tca . " " . " ON ( ca.id_course = cu.idCourse AND ca.id_user=cu.idUser ) " . " WHERE (ca.id_certificate='" . (int) $id_certificate . "' OR ca.id_certificate IS NULL) AND " . $aval_status . " " . " AND cu.idCourse='" . (int) $id_course . "' " . $where . " ORDER BY u.userid LIMIT " . $ini . ", " . $numtablerows;
//cout('<pre>'.print_r($_POST, true).'</pre>');
//cout($query);
$res = sql_query($query);
$from = Get::req('from', DOTY_MIXED, '');
if ($from === 'course') {
$back_ui = getBackUi('index.php?r=alms/course/certificate&id_course=' . (int) $id_course, $lang->def('_BACK'));
$out->add(getTitleArea(array('index.php?r=alms/course/certificate&id_course=' . (int) $id_course => $lang->def('_CERTIFICATE_ASSIGN_STATUS', 'course'), $lang->def('_COURSES')), 'certificate'));
} else {
$back_ui = getBackUi('index.php?modname=certificate&op=report_certificate&id_certificate=' . (int) $id_certificate, $lang->def('_BACK'));
$out->add(getTitleArea(array('index.php?modname=certificate&op=certificate' => $lang->def('_TITLE_CERTIFICATE'), 'index.php?modname=certificate&op=report_certificate&id_certificate=' . (int) $id_certificate => $lang->def('_COURSES'), $lang->def('_CERTIFICATE_VIEW_CAPTION')), 'certificate'));
}
$out->add('<div class="std_block">' . $back_ui);
$numrows = sql_num_rows($res);
$downloadables = array();
if ($numrows > 0) {
$clang =& DoceboLanguage::CreateInstance('course', 'lms');
$type_h = array('image', '', '', '', '', '', '', 'image', 'image');
$cont_h = array('', $lang->def('_USERNAME'), $lang->def('_LASTNAME'), $lang->def('_FIRSTNAME'), $clang->def('_STATUS'), $lang->def('_DATE'), $lang->def('_RELASE_DATE'), Get::sprite('subs_pdf', Lang::t('_TITLE_VIEW_CERT', 'certificate')), Get::sprite('subs_del', Lang::t('_DEL', 'certificate')));
$tb->setColsStyle($type_h);
$tb->addHead($cont_h);
$acl_man =& $GLOBALS['current_user']->getAclManager();
$arr_status = array(_CUS_CONFIRMED => $clang->def('_USER_STATUS_CONFIRMED'), _CUS_SUBSCRIBED => $clang->def('_USER_STATUS_SUBS'), _CUS_BEGIN => $clang->def('_USER_STATUS_BEGIN'), _CUS_END => $clang->def('_USER_STATUS_END'), _CUS_SUSPEND => $clang->def('_USER_STATUS_SUSPEND'));
//foreach($report_info as $info_report)
while ($info = sql_fetch_assoc($res)) {
$cont = array();
$can_assign = (bool) ($info['on_date'] == '');
$input_id = $info['id_user'];
$sel_cell_content = '';
$label_open = '';
$label_close = '';
if ($can_assign) {
$input = '<input type="hidden" id="selection_' . $input_id . '" name="selection[' . $input_id . ']" value="' . $input_id . '"/> ';
if (in_array($input_id, $total_selection)) {
$checked = ' checked="checked"';
} else {
$checked = '';
}
$sel_cell_content .= $input . '<input type="checkbox" id="selected_' . $input_id . '" name="selected[' . $input_id . ']" value="' . $input_id . '"' . $checked . '/>';
$label_open = '<label for="selected_' . $input_id . '">';
$label_close = '</label>';
}
$userid = $acl_man->relativeId($info['userid']);
$cont[] = $sel_cell_content;
$cont[] = $label_open . ($search_filter != '' ? highlightText($userid, $search_filter) : $userid) . $label_close;
$cont[] = $label_open . ($search_filter != '' ? highlightText($info['lastname'], $search_filter) : $info['lastname']) . $label_close;
$cont[] = $label_open . ($search_filter != '' ? highlightText($info['firstname'], $search_filter) : $info['firstname']) . $label_close;
$cont[] = $arr_status[$info['status']];
$cont[] = $info['date_complete'];
$cont[] = $info['on_date'];
$url = 'index.php?modname=certificate&certificate_id=' . $id_certificate . '&course_id=' . $id_course . '&user_id=' . $info['id_user'];
示例11: getcourselist
public function getcourselist()
{
//Datatable info
$start_index = Get::req('startIndex', DOTY_INT, 0);
$results = Get::req('results', DOTY_MIXED, Get::sett('visuItem', 25));
$sort = Get::req('sort', DOTY_MIXED, 'userid');
$dir = Get::req('dir', DOTY_MIXED, 'asc');
$id_category = Get::req('node_id', DOTY_INT, (int) $this->_getSessionTreeData('id_category', 0));
$filter_text = $_SESSION['course_filter']['text'];
$classroom = $_SESSION['course_filter']['classroom'];
$descendants = $_SESSION['course_filter']['descendants'];
$waiting = $_SESSION['course_filter']['waiting'];
$filter_open = false;
if ($descendants || $waiting) {
$filter_open = true;
}
$filter = array('id_category' => $id_category, 'classroom' => $classroom, 'descendants' => $descendants, 'waiting' => $waiting, 'text' => $filter_text, 'open' => $filter_open);
$total_course = $this->model->getCourseNumber($filter);
if ($start_index >= $total_course) {
if ($total_course < $results) {
$start_index = 0;
} else {
$start_index = $total_course - $results;
}
}
$course_res = $this->model->loadCourse($start_index, $results, $sort, $dir, $filter);
$course_with_cert = $this->model->getCourseWithCertificate();
$course_with_competence = $this->model->getCourseWithCompetence();
$list = array();
while ($row = sql_fetch_assoc($course_res)) {
$course_type = 'elearning';
switch ($row['course_type']) {
case 'classroom':
$course_type = 'classroom';
case 'elearning':
if ($row['course_edition'] > 0) {
$course_type = 'edition';
}
}
$num_subscribed = $row['subscriptions'] - $row['pending'];
$list[$row['idCourse']] = array('id' => $row['idCourse'], 'code' => $row['code'], 'name' => $row['name'], 'type' => Lang::t('_' . strtoupper($row['course_type'])), 'type_id' => $course_type, 'wait' => $row['course_edition'] != 1 && $row['pending'] != 0 ? '<a href="index.php?r=' . $this->base_link_subscription . '/waitinguser&id_course=' . $row['idCourse'] . '" title="' . Lang::t('_WAITING', 'course') . '">' . $row['pending'] . '</a>' : '', 'user' => $row['course_type'] !== 'classroom' && $row['course_edition'] != 1 ? '<a class="nounder" href="index.php?r=' . $this->base_link_subscription . '/show&id_course=' . $row['idCourse'] . '" title="' . Lang::t('_SUBSCRIPTION', 'course') . '">' . $num_subscribed . ' ' . Get::img('standard/moduser.png', Lang::t('_SUBSCRIPTION', 'course')) . '</a>' : '', 'edition' => $row['course_type'] === 'classroom' ? '<a href="index.php?r=' . $this->base_link_classroom . '/classroom&id_course=' . $row['idCourse'] . '" title="' . Lang::t('_CLASSROOM_EDITION', 'course') . '">' . $this->model->classroom_man->getDateNumber($row['idCourse'], true) . '</a>' : ($row['course_edition'] == 1 ? '<a href="index.php?r=' . $this->base_link_edition . '/show&id_course=' . $row['idCourse'] . '" title="' . Lang::t('_EDITIONS', 'course') . '">' . $this->model->edition_man->getEditionNumber($row['idCourse']) . '</a>' : ''), 'certificate' => '<a href="index.php?r=' . $this->base_link_course . '/certificate&id_course=' . $row['idCourse'] . '">' . Get::sprite('subs_pdf' . (!isset($course_with_cert[$row['idCourse']]) ? '_grey' : ''), Lang::t('_CERTIFICATE_ASSIGN_STATUS', 'course')) . '</a>', 'competences' => '<a href="index.php?r=' . $this->base_link_competence . '/man_course&id_course=' . $row['idCourse'] . '">' . Get::sprite('subs_competence' . (!isset($course_with_competence[$row['idCourse']]) ? '_grey' : ''), Lang::t('_COMPETENCES', 'course')) . '</a>', 'menu' => '<a href="index.php?r=' . $this->base_link_course . '/menu&id_course=' . $row['idCourse'] . '">' . Get::sprite('subs_menu', Lang::t('_ASSIGN_MENU', 'course')) . '</a>', 'dup' => 'ajax.adm_server.php?r=' . $this->base_link_course . '/dupcourse&id_course=' . $row['idCourse'], 'mod' => '<a href="index.php?r=' . $this->base_link_course . '/modcourse&id_course=' . $row['idCourse'] . '">' . Get::sprite('subs_mod', Lang::t('_MOD', 'standard')) . '</a>', 'del' => 'ajax.adm_server.php?r=' . $this->base_link_course . '/delcourse&id_course=' . $row['idCourse'] . '&confirm=1');
}
if (!empty($list)) {
$id_list = array_keys($list);
$count_students = $this->model->getCoursesStudentsNumber($id_list);
foreach ($list as $id_course => $cinfo) {
$list[$id_course]['students'] = isset($count_students[$id_course]) ? $count_students[$id_course] : '';
}
}
$result = array('totalRecords' => $total_course, 'startIndex' => $start_index, 'sort' => $sort, 'dir' => $dir, 'rowsPerPage' => $results, 'results' => count($list), 'records' => array_values($list));
echo $this->json->encode($result);
}