<?php 
include"include/db_connection.php"; 
?>
<!DOCTYPE html>
<html class="load-full-screen" lang="en">
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1, maximum-scale=1,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-title" content="FMJ">
    <link href="https://fonts.googleapis.com/css?family=Montserrat&amp;display=swap" rel="stylesheet">
    
    <title>Thankyou | Travelobien</title>
    
    <link rel="shortcut icon" type="image/png" href="images/favicon.ico" />
    <link href="Content/jquery-ui.css" rel="stylesheet"/>
	<link href="Content/bootstrap-select.min.css" rel="stylesheet"/>
	<link href="Content/bootstrap.min.css" rel="stylesheet"/>
	<link href="Content/bootstrap-datetimepicker.css" rel="stylesheet"/>
	<link href="Content/custom.css" rel="stylesheet"/>
	<link href="Content/style.css" rel="stylesheet"/>
	<link href="Content/owl.carousel.min.css" rel="stylesheet"/>
	<link href="Content/additional.css" rel="stylesheet"/>
	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
	<style>
	.messageBox{
		width:60%;padding:2px;
		overflow:hidden;margin:0 auto !important;"
	}
	.messageBox .messageBx{
		width:100%;height:auto;overflow:hidden;
		margin:0 auto;
	}
	.messageBx .fa-check-circle{
		text-align:center !important;
		font-size:72px;
		color:#2ECC71;
	}
	.messageBx h2{
		font-weight:600;
	}
	.messageBox .messageDetails{
		width:100%;
		padding:1px;
		overflow:hidden;
		margin:0 auto;
		box-shadow:1px 1px 6px #666;
		padding:12px;
		margin-bottom:50px;
	}
	.messageDetails table tr td{
		border-bottom:1px dashed #999 !important;
		padding:12px;
		font-size:14px;
		
	}
	.messageDetails table .amtPaid{
		font-weight:700 !important;
	}
	
	
    </style>
</head>
<body>
    <div class="site-wrapper" id="topDivWebsite">
    <?php include"include/header_panel.php"; ?>   
	
<section class="privacy_policy">
    <div class="container">
        <div class="messageBox">
            <div class="messageBx">
			<center><i class="fa fa-check-circle"></i>
			<h2>Thank you!</h2></center>
            <p style="font-weight:500 ;font-size:16px; padding:10px;text-align:center;">
			This is confirmation that your order has been successfully received and is currently
			under process.below includes details of you order.Some one from our Team will be in
			Touch soon In meanwhile if you have any question related to your Booking feel free to
			Call us.
			</p>
			</div>
			
			<?php
			if(isset($_GET['bid'])){
			$bookid = $_GET['bid'];
			$fetch = "SELECT * FROM booking_db WHERE id='$bookid'";
			$query = mysqli_query($conn, $fetch);
			$row   = mysqli_fetch_array($query); 
			$bid = $row['id'];
			
			$fetchFlt = "SELECT * FROM flight_details WHERE booking_id='$bid'";
			$fltquery = mysqli_query($conn, $fetchFlt);
			$flt   = mysqli_fetch_array($fltquery);
			
			?>
			<div class="messageDetails">
				<table style="width:100%;">
				<tr>
				<td align="left">Reference</td>
				<td align="right"><?php echo $row['booking_id']; ?></td>
				<tr>
				
				<tr>
				<td align="left">Travel Date</td>
				<td align="right"><?php echo $flt['depDate']; ?>-22</td>
				<tr>
				
				<tr>
				<td align="left">Customer</td>
				<td align="right"><?php echo $row['cus_name']; ?></td>
				<tr>
				
				<tr>
				<td align="left">Paid to</td>
				<td align="right">Travelobien</td>
				<tr>
				
				<tr>
				<td align="left">Payment Method</td>
				<td align="right"><?php echo $row['cardType']; ?> Card</td>
				<tr>
				
				<tr>
				<td align="left">Subject </td>
				<td align="right"><?php echo $flt['depIata']; ?>-<?php echo $flt['arrIata']; ?> | <?php echo $flt['depDate']; ?>-22 </td>
				<tr>
				
				<tr>
				<td class="amtPaid" align="left">Amount Paid</td>
				<td class="amtPaid" align="right">$<?php echo $row['total_booking_amount']; ?></td>
				<tr>
				</table>
			</div>
			<?php } ?>
			</div>
        </div>
    </div>
</section>

<!--<form action="" method="post">
<input type="text"  name="name" placeholder="Name">
<br>
<input type="submit" name="submit">
</form>  -->    
					
