<?php
/*
|--------------------------------------------------------------------------
| Web Engine Template System (osConcert)
|--------------------------------------------------------------------------
|
| Copyright (c) 2007–2026 osConcert
| https://www.osconcert.com
|
| This file is part of the Web Engine template system.
|
| The Web Engine is licensed per installation and may not be copied,
| redistributed, or reused across multiple domains without permission.
|
| osConcert core remains open source under GPL.
|
|  Bootstrap v5.3 2026
|  Template: CyberGord Web Engine https://www.cybergord.com
*/
defined('_FEXEC') or die();
define('DIR_WS_TEMPLATE_IMAGES', 'templates/webengine/images/');
$template_file_name=$content;$con_page = $content;
require(DIR_WS_INCLUDES.'meta_tags.php');
require(DIR_WS_CLASSES.'seatplan.php');
$sp = new seatplan; 
require_once(DIR_WS_CLASSES.'ajax_cart.php');
$theme_css = (SHOW_THEME_MODE === 'dark') ? 'dark' : 'light';
$font_css = (TEMPLATE_FONT === 'font1')  ? 'font1' : 'font2';
//$ajaxCart = new ajaxCart;
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?>>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET;?>">
	<meta name="robots" content="nofollow">
	<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER).DIR_WS_CATALOG;?>">
	<title><?php echo STORE_NAME; ?> | <?php echo META_TAG_TITLE; ?></title>
	<meta name="description" content="<?php echo META_TAG_DESCRIPTION;?>">
	<meta name="keywords" content="<?php echo META_TAG_KEYWORDS;?>">

	<meta property="fb:app_id" content="<?php echo FB_APP_ID; ?>">
	<meta property="og:site_name" content="<?php echo FB_SITE_NAME; ?>">
	<meta property="og:url" content="<?php echo FB_URL; ?>">
	<meta property="og:type" content="<?php echo FB_TYPE; ?>">
	<meta property="og:locale" content="<?php echo FB_LOCALE; ?>">

	<meta property="og:title" content="<?php echo FB_TITLE; ?>">
	<meta property="og:description" content="<?php echo FB_DESCRIPTION; ?>">
	<meta property="og:image" content="<?php echo FB_IMAGE; ?>">
	<meta property="og:image:width" content="1200">
	<meta property="og:image:height" content="630">
	<meta property="og:image:type" content="image/jpeg">

	<meta name="twitter:card" content="summary_large_image">
	<meta name="twitter:title" content="<?php echo FB_TITLE; ?>">
	<meta name="twitter:description" content="<?php echo FB_DESCRIPTION; ?>">
	<meta name="twitter:image" content="<?php echo FB_IMAGE; ?>">

	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<?php if(file_exists(DIR_WS_INCLUDES. 'header_tags.php')) require(DIR_WS_INCLUDES. 'header_tags.php');?>
	<!-- Favicons -->
	<link rel="icon" type="image/ico" href="favicon.ico">
	<!-- Libraries CSS Files -->
	
	  <!-- Vendor CSS Files -->
  <link href="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
  <link href="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/assets/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet">
  <link href="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/assets/vendor/aos/aos.css" rel="stylesheet">
  <link href="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/assets/vendor/glightbox/css/glightbox.min.css" rel="stylesheet">
  <link href="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/assets/vendor/swiper/swiper-bundle.min.css" rel="stylesheet">

	<link href="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/assets/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">

	<?php
	if (SHOW_LANGUAGES_IN_HEADER == 'yes') 
		{
	echo '<link href="templates/webengine/flag-icon.css" rel="stylesheet">';
		}
		?>
	<!-- osConcert CSS Files -->
	<link href="<?php	
	$css='seatplan'.$manufacturers_id; //manufacturers_id is Design ID
	echo DIR_WS_TEMPLATES . TEMPLATE_NAME.'/assets/css/'.$css.'.css?123'; ?>" rel="stylesheet">
	
	<link href="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/assets/css/jquery-ui.css" rel="stylesheet">
	<!-- Template Stylesheet Files -->
	<link href="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/assets/css/fonts.css?v=<?php echo time(); ?>" rel="stylesheet">
	<link href="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/assets/css/engine.css?v=<?php echo time(); ?>" rel="stylesheet">
	<link href="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME . '/assets/css/'.TEMPLATE_FONT.'.css'; ?>" rel="stylesheet">
	<link href="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME . '/assets/css/' . $theme_css . '.css'; ?>" rel="stylesheet">
	<link href="<?php echo DIR_WS_TEMPLATES.TEMPLATE_NAME.'/assets/css/themes/theme-'.TEMPLATE_COLOR.'.css';?>" rel="stylesheet">
	<link href="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/assets/css/marketing-modal.css" rel="stylesheet">
	<link href="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/assets/css/custom.css" rel="stylesheet"> 
	<?php 
	define('LOG_PAGE','<a href="%s"><span>%s</span></a>');
	if($javascript) require(DIR_WS_JAVASCRIPT.$javascript); if(($FSESSION->is_registered('customer_first_name') && $FSESSION->is_registered('customer_id'))){ $user = tep_output_string_protected($FSESSION->customer_first_name); $url = tep_href_link(FILENAME_ACCOUNT,'','SSL'); define('USER', '<a href="%1$s">%2$s</a>'); $clink = sprintf(USER,$url,$user);define('USERLINK',$clink); $account = sprintf(WELCOME_CUSTOMER,tep_href_link(FILENAME_ACCOUNT, '', 'SSL')); $greet = sprintf(TEXT_GREETING_PERSONAL,USERLINK,'',''); $log_page = sprintf(LOG_PAGE,tep_href_link(FILENAME_LOGOFF),TEXT_LOGOFF);}else{ $greet = sprintf(WELCOME_GUEST, tep_href_link(FILENAME_LOGIN, '', 'SSL')); $log_page = sprintf(LOG_PAGE,tep_href_link(FILENAME_LOGIN.'','','SSL'),TEXT_LOGIN);} ?>
	
	<?php
	$gtm_id = defined('OSC_GTM_ID') ? trim(OSC_GTM_ID) : '';
	if ($gtm_id !== '' && $gtm_id !== 'GTM-XXXXXXX'):
	?>
	<!-- Google Tag Manager -->
	<script>
	(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
	new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
	j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
	'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
	})(window,document,'script','dataLayer',<?php echo json_encode($gtm_id); ?>);
	</script>
	<!-- End Google Tag Manager -->
	<?php endif; ?>
	<?php $headerHeight = (int)HEADER_HEIGHT;if ($headerHeight < 60) {$headerHeight = 80;}?>
	<style>:root {--header-height: <?php echo $headerHeight; ?>px;}</style>

