// end of autologin hack GIJ if (!empty($_SESSION['xoopsUserId'])) { $xoopsUser =& $member_handler->getUser($_SESSION['xoopsUserId']); if (!is_object($xoopsUser)) { $xoopsUser = ''; $_SESSION = array(); } else { if ($xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '') { setcookie($xoopsConfig['session_name'], session_id(), time() + 60 * $xoopsConfig['session_expire'], '/', '', 0); } // $xoopsUser->setGroups($_SESSION['xoopsUserGroups']); $xoopsUserIsAdmin = $xoopsUser->isAdmin(); } } // #################### Error reporting settings ################## if (checkDebugGroup() && in_array(1, $xoopsConfig['debug_mode'])) { error_reporting(E_ALL); } else { error_reporting($old_error_reporting); $xoopsErrorHandler->activate(false); } if (!empty($_POST['xoops_theme_select']) && in_array($_POST['xoops_theme_select'], $xoopsConfig['theme_set_allowed'])) { $xoopsConfig['theme_set'] = $_POST['xoops_theme_select']; $_SESSION['xoopsUserTheme'] = $_POST['xoops_theme_select']; } elseif (!empty($_SESSION['xoopsUserTheme']) && in_array($_SESSION['xoopsUserTheme'], $xoopsConfig['theme_set_allowed'])) { $xoopsConfig['theme_set'] = $_SESSION['xoopsUserTheme']; } if ($xoopsConfig['closesite'] == 1) { $allowed = false; if (is_object($xoopsUser)) { foreach ($xoopsUser->getGroups() as $group) {
if (!isset($xoopsOption['template_main'])) { $xoopsCachedTemplate = 'db:system_dummy.html'; } else { $xoopsCachedTemplate = 'db:' . $xoopsOption['template_main']; } // generate safe cache Id $xoopsCachedTemplateId = 'mod_' . $xoopsModule->getVar('dirname') . '|' . md5(str_replace(XOOPS_URL, '', $GLOBALS['xoopsRequestUri'])); if ($xoopsTpl->is_cached($xoopsCachedTemplate, $xoopsCachedTemplateId)) { $xoopsLogger->addExtra($xoopsCachedTemplate, $xoopsConfig['module_cache'][$xoopsModule->getVar('mid')]); $xoopsTpl->assign('xoops_contents', $xoopsTpl->fetch($xoopsCachedTemplate, $xoopsCachedTemplateId)); $xoopsTpl->xoops_setCaching(0); if (!headers_sent()) { header('Content-Type:text/html; charset=' . _CHARSET); } $xoopsTpl->display($xoopsConfig['theme_set'] . '/theme.html'); if (checkDebugGroup()) { if (in_array(2, $xoopsConfig['debug_mode'])) { echo $xoopsLogger->dumpAll(); } if (in_array(4, $xoopsConfig['debug_mode'])) { echo dumpGPCFS(); } } exit; } } else { $xoopsTpl->xoops_setCaching(0); } if (!isset($xoopsOption['template_main'])) { // new themes using Smarty does not have old functions that are required in old modules, so include them now include XOOPS_ROOT_PATH . '/include/old_theme_functions.php';