17 defined(
'XOOPS_MAINFILE_INCLUDED') or die('Restricted access');
19 if (version_compare(PHP_VERSION, '5.3.0', '<')) {
20 set_magic_quotes_runtime(0);
29 defined('NWLINE')or define('NWLINE', "\
n");
34 include_once XOOPS_ROOT_PATH . DS . 'include' . DS . 'defines.php';
35 include_once XOOPS_ROOT_PATH . DS . 'include' . DS . 'version.php';
36 include_once XOOPS_ROOT_PATH . DS . 'include' . DS . 'license.php';
41 require_once XOOPS_ROOT_PATH . DS . 'class' . DS . 'xoopsload.php';
84 include_once
$xoops->path('kernel/
object.php');
85 include_once
$xoops->path('class/criteria.php');
86 include_once
$xoops->path('class/module.textsanitizer.php');
87 include_once
$xoops->path('include/functions.php');
105 define(
'XOOPS_DB_PROXY', 1);
112 include_once
$xoops->path(
'class/database/databasefactory.php');
125 if (file_exists(
$file =
$GLOBALS[
'xoops']->path(
'var/configs/xoopsconfig.php'))) {
126 $fileConfigs = include
$file;
128 unset($fileConfigs, $file);
130 trigger_error(
'File Path Error: ' .
'var/configs/xoopsconfig.php' .
' does not exist.');
144 $xoops->gzipCompression();
151 error_reporting(E_ALL);
181 &&
$_POST[$xoopsConfig[
'sslpost_name']] !=
''
183 session_id(
$_POST[$xoopsConfig[
'sslpost_name']]);
184 }
else if ($xoopsConfig[
'use_mysession'] && $xoopsConfig[
'session_name'] !=
'' && $xoopsConfig[
'session_expire'] > 0) {
185 if (isset($_COOKIE[$xoopsConfig[
'session_name']])) {
186 session_id($_COOKIE[$xoopsConfig[
'session_name']]);
188 if (function_exists(
'session_cache_expire')) {
189 session_cache_expire($xoopsConfig[
'session_expire']);
191 @ini_set(
'session.gc_maxlifetime', $xoopsConfig[
'session_expire'] * 60);
204 if ($xoopsConfig[
'use_mysession']
205 && $xoopsConfig[
'session_name'] !=
''
206 && !isset($_COOKIE[$xoopsConfig[
'session_name']])
216 && !empty($xoopsConfig[
'usercookie'])
217 && !empty($_COOKIE[$xoopsConfig[
'usercookie']])
219 $hash_data = @explode(
"{-}", $_COOKIE[$xoopsConfig[
'usercookie']], 2);
220 list(
$_SESSION[
'xoopsUserId'], $hash_login) = array($hash_data[0], strval(@$hash_data[1]));
233 setcookie($xoopsConfig[
'usercookie'], 0, - 1,
'/');
235 if ((intval(
$xoopsUser->getVar(
'last_login')) + 60 * 5) < time()) {
237 .
" SET last_login = '" . time()
238 .
"' WHERE uid = " .
$_SESSION[
'xoopsUserId'];
242 if (isset(
$_SESSION[
'xoopsUserGroups'])) {
259 $level = isset($xoopsConfig[
'debugLevel']) ? intval($xoopsConfig[
'debugLevel']) : 0;
278 if ($xoopsConfig[
'closesite'] == 1) {
279 include_once
$xoops->path(
'include/site-closed.php');
285 if (file_exists(
'./xoops_version.php')) {
286 $url_arr = explode(
'/', strstr(
$_SERVER[
'PHP_SELF'],
'/modules/'));
292 include_once
$xoops->path(
'header.php');
294 include_once
$xoops->path(
'footer.php');
313 if (file_exists(
$file =
$xoops->path(
'modules/' .
$xoopsModule->getVar(
'dirname',
'n') .
'/language/' . $xoopsConfig[
'language'] .
'/main.php'))) {
315 }
else if (file_exists(
$file =
$xoops->path(
'modules/' .
$xoopsModule->getVar(
'dirname',
'n') .
'/language/english/main.php'))) {