// Initialize Session, Auth and LMS classes $SESSION = new Session($DB, ConfigHelper::getConfig('phpui.timeout')); $AUTH = new Auth($DB, $SESSION, $SYSLOG); if ($SYSLOG) { $SYSLOG->SetAuth($AUTH); } $LMS = new LMS($DB, $AUTH, $SYSLOG); $LMS->ui_lang = $_ui_language; $LMS->lang = $_language; $plugin_manager = new LMSPluginManager(); $LMS->setPluginManager($plugin_manager); // Initialize Swekey class if (ConfigHelper::checkConfig('phpui.use_swekey')) { require_once LIB_DIR . '/swekey/lms_integration.php'; $LMS_SWEKEY = new LmsSwekeyIntegration($DB, $AUTH, $LMS); $SMARTY->assign('lms_swekey', $LMS_SWEKEY->GetIntegrationScript($AUTH->id)); } // Set some template and layout variables $SMARTY->setTemplateDir(null); $custom_templates_dir = ConfigHelper::getConfig('phpui.custom_templates_dir'); if (!empty($custom_templates_dir) && file_exists(SMARTY_TEMPLATES_DIR . '/' . $custom_templates_dir) && !is_file(SMARTY_TEMPLATES_DIR . '/' . $custom_templates_dir)) { $SMARTY->AddTemplateDir(SMARTY_TEMPLATES_DIR . '/' . $custom_templates_dir); } $SMARTY->AddTemplateDir(array(SMARTY_TEMPLATES_DIR . '/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();