</head>
<body id="body" class="d-flex flex-column min-vh-100" data-bs-theme="<?=$theme_css?>">

<?php
$gtm_id = defined('OSC_GTM_ID') ? trim(OSC_GTM_ID) : '';
if ($gtm_id !== '' && $gtm_id !== 'GTM-XXXXXXX'):
?>
<!-- Google Tag Manager (noscript) -->
<noscript>
<iframe src="https://www.googletagmanager.com/ns.html?id=<?php echo htmlspecialchars($gtm_id, ENT_QUOTES); ?>"
height="0" width="0" style="display:none;visibility:hidden"></iframe>
</noscript>
<!-- End Google Tag Manager (noscript) -->
<?php endif; ?>

<?php 
echo '<div id="warning-container">';
require(DIR_WS_INCLUDES . 'warnings.php');
echo '</div>';
 ?>	
 
<?php require(DIR_FS_CATALOG.DIR_WS_TEMPLATES.TEMPLATE_NAME. '/header.php'); ?>
<?php 
	//<!-- errors -->
	if ($FREQUEST->getvalue('error_message')) 
	{ 
	?>
	<div class="alert-warning" style="text-align:center"></div>
	<?php 
	} 
	//<!-- end errors -->
	?>
	
<main id="main" class="flex-grow-1">

<?php
$hero = defined('TEMPLATE_HERO') ? trim(TEMPLATE_HERO) : '';
// Allowed heroes
$allowed_heroes = array('hero1','hero2','hero3','hero4','hero5','hero7','none');
// Determine final hero
if ($hero === '' || !in_array($hero, $allowed_heroes, true)) {
    $hero = 'hero3'; // fallback default
}
// Home check
$is_home =
    basename($_SERVER['PHP_SELF']) === 'index.php' &&
    empty($cPath) &&
    empty($stcPath);
