Ejemplo n.º 1
0
Archivo: index.php Proyecto: itav/lms
    $SMARTY->AddTemplateDir(SMARTY_TEMPLATES_DIR . DIRECTORY_SEPARATOR . $custom_templates_dir);
}
$SMARTY->AddTemplateDir(array(SMARTY_TEMPLATES_DIR . DIRECTORY_SEPARATOR . 'default', SMARTY_TEMPLATES_DIR));
$SMARTY->setCompileDir(SMARTY_COMPILE_DIR);
$SMARTY->debugging = ConfigHelper::checkConfig('phpui.smarty_debug');
$layout['logname'] = $AUTH->logname;
$layout['logid'] = $AUTH->id;
$layout['lmsdbv'] = $DB->GetVersion();
$layout['smarty_version'] = SMARTY_VERSION;
$layout['hostname'] = hostname();
$layout['lmsv'] = $LMS->_version;
$layout['lmsvr'] = $LMS->_revision;
$layout['dberrors'] = $DB->GetErrors();
$layout['dbdebug'] = isset($_DBDEBUG) ? $_DBDEBUG : false;
$layout['popup'] = isset($_GET['popup']) ? true : false;
$SMARTY->assignByRef('layout', $layout);
$SMARTY->assignByRef('LANGDEFS', $LANGDEFS);
$SMARTY->assignByRef('_ui_language', $LMS->ui_lang);
$SMARTY->assignByRef('_language', $LMS->lang);
$error = NULL;
// initialize error variable needed for (almost) all modules
// Load menu
if (!$layout['popup']) {
    require_once LIB_DIR . DIRECTORY_SEPARATOR . 'menu.php';
    $menu = $plugin_manager->executeHook('menu_initialized', $menu);
    $SMARTY->assign('newmenu', $menu);
}
header('X-Powered-By: LMS/' . $layout['lmsv']);
$modules_dirs = array(MODULES_DIR);
$modules_dirs = $plugin_manager->executeHook('modules_dir_initialized', $modules_dirs);
$plugin_manager->executeHook('lms_initialized', $LMS);
Ejemplo n.º 2
0
Archivo: index.php Proyecto: itav/lms
            @(include $suspected_module_dir . $filename . DIRECTORY_SEPARATOR . 'locale' . DIRECTORY_SEPARATOR . $_ui_language . DIRECTORY_SEPARATOR . 'strings.php');
            include $suspected_module_dir . $filename . DIRECTORY_SEPARATOR . 'configuration.php';
            if (is_dir($suspected_module_dir . $filename . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR)) {
                $plugins = glob($suspected_module_dir . $filename . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR . '*.php');
                if (!empty($plugins)) {
                    foreach ($plugins as $plugin_name) {
                        if (is_readable($plugin_name)) {
                            include $plugin_name;
                        }
                    }
                }
            }
        }
    }
}
$SMARTY->assignByRef('LANGDEFS', $LANGDEFS);
$SMARTY->assignByRef('_ui_language', $LMS->ui_lang);
$SMARTY->assignByRef('_language', $LMS->lang);
$SMARTY->setTemplateDir(null);
$style = ConfigHelper::getConfig('userpanel.style', 'default');
$SMARTY->addTemplateDir(array(USERPANEL_DIR . DIRECTORY_SEPARATOR . 'style' . DIRECTORY_SEPARATOR . $style . DIRECTORY_SEPARATOR . 'templates', USERPANEL_DIR . DIRECTORY_SEPARATOR . 'templates'));
$SMARTY->setCompileDir(SMARTY_COMPILE_DIR);
$SMARTY->debugging = ConfigHelper::checkConfig('phpui.smarty_debug');
require_once USERPANEL_LIB_DIR . DIRECTORY_SEPARATOR . 'smarty_addons.php';
$layout['lmsdbv'] = $DB->GetVersion();
$layout['lmsv'] = $LMS->_version;
$layout['lmsvr'] = $LMS->_revision;
$layout['smarty_version'] = SMARTY_VERSION;
$layout['hostname'] = hostname();
$layout['dberrors'] =& $DB->GetErrors();
$SMARTY->assignByRef('modules', $USERPANEL->MODULES);