示例#1
0
$_TIMEOUT = $CONFIG['phpui']['timeout'];
// Include required files (including sequence is important)
require_once LIB_DIR . '/language.php';
include_once LIB_DIR . '/definitions.php';
require_once LIB_DIR . '/unstrip.php';
require_once LIB_DIR . '/common.php';
require_once LIB_DIR . '/LMS.class.php';
$AUTH = NULL;
$LMS = new LMS($DB, $AUTH, $CONFIG);
require_once USERPANEL_LIB_DIR . '/Session.class.php';
require_once USERPANEL_LIB_DIR . '/Userpanel.class.php';
require_once USERPANEL_LIB_DIR . '/ULMS.class.php';
@(include USERPANEL_DIR . '/lib/locale/' . $_ui_language . '/strings.php');
unset($LMS);
// reset LMS class to enable wrappers for LMS older versions
$LMS = new ULMS($DB, $AUTH, $CONFIG);
$SESSION = new Session($DB, $_TIMEOUT);
$USERPANEL = new USERPANEL($DB, $SESSION, $CONFIG);
$LMS->ui_lang = $_ui_language;
$LMS->lang = $_language;
// Initialize modules
$dh = opendir(USERPANEL_MODULES_DIR);
$nomod = unserialize(get_conf('userpanel.disable_modules', 'a:0:{}'));
if ($SESSION->islogged) {
    $noloadmodule = array();
    if ($CONFIG['voip']['enabled'] == 1) {
        require_once LIB_DIR . '/LMSVOIP.class.php';
        $voip = new LMSVOIP($DB, $CONFIG['voip']);
        if (!$DB->GetOne('SELECT 1 FROM v_exportedusers WHERE lmsid = ?', array($SESSION->id))) {
            $noloadmodule[] = 'voip';
        }
示例#2
0
文件: index.php 项目: askipl/lms
include_once(LIB_DIR . DIRECTORY_SEPARATOR . 'definitions.php');
require_once(LIB_DIR . DIRECTORY_SEPARATOR . 'unstrip.php');
require_once(LIB_DIR . DIRECTORY_SEPARATOR . 'common.php');

$AUTH = NULL;
$SYSLOG = null;
$LMS = new LMS($DB, $AUTH, $SYSLOG);

require_once(USERPANEL_LIB_DIR . DIRECTORY_SEPARATOR . 'Session.class.php');
require_once(USERPANEL_LIB_DIR . DIRECTORY_SEPARATOR . 'Userpanel.class.php');
require_once(USERPANEL_LIB_DIR . DIRECTORY_SEPARATOR . 'ULMS.class.php');
@include(USERPANEL_DIR . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'locale' . DIRECTORY_SEPARATOR . $_ui_language . DIRECTORY_SEPARATOR . 'strings.php');

unset($LMS); // reset LMS class to enable wrappers for LMS older versions

$LMS = new ULMS($DB, $AUTH, $SYSLOG);

$plugin_manager = new LMSPluginManager();
$LMS->setPluginManager($plugin_manager);

// Load plugin files and register hook callbacks
$plugins = $plugin_manager->getAllPluginInfo(LMSPluginManager::OLD_STYLE);
if (!empty($plugins))
	foreach ($plugins as $plugin_name => $plugin)
		if ($plugin['enabled'])
			require(LIB_DIR . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR . $plugin_name . '.php');

$SESSION = new Session($DB, $_TIMEOUT);
$USERPANEL = new USERPANEL($DB, $SESSION);
$LMS->ui_lang = $_ui_language;
$LMS->lang = $_language;
示例#3
0
文件: index.php 项目: oswida/lms
$_TIMEOUT = ConfigHelper::getConfig('phpui.timeout');
// Include required files (including sequence is important)
require_once LIB_DIR . '/language.php';
include_once LIB_DIR . '/definitions.php';
require_once LIB_DIR . '/unstrip.php';
require_once LIB_DIR . '/common.php';
$AUTH = NULL;
$SYSLOG = null;
$LMS = new LMS($DB, $AUTH, $SYSLOG);
require_once USERPANEL_LIB_DIR . '/Session.class.php';
require_once USERPANEL_LIB_DIR . '/Userpanel.class.php';
require_once USERPANEL_LIB_DIR . '/ULMS.class.php';
@(include USERPANEL_DIR . '/lib/locale/' . $_ui_language . '/strings.php');
unset($LMS);
// reset LMS class to enable wrappers for LMS older versions
$LMS = new ULMS($DB, $AUTH, $SYSLOG);
$SESSION = new Session($DB, $_TIMEOUT);
$USERPANEL = new USERPANEL($DB, $SESSION);
$LMS->ui_lang = $_ui_language;
$LMS->lang = $_language;
// Initialize modules
$dh = opendir(USERPANEL_MODULES_DIR);
while (false !== ($filename = readdir($dh))) {
    if (preg_match('/^[a-zA-Z0-9]/', $filename) && is_dir(USERPANEL_MODULES_DIR . $filename) && file_exists(USERPANEL_MODULES_DIR . $filename . '/configuration.php')) {
        @(include USERPANEL_MODULES_DIR . $filename . '/locale/' . $_ui_language . '/strings.php');
        include USERPANEL_MODULES_DIR . $filename . '/configuration.php';
        if (is_dir(USERPANEL_MODULES_DIR . $filename . '/plugins/')) {
            $plugins = glob(USERPANEL_MODULES_DIR . $filename . '/plugins/*.php');
            if (!empty($plugins)) {
                foreach ($plugins as $plugin_name) {
                    if (is_readable($plugin_name)) {