本文整理汇总了PHP中Util::get_css方法的典型用法代码示例。如果您正苦于以下问题:PHP Util::get_css方法的具体用法?PHP Util::get_css怎么用?PHP Util::get_css使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Util
的用法示例。
在下文中一共展示了Util::get_css方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: load
/**
* Load css and yui file
* @return null
* @param $js Array[optional]
* @param $css Array[optional]
*/
public static function load($module_list = false, $noprint = false)
{
$module_list = 'base,autocomplete,charts,tabview,table,treeview,colorpicker';
if (strpos($module_list, 'base') !== false) {
$module_list = 'base,' . $module_list;
}
$list = explode(',', $module_list);
$js_load = array();
$css_load = array();
foreach ($list as $k => $module) {
if (isset(self::$_css_map[$module])) {
$css_load = array_unique(array_merge($css_load, self::$_css_map[$module]));
}
if (isset(self::$_js_map[$module])) {
$js_load = array_unique(array_merge($js_load, self::$_js_map[$module]));
}
}
// remove js alredy loaded
$css_load = array_diff($css_load, self::$_css_loaded);
$js_load = array_diff($js_load, self::$_js_loaded);
if (empty($css_load) && empty($js_load)) {
return '';
}
// load new css
$to_load = '';
if (!empty($css_load)) {
$to_load .= '<!-- yui css -->';
foreach ($css_load as $k => $filename) {
$to_load .= Util::get_css(Get::tmpl_path('base') . 'yui-skin/' . $filename, true);
}
}
// load new js
if (!empty($js_load)) {
$to_load .= '<!-- yui js -->';
foreach ($js_load as $k => $filename) {
$to_load .= Util::get_js('/addons/yui/' . $filename);
if ($filename == 'utilities/utilities.js') {
$to_load .= "\n" . '<script type="text/javascript"> YAHOO.util.Connect.initHeader(\'X-Signature\',\'' . Util::getSignature() . '\'); YAHOO.util.Connect.startEvent.subscribe(function() { YAHOO.util.Connect.initHeader(\'X-Signature\',\'' . Util::getSignature() . '\'); });</script>';
}
if ($filename == 'charts/charts-min.js') {
$to_load .= "\n" . '<script type="text/javascript"> YAHOO.widget.Chart.SWFURL = "' . Get::rel_path('base') . '/addons/yui/charts/assets/charts.swf"; </script>';
}
}
if (Lang::direction() == 'rtl') {
$to_load .= Util::get_js('/addons/yui/yui-rtl.js');
}
}
// add loaded file to the cache
if (!empty($css_load)) {
self::$_css_loaded = array_merge(self::$_css_loaded, $css_load);
}
if (!empty($js_load)) {
self::$_js_loaded = array_merge(self::$_js_loaded, $js_load);
}
if (function_exists('cout') && !$noprint) {
cout($to_load, 'page_head');
} else {
return $to_load;
}
}
示例2: init
function init()
{
YuiLib::load(array('json' => 'json-min.js', 'container' => 'container_core-min.js', 'menu' => 'menu-min.js', 'button' => 'button-min.js', 'treeview' => 'treeview-min.js'), array('assets/skins/sam' => 'skin.css'));
cout(Util::get_css('base-folder-tree.css'), 'page_head');
cout(Util::get_js('appLms/lib/category/lib.categorytree.js'), 'page_head');
Util::get_js(Get::rel_path('base') . '/lib/lib.elem_selector.js', true, true);
}
示例3: init
public function init()
{
YuiLib::load('base,tabview');
Lang::init('course');
$this->path_course = $GLOBALS['where_files_relative'] . '/appLms/' . Get::sett('pathcourse') . '/';
$this->model = new CartLms();
require_once _base_ . '/lib/lib.json.php';
$this->json = new Services_JSON();
$this->acl_man =& Docebo::user()->getAclManager();
Util::get_css(Get::rel_path(_base_) . '/appLms/views/cart/cart.css', true, true);
}
示例4: initLibraries
/**
* Include the required libraries in order to have all the things ready and working
*/
public function initLibraries()
{
// load yui
YuiLib::load(array('yahoo-dom-event' => 'yahoo-dom-event.js', 'connection' => 'connection-min.js', 'dragdrop' => 'dragdrop-min.js', 'element' => 'element-beta-min.js', 'animation' => 'animation-min.js', 'json' => 'json-min.js', 'container' => 'container_core-min.js', 'menu' => 'menu-min.js', 'button' => 'button-min.js', 'container' => 'container-min.js', 'button' => 'button-min.js', 'treeview' => 'treeview-min.js', 'resize' => 'resize-beta-min.js', 'selector' => 'selector-beta-min.js'), array('assets/skins/sam' => 'skin.css'));
// Selector class
Util::get_js(Get::rel_path('base') . '/lib/lib.elem_selector.js', true, true);
// Commodities functions
Util::get_js(Get::rel_path('base') . '/lib/js_utils.js', true, true);
// The tableview main file
Util::get_js(Get::rel_path('base') . '/lib/table_view/tableview.js', true, true);
// Datatable css
Util::get_css('../yui-skin/datatable.css', false, true);
}
示例5: showTask
public function showTask()
{
if (!$this->permissions['view']) {
echo 'You can\'t access.';
return;
}
//tabview widget, used in role and group editing
Yuilib::load('tabview');
Util::get_js(Get::rel_path('base') . '/lib/js_utils.js', true, true);
Util::get_js(Get::rel_path('adm') . '/views/functionalroles/functionalroles.js', true, true);
Util::get_css('base-folder-tree.css', false, true);
//render view
$this->render('show', array('permissions' => $this->permissions, 'selected_group' => 0, 'filter_text' => ""));
}
示例6: initLibraries
public function initLibraries()
{
YuiLib::load(array('yahoo-dom-event' => 'yahoo-dom-event.js', 'connection' => 'connection-min.js', 'dragdrop' => 'dragdrop-min.js', 'element' => 'element-beta-min.js', 'animation' => 'animation-min.js', 'json' => 'json-min.js', 'container' => 'container_core-min.js', 'menu' => 'menu-min.js', 'button' => 'button-min.js', 'container' => 'container-min.js', 'button' => 'button-min.js', 'treeview' => 'treeview-min.js', 'resize' => 'resize-beta-min.js', 'selector' => 'selector-beta-min.js'), array('assets/skins/sam' => 'skin.css'));
Util::get_js(Get::rel_path('base') . '/lib/lib.elem_selector.js', true, true);
Util::get_js(Get::rel_path('base') . '/lib/js_utils.js', true, true);
$js_path = Get::rel_path('base') . '/lib/folder_tree/';
Util::get_js($js_path . 'ddnode.js', true, true);
Util::get_js($js_path . 'foldernode.js', true, true);
Util::get_js($js_path . 'foldertree.js', true, true);
//addCss('folder_tree', 'framework');
cout(Util::get_css('base-folder-tree.css'), 'page_head');
foreach ($this->styleSheets as $sheet) {
cout(Util::get_css($sheet . '.css'), 'page_head');
}
}
示例7: init
/**
* Initialize required libraries
*/
public function init()
{
YuiLib::load('base,treeview,selector');
Util::get_js(Get::rel_path('base') . '/lib/lib.elem_selector.js', true, true);
Util::get_js(Get::rel_path('base') . '/lib/js_utils.js', true, true);
Util::get_css('base-folder-tree.css', false, true);
$js_path = Get::rel_path('base') . '/widget/tree/';
if ($this->dragDrop) {
Util::get_js($js_path . 'ddnode.js', true, true);
}
Util::get_js($js_path . 'foldernode.js', true, true);
Util::get_js($js_path . 'foldertree.js', true, true);
if ($this->treeClass != "FolderTree" && $this->treeFile) {
Util::get_js($this->treeFile, true, true);
}
}
示例8: init
/**
* Include the required libraries in order to have all the things ready and working
*/
public function init()
{
Util::get_js(Get::rel_path('base') . '/addons/yui/logger/logger-min.js', true, true);
Util::get_css(Get::rel_path('base') . '/templates/standard/yui-skin/logger.css', true, true);
}
示例9: __construct
/**
* Construct the table drawer class
* @param <type> $max_rows the maximum number of rows per page
* @param <type> $caption the table caption
* @param <type> $summary the tabel summary
*/
public function __construct($max_rows = 10, $caption = '', $summary = '')
{
if (!$max_rows) {
$max_rows = Get::sett('visuItem');
}
$this->table_style = 'table-view';
$this->cols = 0;
$this->max_rows = $max_rows;
$this->cols_class = array();
$this->table_caption = $caption;
$this->table_summary = $summary;
$this->table_head = array();
$this->table_body = array();
$this->table_foot = array();
$this->add_action = array();
$this->hide_over = false;
$this->nav_bar = NULL;
/*i need this for the transiction from old to new*/
$this->rows = 0;
$this->maxRowsAtTime = $max_rows;
Util::get_css(Get::tmpl_path('base') . 'yui-skin/datatable.css', true, true);
}
示例10: createModule
$module_cfg = false;
$GLOBALS['modname'] = Get::req('modname', DOTY_ALPHANUM, '');
$GLOBALS['op'] = Get::req('op', DOTY_ALPHANUM, '');
$r = Get::req('r', DOTY_MIXED, '');
$GLOBALS['mvc'] = $r;
if (!empty($GLOBALS['modname'])) {
require_once _lms_ . '/lib/lib.istance.php';
$module_cfg =& createModule($GLOBALS['modname']);
}
if ($r !== '') {
$GLOBALS['page']->add(Util::get_css(Layout::path() . 'style/base.css', true), 'page_head');
$GLOBALS['page']->add(Util::get_css(Layout::path() . 'style/base-old-treeview.css', true), 'page_head');
$GLOBALS['page']->add(Util::get_css(Layout::path() . 'style/lms.css', true), 'page_head');
$GLOBALS['page']->add(Util::get_css(Layout::path() . 'style/lms-to-review.css', true), 'page_head');
$GLOBALS['page']->add(Util::get_css(Layout::path() . 'style/lms-menu.css', true), 'page_head');
$GLOBALS['page']->add(Util::get_css(Layout::path() . 'style/print.css', true), 'page_head');
$r = preg_replace('/[^a-zA-Z0-9\\-\\_\\/]+/', '', $r);
$r = explode('/', $r);
if (count($r) == 3) {
// Position, class and method defined in the path requested
$mvc_class = ucfirst(strtolower($r[1])) . ucfirst(strtolower($r[0])) . 'Controller';
$mvc_name = $r[1];
$task = $r[2];
} else {
// Only class and method defined in the path requested
$mvc_class = '' . ucfirst(strtolower($r[0])) . 'LmsController';
$mvc_name = $r[0];
$task = $r[1];
}
ob_clean();
$controller = new $mvc_class($mvc_name);
示例11: init
public function init()
{
require_once _base_ . '/lib/lib.userselector.php';
$this->util = new UserSelectorUtil();
$this->json = new Services_JSON();
YuiLib::load('base,tabview,tree,datatable,selector');
Util::get_js(Get::rel_path('base') . '/lib/lib.elem_selector.js', true, true);
Util::get_js(Get::rel_path('base') . '/lib/js_utils.js', true, true);
Util::get_css('base-folder-tree.css', false, true);
$js_path = Get::rel_path('base') . '/widget/tree/';
Util::get_js($js_path . 'foldernode.js', true, true);
Util::get_js($js_path . 'foldertree.js', true, true);
Util::get_js($js_path . 'selectortree.js', true, true);
$js_path = Get::rel_path('base') . '/widget/userselector/';
Util::get_js($js_path . 'userselector.js', true, true);
}
示例12: dispatch
//.........这里部分代码省略.........
$nameGroup[] = new DataColumn('lastname', $lang->def('_LASTNAME'));
$nameGroup[] = new DataColumn('firstname', $lang->def('_FIRSTNAME'));
$columns = array();
$columns[] = new DataColumn('idst', $lang->def('_ID'));
$columns[] = new DataColumnGroup('name', $lang->def('_NAME'), $nameGroup);
$columns[] = new DataColumn('userid', $lang->def('_USERNAME'), 'formatter_userid');
$columns[] = new DataColumn('email', $lang->def('_EMAIL'));
//$columns[] = new DataColumn();
$export = new DataExport(DATATYPE_HTM, 'users', $columns, $source);
cout($export->render());
cout('<br /><br /><a href="index.php?modname=_test_module&op=dataexportcsv">SCARICA IN CSV</a>');
break;
case 'dataexportcsv':
require_once _base_ . '/lib/lib.download.php';
require_once _base_ . '/lib/dataexport/lib.dataexport.php';
$lang =& DoceboLanguage::CreateInstance('standard', 'framework');
$query = "SELECT * FROM core_user ORDER BY lastname LIMIT 0,20 ";
$source = new DataSource_Query($query);
$nameGroup = array();
$nameGroup[] = new DataColumn('lastname', $lang->def('_LASTNAME'));
$nameGroup[] = new DataColumn('firstname', $lang->def('_FIRSTNAME'));
$columns = array();
$columns[] = new DataColumn('idst', $lang->def('_ID'));
$columns[] = new DataColumnGroup('name', $lang->def('_NAME'), $nameGroup);
$columns[] = new DataColumn('userid', $lang->def('_USERNAME'), 'formatter_userid');
$columns[] = new DataColumn('email', $lang->def('_EMAIL'));
//$columns[] = new DataColumn();
$export = new DataExport(DATATYPE_XLS, 'users', $columns, $source);
sendStrAsFile($export->render(), "export_utenti.xls");
break;
case 'sample':
$libs = YuiLib::load(false, false, true);
$GLOBALS['page']->add($libs, 'page_head');
$GLOBALS['page']->add(Util::get_css('../yui-skin/datatable.css'), 'page_head');
Util::get_js(Get::rel_path('base') . '/docebocore/modules/_test_module/sample.js', true, true);
$script = 'YAHOO.util.Event.onDOMReady(function(e) {
initTable();
});';
//$GLOBALS['page']->add('<p>TITLE</p>');
$GLOBALS['page']->add('<div id="datatable"></div>');
$GLOBALS['page']->add('<script type="text/javascript">' . $script . '</script>');
break;
case 'datatable':
require_once _lms_ . '/lib/table_view/class.coursetableview.php';
$_temp_ = array(array("idCourse" => 0, "code" => "codice_001", "name" => "nome_001", "status" => "ok", "subscriptions" => 10), array("idCourse" => 1, "code" => "codice_002", "name" => "nome_002", "status" => "ok", "subscriptions" => 20), array("idCourse" => 2, "code" => "codice_003", "name" => "nome_003", "status" => "ok", "subscriptions" => 30), array("idCourse" => 3, "code" => "codice_004", "name" => "nome_004", "status" => "no", "subscriptions" => 40), array("idCourse" => 4, "code" => "codice_005", "name" => "nome_005", "status" => "ok", "subscriptions" => 50));
require_once _lms_ . '/lib/table_view/class.coursetableview.php';
$tableView = new CourseTableView("courses_table");
$tableView->useDOMReady = true;
//to change
$tableView->isGlobalVariable = true;
//just for debug purpose
$tableView->initLibraries();
$tableView->setInitialData($_temp_);
$temp = $tableView->get();
cout($temp['js'], 'page_head');
cout('<div style="border:solid 1px black; padding:8px;"><p>DATATABLE:</p>' . $temp['html'] . '</div>');
break;
case "catalogue":
YuiLib::load();
cout('<div class="area_block"><h1 class="main_title_dashboard" id="main_area_title">Catalogo corsi</h1></div>', 'content');
cout('<div class="std_block">', 'content');
cout('<div id="course_cat" class="">', 'content');
cout('<ul class="">
<li class="selected"><a href="#tab1"><em>Inviti</em></a></li>
<li><a href="#tab2"><em>Nuovi</em></a></li>
<li><a href="#tab3"><em>Consigliati</em></a></li>
示例13: Copyright
/* ======================================================================== \
| FORMA - The E-Learning Suite |
| |
| Copyright (c) 2013 (Forma) |
| http://www.formalms.org |
| License http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt |
| |
| from docebo 4.0.5 CE 2008-2012 (c) docebo |
| License http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt |
\ ======================================================================== */
if (!Docebo::user()->isLoggedIn() || !isset($_SESSION['idCourse'])) {
die("You can't access to oragnization");
}
require_once _lms_ . '/modules/organization/orglib.php';
require_once _lms_ . '/lib/lib.stats.php';
Util::get_css('lms-scormplayer.css', false, true);
class StatOrg_TreeDb extends OrgDirDb
{
var $stat_filter_on_items = FALSE;
var $filterGroup = FALSE;
function _getOtherTables($tname = FALSE)
{
$prefix = $GLOBALS['prefix_lms'];
if ($this->filterGroup !== FALSE) {
echo "\n\n<!-- filterGroup: " . $this->filterGroup . "-->";
if ($tname === FALSE) {
return ' LEFT JOIN ' . $prefix . '_organization_access' . ' ON ( ' . $prefix . '_organization.idOrg = ' . $prefix . '_organization_access.idOrgAccess ' . ' AND ' . $prefix . '_organization_access.kind = \'group\' )';
} else {
return ' LEFT JOIN ' . $prefix . '_organization_access' . ' ON ( ' . $tname . '.idOrg = ' . $prefix . '_organization_access.idOrgAccess ' . ' AND ' . $prefix . '_organization_access.kind = \'group\' )';
}
/*.' LEFT JOIN '.$prefix.'_coursegroupuser'
示例14: session_name
| |
| from docebo 4.0.5 CE 2008-2012 (c) docebo |
| License http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt |
\ ======================================================================== */
@error_reporting(E_COMPILE_ERROR | E_ERROR | E_CORE_ERROR);
session_name("docebo_session");
session_start();
define('IN_FORMA', true);
define('INSTALL_ENV', 'install');
define("_deeppath_", "../");
require dirname(__FILE__) . '/../base.php';
define('_installer_', _base_ . '/install');
include _lib_ . '/lib.docebo.php';
include _installer_ . '/lib/lib.php';
include _installer_ . '/lib/lib.lang.php';
include _installer_ . '/lib/lib.step.php';
include _installer_ . '/lib/lib.pagewriter.php';
include _installer_ . '/lib/lib.template.php';
PageWriter::init();
include _base_ . '/lib/lib.get.php';
include _base_ . '/lib/lib.utils.php';
include _base_ . '/lib/lib.yuilib.php';
include _base_ . '/lib/lib.form.php';
$GLOBALS['page']->setZone('page_head');
YuiLib::load();
$GLOBALS['page']->setZone('main');
//cout('ciao');
$GLOBALS['page']->add(Util::get_css(getTemplatePath() . 'style/base.css', true), 'page_head');
$GLOBALS['page']->add(Util::get_css(getTemplatePath() . 'style/form.css', true), 'page_head');
$GLOBALS['page']->add(Util::get_js('./lib/base.js', true), 'page_head');
$GLOBALS['page']->add(Util::get_js('../addons/yui/event-mouseenter/event-mouseenter-min.js', true), 'page_head');
示例15: coursecatalogue
function coursecatalogue($id_block, $title, $option = array())
{
YuiLib::load(array('animation' => 'my_animation', 'container' => 'container-min', 'container' => 'container_core-min'));
cout(Util::get_js(Get::rel_path('cms') . '/modules/catalog/catalog.js', true), 'page_head');
if (!isset($_SESSION['chart'])) {
$_SESSION['chart'] = array();
}
$id_course = Get::req('id_course', DOTY_INT, 0);
$action = Get::req('action', DOTY_STRING, '');
if ($id_course !== 0 && $action === '') {
$_SESSION['chart'][$id_course]['idCourse'] = $id_course;
} else {
require_once _lms_ . '/lib/lib.subscribe.php';
$man_subscribe = new CourseSubscribe_Management();
$man_subscribe->subscribeToCourse(getLogUserId(), $id_course);
}
require_once _cms_ . '/lib/lib.catalog.php';
require_once _base_ . '/lib/lib.navbar.php';
cout('<link href="./modules/catalog/catalog.css" type="text/css" rel="stylesheet"/>', 'page_head');
$css_path = Get::tmpl_path('base') . 'yui-skin';
cout(Util::get_css($css_path . '/tabview.css', true), 'page_head');
$lang =& DoceboLanguage::CreateInstance('catalogue', 'cms');
$man_cat = new Man_Catalog();
$array_id_block = explode('_', $id_block);
$page = Get::req('page', DOTY_INT, 0);
if ($page == 0) {
$page = $this->getBlockPage($array_id_block[0]);
}
cout(getTitleArea($title) . '<div class="std_block">');
$catalogue = $man_cat->getCatalogueForBlock($array_id_block[0]);
$all_course = false;
if (array_search(0, $catalogue) !== false) {
unset($catalogue[array_search(0, $catalogue)]);
$all_course = true;
}
$id_catalogue = Get::req('id_catalogue', DOTY_INT, -2);
if ($id_catalogue == -2) {
if (count($catalogue)) {
if (isset($catalogue[0])) {
$id_catalogue = $catalogue[0]['id_catalogue'];
} else {
$id_catalogue = $catalogue[1]['id_catalogue'];
}
} else {
$id_catalogue = 0;
}
}
$id_category = Get::req('id_cat', DOTY_INT, 0);
$number_courses = $man_cat->getCourseNumberForBlock($array_id_block[0], $id_catalogue, $id_category, $all_course);
$nav_bar = new NavBar('ini', Get::sett('visuItem'), $number_courses);
$nav_bar->setLink('index.php?pag=' . $page . '&id_catalogue=' . $id_catalogue . ($id_category != 0 ? '&id_cat=' . $id_category : ''));
$ini = $nav_bar->getSelectedPage();
$limit = ($ini - 1) * Get::sett('visuItem');
cout($nav_bar->getNavBar() . '<div id="demo" class="yui-navset">' . '<ul class="yui-nav">');
foreach ($catalogue as $catalogue_info) {
cout('<li ' . ($catalogue_info['id_catalogue'] == $id_catalogue ? ' class="selected"' : '') . '><a href="index.php?pag=' . $page . '&id_catalogue=' . $catalogue_info['id_catalogue'] . '"><em>' . $catalogue_info['name'] . '</em></a></li>');
}
cout('<li ' . ($id_catalogue == 0 ? ' class="selected"' : '') . '><a href="index.php?pag=' . $page . '&id_catalogue=0"><em>' . $lang->def('_ALL_COURSES') . '</em></a></li>' . '<li ' . ($id_catalogue == -1 ? ' class="selected"' : '') . '><a href="index.php?pag=' . $page . '&id_catalogue=-1"><em>' . $lang->def('_CATEGORY') . '</em></a></li>');
reset($catalogue);
cout('</ul>');
cout('<div class="yui-content">');
if ($number_courses == 0 && $id_catalogue != -1) {
cout('<p>' . $lang->def('_NO_COURSE_FOR_CATALOG') . '</p>');
} elseif ($id_catalogue == -1) {
//Category Visualization
if ($id_category == 0) {
$query = "SELECT ca.idCategory, ca.path, ca.lev, ca.iLeft, ca.iRight, COUNT(co.idCourse)" . " FROM " . $GLOBALS['prefix_lms'] . "_category AS ca" . " LEFT JOIN " . $GLOBALS['prefix_lms'] . "_course AS co ON co.idCategory = ca.idCategory" . " WHERE ca.lev = 1" . " GROUP BY ca.idCategory" . " ORDER BY ca.lev, ca.path";
} else {
$query = "SELECT iLeft, iRight" . " FROM " . $GLOBALS['prefix_lms'] . "_category" . " WHERE idCategory = " . $id_category;
list($ileft, $iright) = sql_fetch_row(sql_query($query));
$query = "SELECT ca.idCategory, ca.path, ca.lev, ca.iLeft, ca.iRight, COUNT(co.idCourse)" . " FROM " . $GLOBALS['prefix_lms'] . "_category AS ca" . " LEFT JOIN " . $GLOBALS['prefix_lms'] . "_course AS co ON co.idCategory = ca.idCategory" . " WHERE ca.iLeft >= " . $ileft . " AND ca.iRight <= " . $iright . " GROUP BY ca.idCategory" . " ORDER BY ca.lev, ca.path";
}
$result = sql_query($query);
$first = true;
$num_folder = sql_num_rows($result);
cout('<div class="cat_nav">');
while (list($id_cat, $path, $lev, $ileft, $iright, $courses) = sql_fetch_row($result)) {
$cat_name = end(explode('/', $path));
if ($id_category == $id_cat) {
cout('<div class="cat_position">' . '<a href="index.php?pag=' . $page . '&id_catalogue=-1">' . $lang->def('_CATEGORY') . '</a>');
if ($lev > 1) {
$query_parent = "SELECT idCategory, path" . " FROM " . $GLOBALS['prefix_lms'] . "_category" . " WHERE iLeft < " . $ileft . " AND iRight > " . $iright . " ORDER BY lev ASC";
$result_parent = sql_query($query_parent);
while (list($id_cat_pa, $path_pa) = sql_fetch_row($result_parent)) {
$pa_name = end(explode('/', $path_pa));
cout(' - <a href="index.php?pag=' . $page . '&id_catalogue=-1&id_cat=' . $id_cat_pa . '">' . $pa_name . '</a>');
}
}
cout(' - ' . $cat_name . '</div>');
}
if ($first && $num_folder > 0) {
$first = false;
cout('<ul class="cat_nav_list">');
}
if ($id_category != $id_cat) {
$sub_folder = ($iright - $ileft - 1) / 2;
cout('<li>' . '<a href="index.php?pag=' . $page . '&id_catalogue=-1&id_cat=' . $id_cat . '">' . $cat_name . '<br />' . ($sub_folder > 0 ? '<span class="cat_item_info">' . $lang->def("_CATEGORIES") . ' (' . $sub_folder . ')<br />' : '') . ($courses > 0 ? '<span class="cat_item_info">' . $lang->def("_COURSES") . ' (' . $courses . ')' : '') . '</a>' . '</li>');
}
}
if ($num_folder > 0) {
//.........这里部分代码省略.........