// Load hero
if ($is_home && $hero !== 'none') {
    require DIR_FS_CATALOG . DIR_WS_TEMPLATES . TEMPLATE_NAME . '/hero/' . $hero . '.php';
}
?>
<?php require(DIR_FS_CATALOG.DIR_WS_TEMPLATES.TEMPLATE_NAME. '/main.php'); ?>

</main>

<?php
if(SHOW_FOOTER=='yes'){ 
require(DIR_FS_CATALOG.DIR_WS_TEMPLATES.TEMPLATE_NAME. '/footer.php'); 
}else{
require(DIR_FS_CATALOG.DIR_WS_TEMPLATES.TEMPLATE_NAME. '/def-footer.php'); 
}
?>  

<div id="cookieAlert" class="cookie-alert" role="dialog" aria-live="polite" aria-label="Cookie notice">
  <div class="cookie-alert__inner">
    <div class="cookie-alert__text">
      <?php echo TEXT_COOKIES; ?>
    </div>
    <div class="cookie-alert__actions">
      <button type="button" id="cookieAcceptBtn" class="btn btn-primary btn-sm"><?php echo TEXT_UNDERSTAND; ?></button>
    </div>
  </div>
</div>

	<a href="<?php echo $_SERVER['REQUEST_URI'];?>#body" class="scroll-top d-flex align-items-center justify-content-center"><i class="bi bi-arrow-up-short"></i></a>
	 
	<!-- Vendor JS Files -->
	<script src="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/assets/vendor/jquery/jquery.min.js"></script>
	<script src="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/assets/vendor/aos/aos.js"></script>
	<script src="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
	<script>
	var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
	var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
	  return new bootstrap.Tooltip(tooltipTriggerEl)
	})
	</script>
	<script src="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/assets/vendor/jquery_ui/jquery-ui.min.js"></script>
	<script src="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/assets/vendor/glightbox/js/glightbox.min.js"></script>
	<script src="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/assets/vendor/swiper/swiper-bundle.min.js"></script>
	<script defer src="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/assets/js/easytooltip.min.js"></script>
	<script src="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/assets/js/main.js"></script>
	<?php
	if (!empty(CLICKY_KEY)) {
		echo '<script async data-id="' . CLICKY_KEY . '" src="//static.getclicky.com/js"></script>';
	}
	?>		
	<?php ################# server load
	if(SEATPLAN_LOGIN_ENFORCED=='true' && !$FSESSION->is_registered('customer_id'))
	{
	?>
	<?php if(file_exists(DIR_WS_TEMPLATES.'login-modal.php')) require(DIR_WS_TEMPLATES.'login-modal.php');?>
	<script>
	$(document).ready(function(){
		$(".seatplan").click(function(){
			$("html, body").animate({ scrollTop: 0 }, "slow");
			$("#LoginModal").modal("show");
		});
	});
	</script>
	<?php 
	}
	{
	$js='';/* checking for the age of the cart in order to initialize the timeout */ if($_SESSION['customer_id']) { $cart_age = $sp->tep_getCartAge($_SESSION['customer_id']); }else { $cart_age = $sp->tep_getTempCartAge(); }/* check if the cart isn't already expired yet */ if($cart_age > (int)SEATPLAN_TIMEOUT) { if($_SESSION['customer_id']){ $sp->tep_clearCart($_SESSION['customer_id'],$cPath); }else{/* if not logged in */ $sp->tep_clearTempCart($cPath); } }else {/* pass the remaining seconds as a jQuery variable */ if($cart_age != -1){ $remaining = ((int)SEATPLAN_TIMEOUT)-$cart_age; $timeout = 'true';}else{ $remaining=(int)SEATPLAN_TIMEOUT; $timeout = 'false';} if(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) { $baseurl = HTTPS_SERVER.DIR_WS_HTTPS_CATALOG; }else{$baseurl = HTTP_SERVER.DIR_WS_HTTP_CATALOG;} $js.='<script>$.cPath='.(($cPath)? $cPath:0).';$.cht="'.$sp->cat_name($cPath).'";$.refresh='.SEATPLAN_REFRESH.';$.lifetime='.SEATPLAN_TIMEOUT.';$.remaining='.$remaining.';$.timeout='.$timeout.';$.baseurl="'.$baseurl.'";$.thank="'.SP_NOTHANKYOU.'";</script>'."\n"; } $sym_left = $currencies->currencies[$currency=$FSESSION->currency]['symbol_left']; $sym_right = $currencies->currencies[$currency=$FSESSION->currency]['symbol_right']; $dec_point = $currencies->currencies[$currency=$FSESSION->currency]['decimal_point']; $thou_point = $currencies->currencies[$currency=$FSESSION->currency]['thousands_point']; $js.='<script>var lng={"expiry":"'.SP_EXPIRY.'","expired":"'.SP_EXPIRED.'","cleared":"'.SP_CLEARED.'","tooslow":"'.SP_TOOSLOW.'","toomany":"'.SP_TOOMANY.'","discount":"'.SP_DISCOUNT.'","seat":"'.ITEM.'","seats":"'.ITEMS.'","thou_point":"'.$thou_point.'","dec_point":"'.$dec_point.'","sym_left":"'.$sym_left.'","sym_right":"'.$sym_right.'"};</script>'."\n"; if($FSESSION->is_registered('customer_id')){$spt='user.min';}else{if(SEATPLAN_LOGIN_ENFORCED=='true'){$spt='public';}else{$spt='user.min';}} 
	if($_SESSION['customer_country_id']==999 && isset($_SESSION['box_office_refund'] )){$spt='refund.min';} 
	if($_SESSION['customer_country_id']==999 && isset($_SESSION['draggable'] )){$spt='public';} 
	$js.='<script src="'.DIR_WS_TEMPLATES.TEMPLATE_NAME.'/assets/js/seatplan_'.$spt.'.js"></script>'."\n"; echo $js;}
	?>
	<?php if(file_exists(DIR_WS_TEMPLATES.'discount-modal.php')) require(DIR_WS_TEMPLATES.'discount-modal.php');?>
	<?php include_once('pop_up_v1.php'); ?>
	<?php
	if (defined('POPUP1_ENABLED') && POPUP1_ENABLED) {
		include 'templates/marketing_modal.php';
	}
	?>

	<?php
	if (defined('POPUP2_ENABLED') && POPUP2_ENABLED) {
		include 'templates/marketing_modal2.php';
	}
	?>


