<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
	<!DOCTYPE html>
	<html lang="pt">
	<head>
<?php $this->load->view('includes/header',isset($data) ? $data : NULL);?>		

	</head>
	<body>
<?php $this->load->view('includes/top',isset($data) ? $data : NULL);?>	

<div class="xs-spacer30 sm-spacer30">
</div>




<div class="article">
<div class="container">
<div class="sm-spacer120">
</div>

<div class="panel panel-success">
<div class="panel-heading" style="background-color: #e31d1a;color: #fff;font-weight: bold;"><?=Genel::dil_ceviri("booking_page_reservation_details")?></div>
<div class="panel-body">
<?php 
$otel_bilgi=$detay["otel"];
?>	
<div class="row">
<div class="col-md-3 img-responsive">
<img src="<?=$otel_bilgi["vitrin_resmi"]?>">

</div>

<div class="col-md-9">
<table class="table table-bordered">
<tr>
<th style="width:150px !important"><?=Genel::dil_ceviri("booking_page_hotel")?></th>
<td><?=$otel_bilgi["otel_adi"]?></td>
<th align="center" style="width:200px !important; text-align: center !important"><?=Genel::dil_ceviri("booking_page_hotel_cost")?></th>
</tr>
<?php foreach ($otel_bilgi["odalar"] as $odalar) { ?>
<tr>
<th><?=Genel::dil_ceviri("booking_page_dates")?></th>
<td><?=date("d-m-Y",strtotime($otel_bilgi["giris_tarihi"]))?> <i class="fa fa-angle-double-right"></i> <?=date("d-m-Y",strtotime($otel_bilgi["cikis_tarihi"]))?></td>
<td rowspan="4" align="center" style="vertical-align: middle !important; font-size:20px;font-weight: bold;"><?=$odalar["satis"]?> <?=$odalar["satis_kur"]?></td>
</tr>

<tr>
<th><?=Genel::dil_ceviri("booking_page_room_type")?></th>
<td><?=$odalar["oda_adi"]?></td>
</tr>

<tr>
<th><?=Genel::dil_ceviri("booking_page_concept")?></th>
<td><?=$odalar["konsept_adi"]?></td>
</tr>

<tr>
<th><?=Genel::dil_ceviri("booking_page_room_guests")?></th>
<td><?=$odalar["yetiskin"]?> <?=Genel::dil_ceviri("booking_page_adult")?> <?php if(($odalar["cocuk"]+$odalar["bebek"])>0){?>, <?=$odalar["cocuk"]+$odalar["bebek"]?> <?=Genel::dil_ceviri("booking_page_child")?><?php }?></td>
</tr>
<?php }?>
</table>


</div>
</div>

<?php
$gidis_transfer_varmi=0;
$donus_transfer_varmi=0;
 if(count($detay["transfer"])>0){?>
<table class="table table-bordered">

<tr class="success">
<th colspan="6">Transfer Bilgileri</th>

</tr>
<?php
$reztransfer=$detay["transfer"];

if(isset($reztransfer["gidis"])){
 foreach ($reztransfer["gidis"] as $gidistransfer) {

$gidis_transfer_varmi=$gidis_transfer_varmi+1;
	?>	
<tr>
<th><?=$gidistransfer["nereden_str"]?><br><?=$gidistransfer["nereye_str"]?></th>
<th><?php if($gidistransfer["isshuttle"]==1){?><?=Genel::dil_ceviri("booking_page_shuttle")?><?php }else{?><?=Genel::dil_ceviri("booking_page_private_car")?><?php }?></th>
<th><?=$gidistransfer["birakilacak_adres"]?></th>
<th><?=date("d-m-Y",strtotime($gidistransfer["transfer_tarihi"]))?></th>
<th><?=$gidistransfer["transfer_ucreti"]?> <?=$gidistransfer["satis_kur"]?></th>
<th>
<form method="POST" action="/reservation/remove-transfer">
<input type="hidden" name="token" value="<?=$token?>">
<input type="hidden" name="donusmu" value="<?=$gidistransfer["donusmu"]?>">
	<button class="btn btn-danger btn-sm"><?=Genel::dil_ceviri("booking_page_sil")?> <i class="fa fa-trash"></i> </button>
</form>
</th>
</tr>

<?php } }?>


<?php
if(isset($reztransfer["donus"])){
 foreach ($reztransfer["donus"] as $gidistransfer) {
$donus_transfer_varmi=$donus_transfer_varmi+1;
	?>	
<tr>
<th><?=$gidistransfer["nereden_str"]?><br><?=$gidistransfer["nereye_str"]?></th>
<th><?php if($gidistransfer["isshuttle"]==1){?><?=Genel::dil_ceviri("booking_page_shuttle")?><?php }else{?><?=Genel::dil_ceviri("booking_page_private_car")?><?php }?></th>
<th><?=$gidistransfer["birakilacak_adres"]?></th>
<th><?=date("d-m-Y",strtotime($gidistransfer["transfer_tarihi"]))?></th>
<th><?=$gidistransfer["transfer_ucreti"]?> <?=$gidistransfer["satis_kur"]?></th>
<th>
<form method="POST" action="/reservation/remove-transfer">
<input type="hidden" name="token" value="<?=$token?>">
<input type="hidden" name="donusmu" value="<?=$gidistransfer["donusmu"]?>">
	<button class="btn btn-danger btn-sm"><?=Genel::dil_ceviri("booking_page_sil")?> <i class="fa fa-trash"></i> </button>
</form>
</th>
</tr>

<?php } }?>
</table>

<?php }?>
</div>
</div>



