<?php
/*
osConcert Visual Seat Reservation http://www.osconcert.com Copyright (c) 2009-2019 cartZone UK www.cartzone.co.uk
*/
defined('_FEXEC') or die();
define('DIR_WS_TEMPLATE_IMAGES', 'templates/blackzone/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');
$ajaxCart = new ajaxCart;
?>
<!DOCTYPE html>
<html xmlns="https://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?>>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET;?>" />
	<link rel="icon" type="image/ico" href="favicon.ico" />
	<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 name="viewport" content="width=device-width" />
	<meta content="width=device-width, initial-scale=1.0" name="viewport">
	<?php if(file_exists(DIR_WS_INCLUDES. 'header_tags.php')) require(DIR_WS_INCLUDES. 'header_tags.php');?>
	<!-- Favicons -->
	<link href="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/img/favicon.ico" rel="icon">
	<link href="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/img/apple-touch-icon.png" rel="apple-touch-icon">
	<!-- Google Fonts -->
	<!--<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,700,700i|Raleway:300,400,500,700,800|Montserrat:300,400,700" rel="stylesheet">-->
	<!-- Bootstrap CSS File -->
	
	<!-- Latest Bootstrap CSS File -->
	<link href="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/bootstrap/css/bootstrap.min.css" rel="stylesheet">
	<!-- Libraries CSS Files -->
	<link href="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/lib/font-awesome/css/font-awesome.min.css" rel="stylesheet">
	<link href="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/lib/animate/animate.min.css" rel="stylesheet">
	<link href="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/lib/ionicons/css/ionicons.min.css" rel="stylesheet">
	<link href="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/lib/owlcarousel/assets/owl.carousel.min.css" rel="stylesheet">
	<link href="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/lib/magnific-popup/magnific-popup.css" rel="stylesheet">
	<link href="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/lib/ionicons/css/ionicons.min.css" rel="stylesheet">
	<link href="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/css/flag-icon.css" rel="stylesheet" />
	<!-- osConcert CSS Files -->
	<link href="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/css/osconcert.css" rel="stylesheet">  
	<link href="<?php $css="seatplan"; echo DIR_WS_TEMPLATES . TEMPLATE_NAME.'/css/'.$css.'.css';?>" rel="stylesheet">
	<link href="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/css/custom.css" rel="stylesheet">
	<link href="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/css/jquery-ui.css" rel="stylesheet">
	<!-- Main Stylesheet File -->
	<link href="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/css/style.css" rel="stylesheet">
	<link rel="stylesheet" href="<?php echo DIR_WS_TEMPLATES.TEMPLATE_NAME.'/css/themes/'.TEMPLATE_COLOR.'.css';?>" />
	<?php if(!defined('POPUP_DISCOUNT_WIDTH'))define('POPUP_DISCOUNT_WIDTH', '600');
if(!defined('POPUP_DISCOUNT_HEIGHT'))define('POPUP_DISCOUNT_HEIGHT', '150');?>
<style>
div#ticket_discount{width: <?php echo POPUP_DISCOUNT_WIDTH;?>px!important;height: <?php echo POPUP_DISCOUNT_HEIGHT;?>px!important;}</style>
	<?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);} ?>
</head>
<body id="body">
  <!--==========================
    Header
  ============================-->
	<?php require(DIR_WS_INCLUDES . 'warnings.php'); ?>	
	<?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">
		<h3><?php echo htmlspecialchars(urldecode($FREQUEST->getvalue('error_message')));?></h3></div>
		<?php 
		} 
		//<!-- end errors -->
		?>

