<?php
// Version
define('VERSION', '3.0.4.0');
define('WB_BASE_PATH',dirname(__FILE__).'/');
/*
	if($_SERVER['REMOTE_ADDR'] != '192.168.1.1'){
		echo '<h1 style="padding:40px;max-width:100%;font-size:70px;">Euroballoon.dk er under opdatering, prøv venligst igen senere...</h1>';
		exit();
	}
*/

// Configuration
if (is_file('config.php')) {
	require_once('config.php');
}

// Install
if (!defined('DIR_APPLICATION')) {
	header('Location: install/index.php');
	exit;
}
	
	$showShop = true;
	if(isset($_GET['consentbox'])){
		$showShop = false;
	}
	if(!isset($_COOKIE['consent'])){
		$showShop = false;
	}
	
	require_once(DIR_SYSTEM . 'startup.php');
		start('catalog');
		exit();
	
	if($showShop){
		// Startup
		require_once(DIR_SYSTEM . 'startup.php');
		start('catalog');
	}else{
		// Set path to our index folder
		define('BASE_PATH',dirname(__FILE__).'/');
		require_once(BASE_PATH.'consent_management/index.php');
	}
