<!doctype html>
<html>
	<head>
		<title>Event Ticketing System by PHPJabbers.com</title>
		<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
		<?php
		foreach ($controller->getCss() as $css)
		{
			echo '<link type="text/css" rel="stylesheet" href="'.(isset($css['remote']) && $css['remote'] ? NULL : PJ_INSTALL_URL).$css['path'].htmlspecialchars($css['file']).'" />';
		}
		foreach ($controller->getJs() as $js)
		{
			echo '<script src="'.(isset($js['remote']) && $js['remote'] ? NULL : PJ_INSTALL_URL).$js['path'].htmlspecialchars($js['file']).'"></script>';
		}
		?>
		<!--[if gte IE 9]>
  		<style type="text/css">.gradient {filter: none}</style>
		<![endif]-->
	</head>
	<body>
		<div id="container">
    		<div id="header">
				<div id="logo">
    				<a href="https://www.phpjabbers.com/event-ticketing-system/" target="_blank" rel="nofollow">Event Ticketing System</a>
					<span>v<?php echo PJ_SCRIPT_VERSION;?></span>
    			</div>
			</div>
			
			<div id="middle">
				<div id="leftmenu">
					<?php require PJ_VIEWS_PATH . 'pjLayouts/elements/leftmenu.php'; ?>
				</div>
				<div id="right">
					<div class="content-top"></div>
					<div class="content-middle" id="content">
					<?php require $content_tpl; ?>
					</div>
					<div class="content-bottom"></div>
				</div> <!-- content -->
				<div class="clear_both"></div>
			</div> <!-- middle -->
		
		</div> <!-- container -->
		<div id="footer-wrap">
			<div id="footer">
			   	<p>Copyright &copy; <?php echo date("Y"); ?> <a href="https://www.PHPJabbers.com" target="_blank">PHPJabbers.com</a></p>
	        </div>
        </div>
	<script>
	/* CSRF: automatically include the session token in every jQuery AJAX POST */
	(function($){
		$.ajaxSetup({
			beforeSend: function(xhr, settings) {
				if (settings.type && settings.type.toUpperCase() === 'POST') {
					var token = '<?php echo pjAppController::getCsrfToken(); ?>';
					if (typeof settings.data === 'string') {
						settings.data += (settings.data ? '&' : '') + 'csrf_token=' + encodeURIComponent(token);
					} else if (typeof settings.data === 'object' && settings.data !== null) {
						settings.data['csrf_token'] = token;
					} else {
						settings.data = 'csrf_token=' + encodeURIComponent(token);
					}
				}
			}
		});
	})(jQuery_1_8_2 || jQuery);
	</script>
	</body>
</html>