<!DOCTYPE html>
<html lang="en">
<head>
	<?php
	if (isset($tpl['meta_arr']))
	{
		if(!empty($tpl['meta_arr']['title']))
		{
			?>
			<title><?php echo stripslashes($tpl['meta_arr']['title']);?></title>
			<?php
		}else{
			?>
		    <title>Vacation Rental Website | Properties</title>
		    <?php
		}
		if(!empty($tpl['meta_arr']['description']))
		{ 
			?>
			<meta name="description" content="<?php echo stripslashes($tpl['meta_arr']['description']);?>"/>
			<?php
		}
		if(!empty($tpl['meta_arr']['keywords']))
		{ 
			?>
			<meta name="keywords" content="<?php echo stripslashes($tpl['meta_arr']['keywords']);?>"/>
			<?php
		}
	} else{
		?>
	    <title>Vacation Rental Website | Properties</title>
	    <?php
	} 
	?>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <link rel="shortcut icon" href="<?php echo PJ_INSTALL_FOLDER . PJ_TEMPLATE_PATH . PJ_TEMPLATE_WEBSITE_PATH; ?>css/images/favicon.ico" />
    <?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'].$css['file'].'" />';
    }
    foreach ($controller->getJs() as $js)
    {
        echo '<script src="'.(isset($js['remote']) && $js['remote'] ? NULL : PJ_INSTALL_URL).$js['path'].$js['file'].'"></script>';
    }
    ?>
</head>
<body>
	<div class="wrapper">
	    <?php require_once(PJ_TEMPLATE_PATH . PJ_TEMPLATE_WEBSITE_PATH . 'elements/header.php'); ?>
	    <?php require $content_tpl; ?>
	    <?php require_once(PJ_TEMPLATE_PATH . PJ_TEMPLATE_WEBSITE_PATH . 'elements/footer.php'); ?>
	</div><!-- /.wrapper -->
	<?php require_once(PJ_TEMPLATE_PATH . PJ_TEMPLATE_WEBSITE_PATH . 'elements/loadjs.php'); ?>
 	<?php
 	if (pjObject::getPlugin('pjWebsiteContent') !== NULL)
    {
    	?><script src="<?php echo PJ_INSTALL_URL; ?>index.php?controller=pjWebsiteContent&action=pjActionLoad"></script><?php
    }
    ?>
</body>
</html>