isMobile() ? ($detect->isTablet() ? 'tablet' : 'phone') : 'computer'); /**** End device check ****/ /**** Start minifier ****/ require_once 'min/static/lib.php'; /**** End minifier ****/ $protocol = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') ? "https" : "http"; $server = isset($_SERVER['HTTP_HOST']) ? $protocol."://".$_SERVER["HTTP_HOST"] : $protocol."://".$_SERVER["SERVER_NAME"]; $url = isset($_SERVER['HTTP_HOST']) ? $_SERVER["HTTP_HOST"] : $_SERVER["SERVER_NAME"]; $fullUrl = $server.$_SERVER['REQUEST_URI']; if ( strpos($fullUrl, 'arrival=') !== false || strpos($fullUrl, 'departure=') !== false || strpos($fullUrl, 'ro=') !== false || strpos($fullUrl, 'arr=') !== false || strpos($fullUrl, 'typeid=') !== false || strpos($fullUrl, 'm=search') !== false ) { $fullUrl = explode("?", $fullUrl)[0]; } $loadingFolder = ''; if(isset($_COOKIE["loading_animation"])){ $loadingFolder = 'loading'; } $cookieFolder = 'noCookies'; if(isset($_COOKIE["vcc__cookies_enabledMandatory"])){ $cookieFolder = 'cookie'; $cookieFolder .= ($_COOKIE["vcc__cookies_enabledMandatory"] == "true") ? 'MandatoryTrue' : 'MandatoryFalse'; $cookieFolder .= ($_COOKIE["vcc__cookies_enabledMarketing"] == "true") ? 'MarketingTrue' : 'MarketingFalse'; $cookieFolder .= ($_COOKIE["vcc__cookies_enabledPreferences"] == "true") ? 'PreferencesTrue' : 'PreferencesFalse'; $cookieFolder .= ($_COOKIE["vcc__cookies_enabledStatistics"] == "true") ? 'StatisticsTrue' : 'StatisticsFalse'; } $cacheFile = $_SERVER["DOCUMENT_ROOT"].'/cache/'.$cookieFolder.'/'.$loadingFolder.'/'.$deviceType.'/'.urlencode($fullUrl); if( !isset($_GET["fetchCache"]) && !isset($_POST['send']) && !isset($_POST["execute"]) && file_exists($cacheFile) && ( !isset($_SESSION['loggedIn']) || $_SESSION['loggedIn'] != 1 ) ){ include($cacheFile); exit; } /**** Start PHPMailer ****/ use PHPMailer\PHPMailer\PHPMailer; require 'common/PHPMailer/src/Exception.php'; require 'common/PHPMailer/src/PHPMailer.php'; require 'common/PHPMailer/src/SMTP.php'; $mail = new PHPMailer(true); /**** End PHPMailer ****/ require_once 'cms/library/config.php'; //Database connection require_once 'common/functions/index.php'; //Functions, that are the same for every template $objFound = false; foreach($objJson["objects"] AS $object){ if($object["url"] == $_SERVER['SERVER_NAME']){ $objFound = true; $obj = $object["id"]; $objName = $object["name"]; $objTmp = $object["template"]; } } if(!$objFound){ exit("No object found for " . $_SERVER['SERVER_NAME']); } $tmpPath = 'templates/' . $objTmp; if (file_exists($tmpPath . '/functions/index.php') && file_exists($tmpPath . '/index.php')) { require_once $tmpPath . '/functions/index.php'; //Template functions if (isset($_POST["execute"]) && $_POST["execute"] == "ajaxCall") { require_once 'common/ajax.php'; } else { require_once $tmpPath . '/index.php'; //Template index if( !isset($_GET["fetchCache"]) && $section != "404" && ( !isset($_SESSION['loggedIn']) || $_SESSION['loggedIn'] != 1 ) ){ generateSiteCache($cacheFile, $fullUrl); } } } else { exit("No template found for " . $_SERVER['SERVER_NAME']); }