本文整理汇总了PHP中getPathImage函数的典型用法代码示例。如果您正苦于以下问题:PHP getPathImage函数的具体用法?PHP getPathImage怎么用?PHP getPathImage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getPathImage函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: modglossarygui
function modglossarygui($object_glos = NULL)
{
checkPerm('view', false, 'storage');
$lang =& DoceboLanguage::createInstance('glossary');
require_once _base_ . '/lib/lib.table.php';
$tableGlossary = new Table(Get::sett('visuItem'), '', $lang->def('_GLOSSARY_SUMMARY'));
$tableGlossary->initNavBar('ini', 'link');
$ini = $tableGlossary->getSelectedElement();
$back_coded = htmlentities(urlencode($object_glos->back_url));
list($title) = sql_fetch_row(sql_query("\r\n\tSELECT title\r\n\tFROM " . $GLOBALS['prefix_lms'] . "_glossary \r\n\tWHERE idGlossary = '" . $object_glos->getId() . "'"));
$reTerm = sql_query("\r\n\tSELECT idTerm, term \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_glossaryterm \r\n\tWHERE idGlossary = '" . $object_glos->getId() . "' \r\n\tORDER BY term \r\n\tLIMIT {$ini}," . Get::sett('visuItem'));
list($num_of_term) = sql_fetch_row(sql_query("\r\n\tSELECT COUNT(*) \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_glossaryterm\r\n\tWHERE idGlossary = '" . $object_glos->getId() . "'"));
if ($title == '') {
$_SESSION['last_error'] = $lang->def('_FILEUNSPECIFIED');
Util::jump_to(Util::str_replace_once('&', '&', $object_glos->back_url) . '&create_result=0');
}
$GLOBALS['page']->add(getTitleArea($lang->def('_GLOSSARY'), 'glossary', $lang->def('_GLOSSARY')) . '<div class="std_block">' . getBackUi(Util::str_replace_once('&', '&', $object_glos->back_url) . '&mod_result=0', $lang->def('_BACK')) . '<b>' . $lang->def('_GLOSSARY') . ' : ' . $title . '</b><br /><br />' . '<div class="mod_container">' . '<a href="index.php?modname=glossary&op=modglossary&idGlossary=' . $object_glos->getId() . '&back_url=' . $back_coded . '" title="' . $lang->def('_MOD_TITLE') . '">' . '<img src="' . getPathImage() . 'standard/edit.png" alt="' . $lang->def('_MOD') . '" /> ' . $lang->def('_MOD_TITLE') . '</a>' . '</div><br />', 'content');
$contentArray = array($lang->def('_TERM'), '<img src="' . getPathImage() . 'standard/edit.png" title="' . $lang->def('_MOD') . '" alt="' . $lang->def('_MOD') . '" />', '<img src="' . getPathImage() . 'standard/delete.png" title="' . $lang->def('_DEL') . '" alt="' . $lang->def('_DEL') . '" />');
$typeArray = array('', 'image', 'image');
$GLOBALS['page']->add($tableGlossary->addHead($contentArray, $typeArray));
while (list($idTerm, $term) = sql_fetch_row($reTerm)) {
$content = array($term, '<a href="index.php?modname=glossary&op=modterm&idTerm=' . $idTerm . '&back_url=' . $back_coded . '" title="' . $lang->def('_MOD') . '">' . '<img src="' . getPathImage() . 'standard/edit.png" alt="' . $lang->def('_MOD') . '" /></a>', '<a href="index.php?modname=glossary&op=delterm&idTerm=' . $idTerm . '&back_url=' . $back_coded . '" title="' . $lang->def('_DEL') . '">' . '<img src="' . getPathImage() . 'standard/delete.png" alt="' . $lang->def('_DEL') . '" /></a>');
$tableGlossary->addBody($content);
}
$tableGlossary->addActionAdd('<a href="index.php?modname=glossary&op=addterm&idGlossary=' . $object_glos->getId() . '&back_url=' . $back_coded . '" title="' . $lang->def('_ADDTERM') . '">' . '<img src="' . getPathImage() . 'standard/add.png" alt="' . $lang->def('_ADD') . '" /> ' . $lang->def('_ADDTERM') . '</a>');
$tableGlossary->setLink('index.php?modname=glossary&op=modglossarygui' . '&idGlossary=' . $object_glos->getId() . '&back_url=' . $back_coded);
$GLOBALS['page']->add($tableGlossary->getTable() . $tableGlossary->getNavBar($ini, $num_of_term) . '</div>', 'content');
}
示例2: myfriends
function myfriends(&$url)
{
checkPerm('view');
require_once $GLOBALS['where_framework'] . '/lib/lib.myfriends.php';
require_once _base_ . '/lib/lib.table.php';
$lang =& DoceboLanguage::createInstance('myfriends', 'lms');
$acl_man =& Docebo::user()->getAclManager();
$my_fr = new MyFriends(getLogUserId());
$users_info = $my_fr->getFriendsList(false, false, false);
require_once _base_ . '/lib/lib.user_profile.php';
$GLOBALS['page']->add(getTitleArea($lang->def('_MY_FRIENDS'), 'myfriends') . '<div class="std_block">' . '<p class="new_elem_link"><a href="' . $url->getUrl('op=searchuser') . '">' . $lang->def('_SEARCH_USER') . '</a></p>', 'content');
$controlled_id = array();
$controlled_id = $my_fr->controlPendentRequest();
if (count($controlled_id)) {
for ($i = 0; $i < count($controlled_id); $i++) {
$controlled_user = $acl_man->getUser($controlled_id[$i], false);
$controlled_username = $acl_man->relativeId($controlled_user[ACL_INFO_USERID]);
$GLOBALS['page']->add('<p>' . $lang->def('_THEUSER') . ' <b>' . $controlled_username . '</b> ' . $lang->def('_REQUEST') . '</p>', 'content');
}
}
$req_number = $my_fr->getPendentRequestCount();
if ($req_number > 0) {
$GLOBALS['page']->add('<p>' . str_replace('[request_number]', $req_number, $lang->def('_PENDENDT_FRIEND')) . '<br />' . '<a href="' . $url->getUrl('op=approveuser') . '">' . $lang->def('_SHOW_ME') . '</a>' . '</p>', 'content');
}
if (is_array($users_info) && !empty($users_info)) {
while (list(, $ui) = each($users_info)) {
$profile = new UserProfile($ui['id']);
$profile->init('profile', 'framework', 'modname=myfriends&op=searchuser', 'ap');
$GLOBALS['page']->add($profile->minimalUserInfo(), 'content');
// action line
$GLOBALS['page']->add('<p class="mf_action_line">' . ($ui['waiting'] == MF_WAITING ? $lang->def('_WAITING_FOR_APPROVE') . ' ' : '') . '<a href="' . $url->getUrl('op=delfriend&id_friend=' . $ui['id']) . '" ' . 'title="' . ($ui['waiting'] == MF_WAITING ? $lang->def('_DEL_WAITING_FRIEND') . ' : ' . $profile->resolveUsername() : $lang->def('_DEL') . ' : ' . $profile->resolveUsername()) . '">' . '<img src="' . getPathImage() . 'standard/remfriend.gif" alt="' . ($ui['waiting'] == MF_WAITING ? $lang->def('_DEL_WAITING_FRIEND') . ' : ' . $profile->resolveUsername() : $lang->def('_DEL') . ' : ' . $profile->resolveUsername()) . '" />' . '</a>' . '</p>', 'content');
}
}
$GLOBALS['page']->add('</div>', 'content');
}
示例3: 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;
}
示例4: notes
function notes()
{
checkPerm('view');
require_once _base_ . '/lib/lib.table.php';
$lang =& DoceboLanguage::createInstance('notes', 'lms');
$nav_bar = new NavBar('ini', Get::sett('visuItem'), 0);
$ini = $nav_bar->getSelectedElement();
$ord = importVar('ord');
$inv = importVar('inv');
switch ($ord) {
case "tit":
$ord = $order = 'title';
if ($inv != 'y') {
$a_down = '&inv=y';
} else {
$order .= ' DESC';
$a_down = '';
}
break;
default:
$ord = $order = 'data';
if ($inv == 'y') {
$a_down = '';
} else {
$order .= ' DESC';
$a_down = '&inv=y';
}
}
$reNotes = sql_query("\r\n\tSELECT idNotes, data, title \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_notes \r\n\tWHERE owner ='" . getLogUserId() . "' AND idCourse='" . $_SESSION['idCourse'] . "' \r\n\tORDER BY {$order} \r\n\tLIMIT {$ini}," . Get::sett('visuItem'));
list($num_notes) = sql_fetch_row(sql_query("SELECT COUNT(*) \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_notes \r\n\tWHERE owner ='" . getLogUserId() . "' AND idCourse='" . $_SESSION['idCourse'] . "' "));
$nav_bar->setElementTotal($num_notes);
$img_up = '<img class="valing-middle" src="' . getPathImage() . 'standard/up_arrow.png" alt="' . $lang->def('_UP') . '"/>';
$img_down = '<img class="valing-middle" src="' . getPathImage() . 'standard/down_arrow.png" alt="' . $lang->def('_DOWN') . '"/>';
$tb = new Table(Get::sett('visuItem'), $lang->def('_NOTES'), $lang->def('_NOTES'));
$contentH = array(($ord == 'data' ? $inv == 'y' ? $img_up : $img_down : '') . '<a href="index.php?modname=notes&op=notes' . $a_down . '"> ' . $lang->def('_DATE') . '</a>', ($ord == 'title' ? $inv == 'y' ? $img_up : $img_down : '') . '<a href="index.php?modname=notes&op=notes&ord=tit' . $a_down . '">' . $lang->def('_TITLE') . '</a>', '<img src="' . getPathImage() . 'standard/edit.png" title="' . $lang->def('_MOD') . '" alt="' . $lang->def('_MOD') . '" />', '<img src="' . getPathImage() . 'standard/delete.png" title="' . $lang->def('_DEL') . '" alt="' . $lang->def('_DEL') . '" />');
$typeH = array('min-cell', '', 'image', 'image');
$tb->setColsStyle($typeH);
$tb->addHead($contentH);
while (list($idNotes, $data, $title) = sql_fetch_row($reNotes)) {
$content = array(Format::date($data), '<a href="index.php?modname=notes&op=displaynotes&idNotes=' . $idNotes . '" title="' . $lang->def('_MORET') . '">' . $title . '</a>', '<a href="index.php?modname=notes&op=modnotes&idNotes=' . $idNotes . '">
<img src="' . getPathImage() . 'standard/edit.png" title="' . $lang->def('_MOD') . '" alt="' . $lang->def('_MOD') . '" /></a>', '<a id="delnotes_' . $idNotes . '"' . ' href="index.php?modname=notes&op=delnotes&idNotes=' . $idNotes . '"' . ' title="' . $lang->def('_TITLE') . ' : ' . strip_tags(str_replace(array('"', "'"), '', $title)) . '">
<img src="' . getPathImage() . 'standard/delete.png" alt="' . $lang->def('_DEL') . '" /></a>');
$tb->addBody($content);
}
$tb->addActionAdd('<a href="index.php?modname=notes&op=addnotes">' . '<img src="' . getPathImage() . 'standard/add.png" title="' . $lang->def('_ADD') . '" alt="' . $lang->def('_ADD') . '" /> ' . $lang->def('_ADD_NOTES') . '</a>');
$GLOBALS['page']->add(getTitleArea(array($lang->def('_NOTES')), 'notes') . '<div class="std_block">', 'content');
if (isset($_POST['result'])) {
switch ($_POST['result']) {
case "ok":
$GLOBALS['page']->add(getResultUi($lang->def('_OPERATION_SUCCESSFUL')), 'content');
case "err":
$GLOBALS['page']->add(getErrorUi($lang->def('_OPERATION_FAILURE')), 'content');
}
}
$GLOBALS['page']->add($tb->getTable() . $nav_bar->getNavBar($ini), 'content');
require_once _base_ . '/lib/lib.dialog.php';
setupHrefDialogBox('a[href*=delnotes]');
$GLOBALS['page']->add('</div>', 'content');
}
示例5: getLevelOneIntest
function getLevelOneIntest($idMenu)
{
$lang =& DoceboLanguage::createInstance('menu', $this->platform);
$query_menu = "\r\n\t\tSELECT name, image\r\n\t\tFROM " . $this->table_level_one . "\r\n\t\tWHERE idMenu = '" . (int) $idMenu . "'";
$re_menu = sql_query($query_menu);
list($name, $image) = sql_fetch_row($re_menu);
return array('name' => $name != '' ? $lang->def($name) : '', 'image' => getPathImage('framework') . 'area_title/' . $image);
}
示例6: showhtml
function showhtml()
{
checkPerm('view');
$lang =& DoceboLanguage::createInstance('htmlfront', 'lms');
$query = "\r\n\tSELECT textof\r\n\tFROM " . $GLOBALS['prefix_lms'] . "_htmlfront \r\n\tWHERE id_course = '" . $_SESSION['idCourse'] . "'";
$re_htmlfront = sql_query($query);
list($textof) = sql_fetch_row($re_htmlfront);
$GLOBALS['page']->add(getTitleArea($lang->def('_HTMLFRONT'), 'htmlfront') . '<div class="std_block">' . (isset($_GET['saveok']) ? getResultUi($lang->def('_OPERATION_SUCCESSFUL')) : '') . '<div class="htmlfront_container">' . $textof . '</div>' . (checkPerm('mod', true) ? '<p class="table-container-below">' . '<a class="infomod" href="index.php?modname=htmlfront&op=edithtml" title="' . $lang->def('_MOD') . '">' . '<img src="' . getPathImage() . 'standard/edit.png" alt="' . $lang->def('_MOD') . '" /> ' . $lang->def('_MOD') . '</a></p>' : '') . '</div>', 'content');
}
示例7: regional_settings
function regional_settings()
{
checkPerm('view');
/*funAdminAccess('lang','OP');
$newPerm = funAdminAccess('addlang', 'NEW', true);
$modPerm = funAdminAccess('modlang', 'MOD', true);
$remPerm = funAdminAccess('dellang', 'REM', true);*/
$write_perm = true;
$mod_perm = true;
$rem_perm = true;
require_once _base_ . "/lib/lib.table.php";
$out =& $GLOBALS['page'];
$lang =& DoceboLanguage::createInstance('admin_regset', 'framework');
$regset = new RegionalSettingsManager();
$out->setWorkingZone("content");
$out->add(getTitleArea($lang->def("_REGIONAL_SETTINGS"), "regset"));
$out->add("<div class=\"std_block\">\n");
$ini = importVar("ini", true, 0);
$arr = $regset->getAllRegions();
$table = new Table(Get::sett('visuItem'));
$out->add($table->OpenTable(""));
$head = array($lang->def("_REGION_CODE"), $lang->def("_DESCRIPTION"), '<img src="' . getPathImage() . 'standard/edit.png" alt="' . $lang->def("_MOD") . '" title="' . $lang->def("_MOD") . '" />', '<img src="' . getPathImage() . 'standard/delete.png" alt="' . $lang->def("_DEL") . '" title="' . $lang->def("_DEL") . '" />');
$head_type = array('', '', 'img', 'img');
$out->add($table->WriteHeader($head, $head_type));
$tot = count($arr) < $ini + Get::sett('visuItem') ? count($arr) : $ini + Get::sett('visuItem');
for ($i = $ini; $i < $tot; $i++) {
$rowcnt = array();
$rowcnt[] = $arr[$i];
$rowcnt[] = $regset->getRegionInfo($arr[$i], "description");
if ($mod_perm) {
$btn = "<a href=\"index.php?modname=regional_settings&op=editregion&id=" . $arr[$i] . "\">";
$btn .= "<img src=\"" . getPathImage() . "standard/edit.png\" ";
$btn .= "alt=\"" . $lang->def("_MOD") . "\" title=\"" . $lang->def("_MOD") . " " . $arr[$i] . "\" />";
$btn .= "</a>\n";
$rowcnt[] = $btn;
} else {
$rowcnt[] = " ";
}
if ($rem_perm && !$regset->getRegionInfo($arr[$i], "default")) {
$btn = "<a href=\"\">";
$btn .= "<img src=\"" . getPathImage() . "standard/delete.png\" ";
$btn .= "alt=\"" . $lang->def("_DEL") . "\" title=\"" . $lang->def("_DEL") . " " . $arr[$i] . "\" />";
$btn .= "</a>\n";
$rowcnt[] = $btn;
} else {
$rowcnt[] = " ";
}
$out->add($table->writeRow($rowcnt));
}
if ($write_perm) {
$out->add($table->WriteAddRow('<a href="index.php?modname=regional_settings&op=addregion">
<img src="' . getPathImage() . 'standard/add.png" title="' . $lang->def('_ADD') . '" alt="' . $lang->def('_ADD') . '" /> ' . $lang->def('_ADD') . '</a>'));
}
$out->add($table->CloseTable());
$out->add($table->WriteNavBar('', 'index.php?modname=regional_settings&op=regset&ini=', $ini, count($arr)));
$out->add("</div>\n");
}
示例8: fileList
function fileList(&$url)
{
checkPerm('view');
require_once _base_ . '/lib/lib.tab.php';
require_once _base_ . '/lib/lib.table.php';
require_once _base_ . '/lib/lib.form.php';
$file_man = new MyFile(getLogUserId());
$tab_man = new TabView('myfiles', '');
$lang =& DoceboLanguage::createInstance('myfiles');
$areas = $file_man->getFilesAreas();
while (list($id_page, $area_name) = each($areas)) {
$new_tab = new TabElemDefault($id_page, $lang->def($area_name), getPathImage('fw') . 'myfiles/' . $id_page . '.gif');
$tab_man->addTab($new_tab);
}
$tab_man->parseInput($_POST, $_SESSION);
$active_tab = $tab_man->getActiveTab();
if (!$active_tab) {
$active_tab = importVar('working_area', false, $file_man->getDefaultArea());
$tab_man->setActiveTab($active_tab);
}
$GLOBALS['page']->addStart(Form::openForm('tab_myfiles', $url->getUrl('op=myfiles')) . Form::getHidden('working_area', 'working_area', $active_tab) . $tab_man->printTabView_Begin('', false), 'content');
$GLOBALS['page']->addEnd($tab_man->printTabView_End() . Form::closeForm(), 'content');
$tb = new Table(0, $lang->def('_MYFILES_CAPTION'), $lang->def('_MYFILES_SUMMARY'));
$cont_h = array($lang->def('_TITLE'), $lang->def('_FILE_POLICY'), '<img src="' . getPathImage() . 'standard/edit.png" title="' . $lang->def('_MOD') . '" alt="' . $lang->def('_MOD') . '" />', '<img src="' . getPathImage() . 'standard/delete.png" title="' . $lang->def('_REM_FILE') . '" alt="' . $lang->def('_DEL') . '" />');
$type_h = array('', 'image nowrap', 'image', 'image');
$tb->setColsStyle($type_h);
$tb->addHead($cont_h);
$re_files = $file_man->getFileList($active_tab, false, MYFILE_TITLE);
while ($file_info = $file_man->fetch_row($re_files)) {
$cont = array($file_info[MYFILE_TITLE]);
switch ($file_info[MYFILE_POLICY]) {
case MF_POLICY_FREE:
$cont[] = $lang->def('_MF_POLICY_FREE');
break;
case MF_POLICY_TEACHER:
$cont[] = $lang->def('_MF_POLICY_TEACHER');
break;
case MF_POLICY_FRIENDS:
$cont[] = $lang->def('_MF_POLICY_FRIENDS');
break;
case MF_POLICY_TEACHER_AND_FRIENDS:
$cont[] = $lang->def('_MF_POLICY_TEACHER_AND_FRIENDS');
break;
case MF_POLICY_NOONE:
$cont[] = $lang->def('_MF_POLICY_NOONE');
break;
}
$cont[] = '<a href="' . $url->getUrl('op=modfiles&working_area=' . $active_tab . '&id_file=' . $file_info[MYFILE_ID_FILE]) . '">' . '<img src="' . getPathImage() . 'standard/edit.png" title="' . $lang->def('_MOD') . ' : ' . $file_info[MYFILE_TITLE] . '" alt="' . $lang->def('_MOD') . '" />' . '</a>';
$cont[] = '<a href="' . $url->getUrl('op=delfiles&id_file=' . $file_info[MYFILE_ID_FILE]) . '">' . '<img src="' . getPathImage() . 'standard/delete.png" title="' . $lang->def('_REM_FILE') . ' : ' . $file_info[MYFILE_TITLE] . '" alt="' . $lang->def('_DEL') . '" />' . '</a>';
$tb->addBody($cont);
}
$tb->addActionAdd('<p class="new_elem_link"><a href="' . $url->getUrl('op=modfiles&working_area=' . $active_tab) . '">' . $lang->def('_ADD_' . $active_tab) . '</a></p>');
$tb->addActionAdd('<p>' . '<a href="' . $url->getUrl('modname=profile&op=profile&id_user=' . getLogUserId() . '&ap=view_files&type=' . $active_tab . '&from=1') . '">' . '<img src="' . getPathImage('fw') . 'myfiles/' . $active_tab . '.gif" title="' . $lang->def($active_tab) . '" alt="' . $lang->def('_VIEW_' . $active_tab) . '" />' . '</a>' . '<a href="' . $url->getUrl('modname=profile&op=profile&id_user=' . getLogUserId() . '&ap=view_files&type=' . $active_tab . '&from=1') . '">' . $lang->def('_VIEW_' . $active_tab) . '</a></p>');
$GLOBALS['page']->add($tb->getTable(), 'content');
}
示例9: loadExtraMenu
function loadExtraMenu()
{
$lang =& DoceboLanguage::createInstance('forum');
$line = '<div class="legend_line">';
echo $line . '<img src="' . getPathImage() . 'standard/add.png" /> ' . $lang->def('_REPLY') . '</div>' . $line . '<img src="' . getPathImage() . 'standard/edit.png" /> ' . $lang->def('_MOD') . '</div>' . $line . '<img src="' . getPathImage() . '/forum/free.gif" /> ' . $lang->def('_FORUMOPEN') . '</div>' . $line . '<img src="' . getPathImage() . '/forum/locked.gif" /> ' . $lang->def('_FORUMCLOSED') . '</div>';
if (checkPerm('mod', true)) {
$line . '<img src="' . getPathImage() . 'forum/erase.gif" /> ' . $lang->def('_DEL') . '</div>';
$line . '<img src="' . getPathImage() . 'forum/unerase.gif" /> ' . $lang->def('_RESTOREINSERT') . '</div>';
}
if (checkPerm('del', true)) {
$line . '<img src="' . getPathImage() . 'standard/delete.png" /> ' . $lang->def('_DEL') . '</div>';
}
}
示例10: NavBar
/**
* class constructor
* @param string $var_name the variable name used for page
* @param int $element_per_page the number of the element displayed in a single page
* @param int $element_total the total number of element
* @param enum $kind_of the type of navbar (link or button)
*/
function NavBar($var_name, $element_per_page, $element_total, $kind_of = false, $modname = false, $platform = false)
{
$this->var_name = $var_name;
$this->element_per_page = $element_per_page;
$this->element_total = $element_total;
$this->link = '';
if ($kind_of == 'button') {
$this->kind_of = 'button';
} else {
$this->kind_of = 'link';
}
$this->symbol = array('start' => array('img' => '<img src="' . getPathImage('fw') . 'standard/start.gif" alt="' . Lang::t('_START') . '" title="' . Lang::t('_START') . '" />', 'src' => getPathImage('fw') . 'standard/start.gif', 'alt' => Lang::t('_START', $modname)), 'prev' => array('img' => '<img src="' . getPathImage('fw') . 'standard/prev.gif" alt="' . Lang::t('_PREV') . '" title="' . Lang::t('_PREV') . '" />', 'src' => getPathImage('fw') . 'standard/prev.gif', 'alt' => Lang::t('_PREV', $modname)), 'next' => array('img' => '<img src="' . getPathImage('fw') . 'standard/next.gif" alt="' . Lang::t('_NEXT') . '" title="' . Lang::t('_NEXT') . '" />', 'src' => getPathImage('fw') . 'standard/next.gif', 'alt' => Lang::t('_NEXT', $modname)), 'end' => array('img' => '<img src="' . getPathImage('fw') . 'standard/end.gif" alt="' . Lang::t('_END') . '" title="' . Lang::t('_END') . '" />', 'src' => getPathImage('fw') . 'standard/end.gif', 'alt' => Lang::t('_END', $modname)));
}
示例11: play
function play($object_link, $id_param)
{
//-kb-play-// if(!checkPerm('view', true, 'organization') && !checkPerm('view', true, 'storage')) die("You can't access");
$lang =& DoceboLanguage::createInstance('link');
$idCategory = $object_link->getId();
$mode = importVar('mode', false, 'link');
$back_coded = htmlentities(urlencode($object_link->back_url));
require_once $GLOBALS['where_lms'] . '/lib/lib.param.php';
$idReference = getLOParam($id_param, 'idReference');
// NOTE: Track only if $idReference is present
if ($idReference !== FALSE) {
require_once $GLOBALS['where_lms'] . '/class.module/track.link.php';
list($exist, $idTrack) = Track_Link::getIdTrack($idReference, getLogUserId(), $idCategory, TRUE);
if ($exist) {
$ti = new Track_Link($idTrack);
$ti->setDate(date('Y-m-d H:i:s'));
$ti->status = 'completed';
$ti->update();
} else {
$ti = new Track_Link(false);
$ti->createTrack($idReference, $idTrack, getLogUserId(), date('Y-m-d H:i:s'), 'completed', 'link');
}
}
list($title) = sql_fetch_row(sql_query("\r\n\tSELECT title \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_link_cat \r\n\tWHERE idCategory = '" . (int) $idCategory . "'"));
$link = 'index.php?modname=link&op=play&idCategory=' . $idCategory . '&id_param=' . $id_param . '&back_url=' . $back_coded;
/*$GLOBALS['page']->add('<div id="top" class="std_block">'
.'<div class="colum_container">' */
cout('<div id="top" class="yui-navset yui-navset-top tab_block">
<ul class="yui-nav">
<li class="first' . ($mode != 'keyw' ? ' selected' : '') . '">
<a href="' . $link . '&mode=list">
<em>' . Lang::t('_SWITCH_TO_LIST', 'link') . '</em>
</a>
</li>
<li' . ($mode == 'keyw' ? ' class="selected"' : '') . '>
<a href="' . $link . '&mode=keyw">
<em>' . Lang::t('_SWITCH_TO_KEYWORD', 'link') . '</em>
</a>
</li>
</ul>
<div class="yui-content">', 'content');
cout(getBackUi(Util::str_replace_once('&', '&', $object_link->back_url), $lang->def('_BACK')), 'content');
$GLOBALS['page']->add('<b>' . $lang->def('_TITLE') . ' : ' . $title . '</b><br /><br />' . $lang->def('_LINKIUNNEWWINDOW') . '<br /><br />', 'content');
if ($mode == 'keyw') {
displayAsKey($idCategory, $link . '&mode=keyw');
} else {
displayAsList($idCategory);
}
$GLOBALS['page']->add('<div class="align_center">' . '<a href="#top"><img src="' . getPathImage() . 'standard/up.png" title="' . $lang->def('_BACKTOTOP') . '" />' . $lang->def('_BACKTOTOP') . '</a>' . getBackUi(Util::str_replace_once('&', '&', $object_link->back_url), $lang->def('_BACK')) . '</div>', 'content');
cout('</div></div>', 'content');
}
示例12: reportList
function reportList()
{
checkPerm('view');
require_once _base_ . '/lib/lib.table.php';
$lang =& DoceboLanguage::createInstance('report', 'framework');
$_SESSION['report_tempdata'] = array();
$can_mod = checkPerm('mod', true);
$acl_man = Docebo::aclm();
$public_admin_mod = true;
$query = "SELECT t1.*, t2.userid \r\n\tFROM %lms_report_filter as t1 \r\n\t\tLEFT JOIN %adm_user as t2 ON t1.author=t2.idst\r\n\tWHERE t1.is_public = 1 OR t1.author = " . Docebo::user()->getId();
$tb = new Table();
$tb->initNavBar('ini', 'button');
$col_type = array('', 'align_center', 'align_center', 'image');
$col_content = array($lang->def('_NAME'), $lang->def('_TAB_REP_CREATOR', 'report', 'framework'), $lang->def('_CREATION_DATE'), '<img src="' . getPathImage() . 'standard/view.png" alt="' . $lang->def('REPORT_SHOW_RESULTS') . '" title="' . $lang->def('REPORT_SHOW_RESULTS') . '" />');
if ($public_admin_mod && $can_mod) {
$col_type[] = 'image';
$col_content[] = '<img src="' . getPathImage() . 'standard/edit.png" alt="' . $lang->def('_MOD') . '" title="' . $lang->def('_MOD') . '"/>';
$col_type[] = 'image';
$col_content[] = '<img src="' . getPathImage() . 'standard/delete.png" alt="' . $lang->def('_DEL') . '" title="' . $lang->def('_DEL') . '"/>';
}
$tb->setColsStyle($col_type);
$tb->addHead($col_content);
$res = sql_query($query);
if ($res) {
while ($row = sql_fetch_assoc($res)) {
$id = $row['id_filter'];
$opn_link = '<a href="index.php?modname=public_report_admin&op=view_report&idrep=' . $id . '" ' . ' title="' . $lang->def('REPORT_SHOW_RESULTS', 'report', 'framework') . '">' . '<img src="' . getPathImage() . 'standard/view.png" alt="' . $lang->def('REPORT_SHOW_RESULTS', 'report', 'framework') . '" />' . '</a>';
$tb_content = array($row['author'] == 0 ? $lang->def($row['filter_name']) : $row['filter_name'], $row['author'] == 0 ? '<div class="align_center">-</div>' : $acl_man->relativeId($row['userid']), Format::date($row['creation_date']), $opn_link);
if ($public_admin_mod && $can_mod) {
if ($row['author'] == Docebo::user()->getId()) {
$tb_content[] = '<a href="index.php?modname=public_report_admin&op=modify_name&modid=' . $id . '" ' . ' title="' . $lang->def('_MOD', 'report', 'framework') . '">' . '<img src="' . getPathImage() . 'standard/edit.png" alt="' . $lang->def('_MOD', 'report', 'framework') . '" />' . '</a>';
} else {
$tb_content[] = '';
}
if ($row['author'] == Docebo::user()->getId()) {
$tb_content[] = '<a href="index.php?modname=public_report_admin&op=del_public_report&idrep=' . $id . '" ' . ' title="' . $lang->def('_DEL', 'report', 'framework') . '">' . '<img src="' . getPathImage() . 'standard/delete.png" alt="' . $lang->def('_DEL', 'report', 'framework') . '" />' . '</a>';
} else {
$tb_content[] = '';
}
}
$tb->addBody($tb_content);
}
}
require_once _base_ . '/lib/lib.dialog.php';
setupHrefDialogBox('a[href*=del_public_report]');
if ($public_admin_mod && $can_mod) {
$tb->addActionAdd('<a href="index.php?modname=public_report_admin&op=create_name">' . '<img src="' . getPathImage() . 'standard/add.png" title="' . $lang->def('_NEW') . '" /> ' . $lang->def('_NEW') . '</a>');
}
cout(getTitleArea($lang->def('_REPORT')) . '<div class="std_block">' . $tb->getTable() . '</div>', 'content');
}
示例13: getLmsLangFlags
function getLmsLangFlags()
{
$lang =& DoceboLanguage::createInstance('blind_navigation');
$blind_link = "<li><a href=\"#lang_box\">" . $lang->def("_LANG_SELECT") . "</a></li>";
$GLOBALS["page"]->add($blind_link, "blind_navigation");
$all_lang = Docebo::langManager()->getAllLangCode();
if (!is_array($all_lang)) {
return '';
}
$res = '<ul id="lang_box">';
foreach ($all_lang as $k => $lang_code) {
$res .= '<a href="index.php?sop=changelang&new_lang=' . $lang_code . '" title="' . $lang_code . '">' . '<img src="' . getPathImage('fw') . 'language/' . $lang_code . '.png" alt="' . $lang_code . '" /></a>';
}
$res .= '</ul>';
return $res;
}
示例14: listroom
function listroom()
{
require_once _base_ . '/lib/lib.table.php';
$lang =& DoceboLanguage::createInstance('admin_config', 'scs');
$out =& $GLOBALS['page'];
$mod_perm = checkPerm('mod', true);
$out->setWorkingZone('content');
$out->add(getTitleArea($lang->def('_ROOM_MAN'), 'admin_conf') . '<div class="std_block">');
$tb_room = new Table(0, $lang->def('_ALL_ROOMS'), $lang->def('_ALL_ROOMS_SUMMARY'));
$cont_h = array($lang->def('_ROOM_NAME'), $lang->def('_ROOM_TYPE'));
$type_h = array('', 'align_center');
if ($mod_perm) {
$cont_h[] = '<img src="' . getPathImage('fw') . 'standard/edit.png" alt="' . $lang->def('_MOD') . '" />';
$type_h[] = 'image';
$cont_h[] = '<img src="' . getPathImage('fw') . 'standard/delete.png" alt="' . $lang->def('_DEL') . '" />';
$type_h[] = 'image';
}
$tb_room->setColsStyle($type_h);
$tb_room->addHead($cont_h);
$query_rooms = "\r\n\tSELECT id_room, room_name, room_type \r\n\tFROM " . $GLOBALS['prefix_scs'] . "_rules_room ";
$re_rooms = sql_query($query_rooms);
while (list($id_room, $room_name, $room_type) = sql_fetch_row($re_rooms)) {
$cont = array($room_name);
switch ($room_type) {
case "course":
$cont[] = $lang->def('_COURSE');
break;
case "private":
$cont[] = $lang->def('_PRIVATE');
break;
case "public":
$cont[] = $lang->def('_PUBLIC');
break;
}
if ($mod_perm) {
$cont[] = '<a href="index.php?modname=room&op=modroom&id_room=' . $id_room . '"' . ' title="' . $lang->def('_MOD') . ' : ' . $room_name . '">' . '<img src="' . getPathImage('fw') . 'standard/edit.png" alt="' . $lang->def('_MOD') . ' : ' . $room_name . '" /></a>';
$cont[] = '<a href="index.php?modname=room&op=delroom&id_room=' . $id_room . '"' . ' title="' . $lang->def('_DEL') . ' : ' . $room_name . '">' . '<img src="' . getPathImage('fw') . 'standard/delete.png" alt="' . $lang->def('_DEL') . ' : ' . $room_name . '" /></a>';
}
$tb_room->addBody($cont);
}
if ($mod_perm) {
$tb_room->addActionAdd('<a href="index.php?modname=room&op=newroom">' . '<img src="' . getPathImage('fw') . 'standard/add.png" alt="' . $lang->def('_NEW_ROOM') . '" />' . ' ' . $lang->def('_NEW_ROOM') . '</a>');
}
$out->add($tb_room->getTable());
$out->add('</div>');
}
示例15: TabView
function &create_TabView($op)
{
global $_tab_op_map;
$tv = new TabView('storage', 'index.php?modname=storage&op=display');
$lang =& DoceboLanguage::createInstance('storage', 'lms');
if (checkPerm('home', true, 'storage')) {
$tv->addTab(new TabElemDefault('storage_home', $lang->def('_HOMEREPOROOTNAME'), getPathImage() . 'area_title/homerepo.gif'));
}
if (checkPerm('lesson', true, 'storage')) {
$tv->addTab(new TabElemDefault('storage_course', $lang->def('_ORGROOTNAME'), getPathImage() . 'area_title/organizations.gif'));
}
if (checkPerm('public', true, 'storage')) {
$tv->addTab(new TabElemDefault('storage_pubrepo', $lang->def('_PUBREPOROOTNAME'), getPathImage() . 'area_title/pubrepo.gif'));
}
$extra_data = load_state();
$tv->parseInput($_POST, $extra_data);
if (isset($_tab_op_map[$op])) {
$tv->setActiveTab($_tab_op_map[$op]);
}
return $tv;
}