20 if (!defined(
"XOOPS_MAINFILE_INCLUDED")) {
 
   21     define(
"XOOPS_MAINFILE_INCLUDED", 1);
 
   26     define(
"XOOPS_ROOT_PATH", 
"");
 
   30     define(
"XOOPS_PATH", 
"");
 
   32     define(
"XOOPS_VAR_PATH", 
"");
 
   34     define(
"XOOPS_TRUST_PATH", XOOPS_PATH);
 
   39         $http = (
$_SERVER[
'HTTPS']==
'on') ? 
'https://' : 
'http://';
 
   41     define(
'XOOPS_PROT', $http);
 
   46     define(
"XOOPS_URL", 
"http://");
 
   49     define(
"XOOPS_CHECK_PATH", 0);
 
   51     if (XOOPS_CHECK_PATH && !@ini_get(
"safe_mode")) {
 
   52         if (function_exists(
"debug_backtrace")) {
 
   53             $xoopsScriptPath = debug_backtrace();
 
   54             if (!count($xoopsScriptPath)) {
 
   55                  die(
"XOOPS path check: this file cannot be requested directly");
 
   57             $xoopsScriptPath = $xoopsScriptPath[0][
"file"];
 
   63             $xoopsScriptPath = str_replace(strpos($xoopsScriptPath, 
"\\\\", 2) ? 
"\\\\" : 
DIRECTORY_SEPARATOR, 
"/", $xoopsScriptPath);
 
   65         if (strcasecmp(substr($xoopsScriptPath, 0, strlen(XOOPS_ROOT_PATH)), str_replace(
DIRECTORY_SEPARATOR, 
"/", XOOPS_ROOT_PATH))) {
 
   66              exit(
"XOOPS path check: Script is not inside XOOPS_ROOT_PATH and cannot run.");
 
   71     require XOOPS_VAR_PATH . 
'/data/secure.php';
 
   73     if (!class_exists(
'XoopsBaseConfig', 
false)) {
 
   74         include __DIR__ . 
'/class/XoopsBaseConfig.php';
 
   78     if (!isset(
$xoopsOption[
"nocommon"]) && XOOPS_ROOT_PATH != 
"") {
 
   79         include XOOPS_ROOT_PATH.
"/include/common.php";
 
static bootstrapTransition()
 
defined('DS') or define('DS' DIRECTORY_SEPARATOR