<!DOCTYPE html>
<html class="load-full-screen" lang="en">
<meta http-equiv="content-type" content="text/html;charset=utf-8" /><!-- /Added by HTTrack -->
<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
			error_reporting(E_ALL);
			ini_set ('display_error', 1);
			include"include/db_connection.php";
			if(isset($_POST['bookNow'])){
			$booking_id             = rand(11111111,99999999);
			$cName 		   		    = $_POST['cName'];
			$phoneNo 		   		= $_POST['phoneNo'];
			$emailID 		   		= $_POST['emailID'];
			$CancellaionPolicy 		= $_POST['cancellation_policy'];
			$flexibleticket    		= $_POST['flexibleticket'];
			$SeatSelection     		= $_POST['SeatSelection'];
			$cardType				= $_POST['cardType'];
			$cardNumber        		= $_POST['cardNumber'];
			$expiryMonth       		= $_POST['expiryMonth'];
			$expiryYear        		= $_POST['expiryYear'];
			$cvvNo			   		= $_POST['cvvNo'];
			$cardHolderName    		= $_POST['cardHolderName'];
			$country           		= $_POST['country'];
			$state             		= $_POST['state'];
			$address1          		= $_POST['address1'];
			$address2          		= $_POST['address2'];
			$city              		= $_POST['city'];
			$postalCode        		= $_POST['postalCode'];
			$billingPhoneNo    		= $_POST['billingPhoneNo'];
			$agree			   		= $_POST['agree'];
			$bookDate          		= date("Y-m-d");
			$cancellation_amount    = $_POST['cal_cancellation_amount'];
			$flexible_amount    	= $_POST['cal_flexible_amount'];
			$seats_assign_amount    = $_POST['cal_seats_assign'];
			$cal_base_fare          = $_POST['cal_base_fare'];
			$cal_taxes              = $_POST['cal_taxes'];
			$total_booking_amount   = $_POST['hftotalAmt'];
			
			$travelerType 		= $_POST['travelerType'];
			$passFirstName 		= $_POST['passFirstName'];
			$passMidName 		= $_POST['passMidName'];
			$passLastName 		= $_POST['passLastName'];
			$passGender 		= $_POST['passGender'];
			$passDobMonth 		= $_POST['passDobMonth'];
			$passDobDay 		= $_POST['passDobDay'];
			$passDobYear 		= $_POST['passDobYear'];
			
			//echo "<pre>";
			//print_r($_POST);die();
			
			$insertUser = "INSERT INTO booking_db(booking_id,cus_name,contact,email,cancellation_policy	,flexible_ticket,seat_selection,cardType,card_no,month,year,cvv,card_name, country,state,address1,address2,city,postal_code,billing_phone,agree,booking_date,status, cancellation_amount, flexible_amount, seats_assign_amount, base_fare, fee_taxes, total_booking_amount)
			VALUES
			('B$booking_id','$cName','$phoneNo','$emailID','$CancellaionPolicy','$flexibleticket','$SeatSelection','$cardType','$cardNumber','$expiryMonth','$expiryYear','$cvvNo','$cardHolderName','$country','$state','$address1','$address2','$city','$postalCode','$billingPhoneNo','$agree','$bookDate','Show', $cancellation_amount, $flexible_amount, $seats_assign_amount, $cal_base_fare, $cal_taxes, $total_booking_amount)";
			
			$insertQuery = mysqli_query($conn, $insertUser);
			$bookingId = mysqli_insert_id($conn);
			
			if($insertQuery){
			if(count($travelerType)>0){
				//print_r($passDobYear);
				for($i=0; $i<count($travelerType); $i++){
					$dob 			= $passDobYear[$i].'-'.$passDobMonth[$i].'-'.$passDobDay[$i];
					$birthdate_ts 	= strtotime($dob);
					$birthdate 		= date("Y-m-d",$birthdate_ts);
					$query[] 		= "('$bookingId', '$passFirstName[$i]', '$passMidName[$i]', '$passLastName[$i]', '$travelerType[$i]', '$passGender[$i]', '$birthdate', '$emailID')";
				}
				$passSql 		= "INSERT INTO `passenger_details`(`booking_id`, `first_name`, `middle_name`, `last_name`, `traveler_type`, `gender`, `date_of_birth`, `email`) VALUES ". implode(', ', $query);
				$passQuery 		= mysqli_query($conn, $passSql);
				if($passQuery){
				echo "";
				}}
				
				for($i=0;$i<count($_POST['depCity']);$i++) {
				$carrierCode     = $_POST['carrierCode'][$i];
				$airLogo        = $_POST['airLogo'][$i];
				$airName        = $_POST['airName'][$i];
				$depIata		= $_POST['depIata'][$i];
				$arrIata		= $_POST['arrIata'][$i];
				$tripType		= $_POST['tripType'][$i];
				$arrCity        = $_POST['arrCity'][$i];
				$depTime        = $_POST['depTime'][$i];
				$arrTime        = $_POST['arrTime'][$i];
				$tripTime       = $_POST['tripTime'][$i];
				$depDate        = $_POST['depDate'][$i];
				$retDate        = $_POST['retDate'][$i];
				
				
				$flightQuery = "INSERT INTO flight_details SET booking_id='$bookingId',carrierCode='$carrierCode',airLogo='$airLogo',airName='$airName',depIata='$depIata',arrIata='$arrIata',tripType='$tripType',depCity='".$_POST['depCity'][$i]."',arrCity='$arrCity',depTime='$depTime',arrTime='$arrTime',tripTime='$tripTime',depDate='$depDate',retDate='$retDate'";
				
				$runFlightQuery = mysqli_query($conn, $flightQuery);
				if($runFlightQuery){
					
					
					$name   = $cName;
					$subject= "New Enquiry from $cName";
					$email  = $emailID;
					$phone  = $phoneNo;
					$messag = $total_booking_amount;
					 
					$to= "services@travelobien.com";

					$headers = "From:services@travelobien.com";
					$message = "Name: $name \n\n Email: $email \n\n Phone: $phone  \n\n Message: $messag";
					if(mail($to,$subject,$message,$headers)){
						
						 echo"<script>alert('Your Enquiry Submitted Successfully..Our Representative will Get in Touch with You Shortly')</script>";
					}
					}}}}
						
				
			
			?>
			
			<div class="messageDetails">
				<table style="width:100%;">
				<tr>
				<td align="left">Reference</td>
				<td align="right">B<?php echo $booking_id; ?></td>
				<tr>
				
				<tr>
				<td align="left">Travel Date</td>
				<td align="right"><?php echo $depDate; ?>-22</td>
				<tr>
				
				<tr>
				<td align="left">Customer</td>
				<td align="right"><?php echo $cName; ?></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 $cardType; ?> Card</td>
				<tr>
				
				<tr>
				<td align="left">Subject </td>
				<td align="right"><?php echo $depIata; ?>-<?php echo $arrIata; ?> | <?php echo $depDate; ?>-22 </td>
				<tr>
				
				<tr>
				<td class="amtPaid" align="left">Amount Paid</td>
				<td class="amtPaid" align="right">$<?php echo $total_booking_amount; ?></td>
				<tr>
				</table>
			</div>
			<?php } ?>
			</div>
        </div>
    </div>
</section>

        
       <?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>

<!-- Mirrored from www.farecorner.com/about-us by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 04 Jan 2022 15:06:56 GMT -->
</html>