<main id="main"> 
<div class="container clear">
	<?php 
	if (SHOW_BREADCRUMB == 'yes')
		{
		require_once(DIR_WS_TEMPLATES.TEMPLATE_NAME.'/content/breadcrumb.php');
		}  ?>
	<div class="row">
		<div class="col-md-12">
		<?php if (DISPLAY_COLUMN_LEFT == 'yes') 
		{
		?>
		<!-- sidebar-left //-->
		<div class="row">
		<!--<div class="col-md-8 order-sm-4 clear">-->
		<div class="col-md-9 order-md-9 clear">
		<?php 
		}
		elseif (DISPLAY_COLUMN_RIGHT == 'yes')
		{
		?>
		<!-- sidebar-right //-->
		<div class="row">
		<div class="col-md-8 order-md-4 clear">	
		<!--<div class="col-md-9 order-sm-9 clear">-->
		<?php
		}
		if ($FREQUEST->getvalue('error_message')) 
		{ 
		?>
		<div class="headerError"><?php echo htmlspecialchars(urldecode($FREQUEST->getvalue('error_message')));?></div>
		<?php 
		}

		if (isset($content_template)) 
		{ 
		require(DIR_WS_CONTENT . $content_template);
		}
		else if (isset($GLOBALS["TPL_CONTENT"]))
		{
		echo $GLOBALS["TPL_CONTENT"];
		}
		///////////////////////////////////////////////////////////////////
		else
		{
		if (file_exists(DIR_FS_CATALOG . DIR_WS_TEMPLATES . TEMPLATE_NAME . "/content/" . $content . '.tpl.php'))
		{
		require(DIR_FS_CATALOG.DIR_WS_TEMPLATES.TEMPLATE_NAME."/content/".$content.'.tpl.php');
		}
		else
		{
		require(DIR_WS_CONTENT.$content.'.tpl.php');}
		}
		///////////////////////////////////////////////////////////////////
		?>
		</div>
			<?php 
			if (DISPLAY_COLUMN_LEFT == 'yes') 
			{
			if (DOWN_FOR_MAINTENANCE =='false' || DOWN_FOR_MAINTENANCE_COLUMN_LEFT_OFF =='false') 
			{ 
			?>
			<!--<div class="col-md-4 order-sm-8">-->
			<div class="col-md-3 order-md-3">
			<?php require_once(DIR_WS_INCLUDES.'column_left.php'); ?>
			</div><!-- end: sidebar-left -->
		</div>
		</div>
			<?php 
			}
			}
			elseif (DISPLAY_COLUMN_RIGHT == 'yes')
			{
			?>
			<div class="col-md-4 order-md-8">
			<!--<div class="col-md-3 order-sm-3">-->
			<?php require_once(DIR_WS_INCLUDES.'column_left.php'); ?>
			</div><!-- end: sidebar-right -->
		</div>
		</div>
			<?php 	
			}
			?>
	</div>
