35 lines
1.2 KiB
PHP
35 lines
1.2 KiB
PHP
<?php
|
|
|
|
/*** check dir function defined ***/
|
|
if (!defined('__DIR__')) define('__DIR__', false);
|
|
|
|
/*** define the site path constant ***/
|
|
define('__MDIR__', (__DIR__ ? __DIR__ : dirname(__FILE__)) . '/');
|
|
|
|
/*** Activate update page ***/
|
|
$excludeIP = array('127.0.0.1.1', '80.232.245.53');
|
|
|
|
// Update remote IP based on proxy pass through
|
|
if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR'] != $_SERVER['REMOTE_ADDR']) {
|
|
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
|
}
|
|
|
|
if (0 && !in_array($_SERVER['REMOTE_ADDR'], $excludeIP)) {
|
|
if ($_SERVER['REQUEST_URI'] != '/') die(header("Location: /"));
|
|
include_once 'system-brs-core/app/pubUpdate/pubUpdate.php';
|
|
die();
|
|
}
|
|
|
|
/*** Activate comming soon page ***/
|
|
if (0 && !in_array($_SERVER['REMOTE_ADDR'], $excludeIP)) {
|
|
if ($_SERVER['REQUEST_URI'] != '/') die(header("Location: /"));
|
|
include_once 'system-brs-core/app/pubComingSoon/pubComingSoon.php';
|
|
die();
|
|
}
|
|
|
|
/*** include auto-load & the init.php file ***/
|
|
include './../vendor/autoload.php';
|
|
|
|
/*** include the init.php file ***/
|
|
include __MDIR__ . 'system-brs-core/config/init.php';
|