require_once LIB_DIR . '/menu.php'; $SMARTY->assign('newmenu', $menu); } header('X-Powered-By: LMS/' . $layout['lmsv']); // Check privileges and execute modules if ($AUTH->islogged) { // Load plugin files and register hook callbacks $plugins = preg_split('/[;,\\s\\t\\n]+/', ConfigHelper::getConfig('phpui.plugins'), -1, PREG_SPLIT_NO_EMPTY); if (!empty($plugins)) { foreach ($plugins as $plugin_name) { if (is_readable(LIB_DIR . '/plugins/' . $plugin_name . '.php')) { require LIB_DIR . '/plugins/' . $plugin_name . '.php'; } } } $res = $LMS->ExecHook('access_table_init', array('accesstable' => $access['table'])); if (isset($res['accesstable'])) { $access['table'] = $res['accesstable']; } LMSConfig::getConfig(array('force' => true, 'force_user_rights_only' => true, 'access_table' => $access['table'], 'user_id' => $AUTH->id)); $module = isset($_GET['m']) ? preg_replace('/[^a-zA-Z0-9_-]/', '', $_GET['m']) : ''; $deny = $allow = FALSE; $res = $LMS->ExecHook('module_load_before', array('module' => $module)); if ($res['abort']) { $SESSION->close(); $DB->Destroy(); die; } $module = $res['module']; if ($AUTH->passwdrequiredchange) { $module = 'chpasswd';