<?php
$p_checkin = isset($tpl['arr']['checkin']) && !empty($tpl['arr']['checkin']);
$p_checkout = isset($tpl['arr']['checkout']) && !empty($tpl['arr']['checkout']);
$p_pets = isset($tpl['arr']['pets']) && !empty($tpl['arr']['pets']);
$p_policies = isset($tpl['arr']['policies']) && !empty($tpl['arr']['policies']);
$p_fees = isset($tpl['arr']['fees']) && !empty($tpl['arr']['fees']);

if ($p_checkin || $p_checkout || $p_pets || $p_policies || $p_fees)
{
	?>
	<div class="listing-section listing-section-clean">
		<div class="listing-section-inner">
			<h2 class="listing-h2"><?php __('front_label_policies_fees'); ?></h2>
		</div>
		<?php
		if ($p_checkin)
		{
			?>
			<div class="policy-item">
				<div class="policy-item-inner row">
					<label class="policy-item-label"><?php __('front_label_checkin'); ?></label>
					<label class="policy-item-value"><?php echo nl2br(stripslashes($tpl['arr']['checkin'])); ?></label>
				</div>
			</div>
			<?php
		}
		if ($p_checkout)
		{
			?>
			<div class="policy-item">
				<div class="policy-item-inner row">
					<label class="policy-item-label"><?php __('front_label_checkout'); ?></label>
					<label class="policy-item-value"><?php echo nl2br(stripslashes($tpl['arr']['checkout'])); ?></label>
				</div>
			</div>
			<?php
		}
		if ($p_pets)
		{
			?>
			<div class="policy-item">
				<div class="policy-item-inner row">
					<label class="policy-item-label"><?php __('front_label_pets'); ?></label>
					<label class="policy-item-value"><?php echo nl2br(stripslashes($tpl['arr']['pets'])); ?></label>
				</div>
			</div>
			<?php
		}
		if ($p_policies)
		{
			?>
			<div class="policy-item">
				<div class="policy-item-inner row">
					<label class="policy-item-label"><?php __('front_label_policies'); ?></label>
					<label class="policy-item-value"><?php echo nl2br(stripslashes($tpl['arr']['policies'])); ?></label>
				</div>
			</div>
			<?php
		}
		if ($p_fees)
		{
			?>
			<div class="policy-item">
				<div class="policy-item-inner row">
					<label class="policy-item-label"><?php __('front_label_fees'); ?></label>
					<label class="policy-item-value"><?php echo nl2br(stripslashes($tpl['arr']['fees'])); ?></label>
				</div>
			</div>
			<?php
		}
		?>
	</div>
	<?php
}