</div>
</main>
<?php require(DIR_FS_CATALOG.DIR_WS_TEMPLATES.TEMPLATE_NAME. '/footer.php'); ?>  
	<!-- START Bootstrap-Cookie-Alert -->
	<div class="alert text-center cookiealert" role="alert">
		<?php echo TEXT_COOKIES ?>
		<button type="button" class="btn btn-primary btn-sm acceptcookies" aria-label="Close">
		<?php echo TEXT_UNDERSTAND ?>
		</button>
	</div>
	<!-- END Bootstrap-Cookie-Alert -->
  <a href="#" class="back-to-top"><i class="fa fa-chevron-up"></i></a>
  <!-- JavaScript Libraries (confirm button scripts and other osConcert are in the main.js
  // for SaleMaker to work main is disconnected
  // Nav mobile is now in own file mobile.js
  -->
	<script src="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/lib/jquery/jquery-3.4.1.js"></script>
	
	
	<script src="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/lib/jquery_ui/jquery-ui.min.js"></script>
	<script src="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/lib/bootstrap/js/bootstrap.bundle.min.js"></script>
	<script src="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/lib/easing/easing.min.js"></script>
	<script src="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/lib/superfish/hoverIntent.js"></script>
	<script src="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/lib/superfish/superfish.min.js"></script>
	<script src="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/lib/wow/wow.min.js"></script>
	<script src="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/lib/owlcarousel/owl.carousel.js"></script>
	<script src="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/lib/magnific-popup/magnific-popup.min.js"></script>
	<script src="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/lib/sticky/sticky.js"></script>
	<script defer src="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/js/cookiealert.js"></script>
	<script defer src="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/js/easyTooltip.js"></script>
	<script>new WOW().init();</script>
	<!-- Contact Form JavaScript File -->
	
	<script src="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/js/main.js"></script>
	
	<?php ################# server load
	if(SEATPLAN_LOGIN_ENFORCED=='true' && !$FSESSION->is_registered('customer_id'))
	{
	?>
	<!-- Login Modal -->
	<div class="modal fade" id="LoginModal" tabindex="-1" role="dialog"  aria-hidden="true">
	  <div class="modal-dialog" role="document">
		<div class="modal-content">
		  <div class="modal-header">
			<button type="button" class="close" data-dismiss="modal" aria-label="Close">
			  <span aria-hidden="true">&times;</span>
			</button>
		  </div>
		  <div class="modal-body">
		   <p><?php echo PLEASE_LOGIN;?></p>
		  </div>
		</div>
	  </div>
	</div>
	<script>
	$(document).ready(function(){
		$(".seatplan").click(function(){
			$("html, body").animate({ scrollTop: 0 }, "slow");
			$("#LoginModal").modal("show");
		});
	});
	</script>
	<?php 
	///// remove this section to display a default seatplan
	$js.='<script>$.cPath='.(($cPath)? $cPath:0).';$.cht="'.$sp->cat_name($cPath).'";$.refresh=1000000;</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.'", "ticketlimit":"'.SP_TICKETLIMIT.'", "GAticketlimit":"'.SP_GA_TICKET_LIMIT.'","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';}else{if(SEATPLAN_LOGIN_ENFORCED=='true'){$spt='public';}else{$spt='user';}}$js.='<script src="'.DIR_WS_TEMPLATES.TEMPLATE_NAME.'/js/seatplan_'.$spt.'.js"></script>'."\n";echo $js;///// end of section to remove
	}else{
	$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.'","ticketlimit":"'.SP_TICKETLIMIT.'","GAticketlimit":"'.SP_GA_TICKET_LIMIT.'","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';}else{if(SEATPLAN_LOGIN_ENFORCED=='true'){$spt='public_unpacked';}else{$spt='user';}} if($_SESSION['customer_country_id']==999 && isset($_SESSION['box_office_refund'] )){$spt='refund';} $js.='<script src="'.DIR_WS_TEMPLATES.TEMPLATE_NAME.'/js/seatplan_'.$spt.'.js"></script>'."\n"; echo $js;
	?>
	<?php #### server load 
	} 
	?>
	<script src="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME; ?>/js/mobile.js"></script>
	<script>
	//this only wants to work here!
	jQuery(function() {
		$('#checkout_agree').click(function() {
			if (jQuery(this).is(':checked')) {
				 jQuery('#checkout_button').removeAttr('disabled');
					   } else {
				 jQuery('#checkout_button').attr('disabled', 'disabled');
			}
		});
	});
	</script>
	<script>
jQuery(document).ready(function() {
  jQuery("form[name=checkout_confirmation]").on('submit',function(e){
   
    var $form = jQuery(this);

    if ($form.data('submitted') === true) {
      // Previously submitted - don't submit again
       e.preventDefault();
	   jQuery('#checkout_button').attr('disabled', 'disabled');
	   
	 // alert('wait');
    } else {
      // Mark it so that the next submit can be ignored
      $form.data('submitted', true);
    }
        
});

jQuery(':input[data-loading-text]').click(function () {
    var btn = $(this);
    btn.button('loading');
   })
});

</script>
	<?php if(GOOGLE_ANALYTICS != ''){?><!-- start: Google Analytics -->
	<script>
	  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
	  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
	  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
	  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
	  ga('create', '<?php echo GOOGLE_ANALYTICS; ?>', 'auto');
	  ga('send', 'pageview');
	</script><!-- end: Google Analytics --><?php }?>
	<?php if(file_exists(DIR_WS_TEMPLATES.'discount-modal.php')) require(DIR_WS_TEMPLATES.'discount-modal.php');?>