<?php
if (isset($tpl['p_arr']))
{
	if (isset($tpl['p_arr']['deposit_f']))
	{
		?>
		<div class="form-group">
			<label class="col-lg-5 col-md-5 col-sm-5 col-xs-12 control-label"><?php __('front_price_per_selected_range'); ?></label>

			<div class="col-lg-7 col-md-7 col-sm-7 col-xs-12">
				<label class="control-label"><?php echo $tpl['p_arr']['amount_f']; ?></label>
			</div><!-- /.col-lg-9 col-md-9 col-sm-9 col-xs-12 -->
		</div><!-- /.form-group -->
		<div class="form-group">
			<label class="col-lg-5 col-md-5 col-sm-5 col-xs-12 control-label"><?php __('front_booking_price_tax'); ?></label>

			<div class="col-lg-7 col-md-7 col-sm-7 col-xs-12">
				<label class="control-label"><?php echo $tpl['p_arr']['tax_f']; ?></label>
			</div><!-- /.col-lg-9 col-md-9 col-sm-9 col-xs-12 -->
		</div><!-- /.form-group -->
		<?php
		if($tpl['p_arr']['security'] > 0)
		{ 
			?>
			<div class="form-group">
				<label class="col-lg-5 col-md-5 col-sm-5 col-xs-12 control-label"><?php __('front_booking_price_security'); ?></label>
	
				<div class="col-lg-7 col-md-7 col-sm-7 col-xs-12">
					<label class="control-label"><?php echo $tpl['p_arr']['security_f']; ?></label>
				</div><!-- /.col-lg-9 col-md-9 col-sm-9 col-xs-12 -->
			</div><!-- /.form-group -->
			<?php
		} 
		if($tpl['p_arr']['total'] > 0)
		{ 
			?>
			<div class="form-group">
				<label class="col-lg-5 col-md-5 col-sm-5 col-xs-12 control-label"><?php __('front_booking_total_price'); ?></label>
	
				<div class="col-lg-7 col-md-7 col-sm-7 col-xs-12">
					<label class="control-label"><?php echo $tpl['p_arr']['total_f']; ?></label>
				</div><!-- /.col-lg-9 col-md-9 col-sm-9 col-xs-12 -->
			</div><!-- /.form-group -->
			<?php
		} 
		if($tpl['p_arr']['deposit_p'] > 0)
		{ 
			?>
			<div class="form-group">
				<label class="col-lg-5 col-md-5 col-sm-5 col-xs-12 control-label"><?php __('front_booking_price_deposit'); ?></label>
	
				<div class="col-lg-7 col-md-7 col-sm-7 col-xs-12">
					<label class="control-label"><?php echo $tpl['p_arr']['deposit_f']; ?> (<?php echo $tpl['p_arr']['deposit_p']; ?>% <?php __('front_price_of');?> <?php echo $tpl['p_arr']['total_f'];?> <?php echo $tpl['p_arr']['security'] > 0 ? ' + ' . $tpl['p_arr']['security_f'] . ' ' . __('front_booking_price_security', true) : '';?>)</label>
				</div><!-- /.col-lg-9 col-md-9 col-sm-9 col-xs-12 -->
			</div><!-- /.form-group -->
			<?php
		}else{
			?>
			<div class="form-group">
				<label class="col-lg-5 col-md-5 col-sm-5 col-xs-12 control-label"><?php __('front_booking_price_deposit'); ?></label>
	
				<div class="col-lg-7 col-md-7 col-sm-7 col-xs-12">
					<label class="control-label"><?php echo $tpl['p_arr']['deposit_f']; ?> (<?php echo $tpl['p_arr']['deposit_p']; ?>%)</label>
				</div><!-- /.col-lg-9 col-md-9 col-sm-9 col-xs-12 -->
			</div><!-- /.form-group -->
			<?php
		} 
	} else {
		?>
		<div class="form-group">
			<label class="col-lg-5 col-md-5 col-sm-5 col-xs-12 control-label"><?php __('front_booking_price'); ?></label>

			<div class="col-lg-7 col-md-7 col-sm-7 col-xs-12">
				<label class="control-label"><?php echo $tpl['p_arr']['amount_f']; ?></label>
			</div><!-- /.col-lg-9 col-md-9 col-sm-9 col-xs-12 -->
		</div><!-- /.form-group -->
		<?php
	}
}elseif($_GET['action'] == 'pjActionGetPrice'){
	if(isset($tpl['status']))
	{
		$front_bs = __('front_booking_status', true);
		$status = __('status', true);
		$listing_b_dn = __('listing_b_dn', true);
		?>
		<div class="form-group">
			<label class="col-lg-3 col-md-3 col-sm-3 col-xs-12 control-label">&nbsp;</label>
	
			<div class="col-lg-9 col-md-9 col-sm-9 col-xs-12">
				<label id="pjVrProperyReservedMsg" class="control-label">
					<?php
					switch ($tpl['status'])
					{
						case 1:
							?><span class="text-success"><?php echo $front_bs[1]; ?></span><?php
							break;
						case 2:
							?><span class="text-danger"><?php echo $front_bs[2]; ?></span><?php
							break;
						case 3:
							?><span class="text-danger"><?php echo $front_bs[3]; ?></span><?php
							break;
						case 4:
							?><span class="text-danger"><?php echo $front_bs[4]; ?></span><?php
							break;
						case 5:
							?><span class="text-danger"><?php echo $front_bs[5]; ?></span><?php
							break;
						case 6:
							?><span class="text-danger"><?php echo $front_bs[6]; ?></span><?php
							break;
						case 8:
							?><span class="text-danger"><?php echo $front_bs[8]; ?></span><?php
							break;
						case 9:
							?><span class="text-danger"><?php printf($front_bs[9], $tpl['arr']['o_min_booking_lenght'], @$listing_b_dn[$tpl['arr']['o_price_based_on']]); ?></span><?php
							break;
						case 10:
							?><span class="text-danger"><?php printf($front_bs[10], $tpl['arr']['o_max_booking_lenght'], @$listing_b_dn[$tpl['arr']['o_price_based_on']]); ?></span><?php
							break;
						case 7:
							?><span class="text-danger"><?php echo $status[7]; ?></span><?php
							break;
					} 
					?>
				</label>
			</div><!-- /.col-lg-9 col-md-9 col-sm-9 col-xs-12 -->
		</div><!-- /.form-group -->
		<?php
	}else{
		?>
		<div class="form-group">
			<label class="col-lg-3 col-md-3 col-sm-3 col-xs-12 control-label">&nbsp;</label>
	
			<div class="col-lg-9 col-md-9 col-sm-9 col-xs-12">
				<label id="pjVrProperyReservedMsg" class="control-label"><span class="text-danger"><?php __('front_property_reserved');?></span></label>
			</div><!-- /.col-lg-9 col-md-9 col-sm-9 col-xs-12 -->
		</div><!-- /.form-group -->
		<?php
	}
}
?>