<script>
document.addEventListener('DOMContentLoaded', function () {
  const alertBox = document.getElementById('cookieAlert');
  const acceptBtn = document.getElementById('cookieAcceptBtn');
  const resetBtn = document.getElementById('cookieResetBtn');

  const cookieName = 'we_cookie_notice_accepted';
  const cookieDays = 30;

  function setCookie(name, value, days) {
    const date = new Date();
    date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
    document.cookie = name + '=' + encodeURIComponent(value) +
      '; expires=' + date.toUTCString() +
      '; path=/; SameSite=Lax';
  }

  function getCookie(name) {
    const nameEQ = name + '=';
    const cookies = document.cookie.split(';');
    for (let i = 0; i < cookies.length; i++) {
      let c = cookies[i].trim();
      if (c.indexOf(nameEQ) === 0) {
        return decodeURIComponent(c.substring(nameEQ.length));
      }
    }
    return null;
  }

  function deleteCookie(name) {
    document.cookie = name + '=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; SameSite=Lax';
  }

  function showBanner() {
    if (alertBox) {
      alertBox.classList.add('show');
    }
  }

  function hideBanner() {
    if (alertBox) {
      alertBox.classList.remove('show');
    }
  }

  if (getCookie(cookieName) !== '1') {
    showBanner();
  }

  if (acceptBtn) {
    acceptBtn.addEventListener('click', function () {
      setCookie(cookieName, '1', cookieDays);
      hideBanner();
    });
  }

  if (resetBtn) {
    resetBtn.addEventListener('click', function () {
      deleteCookie(cookieName);
      showBanner();
      console.log('Cookie reset:', cookieName);
    });
  }

  window.cookieNoticeReset = function () {
    deleteCookie(cookieName);
    showBanner();
    console.log('Cookie reset from console:', cookieName);
  };

  window.cookieNoticeSet = function () {
    setCookie(cookieName, '1', cookieDays);
    hideBanner();
    console.log('Cookie set from console:', cookieName);
  };
});
</script>