<?php 
if($gidis_transfer_varmi==0 && $donus_transfer_varmi==0){
?>
<a href="/reservation/guest-info/<?=$token?>" class="btn btn-success btn-block" style="font-size: 18px; font-weight: bold"><?=Genel::dil_ceviri("booking_page_continue_without_transfer")?> <i class="fa fa-angle-double-right"></i></a>
<?php }?>


<?php 
//print_r($detay);
if($gidis_transfer_varmi==0){
?>

<div class="row">
<div class="col-md-12 sm-tacenter">
<h1 class="slice">
<span><?=Genel::dil_ceviri("booking_page_one_way")?></span>
</h1>
</div>
</div>
<div class="sm-spacer30">
</div>
<div class="row">
<div class="col-md-12">
<div>
<table class="table table-bordered">
<tr class="success">
<th><?=Genel::dil_ceviri("booking_page_direction")?></th>
<th><?=Genel::dil_ceviri("booking_page_transfer_type")?></th>
<th><?=Genel::dil_ceviri("booking_page_vehicle_type")?></th>
<th><?=Genel::dil_ceviri("booking_page_total_cost")?></th>
<th>#</th>
</tr>
<?php foreach ($transfer["gidis_transferleri"] as $transferim) {?>

<tr>
<td><?=$transferim["nereden_str"]?><br><?=$transferim["nereye_str"]?></td>
<td><?php if($transferim["isshuttle"]==1){?><?=Genel::dil_ceviri("booking_page_shuttle")?><?php }else{?><?=Genel::dil_ceviri("booking_page_private_car")?><?php }?></td>
<td><img class="img-responsive" style="display:block" src="<?=$transferim["arac_resim"]?>">
Min: <?=$transferim["min_kapasite"]?> / Max: <?=$transferim["max_kapasite"]?>
</td>
<td style="vertical-align: middle !important;"><?=$transferim["price"]?> <?=$transferim["currency"]?></td>
<td style="vertical-align: middle !important;">
<form method="POST" action="/reservation/add-transfer">	
<input type="hidden" name="token" value="<?=$token?>">
<input type="hidden" name="transfer_id" value="<?=$transferim["transfer_id"]?>">
<input type="hidden" name="donusmu" value="0">

<button type="submit" class="btn btn-warning"><?=Genel::dil_ceviri("booking_page_sec")?> <i class="fa fa-angle-double-right"></i></button>	
</form>
</td>
</tr>
<?php }?>	
</table>	

<div>&nbsp;</div>
</div>
</div>
</div>
<div class="sm-spacer30">
</div>
<?php }?>
<?php 
//print_r($transfer);
?>








<?php if($donus_transfer_varmi==0){?>

<div class="row">
<div class="col-md-12 sm-tacenter">
<h1 class="slice">
<span><?=Genel::dil_ceviri("booking_page_return_transfer")?></span>
</h1>
</div>
</div>
<div class="sm-spacer30">
</div>
<div class="row">
<div class="col-md-12">
<div>
<table class="table table-bordered">
<tr class="success">
<th><?=Genel::dil_ceviri("booking_page_direction")?></th>
<th><?=Genel::dil_ceviri("booking_page_transfer_type")?></th>
<th><?=Genel::dil_ceviri("booking_page_vehicle_type")?></th>
<th><?=Genel::dil_ceviri("booking_page_total_cost")?></th>
<th>#</th>
</tr>
<?php foreach ($transfer["donus_transferleri"] as $transferim) {?>

<tr>
<td><?=$transferim["nereden_str"]?><br><?=$transferim["nereye_str"]?></td>
<td><?php if($transferim["isshuttle"]==1){?><?=Genel::dil_ceviri("booking_page_shuttle")?><?php }else{?><?=Genel::dil_ceviri("booking_page_private_car")?><?php }?></td>
<td><img class="img-responsive" style="display:block" src="<?=$transferim["arac_resim"]?>">
Min: <?=$transferim["min_kapasite"]?> / Max: <?=$transferim["max_kapasite"]?>
</td>
<td style="vertical-align: middle !important;"><?=$transferim["price"]?> <?=$transferim["currency"]?></td>
<td style="vertical-align: middle !important;">
<form method="POST" action="/reservation/add-transfer">	
<input type="hidden" name="token" value="<?=$token?>">
<input type="hidden" name="transfer_id" value="<?=$transferim["transfer_id"]?>">
<input type="hidden" name="donusmu" value="1">

<button type="submit" class="btn btn-warning"><?=Genel::dil_ceviri("booking_page_sec")?> <i class="fa fa-angle-double-right"></i></button>	
</form>
</td>
</tr>
<?php }?>	
</table>	

<div>&nbsp;</div>
</div>
</div>
</div>
<div class="sm-spacer30">
</div>
<?php }?>



<?php 
if($gidis_transfer_varmi==0 && $donus_transfer_varmi==0){
?>
<a href="/reservation/guest-info/<?=$token?>" class="btn btn-success btn-block" style="font-size: 18px; font-weight: bold"><?=Genel::dil_ceviri("booking_page_continue_without_transfer")?> <i class="fa fa-angle-double-right"></i></a>
<?php }else{?>
<a href="/reservation/guest-info/<?=$token?>" class="btn btn-success btn-block" style="font-size: 18px; font-weight: bold"><?=Genel::dil_ceviri("booking_page_next_step")?> <i class="fa fa-angle-double-right"></i></a>
<?php }?>
<div class="sm-spacer60">
</div>
</div>
</div>



	<?php $this->load->view('includes/footer',isset($data) ? $data : NULL);?>	


	</body>
	</html>