17 if (!defined(
"XOOPS_MAINFILE_INCLUDED")) {
18 define(
"XOOPS_MAINFILE_INCLUDED", 1);
23 define(
"XOOPS_ROOT_PATH",
"");
27 define(
"XOOPS_PATH",
"");
29 define(
"XOOPS_VAR_PATH",
"");
31 define(
"XOOPS_TRUST_PATH", XOOPS_PATH);
36 $http = (
$_SERVER[
'HTTPS']==
'on') ?
'https://' :
'http://';
38 define(
'XOOPS_PROT', $http);
43 define(
"XOOPS_URL",
"http://");
46 define(
"XOOPS_CHECK_PATH", 0);
48 if (XOOPS_CHECK_PATH && !@ini_get(
"safe_mode")) {
49 if (function_exists(
"debug_backtrace")) {
50 $xoopsScriptPath = debug_backtrace();
51 if (!count($xoopsScriptPath)) {
52 die(
"XOOPS path check: this file cannot be requested directly");
54 $xoopsScriptPath = $xoopsScriptPath[0][
"file"];
60 $xoopsScriptPath = str_replace(strpos($xoopsScriptPath,
"\\\\", 2) ?
"\\\\" :
DIRECTORY_SEPARATOR,
"/", $xoopsScriptPath);
62 if (strcasecmp(substr($xoopsScriptPath, 0, strlen(XOOPS_ROOT_PATH)), str_replace(
DIRECTORY_SEPARATOR,
"/", XOOPS_ROOT_PATH))) {
63 exit(
"XOOPS path check: Script is not inside XOOPS_ROOT_PATH and cannot run.");
68 require XOOPS_VAR_PATH .
'/data/secure.php';
70 define(
"XOOPS_GROUP_ADMIN",
"1");
71 define(
"XOOPS_GROUP_USERS",
"2");
72 define(
"XOOPS_GROUP_ANONYMOUS",
"3");
74 if (!isset(
$xoopsOption[
"nocommon"]) && XOOPS_ROOT_PATH !=
"") {
75 include XOOPS_ROOT_PATH.
"/include/common.php";