define("ROOT", $_SERVER['DOCUMENT_ROOT']);
define("MODE", "LIVE"); // LIVE, TEST or MAINTENANCE
define("DEBUG", false); // true or false
const WHITELIST_IP = array("84.105.151.187", "84.83.158.19", "84.105.130.177", "77.245.85.229");
define("DB_HOST", "localhost");
define("DB_NAME", "sticht1_cms");
define("DB_USER", "sticht1_cms");
define("DB_PASS", "vv9XEGM1");
define("MAIL_NAME", "ArchiScienza");
define("MAIL_REPLY", "stichting@archiscienza.nl");
//Verzendinstellingen
define("MAIL_HOST", "gaia.hostingvisions.nl");
define("MAIL_USER", "no-reply@2ndchapter.nl");
define("MAIL_PASS", "sBwLA7cHQ");
define("MAIL_PORT", "587");
define("MAIL_SECU", "STARTTLS");
define("MYPARCEL_API", "");
define("MAILCHIMP_API", "");
define("MAILCHIMP_LISTID", "");
define("INTERNAL_KEY", "7894hrnejwHHU8ufjbdknsaopdur933bwdjsabG7yrgweufids");
define("MOLLIE_API", "");
define("MOLLIE_TEST_API", "");
define("URL", "https://www.archiscienza.nl/");
define("M_URL", "https://www.archiscienza.nl/");
define("DEFAULT_LANG", "nl");
const LANGS = array("nl");
define("UPLOAD_FILESIZE", 5242880);
define("UPLOAD_WHITELIST", ".jpg,.jpeg,.JPG,.png,.gif");
define("UPLOAD_JPG_QUALITY", 80);
/* INITIALIZE CLASSES, SETTINGS AND FUNCTIONS */
if(!session_id()){session_start();}
if (@empty($_SESSION['csrf_token'])) {
$_SESSION['csrf_token'] = bin2hex(openssl_random_pseudo_bytes(32));
}
// Mobile class:
require_once(ROOT."/system/mobile_detect.php");
$detect = new Mobile_Detect();
switch(MODE){
case "LIVE":
break;
case "TEST":
break;
case "MAINTENANCE":
if(!in_array($_SERVER['REMOTE_ADDR'],WHITELIST_IP)){
//exit("
Website is offline for planned maintenance. Please come back later.
");
}
break;
}
if(DEBUG === true){
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
}elseif(DEBUG === false){
ini_set("display_errors", 0);
}
/* REQUIRES 1 */
//Database
require_once(ROOT."/system/classes/database.php");
$_DB = new Database();
//Functions
require_once(ROOT."/system/functions.php");
/* LOAD CONFIG FROM DATABASE */
$_CONF = array();
$_DB->query("SELECT setting_cat, setting_name, setting_value FROM system_settings");
$results = $_DB->resultset();
foreach($results as $single_setting){
$_CONF[$single_setting['setting_cat']][$single_setting['setting_name']] = $single_setting['setting_value'];
}
/* LOAD LANGUAGES */
$_LANGUAGES = array();
// Translate class:
require_once(ROOT."/system/classes/translate.php");
$_TRANSLATE = new translate;
$_TRANSLATE->load();
/* LOAD MODULES */
$_MODULES = array();$_HEADER = array();
require_once(ROOT."/system/module_manager.php");
$_MOD_MANAGER = new module_manager;
$_MOD_MANAGER->load();
/* REQUIRES 2 */
// Secupload class
require_once(ROOT."/system/classes/secupload.php");
// Image class
require_once(ROOT."/system/classes/image.php");
// Mailer class:
require_once(ROOT."/system/classes/mailer.php");
// Menu class:
require_once(ROOT."/system/classes/menu.php");
/* LANGUAGE AND LOCALE */
if(@!$_GET['language']){
if(@$_SESSION['language_to_use']){
$language_to_use = strtolower($_SESSION['language_to_use']);
//$language_to_use = strtolower(DEFAULT_LANG);
}else{
$language_to_use = strtolower(DEFAULT_LANG);
}
}else{
$language_to_use = strtolower($_GET['language']);
}
if(!@$_GET['language'] && !in_array($language_to_use, LANGS)){
$language_to_use = strtolower(DEFAULT_LANG);
}
$_SESSION['language_to_use'] = strtolower($language_to_use);
// Country settings
$i = 0;
$_DB->query("SELECT country_id, country_2lt, country_cont, country_deliverycosts, country_deliveryfree, country_deliverytime FROM countries WHERE country_active = 1");
$results = $_DB->resultset();
foreach($results as $single_setting){
$_CONF['countries'][$single_setting['country_id']]['country_id'] = $single_setting['country_id'];
$_CONF['countries'][$single_setting['country_id']]['country_name'] = get_country_name($single_setting['country_id'], $_SESSION['language_to_use']);
$_CONF['countries'][$single_setting['country_id']]['country_2lt'] = $single_setting['country_2lt'];
$_CONF['countries'][$single_setting['country_id']]['country_cont'] = $single_setting['country_cont'];
$_CONF['countries'][$single_setting['country_id']]['country_deliverycosts'] = $single_setting['country_deliverycosts'];
$_CONF['countries'][$single_setting['country_id']]['country_deliveryfree'] = $single_setting['country_deliveryfree'];
$_CONF['countries'][$single_setting['country_id']]['country_deliverytime'] = $single_setting['country_deliverytime'];
$i++;
}
// Statistics class:
require_once(ROOT."/system/classes/statistics.php");
$_STATISTICS = new statistics;
if(!@$_LANGUAGES['translate'][$language_to_use] && @$_GET['language']){
$translation = $_LANGUAGES['translate'][strtolower(DEFAULT_LANG)];
header("Status: 404 Not Found");
header('HTTP/1.0 404 Not Found');
include("404.php");
$_SERVER['REDIRECT_STATUS'] = 404;
exit();
}
$translation = $_LANGUAGES['translate'][$language_to_use];
setlocale(LC_TIME, $_LANGUAGES['settings'][$language_to_use]['setlocale']);
date_default_timezone_set($_LANGUAGES['settings'][$language_to_use]['timezone']);
Fatal error: Uncaught Error: Undefined constant "LANGS" in /home/sticht1/domains/archiscienza.nl/public_html/index.php:12
Stack trace:
#0 {main}
thrown in /home/sticht1/domains/archiscienza.nl/public_html/index.php on line 12