Error 503

{$errorMessage}

"; exit(); } /* start output buffering */ ob_start(); /* Create an instance of the modX class */ $modx= new modX(); if (!is_object($modx) || !($modx instanceof modX)) { ob_get_level() && @ob_end_flush(); $errorMessage = 'MODX not installed. Install now?'; @include(MODX_CORE_PATH . 'error/unavailable.include.php'); header('HTTP/1.1 503 Service Unavailable'); echo "Error 503: Site temporarily unavailable

Error 503

{$errorMessage}

"; exit(); } /* Set the actual start time */ $modx->startTime= $tstart; /* Initialize the default 'web' context */ //$modx->initialize('web'); //ADDED BY Nico /* setup for multiple domains */ $siteName = strtolower(MODX_HTTP_HOST); if (strpos($siteName, 'dev.') === 0) { // error_log('-- in QA --'); define('QA_INSTANCE', true); $siteName = "__QA_SITE_NAME__"; } elseif (substr($siteName, -strlen(".com")) != ".com" && substr($siteName, -strlen(".co.za")) != ".co.za" && substr($siteName, -strlen(".net")) != ".net") { // error_log('-- in LOCAL --'); define('LOCAL_INSTANCE', true); $siteName = "__LOCAL_SITE_NAME__"; } $sites = ['ngwesi', 'haina', 'nthambo', 'umkumbe', 'aof', 'ndzuti', 'linyanti', 'savuti', 'nokana', 'mapula', 'sunsafaris', 'africaonfoot', 'afrika-ecco', 'delta-belle', 'sundestinations','ezulwini-river-lodge', 'ezulwini-billys-lodge', 'john-chase-safaris','tuskers','xobega', 'african-retreats', 'bundox', 'balulenisafarilodge', 'klaserieriversafarilodge']; if (strpos($siteName, 'expert-botswana') > -1) { define('SITE_NAME', 'expert-botswana'); $modx->initialize('web'); } elseif (strpos($siteName, 'afrikaeccosafaris') > -1) { define('SITE_NAME', 'afrika-ecco'); $modx->initialize('afrika-ecco'); } elseif (strpos($siteName, 'africaonfoot') > -1) { define('SITE_NAME', 'aof'); $modx->initialize('aof'); } elseif (strpos($siteName, 'johnchasesafaris') > -1) { define('SITE_NAME', 'john-chase-safaris'); $modx->initialize('john-chase-safaris'); } elseif (strpos($siteName, 'bundox') > -1) { define('SITE_NAME', 'bundoxsafarilodge'); $modx->initialize('bundoxsafarilodge'); } else { foreach ($sites as $s) { if (strpos($siteName, $s) > -1) { define('SITE_NAME', $s); $modx->initialize($s); break; } } } //END OF Nico's additions /* execute the request handler */ if (!MODX_API_MODE) { $modx->handleRequest(); }