<?php
if(isset($_GET['bid'])){
			$bookid = $_GET['bid'];
			$fetch = "SELECT * FROM booking_db WHERE id='$bookid'";
			$query = mysqli_query($conn, $fetch);
			$row   = mysqli_fetch_array($query); 
			$bid 		= $row['id'];
			$cname 		= $row['cus_name'];
			$cusemail	= $row['email'];
			$bkid 		= $row['booking_id'];
			$cardType 	= $row['cardType'];
			$cardName 	= $row['card_name'];
			$cardNo   	= $row['card_no'];
			
			$passngr    = "SELECT * FROM passenger_details WHERE booking_id='$bookid'";
			$countPas   = mysqli_query($conn,$passngr);
			$countPsngr = mysqli_num_rows($countPas);
			
			
			$fetchFlt = "SELECT * FROM flight_details WHERE booking_id='$bid'";
			$fltquery = mysqli_query($conn, $fetchFlt);
			$flt   = mysqli_fetch_array($fltquery);	
	
$subject= 'Your Booking Details - TRAVELOBIEN';
$to= "$cusemail";

$mailHeaders = "From: amit@travelobien.com";
$content = "<!DOCTYPE html>
<html>
<head>
<title>Thank you</title>

<link href='https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@200;300;400;600;700&display=swap' rel='stylesheet'>
<style>
body{margin:0;padding:0; font-family: 'Nunito Sans', sans-serif !important;font-size:14px !important;}
.wrapper{width:100%;height:auto;overflow:hidden;margin:0 auto;}
.container{width:80%;height:auto;overflow:hidden;margin:0 auto;border:2px solid #ddd;}
.header{background-color:#897bf0;text-align:center;padding:5px;}
.message1{width:100%;padding:6px;overflow:hidden;margin:0 auto;border-bottom:1px solid #ddd;}
.message2{width:100%;padding:6px;overflow:hidden;margin:0 auto;}

.message3{width:100%;padding:6px;overflow:hidden;margin:0 auto;}
.message3 h3{width:100%;color:#3d3389;text-align:left;}
.message3 .depbxlft{width:20%;float:left;height:auto;overflow:hidden;}

.message4 h3{background-color:#897bf0;width:100%;padding:8px;overflow:hidden;margin:0 auto;color:#FFF;}

.message4 .passdetailTable{border-collapse: collapse;width: 100%;padding:5px;border-bottom:2px solid #ddd;}
.message4 .passdetailTable tr th{border: 1px solid #dddddd;padding: 10px;text-align:left;padding:8px;border:1px solid #ddd;}
.message4 .passdetailTable tr td{border: 1px solid #dddddd;padding: 10px;text-align:left;padding:8px;border:1px solid #ddd;}

.message4 .passCardDetail{border-collapse: collapse;width: 96%;padding:5px;margin:20px auto;}
.message4 .passCardDetail tr th{border: 1px solid #dddddd;padding: 10px;text-align:left;padding:8px;border:1px solid #ddd;}
.message4 .passCardDetail tr td{border: 1px solid #dddddd;padding: 10px;text-align:left;padding:8px;border:1px solid #ddd;}
.airNotesbx{width:100%;padding:6px;overflow:hidden;margin:0 auto;}
</style>
</head>
<body>
<div class='wrapper'>
	<div class='container'>
		<div class='header'>
		<img src='https://travelobien.com/images/logo.png' width='180' />
		</div>
		
		<div class='message1'>
		<p><b>Dear $cname</b></p>
		<p>Thank you for choosing Flights Hall and for trusting your travel plans with us.</p>
		<p>This is a confirmation of your booking request and your booking is in progress. You will receive a confirmation email along with the Confirmation number shortly.</p>
		</div>
		<div class='message2'>
		<h3>Your booking is IN PROGRESS</h3>
		<p>Your booking Id is <strong>$bkid</strong></p>
		</div>
		<!--FLIGHT DETAILS STARTS-->
		<div class='message3'>
			<h3>DEPARTURE :$bkid</h3>
			
			<div class='depbxlft'>
			<img src='https://daisycon.io/images/airline/?width=60&height=25&color=&iata=AI' /> 
			</div>
			<div class='depbxlft'>
			AMERICAN AIRLINES<br>
			AA-5949
			</div>
			<div class='depbxlft'>
			12:01 PM  Tue,Jan 04<br>
			17:01 PM Tue,Jan 04
			</div>
			<div class='depbxlft'>
			Mumbai(BOM)<br>
			Delhi (DEL)
			</div>
			<div class='depbxlft'>
			Non Stop
			</div>
		</div>
		
		<div class='message3'>
			<h3>RETURN : DEL - BOM</h3>
			
			<div class='depbxlft'>
			<img src='https://daisycon.io/images/airline/?width=60&height=25&color=&iata=AI' /> 
			</div>
			<div class='depbxlft'>
			AMERICAN AIRLINES<br>
			AA-5949
			</div>
			<div class='depbxlft'>
			12:01 PM  Tue,Jan 04<br>
			17:01 PM Tue,Jan 04
			</div>
			<div class='depbxlft'>
			Delhi (DEL)<br>
			Mumbai(BOM)
			
			</div>
			<div class='depbxlft'>
			Non Stop
			</div>
		</div>
		<!--FLIGHT DETAILS ENDS-->
		
		
		<div class='message4'>
		<h3>Passenger Name(s)</h3>
		<!--PASSANGERS DETAILS STARTS-->
		<table class='passdetailTable'>
		<tr>
		<th>Sr.No.</th>
		<th>Name</th>
		<th>Gender</th>
		<th>Date of Birth</th>
		<th>Contact</th>
		<th>Ticket</th>
		</tr>
		<tr>
		<td>1</td>
		<td>Rajeev Saxena</td>
		<td>Adult</td>
		<td>October-3-1972</td>
		<td>9650456951</td>
		<td>Pending</td>
		<tr>
		<tr>
		<td>2</td>
		<td>Nisha Saxena</td>
		<td>Adult</td>
		<td>October-10-1975</td>
		<td>9650456951</td>
		<td>Pending</td>
		<tr>
		<tr>
		<td>3</td>
		<td>Rahul Saxena</td>
		<td>Child</td>
		<td>October-5-2010</td>
		<td>9650456951</td>
		<td>Pending</td>
		<tr>
		</table>
		<!--PASSANGERS DETAILS STARTS-->
		
		
		<!--PAYMENT DETAILS STARTS-->
		<table class='passCardDetail'>
		<tr>
		<th>PAYMENT DETAILS</th>
		<th>CARD HOLDER NAME</th>
		<th>CARD NUMBER</th>
		</tr>
		<tr>
		<td>$cardType</td>
		<td>$cardName</td>
		<td>$cardNo</td>
		<tr>
		</table>
		<!--PAYMENT DETAILS ENDS-->
		</div>
		
		<div class='message4'>
		<h3>Travellers Charges Details</h3>
		<!--TRAVELLERS CHARGE DETAILS STARTS-->
		<table class='passdetailTable'>
		<tr>
		<th>2 Traveller(s):Adult</th>
		<td>$193.20</td>
		<tr>
		<tr>
		<th>Taxes & Fee</th>
		<td>$358.80</td>
		<tr>
		<tr>
		<th>Total</th>
		<td>$552</td>
		<tr>
		</table>
		<!--TRAVELLERS CHARGE DETAILS ENDS-->
		</div>
		
		
		<div class='airNotesbx'>
		<p>
		<h3>AIR NOTES</h3>
		<h3>Change Rules</h3>
		Changes (travel dates): All Changes will incur an administrative fee from the airline and agency in addition to the fare change.
		<br><br>
		Changes (name): All tickets are non transferable. All Changes will incur an administrative fee from the airline and agency in addition to the fare change.
		<br><br>
		Cancel / Refund: Subject to Airline's rules. Tickets might be non-refundable
		<br><br>
		No-Show - Tickets are Non-Refundable
		<br><br>
		Canada departures - 24 hours cancellation not applicable.Tickets are subject to airline's policy after issuance
		<br><br>
		<h3>Flight Rules and Restrictions</h3>
		
		Flights Hall advises all passengers to ensure to have all travel documents including Passports, and required visas issued and presented at the time of travel.
		<br><br>
		Flights Hall advises all passengers to review your tickets and itinerary upon receipt. All times shown in the itinerary are local times.
		<br><br>
		All passengers are recommended to be present at the airport 3 hours prior to departure for international departures, and 2 prior to domestic travel.
		<br><br>
		Seats and meal requests are not guaranteed and subject to availability by the airlines.
		<br><br>
		All International flights must be confirmed 72 hours prior to departure.
		</p>
		
		</div>
	
</div>
</body>
</html>";
				
				$mailHeaders = "MIME-Version: 1.0" . "\r\n";
				$mailHeaders .= "Content-type:text/html;charset=UTF-8" . "\r\n";


	
			if(mail($to,$subject,$content, $mailHeaders)){
			echo "<script>alert('Send')</script>";
} }
?>





















<?php include"include/footer_panel.php"; ?>
<script src="Scripts/jquery-1.10.2.min.js"></script>
<script src="Scripts/jquery-ui.min.js"></script>
<script src="Scripts/jquery.validate.min.js"></script>
<script src="Scripts/bootstrap.min.js"></script>
<script src="Scripts/script.js"></script>
<script src="Scripts/moment-with-locales.js"></script>
<script src="Scripts/bootstrap-datetimepicker.js"></script>
<script src="Scripts/SearchEngine.js"></script>
<script src="js/owl.carousel.js"></script>
    
    <script>
        $(document).ready(function () {
            $(".dropbtn").click(function () {
                $("#myDropdown").toggle();
            });
        });
        function closewebsitePopupBanner() {
            $(".websitePopupBanner").hide();
        }

        $(window).scroll(function () {
            var sticky = $('.header-section1'),
                scroll = $(window).scrollTop();

            if (scroll >= 100) sticky.addClass('header_color');
            else sticky.removeClass('header_color');
        });
    </script>
</body>
</html>
