<!doctype html>
<html lang="en">
 <?php include('fixed/top.php');  ?>
 <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">

<body>
    <!-- preloader area -->
    <div class="preloader">
        <div class="d-table">
            <div class="d-table-cell">
                <div class="load-spinner">
                    <div></div>
                    <div></div>
                    <div></div>
                    <div></div>
                    <div></div>
                    <div></div>
                    <div></div>
                    <div></div>
                    <div></div>
                    <div></div>
                    <div></div>
                    <div></div>
                </div>
            </div>
        </div>
    </div>
    <div class="pagewrap modify-search">
        <div class="head-wrapper">
            <!-- page header section -->
            <header class="header header-light">
                <div class="container">
                    <div class="sideMenu">
                        <button type="button" class="btn rounded-0 btn-left toggle-slide-right"
                            data-bs-toggle="offcanvas" data-bs-target="#offcanvasWithBackdrop"
                            aria-controls="offcanvasWithBackdrop">
                            <i class="bi bi-text-center"></i>
                        </button>
                        <div class="offcanvas offcanvas-start theme-bg-secondary border-0" tabindex="-1"
                            id="offcanvasWithBackdrop">
                            <div class="p-0">
                                <span class="p-0" id="offcanvasLabel"></span>
                                <button type="button" class="btn-close custom-btn-close theme-text-white"
                                    data-bs-dismiss="offcanvas" aria-label="Close">
                                    <i class="bi bi bi-x-lg"></i>
                                </button>
                            </div>
                            <!-- left side menu section -->
                            <div class="offcanvas-body p-0 mt-5">
                                <ul class="menuList nav flex-column w-100">
                                    <li class="nav-item"><a href="index.html" class="position-relative card-effect">
                                            <div class="card-box"></div>
                                            <i class="bi bi-house-fill ps-4 pe-2"></i>Home
                                        </a>
                                    </li>
                                    <li class="nav-item"><a href="deals-offers.html"
                                            class="position-relative card-effect">
                                            <div class="card-box"></div>
                                            <i class="bi bi-chat-square-heart-fill ps-4 pe-2"></i>Specials Deals
                                        </a>
                                    </li>
                                    <li class="nav-item"><a href="#travelDeals" class="position-relative card-effect">
                                            <div class="card-box"></div>
                                            <i class="bi bi-bookmark-check-fill ps-4 pe-2"></i>Travel Deals
                                        </a>
                                    </li>
                                    <li class="nav-item"><a href="#featuredFlights"
                                            class="position-relative card-effect">
                                            <div class="card-box"></div>
                                            <i class="bi bi-bell-fill ps-4 pe-2"></i>Featured Flights
                                        </a>
                                    </li>
                                    <li class="nav-item"><a href="#howWork" class="position-relative card-effect">
                                            <div class="card-box"></div>
                                            <i class="bi bi-shield-fill-exclamation ps-4 pe-2"></i>How it Work
                                        </a>
                                    </li>
                                    <li class="nav-item"><a href="about.html" class="position-relative card-effect">
                                            <div class="card-box"></div>
                                            <i class="bi bi-balloon-fill ps-4 pe-2"></i>About Us
                                        </a>
                                    </li>
                                    <li class="nav-item"><a href="contact.html" class="position-relative card-effect">
                                            <div class="card-box"></div>
                                            <i class="bi bi-arrows-move ps-4 pe-2"></i>Contact Us
                                        </a>
                                    </li>
                                    <li class="nav-item"><a href="blog.html" class="position-relative card-effect">
                                            <div class="card-box"></div>
                                            <i class="bi bi-arrow-right-circle-fill ps-4 pe-2"></i>Blogs
                                        </a>
                                    </li>
                                </ul>
                                <div class="mt-5">
                                    <p class="d-inline-flex theme-text-white">
                                        <i class="bi bi-telephone-fill h4 theme-text-white ps-4 pe-2"></i>
                                        24×7 Customer Support <br> 1800-313-5699
                                    </p>
                                </div>
                                <div class="mt-3">
                                    <p class="d-inline-flex theme-text-white">
                                        <i class="bi bi-envelope-fill h4 theme-text-white ps-4 pe-2"></i>
                                        Email us <br> support@example.com
                                    </p>
                                </div>
                                <p class="ps-4 mb-0 mt-5 theme-text-white">Social Network</p>
                                <div class="d-flex social mt-3 ps-4">
                                    <a href="#" class="h4 pe-3"><i class="bi bi-facebook"></i></a>
                                    <a href="#" class="h4 px-3"><i class="bi bi-twitter"></i></a>
                                    <a href="#" class="h4 px-3"><i class="bi bi-linkedin"></i></a>
                                    <a href="#" class="h4 px-3"><i class="bi bi-instagram"></i></a>
                                </div>
                            </div>
                        </div>
                    </div>
                    <nav class="navbar navbar-expand-md navbar-light py-0 px-0">
                        <a class="navbar-brand ms-5" href="index.html"><img src="<?php echo base_url(); ?>assets/front/images/logo.png"
                                alt="Brand Logo" title="Brand Logo" class="img-fluid"></a>
                        <button class="navbar-toggler px-1 btn rounded-0" type="button" data-bs-toggle="collapse"
                            data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
                            aria-expanded="false" aria-label="Toggle navigation">
                            <span class="navbar-toggler-icon"></span>
                        </button>
                        <div class="collapse navbar-collapse" id="navbarSupportedContent">
                            <ul class="navbar-nav ms-auto">
                                <li class="nav-item">
                                    <div class="dropdown-container pe-md-4">
                                        <div class="dropdown-toggle click-dropdown">
                                            <i class="bi bi-currency-exchange"></i> Currency
                                        </div>
                                        <div class="dropdown-menu">
                                            <ul>
                                                <li class="nav-item"><a class="dropdown-item" href="#">INR</a></li>
                                                <li class="nav-item"><a class="dropdown-item" href="#">USD</a></li>
                                                <li class="nav-item"><a class="dropdown-item" href="#">EUR</a></li>
                                            </ul>
                                        </div>
                                    </div>
                                </li>
                                <li class="nav-item">
                                    <div class="dropdown-container pe-md-4">
                                        <div class="dropdown-toggle click-dropdown">
                                            <i class="bi bi-translate"></i> Language
                                        </div>
                                        <div class="dropdown-menu">
                                            <ul>
                                                <li class="nav-item"><a class="dropdown-item" href="#">English</a></li>
                                                <li class="nav-item"><a class="dropdown-item" href="#">Rusian</a></li>
                                                <li class="nav-item"><a class="dropdown-item" href="#">French</a></li>
                                            </ul>
                                        </div>
                                    </div>
                                </li>
                                <li class="nav-item">
                                    <div class="dropdown-container">
                                        <div class="dropdown-toggle click-dropdown">
                                            <i class="bi bi-person-circle"></i> Account
                                        </div>
                                        <div class="dropdown-menu">
                                            <ul>
                                                <li class="nav-item"><a class="dropdown-item"
                                                        href="signin.html">Login</a></li>
                                                <li class="nav-item"><a class="dropdown-item"
                                                        href="signup.html">Register</a></li>
                                            </ul>
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </nav>
                </div>
            </header>
            <!-- review booking flight-->
            <div class="flight-search">
                <div class="container">
                    <div class="row">
                        <div class="col-12 col-md-6 mb-4 mb-md-0">
                            <span class="fw-bold theme-text-white">Review your booking</span>
                        </div>
                        <div class="col-12 col-md-6 mb-4 mb-md-0">
                            <ul class="reviewStatus step2">
                                <li><span class="numbering completed">1</span><span
                                        class="reviewText grayText font12 ">Flight Selected</span></li>
                                <li><span class="numbering onpage">2</span><span
                                        class="reviewText grayText font12 active">Review</span></li>
                                <li><span class="numbering ">3</span><span class="reviewText grayText font12 ">Traveller
                                        &amp; Addons</span></li>
                                <li><span class="numbering ">4</span><span class="reviewText grayText font12 ">Make
                                        Payment</span></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- body section -->
        <div class="content-section">
            <!-- flight revew booking page -->
            <?php $flight_det = json_decode($flight_details); 
           // print_r($flight_details);
            if(!empty($flight_det)):
            $fly_info = $flight_det->tripInfos[0]->sI;
            $search_data = $flight_det->searchQuery;  
            $route_info = $search_data->routeInfos;
            $totalPriceList = $flight_det->tripInfos[0]->totalPriceList;
            ?>
            <div class="review-flight py-3">
                <div class="container">
                    <div class="row">
                        <div class="col-12 col-md-9" data-aos="fade-up" data-aos-delay="200">
                            <div class="d-flex justify-content-between align-items-start mb-3">
                                <div class="fw-bold">Flight Details</div>
                                <div>
                                    <a href="<?php echo base_url(); ?>">  <span class="font-small"><i class="bi bi-arrow-left mx-2"></i>Back To Search</span></a>
                                </div>
                            </div>
                            <!-- flight details section -->
                        <!--    <div class="theme-box-shadow theme-border-radius bg-light mb-3">
                                <div class="row border-bottom py-2 m-auto">
                                    <div class="col-8">
                                        <span class="fw-bold">
                                            <span class="text-uppercase">Depart - </span>
                                            <span>New Delhi To Kochi</span>
                                        </span>
                                    </div>
                                    <div class="col-4 text-end">
                                        <span class="font-small">Fare Rules</span>
                                        <i class="bi bi-info-circle-fill pl-1"></i>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-sm-12">
                                        <div class="px-3">
                                            <ul class="row py-3">
                                                <li class="col-12 pb-3">
                                                    <div class="float-start">
                                                        <img src="<?php echo base_url(); ?>assets/front/images/icons/D-indigo.jpg" alt="indigo">
                                                    </div>
                                                    <div class="float-start ms-2">
                                                        <div class="font-medium">Spicejet</div>
                                                        <div class="font-small">SG-191</div>
                                                    </div>
                                                    <div
                                                        class="float-start rounded theme-bg-secondary theme-text-white font-medium px-2 ms-5">
                                                        Class - SS</div>
                                                    <div class="font-medium float-start mx-5">Economy</div>
                                                    <div class="font-medium float-start mx-5">Refundable</div>

                                                </li>
                                                <li class="col-12 col-md-6 col-lg-3 pb-3">
                                                    <div class="font-medium fw-bold text-uppercase">New Delhi
                                                    </div>
                                                    <div class="font-medium fw-bold">07:20 | <span
                                                            class="fw-normal">Sat,
                                                            Mar 30</span></div>
                                                    <div class="font-small">Indira Gandhi, T - 1D</div>
                                                </li>
                                                <li class="col-12 col-md-6 col-lg-3 pb-3">
                                                    <div class="float-start"><i class="bi bi-clock pe-2 fs-6"></i></div>
                                                    <div class="float-start"> <span class="font-medium d-block">03h
                                                            15m</span>
                                                        <span class="font-small d-block">Non Stop</span> <span
                                                            class="font-small d-block">Equipment:737</span>
                                                    </div>
                                                </li>
                                                <li class="col-12 col-md-6 col-lg-3 pb-3">
                                                    <div class="font-medium fw-bold text-uppercase">KOCHI</div>
                                                    <div class="font-medium fw-bold">10:35 | <span
                                                            class="fw-normal">Sat,
                                                            Mar 30</span></div>
                                                    <div class="font-small">Cochin, T - 2</div>
                                                </li>
                                                <li class="col-12 col-md-6 col-lg-3 pb-3"> <span
                                                        class="font-small text-uppercase fw-bold"> <i
                                                            class="bi bi-briefcase me-2 fs-6"></i> Baggage </span> <span
                                                        class="font-small d-block">CHECK-IN : 15 Kgs</span><span
                                                        class="font-small d-block">CABIN : 7 Kgs</span> </li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            </div>-->
                            <!-- flight details section -->
                            <div class="theme-box-shadow theme-border-radius bg-light mb-3">
                                <div class="row border-bottom py-2 m-auto">
                                    <div class="col-8">
                                        <span class="fw-bold">
                                         <!--   <span class="text-uppercase">Return - </span>-->
                                            <span><?php echo $route_info[0]->fromCityOrAirport->name ;?> To <?php echo $route_info[0]->toCityOrAirport->name ;?></span>
                                        </span>
                                    </div>
                                    <div class="col-4 text-end" data-toggle="modal" data-target="#fareRuleModal">
                                        <span class="font-small">Fare Rules</span>
                                        <i class="bi bi-info-circle-fill pl-1"></i>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-sm-12">
                                        <div class="px-3">
                                            <ul class="row py-3">
                                                <?php $j=1; if(!empty($fly_info)) : foreach($fly_info as $fly) :
                                                $minutes = $fly->duration; 
                                                $hours = floor($minutes / 60);
                                                $min = $minutes - ($hours * 60);
                                                $duration = $hours."h ".$min."m";
                                                if(!empty($fly->cT)){
                                                $ct_minutes =$fly->cT;
                                                $ct_hours = floor($ct_minutes / 60);
                                                $ct_min = $ct_minutes - ($ct_hours * 60);
                                                $ct_time = $ct_hours."h ".$ct_min."m";  
                                                }else{
                                                $ct_time ='';    
                                                }
                                                $d_date = $fly->dt;
                                                $a_date = $fly->at;
                                                $depart_date = date('d-m-Y',strtotime($d_date));
                                                $depart_time = date('h:i a',strtotime($d_date));
                                                
                                                $arrive_date = date('d-m-Y',strtotime($a_date)); 
                                                $arrive_time = date('h:i a',strtotime($a_date));
                                                
                                                
                                                ?>
                                                <li class="col-12 pb-3">
                                                    <div class="float-start">
                                                        <img src="<?php echo base_url(); ?>assets/front/images/icons/D-goair.jpg" alt="goair">
                                                    </div>
                                                    <div class="float-start ms-2">
                                                        <div class="font-medium"><?=$fly->fD->aI->name?></div>
                                                        <div class="font-small"><?=$fly->fD->aI->code?> - <?=$fly->fD->fN?></div>
                                                    </div>
                                                    <div
                                                        class="float-start rounded theme-bg-secondary theme-text-white font-medium px-2 ms-5">
                                                        Class - SS</div>
                                                    <div class="font-medium float-start mx-5"><?php echo $search_data->cabinClass ;?></div>
                                                    <div class="font-medium float-start mx-5">Refundable</div>

                                                </li>
                                                <li class="col-12 col-md-6 col-lg-3 pb-3">
                                                    <div class="font-medium fw-bold text-uppercase"><?=$fly->da->city?>
                                                    </div>
                                                    <div class="font-medium fw-bold"><?=$depart_time?> | <span
                                                            class="fw-normal"><?=$depart_date?></span></div>
                                                    <div class="font-small"><?=$fly->da->name?>, <?php if(!empty($fly->da->terminal)) echo $fly->da->terminal;?></div>
                                                </li>
                                                <li class="col-12 col-md-6 col-lg-3 pb-3">
                                                    <div class="float-start"><i class="bi bi-clock pe-2 fs-6"></i></div>
                                                    <div class="float-start"> <span class="font-medium d-block"><?=$duration?></span>
                                                        <span class="font-small d-block"><?php if($fly->stops==0) { echo 'Non Stop'; } else { echo $fly->stops.' Stop(s)'; } ?></span> <span
                                                            class="font-small d-block">Equipment:<?=$fly->fD->eT?></span>
                                                    </div>
                                                </li>
                                                <li class="col-12 col-md-6 col-lg-3 pb-3">
                                                    <div class="font-medium fw-bold text-uppercase"><?=$fly->aa->city?></div>
                                                    <div class="font-medium fw-bold"><?=$arrive_time?> | <span
                                                            class="fw-normal"><?=$arrive_date?></span></div>
                                                    <div class="font-small"><?=$fly->aa->name?>, <?php if(!empty($fly->aa->terminal)) echo $fly->aa->terminal;?></div>
                                                </li>
                                                <li class="col-12 col-md-6 col-lg-3 pb-3"> <span
                                                        class="font-small text-uppercase fw-bold"> <i
                                                            class="bi bi-briefcase me-2 fs-6"></i> Baggage </span> <span
                                                        class="font-small d-block">CHECK-IN : 15 Kgs</span><span
                                                        class="font-small d-block">CABIN : 7 Kgs</span> </li>
                                                <li class="col-12 mb-3 text-center">
                                                     <?php if(!empty($ct_time)){ ?> 
                                                    <div
                                                        class="border d-inline-block theme-border-radius font-small p-2">
                                                        Change planes at <?=$fly->aa->name?>, Connecting Time: <?=$ct_time?> Connecting flight may depart from a different terminal</div>
                                                    <?php } ?>
                                                </li>
                                                
                                               <!-- <li class="col-12 pb-3">
                                                    <div class="float-start">
                                                        <img src="<?php echo base_url(); ?>assets/front/images/icons/D-goair.jpg" alt="goair">
                                                    </div>
                                                    <div class="float-start ms-2">
                                                        <div class="font-medium">Spicejet</div>
                                                        <div class="font-small">SG-191</div>
                                                    </div>
                                                    <div
                                                        class="float-start rounded theme-bg-secondary theme-text-white font-medium px-2 ms-5">
                                                        Class - SS</div>
                                                    <div class="font-medium float-start mx-5">Economy</div>
                                                    <div class="font-medium float-start mx-5">Refundable</div>

                                                </li>
                                                <li class="col-12 col-md-6 col-lg-3 pb-3">
                                                    <div class="font-medium fw-bold text-uppercase">KOCHI
                                                    </div>
                                                    <div class="font-medium fw-bold">14:05 | <span
                                                            class="fw-normal">Sat,
                                                            Mar 30</span></div>
                                                    <div class="font-small">Indira Gandhi, T - 1D</div>
                                                </li>
                                                <li class="col-12 col-md-6 col-lg-3 pb-3">
                                                    <div class="float-start"><i class="bi bi-clock pe-2 fs-6"></i></div>
                                                    <div class="float-start"> <span class="font-medium d-block">03h
                                                            15m</span>
                                                        <span class="font-small d-block">Non Stop</span> <span
                                                            class="font-small d-block">Equipment:737</span>
                                                    </div>
                                                </li>
                                                <li class="col-12 col-md-6 col-lg-3 pb-3">
                                                    <div class="font-medium fw-bold text-uppercase">New Delhi</div>
                                                    <div class="font-medium fw-bold">15:30 | <span
                                                            class="fw-normal">Sat,
                                                            Mar 30</span></div>
                                                    <div class="font-small">Cochin, T - 2</div>
                                                </li>
                                                <li class="col-12 col-md-6 col-lg-3 pb-3"> <span
                                                        class="font-small text-uppercase fw-bold"> <i
                                                            class="bi bi-briefcase me-2 fs-6"></i> Baggage </span> <span
                                                        class="font-small d-block">CHECK-IN : 15 Kgs</span><span
                                                        class="font-small d-block">CABIN : 7 Kgs</span> </li>-->
                                                
                                              <?php $j++; endforeach;endif;?>  
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <!-- travel insurance section -->
                            <div class="d-flex justify-content-between align-items-start mb-3">
                                <div class="fw-bold">Add-ons</div>
                            </div>
                            <div class="theme-box-shadow theme-border-radius bg-light mb-3 p-3">
                                <div class="d-flex align-items-center mb-3">
                                    <div class="flex-shrink-0">
                                        <img src="<?php echo base_url(); ?>assets/front/images/travel-secure-icon.png" alt="Travel Secure">
                                    </div>
                                    <div class="flex-grow-1 ms-3">
                                        <span class="fw-bold">Secure your trip</span>
                                        <p class="font-small mb-0">See all the benefits you get
                                            for
                                            just $ 159 (18% GST
                                            included)
                                        </p>
                                    </div>
                                </div>
                                <div class="col-12">
                                    <div class="d-flex flex-column">
                                        <div class="form-check">
                                            <input class="form-check-input" type="radio" name="flexRadioDefault"
                                                id="flexRadioDefault1">
                                            <label class="form-check-label font-medium" for="flexRadioDefault1">
                                                Yes, secure my trip, I agree to the <a href="#">Terms & Conditions</a> &
                                                <a href="#">Good Health</a>
                                                terms, and confirm all passengers are
                                                between 2 to 70 years of age

                                            </label>
                                        </div>
                                        <div class="form-check">
                                            <input class="form-check-input" type="radio" name="flexRadioDefault"
                                                id="flexRadioDefault2" checked>
                                            <label class="form-check-label font-medium" for="flexRadioDefault2">
                                                No, I do not wish to secure my trip
                                            </label>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="col-12 col-md-3" data-aos="fade-down" data-aos-delay="300">
                            <div class="fw-bold mb-3">Fare Details</div>
                            <div class="row">
                                <div class="col-12 mb-3">
                                <?php 
                                    //print_r($totalPriceList); 
                                    foreach($totalPriceList as $PriceList){ 
                                 $fare_details = $PriceList->fd;
   
                                    ?>
                                    <div class="theme-box-shadow theme-border-radius bg-light">
                                        <ul class="">
                                            <!-- base fare section -->
                                            <li class="border-bottom p-3 font-medium">
                                                <a class="d-flex justify-content-between theme-text-accent-one"
                                                    data-bs-toggle="collapse" href="#baseFare" role="button"
                                                    aria-expanded="false" aria-controls="baseFare">
                                                    <span class="font-medium fw-bold">
                                                        Base Fare</span>
                                                    <span>
                                                        <i class="bi bi-plus-circle-fill theme-text-accent-two"></i>
                                                    </span>
                                                </a>
                                      <div class="collapse" id="baseFare">
                                      <?php 
                                      $amount_infant = $amount_childt= $amount_adult = $airline_gst =$manage_fee = $fuel_charge=$other_charges = 0;
                                      foreach ($fare_details as $key => $fare) { 
                                      
                                      $airline_gst = 0;
                                      $manage_fee  =  0;
                                      $manage_fee_tax  =  0;
                                      $fuel_charge  =  0;
                                      $other_charges  = 0; 
                                          
                                          
                                      $adult = $search_data->paxInfo->ADULT;
                                      $child = $search_data->paxInfo->CHILD;
                                      $infant = $search_data->paxInfo->INFANT;
                                      ?>
                                                <div class="d-flex justify-content-between pt-3">
                                                 <?php   if($key =='ADULT'){
                                                   $amount = $amount_adult = $adult*$fare->fC->BF;
                                                   ?>
                                                    <span class="font-medium">
                                                            Adult(s) (<?=$adult?> X ₹ <?=$fare->fC->BF?>)
                                                    </span>
                                                    <span class="font-medium">
                                                       <i class="bi bi-currency-rupee"></i>
                                                       <span class="fw-normal"><?=$amount_adult?></span>
                                                    </span>
                                                   <?php }elseif($key =='CHILD'){ 
                                                     $amount = $amount_child = $child*$fare->fC->BF;
                                                   ?>
                                                   <span class="font-medium">
                                                            Child (<?=$child?> X ₹ <?=$fare->fC->BF?>)
                                                   </span>
                                                    <span class="font-medium">
                                                       <i class="bi bi-currency-rupee"></i>
                                                       <span class="fw-normal"><?=$amount_child?></span>
                                                    </span>
                                                   <?php }elseif($key =='INFANT'){ 
                                                  $amount = $amount_infant = $infant*$fare->fC->BF;
                                                   ?>
                                                   <span class="font-medium">
                                                            Infant (<?=$infant?> X ₹ <?=$fare->fC->BF?>)
                                                         </span>
                                                     <span class="font-medium">
                                                       <i class="bi bi-currency-rupee"></i>
                                                       <span class="fw-normal"><?=$amount_infant?></span>
                                                    </span>
                                                            <?php } ?>
                                                    
                                                        </div>
                                           <?php } ?>
                                                    
                                                </div>
                                            </li>
                                            <!-- airline charge fare -->
                                            <!--<li class="border-bottom p-3 font-medium">
                                                <a class="d-flex justify-content-between theme-text-accent-one"
                                                    data-bs-toggle="collapse" href="#airlineSurcharge" role="button"
                                                    aria-expanded="false" aria-controls="airlineSurcharge">
                                                    <span class="font-medium fw-bold">
                                                        Airline Fuel Surcharge</span>
                                                    <span>
                                                        <i class="bi bi-plus-circle-fill theme-text-accent-two"></i>
                                                    </span>
                                                </a>
                                                <div class="collapse" id="airlineSurcharge">
                                                    <div class="d-flex justify-content-between pt-3">
                                                        <span class="font-medium">Adult(s)
                                                            (1 X ₹ 8,0)</span>
                                                        <span class="font-medium">
                                                            <i class="bi bi-currency-rupee"></i>
                                                            <span class="fw-normal">800</span>
                                                        </span>
                                                    </div>
                                                </div>
                                            </li>-->
                                            <!-- other charge fare -->
                                            <li class="border-bottom p-3 font-medium">
                                                <a class="d-flex justify-content-between theme-text-accent-one"
                                                    data-bs-toggle="collapse" href="#otherCharges" role="button"
                                                    aria-expanded="false" aria-controls="otherCharges">
                                                    <span class="font-medium fw-bold">
                                                        Taxes and fees</span>
                                                    <span>
                                                        <i class="bi bi-plus-circle-fill theme-text-accent-two"></i>
                                                    </span>
                                                </a>
                                                <div class="collapse" id="otherCharges">
                                                    <div class="d-flex justify-content-between pt-3">
                                                        <span class="font-medium">Airline GST</span>
                                                        <span class="font-medium">
                                                            <i class="bi bi-currency-rupee"></i>
                                                            <span class="fw-normal">396</span>
                                                        </span>
                                                    </div>
                                                      <div class="d-flex justify-content-between pt-3">
                                                        <span class="font-medium">Management fee</span>
                                                        <span class="font-medium">
                                                            <i class="bi bi-currency-rupee"></i>
                                                            <span class="fw-normal">396</span>
                                                        </span>
                                                    </div>
                                                      <div class="d-flex justify-content-between pt-3">
                                                        <span class="font-medium">Management tax</span>
                                                        <span class="font-medium">
                                                            <i class="bi bi-currency-rupee"></i>
                                                            <span class="fw-normal">396</span>
                                                        </span>
                                                    </div>
                                                      <div class="d-flex justify-content-between pt-3">
                                                        <span class="font-medium">Airline Fuel Surcharge</span>
                                                        <span class="font-medium">
                                                            <i class="bi bi-currency-rupee"></i>
                                                            <span class="fw-normal">480</span>
                                                        </span>
                                                    </div>
                                                    <div class="d-flex justify-content-between pt-3">
                                                        <span class="font-medium">Other Charges</span>
                                                        <span class="font-medium">
                                                            <i class="bi bi-currency-rupee"></i>
                                                            <span class="fw-normal">1151</span>
                                                        </span>
                                                    </div>
                                                </div>
                                            </li>
                                            <!-- hc charge fare -->
                                            <li class="border-bottom p-3 font-medium">
                                                <div class="d-flex justify-content-between">
                                                    <span class="font-medium fw-bold text-uppercase">
                                                        HC</span>
                                                    <span>
                                                        <i class="bi bi-currency-rupee"></i><span
                                                            class="fw-normal">480</span>
                                                    </span>
                                                </div>
                                            </li>
                                            <!-- gst charge fare -->
                                            <li class="border-bottom p-3 font-medium">
                                                <div class="d-flex justify-content-between">
                                                    <span class="font-medium fw-bold text-uppercase">
                                                        GST</span>
                                                    <span>
                                                        <i class="bi bi-currency-rupee"></i><span
                                                            class="fw-normal">80</span>
                                                    </span>
                                                </div>
                                            </li>
                                            <!-- grand total charge fare -->
                                            <li class="border-bottom p-3 font-medium">
                                                <div class="d-flex justify-content-between">
                                                    <span class="fs-6 fw-bold">
                                                        Grand Total</span>
                                                    <span class="fs-6">
                                                        <i class="bi bi-currency-rupee"></i><span
                                                            class="fw-bold">14952</span>
                                                    </span>
                                                </div>
                                            </li>
                                        </ul>
                                    </div>
                                    <?php } ?>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-12">
                                    <div class="theme-box-shadow theme-border-radius bg-light p-3 font-small" data-toggle="modal" data-target="#fareRuleModal">
                                        Cancellation &amp;
                                        Date change
                                        charges <a href="#" class="">More</a></div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- button section -->
                    <div class="row">
                        <div class="col-12">
                            <a href="<?php echo base_url(); ?>pax-details/<?=$flight_det->bookingId?>/<?=$selected_priceId?>"><button type="submit" class="btn btn-effect btn-book">Continue</button></a>
                        </div>
                    </div>
                </div>
            </div>
         <?php endif;?>

        </div>
        
          <div class="modal fade" id="fareRuleModal" tabindex="-1" role="dialog" aria-labelledby="fareRuleModalLabel" aria-hidden="true">
          <div class="modal-dialog modal-lg" role="document">
            <div class="modal-content">
              <div class="modal-header">
                <h5 class="modal-title" id="exampleModalLabel">Fare rule information</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                  <span aria-hidden="true">&times;</span>
                </button>
              </div>
              <div class="modal-body">
                <!-- Modal content goes here -->
            <?php
            $farerule_info = $totalPriceList[0]->fareRuleInformation;

            if (isset($farerule_info->tfr)) {
                $fareRules = $farerule_info->tfr;

                $paragraph = "Fare Rules:<br/><br/>";

                foreach ($fareRules as $ruleType => $rules) {
                    if (!empty($rules)) {
                        $paragraph .= ucwords(str_replace('_', ' ', $ruleType)) . ":<br/>";

                        foreach ($rules as $rule) {
                            $paragraph .= "- " . $rule->policyInfo . "<br/>";
                            if(isset($rule->amount)){
                                $amount = $rule->amount;
                            }
                            $paragraph .= "  (Amount: " . $amount . ", Start Time: " . $rule->st . ", End Time: " . $rule->et . ")<br/>";
                        }

                        $paragraph .= "<br/>";
                    }
                }

                echo $paragraph;
            } else {
                echo "No fare rule information available.";
            }
            ?>

              </div>
              <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
              </div>
            </div>
          </div>
        </div>
        <!-- page footer section -->
        <footer class="footer" id="footerSec">
            <div class="container">
                <div class="row">
                    <div class="col-12 col-lg-6 pt-5">
                        <img src="<?php echo base_url(); ?>assets/front/images/logoWhite.png" class="img-fluid" alt="Brand color white"
                            title="Brand color white">
                        <p class="text-justify pt-5">Flight World Travel Agent dashboard is a specialized travel service
                            for organizations from flightworld.com</p>
                        <p class="pt-lg-5">Get Latest Deals, Upcoming Flight Offers and Cheap Fare</p>
                        <form class="form">
                            <div class="row">
                                <div class="col-12">
                                    <div class="input-group">
                                        <input type="text" class="form-control py-3 rounded-0" id="inputPassword2"
                                            placeholder="Enter your email address">
                                        <button type="button"
                                            class="btn btn-outline-light rounded-0 custom-btn-subscribe btn-effect">Subscribe</button>
                                    </div>
                                </div>
                            </div>
                        </form>
                        <div class="col-12 mt-5">
                            <img src="<?php echo base_url(); ?>assets/front/images/tafi.svg" class="img-fluid me-4" alt="tafi" title="tafi">
                            <img src="<?php echo base_url(); ?>assets/front/images/taai.svg" class="img-fluid" alt="taai" title="taai">
                        </div>
                    </div>
                    <div class="col-12 col-lg-6 pt-5">
                        <img src="<?php echo base_url(); ?>assets/front/images/iata.svg" class="img-fluid d-inline-flex" alt="IATA" title="IATA">
                        <p class="fw-bold text-uppercase mb-0 ms-2 d-inline-flex">We are an IATA Certified travel agency
                        </p>
                        <div class="row">
                            <div class="col-md-4 mt-5">
                                <p class="text-uppercase fw-bold mb-4">About Us</p>
                                <ul class="fl-menu">
                                    <li class="nav-item"><a href="about.html">About</a></li>
                                    <li class="nav-item"><a href="contact.html">Contact us</a></li>
                                    <li class="nav-item"><a href="#">Bank Details</a></li>
                                </ul>
                            </div>
                            <div class="col-md-4 mt-5">
                                <p class="text-uppercase fw-bold">Legal</p>
                                <ul class="fl-menu">
                                    <li class="nav-item"><a href="privacy.html">Privacy</a></li>
                                    <li class="nav-item"><a href="#">T&C</a></li>
                                    <li class="nav-item"><a href="#">Disclaimer</a></li>
                                    <li class="nav-item"><a href="#">Privacy and Cookies</a></li>
                                    <li class="nav-item"><a href="#">Legal</a></li>
                                    <li class="nav-item"><a href="#">Help</a></li>
                                    <li class="nav-item"><a href="#">Feedback</a></li>
                                </ul>
                            </div>
                            <div class="col-md-4 mt-5">
                                <p class="text-uppercase fw-bold">Company</p>
                                <ul class="fl-menu">
                                    <li class="nav-item"><a href="#">Partner With Us</a></li>
                                    <li class="nav-item"><a href="#">Services</a></li>
                                    <li class="nav-item"><a href="#">Careers</a></li>
                                    <li class="nav-item"><a href="#">Products</a></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row g-0 pt-5">
                    <div class="col-12 border-top border-bottom">
                        <div class="row">
                            <div class="col-12 col-lg-4 text-start py-3">
                                <p class="d-inline-flex text-uppercase mb-0">Follow Us</p>
                                <div class="d-inline-flex social">
                                    <a href="#" class="ps-3"><i class="bi bi-facebook"></i></a>
                                    <a href="#" class="ps-3"><i class="bi bi-twitter"></i></a>
                                    <a href="#" class="ps-3"><i class="bi bi-linkedin"></i></a>
                                    <a href="#" class="ps-3"><i class="bi bi-instagram"></i></a>
                                </div>
                            </div>
                            <div class="col-12 col-lg-4 text-lg-center social py-3">
                                <p class="d-inline-flex text-uppercase mb-0">Support Center:</p>
                                <a href="#" class="botom-link">(769) 25698745</a>
                            </div>
                            <div class="col-12 col-lg-4 text-lg-end social py-3">
                                <a href="mailto:support@example.com" class="botom-link">support@example.com</a>
                            </div>
                        </div>
                    </div>
                    <div class="col-12">
                        <p class="text-center py-5 mb-0 font-small">©2022 Flight World Pwt Lcd. All Rights Reserved.
                        </p>
                    </div>
                </div>

            </div>
            <p id="back-top" class="back-to-top bg-dark" style="display: block;">
                <a href="#top"><i class="bi bi-chevron-up"></i></a>
            </p>
        </footer>

    </div>

<?php include('fixed/bottom.php');  ?>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
</body>

</html>