26 if (!class_exists(
'XoopsLoad',
false)) {
27 require_once dirname(__DIR__).
'/class/XoopsBaseConfig.php';
29 $delayedWarning =
'Patch mainfile.php for XoopsBaseConfig';
42 defined('NWLINE')or define('NWLINE', "\
n");
47 include_once __DIR__ . '/defines.php';
53 \Patchwork\Utf8\Bootup::initAll();
54 \Patchwork\Utf8\Bootup::filterRequestUri();
55 \Patchwork\Utf8\Bootup::filterRequestInputs();
61 $xoops =
Xoops::getInstance();
73 $xoops->events()->initializeListeners();
79 $xoops->events()->triggerEvent('
core.
include.common.classmaps');
84 $xoops->events()->triggerEvent('
core.
include.common.security');
92 if (!defined('XOOPS_XMLRPC')) {
93 define(
'XOOPS_DB_CHKREF', 1);
95 define(
'XOOPS_DB_CHKREF', 0);
99 define (
'XOOPS_DB_PROXY', 1);
111 $xoops->events()->triggerEvent(
'core.include.common.start');
116 if (isset($delayedWarning)) {
117 trigger_error($delayedWarning);
123 include_once $xoops->path(
'include/functions.php');
129 $xoops->getConfigs();
139 trigger_error(
'File Path Error: ' .
'var/configs/system_configs.php' .
' does not exist.');
142 $xoops->events()->triggerEvent(
'core.include.common.configs.success');
148 $xoops->gzipCompression();
154 $xoops->events()->triggerEvent(
'core.include.common.xframeoption');
162 $xoops->security()->checkBadips();
167 $xoops->loadLocale();
179 $xoops->session()->sessionStart();
184 if ($xoops->session()->has(
'xoopsUserId')) {
185 $uid = $xoops->session()->get(
'xoopsUserId');
187 if ($xoops->user instanceof \
XoopsUser) {
188 if ((intval($xoops->user->getVar(
'last_login')) + 60 * 5) < time()) {
194 $xoops->userIsAdmin = $xoops->user->isAdmin();
198 $xoops->events()->triggerEvent(
'core.include.common.auth.success');
203 $xoops->themeSelect();
208 if ($xoops->getConfig(
'closesite') == 1) {
209 include_once $xoops->path(
'include/site-closed.php');
216 $xoops->moduleDirname =
'system';
218 $url_arr = explode(
'/', strstr(
$_SERVER[
'PHP_SELF'],
'/modules/'));
220 $xoops->module = $xoops->getModuleByDirname($url_arr[2]);
221 $xoops->moduleDirname = $url_arr[2];
224 if (!$xoops->module || !$xoops->module->getVar(
'isactive')) {
229 if ($xoops->isUser()) {
230 if (!
$moduleperm_handler->checkRight(
'module_read', $xoops->module->getVar(
'mid'), $xoops->user->getGroups())) {
233 $xoops->userIsAdmin = $xoops->user->isAdmin($xoops->module->getVar(
'mid'));
235 if (!
$moduleperm_handler->checkRight(
'module_read', $xoops->module->getVar(
'mid'), FixedGroups::ANONYMOUS)) {
237 $xoops_url .
'/user.php?from=' . $xoops->module->getVar(
'dirname',
'n'),
244 if ($xoops->module->getVar(
'dirname',
'n') !=
'system') {
245 $xoops->loadLanguage(
'main', $xoops->module->getVar(
'dirname',
'n'));
246 $xoops->loadLocale($xoops->module->getVar(
'dirname',
'n'));
249 if ($xoops->module->getVar(
'hasconfig') == 1
250 || $xoops->module->getVar(
'hascomments') == 1
251 || $xoops->module->getVar(
'hasnotification') == 1
253 $xoops->getModuleConfigs();
256 if ($xoops->isUser()) {
257 $xoops->userIsAdmin = $xoops->user->isAdmin(1);
269 $xoops->getActiveModules();
271 $xoops->events()->triggerEvent(
'core.include.common.end');
static getLegacyLanguage()
if(!isset($xoops->paths[$path_type])) if($path_type== 'var') $file
if(!class_exists('XoopsLoad', false)) global $xoops
static bootstrapTransition()
defined('DS') or define('DS' DIRECTORY_SEPARATOR
if($xoops->getConfig('closesite')==1) $xoops_url
defined('NWLINE') or define('NWLINE' n
if(!$xoops->isUser()) $uid
const E_NO_ACCESS_PERMISSION
static getDatabaseConnection()
if(isset($delayedWarning))