403Webshell
Server IP : 103.234.187.230  /  Your IP : 216.73.216.216
Web Server : Apache
System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/tajmahaltoursonline.com/application/layouts/scripts/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/tajmahaltoursonline.com/application/layouts/scripts/layout-flight.phtml
<?php
header("Access-Control-Allow-Origin: *");
$object = Zend_Controller_Front::getInstance();
$options = $object->getParam('bootstrap')->getOption('bootstrap');
$baseUrl = $options['siteUrl'];
$siteName = $options['siteName'];
$tollfreenumber = $options['tollfreenumber'];
$whatsappnumber = $options['whatsappnumber'];
$modulename = $object->getRequest()->getModuleName();
//echo $modulename; 

//  $staticDataDomestic1 = $this->staticDataDomestic;
//   echo"<pre>"; print_r($staticDataDomestic1);die();

$controller = $object->getRequest()->getControllerName();
//echo $controller; die();
$action = $object->getRequest()->getActionName();
//echo $action; die();
define('CONST_PACKAGE_TRAVELER_MAX_ROOM', $options['CONST_PACKAGE_TRAVELER_MAX_ROOM']);
define('CONST_PACKAGE_TRAVELER_MAX_ADULT_IN_ROOM', $options['CONST_PACKAGE_TRAVELER_MAX_ADULT_IN_ROOM']);
define('CONST_PACKAGE_TRAVELER_MAX_CHILD_IN_ROOM', $options['CONST_PACKAGE_TRAVELER_MAX_CHILD_IN_ROOM']);
define('CONST_PACKAGE_TRAVELER_MAX_INFANT_IN_ROOM', $options['CONST_PACKAGE_TRAVELER_MAX_INFANT_IN_ROOM']);
$mydevice = Zend_Controller_Action_HelperBroker::getStaticHelper('General')->getDevice();
$getMypopCookie = Zend_Controller_Action_HelperBroker::getStaticHelper('General')->getMypopCookie('MyCookies'); // get the popup sessions
$contactDetail = Zend_Controller_Action_HelperBroker::getStaticHelper('Custom')->getContactDetailForFooter();
$tollfreenumber = ($contactDetail['phone']) ? $contactDetail['phone'] : $tollfreenumber;
$whatsappnumber = ($contactDetail['whatsapp_no']) ? $contactDetail['whatsapp_no'] : $whatsappnumber;
$countrycode = (isset($getMypopCookie['countrycode']) && $getMypopCookie['countrycode'] != '') ? $getMypopCookie['countrycode'] : '+91';
$getCountryFlag = Zend_Controller_Action_HelperBroker::getStaticHelper('General')->getCountryCodeData($countrycode);
$session = new Zend_Session_Namespace('User');
$cssversion = 4.0;
if (($modulename == 'agentlogin') && ($controller == 'index') && ($action == 'index')) {

?>
    <!DOCTYPE html>
    <html lang="en">

    <head>
        <title><?php echo $options['siteName']; ?> Travel Agent Login</title>
        <base href="<?php echo Catabatic_Helper::getSiteUrl(); ?>" />
        <meta charset="UTF-8">
        <!--        <meta name="viewport" content="width=device-width, initial-scale=1">-->
        <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
        <!--	<link rel="icon" type="image/png" href="<?php //echo $baseUrl;   
                                                        ?>public/vendor/images/icons/favicon.ico"/>-->
        <link rel="shortcut icon" href="<?php echo $baseUrl; ?>public/images/favicon.png">
        <link rel="stylesheet" type="text/css" href="<?php echo $baseUrl; ?>public/vendor/bootstrap/css/bootstrap.min.css">
        <link rel="stylesheet" type="text/css" href="<?php echo $baseUrl; ?>public/vendor/fonts/font-awesome-4.7.0/css/font-awesome.min.css">
        <link rel="stylesheet" type="text/css" href="<?php echo $baseUrl; ?>public/vendor/fonts/Linearicons-Free-v1.0.0/icon-font.min.css">
        <link rel="stylesheet" type="text/css" href="<?php echo $baseUrl; ?>public/vendor/animate/animate.css">
        <link rel="stylesheet" type="text/css" href="<?php echo $baseUrl; ?>public/vendor/css-hamburgers/hamburgers.min.css">
        <link rel="stylesheet" type="text/css" href="<?php echo $baseUrl; ?>public/vendor/animsition/css/animsition.min.css">
        <link rel="stylesheet" type="text/css" href="<?php echo $baseUrl; ?>public/vendor/select2/select2.min.css">
        <link rel="stylesheet" type="text/css" href="<?php echo $baseUrl; ?>public/vendor/daterangepicker/daterangepicker.css">
        <link rel="stylesheet" type="text/css" href="<?php echo $baseUrl; ?>public/vendor/css/util.css">
        <link rel="stylesheet" type="text/css" href="<?php echo $baseUrl; ?>public/vendor/css/main.css">

        <script>
            var SITEURL = '<?php echo $baseUrl ?>';
            var appmode = '<?php echo $options['appmode'] ?>';
            var dvc = '<?php echo ($mydevice == "mobile") ? "m" : "d" ?>';
        </script>

    </head>

    <body>
        <?php
        echo $this->layout()->content;
        ?>
        <form id="auth_login_B2B_submit" method="POST" action="<?php echo $baseUrl; ?>agentlogin/index/agentlogin">
            <div class="auth_login_submit_B2B">
                <input type="hidden" name="EmailId" id="EmailIdB2B">
                <input type="hidden" name="UserSysId" id="UserSysIdB2B">
                <input type="hidden" name="CustomerSysId" id="CustomerSysIdB2B">
                <input type="hidden" name="AgencySysId" id="AgencySysId_B2B">
                <input type="hidden" name="MasterAgencySysId" id="MasterAgencySysIdB2B">
                <input type="hidden" name="FirstName" id="FirstNameB2B">
                <input type="hidden" name="LastName" id="LastNameB2B">
                <input type="hidden" name="Password_cu" id="Password_cuB2B">
                <input type="hidden" name="AgencyName" id="AgencyNameB2B">
                <input type="hidden" name="AgencyCode" id="AgencyCodeB2B">
                <input type="hidden" name="ContactNo1" id="Contact_noB2B">
            </div>
        </form>
        <script type="text/javascript" src="<?php echo $baseUrl; ?>public/vendor/jquery/jquery-3.2.1.min.js"></script>
        <script type="text/javascript" src="<?php echo $baseUrl; ?>public/vendor/animsition/js/animsition.min.js"></script>
        <script type="text/javascript" src="<?php echo $baseUrl; ?>public/vendor/bootstrap/js/popper.js"></script>
        <script type="text/javascript" src="<?php echo $baseUrl; ?>public/vendor/bootstrap/js/bootstrap.min.js"></script>
        <script type="text/javascript" src="<?php echo $baseUrl; ?>public/vendor/select2/select2.min.js"></script>
        <script type="text/javascript" src="<?php echo $baseUrl; ?>public/vendor/daterangepicker/moment.min.js"></script>
        <script type="text/javascript" src="<?php echo $baseUrl; ?>public/vendor/daterangepicker/daterangepicker.js"></script>
        <script type="text/javascript" src="<?php echo $baseUrl; ?>public/vendor/countdowntime/countdowntime.js"></script>
        <script type="text/javascript" src="<?php echo $baseUrl; ?>public/vendor/js/main.js"></script>
        <script type="text/javascript" src="<?php echo $baseUrl; ?>public/js/login.js"></script>
        <script type="text/javascript" src="<?php echo $baseUrl; ?>public/js/createinputfilter.js"></script>


    </body>

    </html>
<?php } else { ?>

    <!DOCTYPE html>
    <html>

    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!--        <meta name="viewport" content="width=device-width, initial-scale=1">-->
        <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
        <link rel="shortcut icon" href="<?php echo $baseUrl; ?>public/images/favicon.png">
        <?php
        if (($modulename == 'detail') && ($controller == 'index') && ($action == 'index')) {
            $detailLayout = $this->detailLayout;


        ?>
            <title><?php echo $detailLayout['PackageTitle']; ?></title>

            <meta name="description" content="<?php echo $detailLayout['Description']; ?>" />
            <meta name="keywords" content="<?php echo $detailLayout['Keyword']; ?>" />

        <?php
        } else if (($modulename == 'tours') && ($controller == 'package') && ($action == 'index')) {
            $detailLayout = $this->detailLayout;
            //                    echo"<pre>"; print_r($detailLayout);die();
            $PackageTitle = (isset($detailLayout['PackageTitle']) && $detailLayout['PackageTitle'] != '') ? $detailLayout['PackageTitle'] : '';
            $finPackageTitle = (isset($detailLayout['Metatag']) && $detailLayout['Metatag'] != '') ? $detailLayout['Metatag'] : $PackageTitle;
        ?>
            <title><?php echo $finPackageTitle; ?></title>
            <meta name="description" content="<?php echo $detailLayout['Description']; ?>" />
            <meta name="keywords" content="<?php echo $detailLayout['Keyword']; ?>" />
        <?php
        } else if (($modulename == 'destination') && ($controller == 'index') && ($action == 'domestic-destination')) {

            //$detailLayout = $this->detailLayout;
            $staticDataDomestic1 = $this->staticDataDomestic;
            //                echo"<pre>"; print_r($staticDataDomestic1[0]['page_title']);die();
            $DestinationTitle = (isset($staticDataDomestic1[0]['page_title']) && $detailLayout[0]['page_title'] != '') ? $detailLayout[0]['page_title'] : '';
            $finPackageTitle = (isset($staticDataDomestic1[0]['meta_title']) && $staticDataDomestic1[0]['meta_title'] != '') ? $staticDataDomestic1[0]['meta_title'] : $DestinationTitle;
        ?>
            <title><?php echo $finPackageTitle; ?></title>
            <meta name="description" content="<?php echo $staticDataDomestic1[0]['meta_description']; ?>" />
            <meta name="keywords" content="<?php echo $staticDataDomestic1[0]['meta_keywords']; ?>" />
        <?php
        } else if (($modulename == 'destination') && ($controller == 'index') && ($action == 'international-destination')) {
            $staticInternational = $this->staticDataInternational;
            //      echo"<pre>"; print_r($staticDataInternational1[0]['page_title']);die();
            $PackageTitleInternational = (isset($staticInternational[0]['page_title']) && $staticInternational[0]['page_title'] != '') ? $staticInternational[0]['page_title'] : $siteName;;
            $finPackageTitleInternational = (isset($staticInternational[0]['meta_title']) && $staticInternational[0]['meta_title'] != '') ? $staticInternational[0]['meta_title'] : $PackageTitleInternational;


        ?>
            <title><?php echo $finPackageTitleInternational; ?></title>

            <meta name="description" content="<?php echo $staticInternational[0]['meta_description'] ?>" />
            <meta name="keywords" content="<?php echo $staticInternational[0]['meta_keywords']; ?>" />
        <?php
        } else if (($modulename == 'travelogue') && ($action == 'index' || $action == 'detail')) {
            $resultsetSeoForBlog = $this->resultsetSeoForBlog;

            $PackageTitle = (isset($resultsetSeoForBlog['TravTitle']) && $resultsetSeoForBlog['TravTitle'] != '') ? $resultsetSeoForBlog['TravTitle'] : $siteName;
            $finPackageTitle = (isset($resultsetSeoForBlog['metatag']) && $resultsetSeoForBlog['metatag'] != '') ? $resultsetSeoForBlog['metatag'] : $PackageTitle;

        ?>
            <title><?php echo $finPackageTitle ?></title>

            <meta name="description" content="<?php echo ($resultsetSeoForBlog['Description']); ?>" />
            <meta name="keywords" content="<?php echo $resultsetSeoForBlog['Keyword']; ?>" />
        <?php
        } else if (($modulename == 'cms') && ($controller == 'index') && ($action == 'index')) {
            $resultsetSeoForCmsPages = $this->resultsetSeoForCmsPages;
        ?>
            <title><?php echo $resultsetSeoForCmsPages['Title']; ?></title>
            <meta name="description" content="<?php echo $resultsetSeoForCmsPages['Description']; ?>" />
            <meta name="keywords" content="<?php echo $resultsetSeoForCmsPages['Keyword']; ?>" />
        <?php } else {

        ?>
            <title>Book Online Holiday Tours | Honeymoon Packages | <?php echo $options['siteName']; ?> </title>
            <meta name="description" content="<?php echo $options['siteName']; ?>  is a leading travel company in Delhi, India. Get the best holiday tour packages to enjoying fantastic holiday destinations of your choice with Us." />
            <meta name="keywords" Content="Online Holiday Tour, Travel Agency in India, Travel Company in Delhi, Book Tour Packages, Adventure Tours from India, Trekking Tour Packages, India Tours, Honeymoon Packages, Holiday Packages, Cheap Tour Packages, Tours and Travel in Delhi, Delhi Tour Company, Travel Agency Delhi, Destination Management Company, DMC India, International Tours from India, International Tours, Holiday Packages from India." />
        <?php } ?>



        <meta name="author" content="<?php echo $siteName; ?> ">
        <meta name="robots" content="index, follow" />
        <meta name="language" content="English">
        <meta name="p:domain_verify" content="ad7f915dea4182cf9f24faa361ed56d5" />

        <link rel="alternate" href="<?php echo $options['websiteUrl'] . $_SERVER[REQUEST_URI]; ?>" hreflang="en-us" />
        <link rel="canonical" href="<?php echo $options['websiteUrl'] . $_SERVER[REQUEST_URI]; ?>" />

        <?php if (($modulename == 'default') && ($controller == 'index') && ($action == 'index')) {  ?>
            <meta name="image" content="<?php echo $options['websiteUrl'] . $_SERVER[REQUEST_URI]; ?>public/images/ftr-logo.png">
            <meta property="og:type" content="website" />
            <meta name="og_site_name" property="og:site_name" content="<?php echo $options['websiteUrl'] . $_SERVER[REQUEST_URI]; ?>" />
            <meta name="og_title" property="og:title" content="International Holiday and Honeymoon Tour Packages | <?php echo $options['siteName']; ?> ">
            <meta name="Description" property="og:description" content="<?php echo $siteName; ?> is a leading Tours and Travels Company in Delhi, India. Get the best Tour Packages to explore fantastic Holiday Destinations of your choice with Us.">
            <meta name="og_url" property="og:url" content="<?php echo $options['websiteUrl'] . $_SERVER[REQUEST_URI]; ?>" />

            <!-- Schema.org for Google -->

            <meta itemprop="name" content="<?php echo $siteName; ?>">
            <meta itemprop="description" content="<?php echo $siteName; ?> is a leading Tours and Travels Company in Delhi, India. Get the best Tour Packages to explore fantastic Holiday Destinations of your choice with Us.">
            <meta itemprop="image" content="<?php echo $options['websiteUrl'] . $_SERVER[REQUEST_URI]; ?>public/images/ftr-logo.png">

            <!-- Twitter -->
            <meta name="twitter:card" content="summary">
            <meta name="twitter:title" content="<?php echo $siteName; ?>">
            <meta name="twitter:description" content="<?php echo $siteName; ?> is a leading Tours and Travels Company in Delhi, India. Get the best Tour Packages to explore fantastic Holiday Destinations of your choice with Us.">

        <?php } ?>

        <base href="<?php echo Catabatic_Helper::getSiteUrl(); ?>" />
        <!-- Font Styles -->

        <!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css">-->
        <!--Stylesheets -->
        <!-- <link rel="stylesheet" href="<?php /*echo $baseUrl; */ ?>public/flight/css/bootstrap.min.css" />
        <link rel="stylesheet" href="<?php /*echo $baseUrl; */ ?>public/flight/css/jquery-ui.css" />-->
        <!-- Owl Stylesheets -->
        <!-- <link rel="stylesheet" href="<?php /*echo $baseUrl; */ ?>public/flight/owlcarousel/assets/owl.carousel.min.css">
        <link rel="stylesheet" href="<?php /*echo $baseUrl; */ ?>public/flight/owlcarousel/assets/owl.theme.default.min.css">
        <link rel="stylesheet" href="public/countrycode/style.css">-->
        <!-- style css -->
        <!--<link rel="stylesheet" href="<?php /*echo $baseUrl; */ ?>public/flight/css/style.css">
        <link rel="stylesheet" href="<?php /*echo $baseUrl; */ ?>public/flight/css/responsive.css">-->




        <link rel="stylesheet" href="<?php echo $baseUrl; ?>public/assets/css/bootstrap.min.css">
        <?php if (($modulename == 'default') && ($controller == 'flight') && ($action == 'travellers')) { ?>
            <!-- <link rel="stylesheet" href="<?php echo $baseUrl; ?>public/flight/css/style.css"> -->
        <?php } ?>


        <link rel="stylesheet" href="<?php echo $baseUrl; ?>public/assets/css/font-awesome.min.css">
        <link href="<?php echo $baseUrl; ?>public/flight/tipped/tipped.css" rel="stylesheet" />
        <?php if (($modulename == 'default') && ($controller == 'flight') && ($action == 'add-onn-service')) { ?>
            <link href="<?php echo $baseUrl; ?>public/flight/css/seatmap.css?v=<?= $cssversion ?>" rel="stylesheet" />
        <?php } ?>
        <link rel="stylesheet" href="<?php echo $baseUrl; ?>public/assets/css/style.css?v=<?= $cssversion ?>">
        <!-- Modernizr JS -->
        <!-- <script src="<?php /*echo $baseUrl; */ ?>public/js/modernizr-2.6.2.min.js"></script>-->



        <script>
            var SITEURL = '<?php echo $baseUrl ?>';
            var appmode = '<?php echo $options['appmode'] ?>';
            var dvc = '<?php echo ($mydevice == "mobile") ? "m" : "d" ?>';
            var HOTEL_CATEGORY = {
                "Budget": [1],
                "Standard": [2],
                "Deluxe": [3],
                "Luxury": [4],
                "Premium": [5]
            };
        </script>


        <?php
        echo $seoContent = (isset($detailLayout['seoHcontent']) && $detailLayout['seoHcontent'] != '') ? $detailLayout['seoHcontent'] : '';
        ?>
        <style>
            .ui-autocomplete {
                z-index: 99999999 !important;
            }

            .ui-front {
                z-index: 9999;
            }

            .countdownDiv {
                position: fixed;
                bottom: 0;
                left: 0;
                width: 100%;
                background-color: #004362;
                color: #fff;
                padding: 12px;
                text-align: center;
                line-height: 33px;
                z-index: 9999;
                font-size: 15px;
                font-weight: bold;
            }

            /*.custom-nav {*/
                /*position: relative !important;*/
                /*background: #3584bd !important;*/
            /*}*/
            html,
            body {
                overscroll-behavior-y: contain;
            }

            <?php if (($modulename == 'default') && ($controller == 'flight') && ($action != 'index')) { ?>@media (max-width:992px) {

                footer, .footeruppercls {
                    display: none;
                }

                .copyright {
                    display: none;
                }

            }

            <?php } ?>
        </style>
    </head>

    <body ng-app="Farohar">
        <!-- <div class="loader" >
        <div class="loadingio-spinner-ripple-zdgradklyya">
            <div class="ldio-50dj1g083ax">
                <div></div> 
            </div>
        </div>
    </div> -->




        <div id="page" ng-controller="FlightListingController">
            <?php
            $data   = [
                'baseUrl' => $baseUrl, 'AgencySysId' => $options['gtxagencysysid'], 'modulename' => $modulename,
                'CONST_PACKAGE_TRAVELER_MAX_ROOM' => CONST_PACKAGE_TRAVELER_MAX_ROOM,
                'CONST_PACKAGE_TRAVELER_MAX_ADULT_IN_ROOM' => CONST_PACKAGE_TRAVELER_MAX_ADULT_IN_ROOM,
                'CONST_PACKAGE_TRAVELER_MAX_CHILD_IN_ROOM' => CONST_PACKAGE_TRAVELER_MAX_CHILD_IN_ROOM,
                'CONST_PACKAGE_TRAVELER_MAX_INFANT_IN_ROOM' => CONST_PACKAGE_TRAVELER_MAX_INFANT_IN_ROOM,
                'POPUPCOOKIES' => $getMypopCookie,
                'tollfreenumber' => $tollfreenumber
            ];

            echo $this->render("header.phtml");
            echo $this->partial('models/modal-enquiry.phtml', ['baseUrl' => $baseUrl, 'siteName' => $siteName, 'tollfreenumber' => $tollfreenumber, 'POPUPCOOKIESENQUIRY' => $getMypopCookie]);
            echo $this->partial('models/modal-signin.phtml', ['baseUrl' => $baseUrl]);

            if (($modulename == 'tours') && ($controller == 'package') && ($action == 'index')) {
                echo $this->partial('models/modal-checkrate-enquiry.phtml', $data);
            }
            ?>

            <?php

            echo $this->layout()->content;
            echo $this->render("footer.phtml");
            ?>

        </div>


        <!-- <script src="<?php /*echo $baseUrl; */ ?>public/flight/js/jquery-1.12.4.min.js"></script>-->


        <!-- Bootstrap JS -->
        <!--<script src="<?php /*echo $baseUrl; */ ?>public/flight/js/bootstrap.min.js"></script>
        <script src="<?php /*echo $baseUrl; */ ?>public/flight/js/jquery-ui.js"></script>

        <script src="<?php /*echo $baseUrl; */ ?>public/flight/owlcarousel/owl.carousel.js"></script>-->

        <script src="<?php echo $baseUrl; ?>public/assets/js/jquery.min.js"></script>
        <script src="<?php echo $baseUrl; ?>public/flight/owlcarousel/owl.carousel.js"></script>
        <script src="<?php echo $baseUrl; ?>public/assets/js/custom.js?v=<?= $cssversion ?>"></script>
        <script src="<?php /*echo $baseUrl; */ ?>public/flight/tipped/tipped.js"></script>
        <script type="text/javascript" src="public/js/custom_mangal.js"></script>
        <script type="text/javascript" src="public/js/login.js"></script>
        <script type="text/javascript" src="<?php echo $baseUrl; ?>public/js/createinputfilter.js"></script>
        <script>
            $('.sorting').on('click', function(e) {
                if ($(this).hasClass("active")) {
                    $('.sortright-flight ul li a').removeClass('active active_sort');
                    $(this).addClass("active_sort");
                } else {
                    $('.sortright-flight ul li a').removeClass('active active_sort');
                    $(this).addClass("active");
                }
            });

            $('.sortinground').on('click', function(e) {
                if ($(this).hasClass("active")) {
                    $('.sortright-flight-round ul li a').removeClass('active active_sort');
                    $(this).addClass("active_sort");
                } else {
                    $('.sortright-flight-round ul li a').removeClass('active active_sort');
                    $(this).addClass("active");
                }
            });

            $('.sortingroundfirst').on('click', function(e) {
                if ($(this).hasClass("active")) {
                    $('.sortright-flight-round-first ul li a').removeClass('active active_sort');
                    $(this).addClass("active_sort");
                } else {
                    $('.sortright-flight-round-first ul li a').removeClass('active active_sort');
                    $(this).addClass("active");
                }
            });
        </script>

        <?php
        if (($modulename == 'default') && ($controller == 'flight') && ($action == 'flight-search')) {
            $scriptsAngular = $this->headScript(); // include the angular js here

            $scriptsAngular->appendFile($baseUrl . "public/js/ng/angular.min.js?v=<?= $cssversion ?>")
                ->appendFile($baseUrl . "public/js/ng/angular-route.min.js");
            if ($route == 2 && $interNationalSearch == '' && $mydevice == 'mobile') {
                $scriptsAngular->appendFile($baseUrl . "public/js/ng/ngInfiniteScroll.js");
            } else {
                $scriptsAngular->appendFile($baseUrl . "public/js/ng/ng-infinite-scroll.min.js");
                $scriptsAngular->appendFile($baseUrl . "public/js/ng/ng-infinite-scroll.js");
            }
            $scriptsAngular->appendFile($baseUrl . "public/js/ng/app.js")
                ->appendFile($baseUrl . "public/js/ng/ngfactory.js")
                ->appendFile($baseUrl . "public/js/ng/ngsortingorder.js")
                ->appendFile($baseUrl . "public/js/ng/flight_search_new.js?v=<?= $cssversion ?>");
            echo $scriptsAngular;
        }
        ?>
        <script>
            $(window).on('scroll', function() {
                // var height = $(window).height(); // New height
                // if ($(window).scrollTop() + $(window).height() >= $(document).height()) {
                //     $('.loadMoreNew').trigger('click');
                //     $('.loadMoreRound').trigger('click');
                // }
            });

            $('.flights_slider_mobile').on('scroll', function() {
                $('.loadMoreNew').trigger('click');
                $('.loadMoreRound').trigger('click');
                // if ($(window).scrollTop() + $(window).height() >= $(document).height() - 300) {
                //     $('.loadMoreNew').trigger('click');
                // }
                // let div = $(this).get(0);
                // var height = $(window).height(); // New height
                // if (div.scrollTop + div.clientHeight >= div.scrollHeight) {
                //     $('.loadMoreNew').trigger('click');
                //     $('.loadMoreRound').trigger('click');
                // }
            });

            <?php
            if (($modulename == 'default') && ($controller == 'flight') && ($action == 'review' || $action == 'add-onn-service' || $action == 'travellers')) {
            ?>
                $(document).ready(function() {
                    localStorage.clear();
                    var timer2 = localStorage.getItem('timer');
                    if (timer2 === null) timer2 = "14:00";
                    $('.countdown').html(timer2);

                    var interval = setInterval(function() {
                        var timer = timer2.split(':');
                        var minutes = parseInt(timer[0], 10);
                        var seconds = parseInt(timer[1], 10);
                        --seconds;
                        minutes = (seconds < 0) ? --minutes : minutes;
                        if (minutes < 0) {
                            clearInterval(interval);
                            localStorage.removeItem('timer');
                            alert('Your session has been expired. please try again.');
                            window.location.href = 'flight';
                            //$('button').show();
                        } else {
                            seconds = (seconds < 0) ? 59 : seconds;
                            seconds = (seconds < 10) ? '0' + seconds : seconds;
                            $('.countdown').html(minutes + ':' + seconds);
                            timer2 = minutes + ':' + seconds;
                            localStorage.setItem('timer', timer2);
                        }
                    }, 1000);
                });

            <?php
            }
            ?>
        </script>
        <script>
            jQuery(document).ready(function($) {
                $('.loop').owlCarousel({
                    center: true,
                    items: 2,
                    dots: false,
                    loop: true,
                    margin: 30,
                    responsive: {
                        320: {
                            center: false,
                            items: 2


                        },
                        600: {
                            center: true,
                            items: 2
                        },
                        1000: {
                            items: 4,
                            nav: true,
                            center: true,
                            loop: true,
                            navText: ["<i class='fa fa-angle-left' aria-hidden='true'></i>", "<i class='fa fa-angle-right' aria-hidden='true'></i>"]
                        }
                    }
                });
                $('.loop_flight').owlCarousel({
                    center: false,
                    items: 2,
                    dots: false,
                    loop: false,
                    margin: 30,
                    responsive: {
                        320: {
                            center: false,
                            items: 2


                        },
                        600: {
                            center: false,
                            items: 2
                        },
                        1000: {
                            items: 4,
                            nav: true,
                            center: false,
                            loop: false,
                            navText: ["<i class='fa fa-arrow-left' aria-hidden='true'></i>", "<i class='fa fa-arrow-right' aria-hidden='true'></i>"]
                        }
                    }
                });
                $('.loop2').owlCarousel({
                    center: false,
                    items: 2,
                    dots: false,
                    loop: false,
                    margin: 20,
                    responsive: {
                        320: {
                            center: false,
                            items: 1,
                            margin: 10


                        },
                        450: {
                            center: false,
                            items: 2
                        },

                        1000: {
                            items: 3,
                            nav: false,
                            center: false,
                            loop: false,
                            navText: ["<i class='fa fa-angle-left' aria-hidden='true'></i>", "<i class='fa fa-angle-right' aria-hidden='true'></i>"]
                        }
                    }
                });

                $('.popularloop').owlCarousel({
                    center: false,
                    items: 3,
                    dots: false,
                    loop: true,
                    margin: 10,
                    responsive: {
                        320: {
                            center: false,
                            items: 2


                        },
                        400: {
                            center: false,
                            items: 3


                        },

                        600: {
                            center: false,
                            loop: true,
                            nav: false,
                            items: 4
                        },
                        1000: {
                            items: 3,
                            nav: true,
                            center: false,
                            loop: true,
                            navText: ["<i class='fa fa-angle-left' aria-hidden='true'></i>", "<i class='fa fa-angle-right' aria-hidden='true'></i>"]
                        }
                    }
                });




                $('.nonloop').owlCarousel({
                    center: true,
                    items: 2,
                    loop: false,
                    margin: 10,
                    responsive: {
                        600: {
                            items: 4
                        }
                    }
                });
            });
        </script>
        <script>
            $(document).ready(function() {
                $('.travller_search').on("click", function() {
                    $(".roomBoxMain").slideToggle("slow");
                });
                $('#done_traveller').on("click", function() {
                    $(".roomBoxMain").slideUp("slow");
                });

                $('.flight_infotitle_dd').on("click", function() {

                    $(".flight_information_details_content").toggle("show_hiddenpart_hidden");
                });



                $('.ddSpinnerPlus').click(function() {
                    var totalpass = $('.TotalTravellers').html();
                    if (totalpass < 9) {
                        if ($(this).prev().val() < 9) {
                            $(this).prev().val(+$(this).prev().val() + 1);
                            $('.counter1').val(+$(this).prev().val());
                        }
                        SumTravellers();
                    } else {
                        alert('Total Passanger Can not be more than 9');
                    }
                });

                $('.ddSpinnerMinus').click(function() {
                    var infants = $('#infants').val();
                    var adult = $(this).next().val();
                    if (infants > 1) {
                        if (parseInt(infants) >= adult) {
                            $('#infants').val(infants - 1)
                        }
                    }

                    if ($('#adults').val() > 1) {
                        $(this).next().val(+$(this).next().val() - 1);
                        $('.counter1').val(+$(this).next().val());
                    }
                    SumTravellers();
                });

                $('.chSpinnerPlus').click(function() {
                    var totalpass = $('.TotalTravellers').html();
                    if (totalpass < 9) {
                        if ($(this).prev().val() < 9) {
                            $(this).prev().val(+$(this).prev().val() + 1);
                            $('.counter2').val(+$(this).prev().val());
                        }
                        SumTravellers();
                    } else {
                        alert('Total Passanger Can not be more than 9');
                    }
                });

                $('.chSpinnerMinus').click(function() {
                    if ($(this).next().val() > 0) {
                        if ($(this).next().val() > 0)
                            $(this).next().val(+$(this).next().val() - 1);
                        $('.counter2').val(+$(this).next().val());
                    }
                    SumTravellers();
                });

                $('.infSpinnerPlus').click(function() {
                    var totalpass = $('.TotalTravellers').html();
                    if (totalpass < 9) {
                        var adults = $('#adults').val();
                        if (parseInt(adults) <= parseInt($(this).prev().val())) {
                            return false;
                        }
                        if ($(this).prev().val() < 9) {
                            $(this).prev().val(+$(this).prev().val() + 1);
                            $('.counter3').val(+$(this).prev().val());
                        }
                        SumTravellers();
                    } else {
                        alert('Total Passanger Can not be more than 9');
                    }
                });
                $('.infSpinnerMinus').click(function() {
                    if ($(this).next().val() > 0) {
                        if ($(this).next().val() > 0)
                            $(this).next().val(+$(this).next().val() - 1);
                        $('.counter3').val(+$(this).next().val());
                    }
                    SumTravellers();
                });

                function SumTravellers() {
                    var a = 0;
                    $(".quantity").each(function() {
                        a += parseInt($(this).val());
                    });
                    $('.TotalTravellers').html(a);
                    return a;
                }

                function ValidateInfant() {
                    var a = 0;
                    $(".quantity").each(function() {
                        a += parseInt($(this).val());
                    });
                    $('.TotalTravellers').html(a);
                    return a;
                }

                $(".SelectClass") // select the radio by its id
                    .change(function() { // bind a function to the change event
                        if ($(this).is(":checked")) { // check if the radio is checked
                            var val = $(this).val(); // retrieve the value
                            var htmlval = $(this).attr('data'); // retrieve the html value
                            $('.TravellersClass').html(htmlval);
                        }
                    });


                $("#from, #to").datepicker({
                    //defaultDate: "+1w",
                    changeMonth: false,
                    dateFormat: "d M yy",
                    numberOfMonths: 2,
                    minDate: 0,
                    buttonImage: true,
                    buttonImageOnly: true,
                    beforeShow: function() {
                        if (this.id == 'to') {
                            var dateMin = $('#from').datepicker("getDate");
                            var TodateMin = $('#to').datepicker("getDate");
                            if (TodateMin === null) {
                                TodateMin = dateMin;
                            }
                            var rMin = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 0); // Min Date = Selected + 1d
                            var rMax = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 180); // Max Date = Selected + 62d
                            var c_out_date = new Date(TodateMin.getFullYear(), TodateMin.getMonth(), TodateMin.getDate()); // Min Date = Selected + 1d
                            $('#to').datepicker("option", "minDate", rMin);
                            $('#to').datepicker("option", "maxDate", rMax);
                            $('#to').datepicker("setDate", c_out_date);
                            $('#RoundTrip').prop('checked', true);
                        }
                    },
                    onSelect: function(selectedDate, inst) {
                        var tripType = $('.tripType:checked').val(); // retrieve the value
                        if (this.id == 'from') {
                            var dateMin = $('#from').datepicker("getDate");

                            var rMin = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 0); // Min Date = Selected + 1d
                            var rMax = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 180); // Max Date = Selected + 62d
                            var c_out_date = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 0); // Min Date = Selected + 1d
                            var theDate = new Date(Date.parse($(this).datepicker('getDate')));
                            var dateFormatted = $.datepicker.formatDate('DD', theDate);
                            var FromFormatted = $.datepicker.formatDate('dd/mm/yy', theDate);
                            $('.Departure').html(dateFormatted);
                            $('#departure_date').val(FromFormatted);
                            if (parseInt(tripType) === 2) {
                                $('#to').datepicker("option", "minDate", rMin);
                                $('#to').datepicker("option", "maxDate", rMax);

                                $('#to').datepicker("setDate", c_out_date);
                                $('.Return').html(dateFormatted);

                            }
                            //                            console.log(c_out_date);

                            ///$('#to').focus();return false;                 
                        } else {
                            var dateMin = $('#to').datepicker("getDate");
                            var c_out_date = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 0);
                            var theDate = new Date(Date.parse(c_out_date));
                            var dateFormatted = $.datepicker.formatDate('DD', theDate);
                            var ToFormatted = $.datepicker.formatDate('dd/mm/yy', theDate);
                            $('.Return').html(dateFormatted);
                            $('#return_date').val(ToFormatted);
                            //                            console.log(ToFormatted);
                        }


                    }
                });

                $("#Mobilefrom, #Mobileto").datepicker({
                    //defaultDate: "+1w",
                    changeMonth: false,
                    dateFormat: "d M yy",
                    numberOfMonths: 1,
                    minDate: 0,
                    buttonImage: true,
                    buttonImageOnly: true,
                    beforeShow: function() {
                        if (this.id == 'Mobileto') {
                            var dateMin = $('#Mobilefrom').datepicker("getDate");
                            var TodateMin = $('#Mobileto').datepicker("getDate");

                            var rMin = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 0); // Min Date = Selected + 1d
                            var rMax = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 180); // Max Date = Selected + 62d
                            var c_out_date = new Date(TodateMin.getFullYear(), TodateMin.getMonth(), TodateMin.getDate()); // Min Date = Selected + 1d
                            $('#Mobileto').datepicker("option", "minDate", rMin);
                            $('#Mobileto').datepicker("option", "maxDate", rMax);
                            $('#Mobileto').datepicker("setDate", c_out_date);
                        }
                    },
                    onSelect: function(selectedDate, inst) {
                        var tripType = $('.tripType:checked').val(); // retrieve the value
                        if (this.id == 'Mobilefrom') {
                            var dateMin = $('#Mobilefrom').datepicker("getDate");

                            var rMin = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 0); // Min Date = Selected + 1d
                            var rMax = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 180); // Max Date = Selected + 62d
                            var c_out_date = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 0); // Min Date = Selected + 1d
                            var theDate = new Date(Date.parse($(this).datepicker('getDate')));
                            var dateFormatted = $.datepicker.formatDate('DD', theDate);
                            var FromFormatted = $.datepicker.formatDate('dd/mm/yy', theDate);
                            $('.Departure').html(dateFormatted);
                            $('#departure_date').val(FromFormatted);
                            if (parseInt(tripType) === 2) {
                                $('#Mobileto').datepicker("option", "minDate", rMin);
                                $('#Mobileto').datepicker("option", "maxDate", rMax);

                                $('#Mobileto').datepicker("setDate", c_out_date);
                                $('.Return').html(dateFormatted);

                            }
                            //                            console.log(c_out_date);

                            ///$('#to').focus();return false;                 
                        } else {
                            var dateMin = $('#Mobileto').datepicker("getDate");
                            var c_out_date = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 0);
                            var theDate = new Date(Date.parse(c_out_date));
                            var dateFormatted = $.datepicker.formatDate('DD', theDate);
                            var ToFormatted = $.datepicker.formatDate('dd/mm/yy', theDate);
                            $('.Return').html(dateFormatted);
                            $('#return_date').val(ToFormatted);
                            //                            console.log(ToFormatted);
                        }


                    }
                });

                $(document).on('click', '.tripType', function() {

                    var tripType = $(this).val();
                    var from = $('#from').val();
                    if (tripType == 2) {

                        $('#to').val(from);
                        var dateMin = $('#from').datepicker("getDate");
                        var c_out_date = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 0);
                        var theDate = new Date(Date.parse(c_out_date));
                        var dateFormatted = $.datepicker.formatDate('DD', theDate);
                        var ToFormatted = $.datepicker.formatDate('dd/mm/yy', theDate);
                        $('.Return').html(dateFormatted);
                        $('#return_date').val(ToFormatted);
                        $("#to").removeAttr("readonly", "readonly");
                        $("#to").removeAttr("disabled", "disabled");
                        $("#to").removeClass("disabledcls", true);
                    } else {
                        $('#to').val('');
                        $('.Return').html('');
                        $('#return_date').val('');
                        $("#to").attr("readonly", "readonly");
                        $("#to").addClass("disabledcls");
                    }

                });


                $(document).on('click', '.tripTypeRound', function() {
                    $("#to").removeAttr("disabled", "disabled");
                    $("#RoundTrip").prop('checked', true);
                    $("#to").removeClass("disabledcls");
                    // debugger;
                    $("#to").datepicker("show");
                });


                $('.getsearch').on('click', function() {
                    var index = $(this).attr('index');
                    var searchurl = $('#searchurl_' + index).val();
                    if (searchurl == '') {
                        alert('Oops invalid search data');
                        return false;
                    } else {
                        window.location.href = 'flight/flightsearchdata?' + searchurl;
                    }

                });

                setTimeout(function() {


                    //  $('.select2').select2();

                    $.getJSON(SITEURL + 'flight/getsetcity', function(source) {

                        $(".airport_search").autocomplete({
                            minLength: 0,
                            autoFocus: true,
                            source: function(request, response) {
                                var term = $.ui.autocomplete.escapeRegex(request.term),
                                    startsWithMatcher = new RegExp("^" + term, "i"),
                                    startsWith = $.grep(source, function(value) {
                                        return startsWithMatcher.test(value.AirportCode || value.value || value);
                                    }),
                                    containsMatcher = new RegExp(term, "i"),
                                    contains = $.grep(source, function(value) {
                                        return $.inArray(value, startsWith) < 0 &&
                                            containsMatcher.test(value.label || value.value || value);
                                    });

                                response(startsWith.concat(contains).slice(0, 10));
                            },
                            response: function(e) {
                                //console.log(e);
                            },

                            select: function(event, ui) {
                                var index = $(this).attr('index');
                                var value = ui.item.value;

                                var dddd = value.split(',');
                                ui.item.value = dddd[0] + ' (' + ui.item.AirportCode + ')';
                                //alert(dddd[0]);
                                $('.apendn_' + index).val(dddd[0]);
                                $('.fromText_' + index).html(dddd[1]);
                                $('#mytrip_city_' + index).val(dddd[1]);
                                $('#FromToCIty_' + index).val(value);
                                $('#airport_search_' + index).val(ui.item.AirportCode);
                                $('#ContSysId_' + index).val(ui.item.ContSysId);

                            }
                        }).focus(function() {
                            $(this).val('');
                            $(this).autocomplete('search');
                        });

                    });
                }, 1000);



                $(".passengercity").autocomplete({
                    minLength: 2,
                    autoFocus: true,
                    source: SITEURL + 'cms/index/getgeocity',
                    select: function(event, ui) {
                        var code = ui.item.code;
                        var cityid = ui.item.id;
                        $("#passenger-city-1").val(cityid);
                        $("#passenger-country-1").val(ui.item.ContId);
                    }
                });
                // setTimeout(function() {
                //     //    alert(11)
                //     $.getJSON('public/data/dynamic/package_destinations.json?callback=gotWeather', function(destinations) {
                //         $(".passengercity").autocomplete({
                //             minLength: 2,
                //             autoFocus: true,
                //             source: destinations,
                //             format: "json",
                //             select: function(event, ui) {
                //                 var code = ui.item.code;
                //                 var cityid = ui.item.id;
                //                 $("#passenger-city-1").val(cityid);
                //                 $("#passenger-country-1").val(ui.item.ContId);
                //             }
                //         });

                //     });
                // }, 1000);
                $(document).on('click', '.multicity_form_boxshow2', function() {
                    var index = $(this).attr('index');
                    $(".show_multicity_wrapper" + index).toggle("show_hiddenpart_hidden");

                    $("i", this).toggleClass("fa-chevron-circle-up fa-chevron-circle-down");
                });
                $(document).on('click', '.multicity_form_boxshow3', function() {
                    var index = $(this).attr('index');
                    $(".show_multicity_wrapper3" + index).toggle("show_hiddenpart_hidden");

                    $("i", this).toggleClass("fa-chevron-circle-up fa-chevron-circle-down");
                });
            });

            $(document).on('click', '.edit_multicity_icond', function() {
                if ($('li.FareRules').hasClass('active')) {
                    $('.FareRulesDiv').click();
                }
            });
            $(document).on('click', '.FareRulesDiv', function() {
                var IsLCC = $(this).attr('IsLCC');
                var index = $(this).attr('index');
                var TraceId = $(this).attr('data');
                var ApiResultIndex = $(this).attr('ResultIndex');
                $.ajax({
                    type: "POST",
                    url: "<?php echo $baseUrl; ?>flight/getflightfarerules",
                    dataType: 'html',
                    data: {
                        TraceId: TraceId,
                        ApiResultIndex: ApiResultIndex,
                        IsLCC: IsLCC
                    },
                    beforeSend: function() {
                        $("#FareRulesDiv_" + index).html('<div style="text-align:center;padding-top:30px;"><img src="<?php echo $baseUrl; ?>public/images/loader.gif"/></div>');
                    },
                    success: function(data) {
                        //                                    console.log(data);
                        $("#FareRulesDiv_" + index).html(data);
                    }
                });
            });

            $('.exchange_transfer,.exchange_transfer_searchflight').on('click', function() {
                var mytrip_city_from = $('#mytrip_city_from').val();
                var mytrip_city_to = $('#mytrip_city_to').val();
                $('#mytrip_city_from').val(mytrip_city_to);
                $('#mytrip_city_to').val(mytrip_city_from);

                var fromText_1 = $('.fromText_1').text();
                var fromText_2 = $('.fromText_2').text();
                $('.fromText_1').html(fromText_2);
                $('.fromText_2').html(fromText_1);

                var airport_search_1 = $('#airport_search_1').val();
                var airport_search_2 = $('#airport_search_2').val();
                $('#airport_search_1').val(airport_search_2);
                $('#airport_search_2').val(airport_search_1);

                var ContSysId_1 = $('#ContSysId_1').val();
                var ContSysId_2 = $('#ContSysId_2').val();
                $('#ContSysId_1').val(ContSysId_2);
                $('#ContSysId_2').val(ContSysId_1);

                var FromToCIty_1 = $('#FromToCIty_1').val();
                var FromToCIty_2 = $('#FromToCIty_2').val();
                $('#FromToCIty_1').val(FromToCIty_2);
                $('#FromToCIty_2').val(FromToCIty_1);

                var mytrip_city_1 = $('#mytrip_city_1').val();
                var mytrip_city_2 = $('#mytrip_city_2').val();
                $('#mytrip_city_1').val(mytrip_city_2);
                $('#mytrip_city_2').val(mytrip_city_1);
            });
            $('.flightsearch').on('submit', function(event) {
                var source = $('input[name="source"]').val();
                var mytrip_city_from = $('input[name="mytrip_city_from"]').val();
                var mytrip_city_to = $('input[name="mytrip_city_to"]').val();
                var destination = $('input[name="destination"]').val();
                var source_city = $('input[name="source_city"]').val();
                var destination_city = $('input[name="destination_city"]').val();



                if (source === '') {
                    alert('Please enter from city name');
                    $('input[name="source"]').focus();
                    return false;
                } else if (destination === '') {
                    alert('Please enter to city name');
                    $('input[name="destination"]').focus();
                    return false;
                } else if (source_city === '') {
                    alert('Please enter valif from city name');
                    $('input[name="source"]').focus();
                    return false;
                } else if (destination_city === '') {
                    alert('Please enter valif to city name');
                    $('input[name="destination"]').focus();
                    return false;
                } else if (mytrip_city_from == mytrip_city_to) {
                    alert('Source and destination can not be same');
                    return false;
                }
            });
            $('.flight_infotitle_dd').on("click", function() {

                $(".flight_information_details_content").toggle("show_hiddenpart_hidden");
            });

            $('.fair_information').on("click", function() {

                //              $(".fair_information_details").toggle("fair_information_show");
                $(".fair_information_details").slideToggle("slow");
                //$(".fair_details").slideToggle("slow");
            });

            $('.RefreshTraveller').on("click", function() {
                $('.RefreshTraveller').addClass("fa-spin");
                getSearchCutomer();
            });

            <?php if (isset($session->session) && !empty($session->session) && $action == 'travellers') { ?>
                getSearchCutomer();
            <?php } ?>

            function getSearchCutomer() {
                $('#CustomerSysId-1').val('0');
                var leadMobile = $('#leadMobile').val();
                var leadEmail = $('#leadEmail').val();
                if (leadMobile === '') {
                    alert('Please enter mobile number');
                    $("#leadMobile").focus();
                    $("#leadEmail").val('');
                    return false;
                }
                $.ajax({
                    url: '<?php echo $baseUrl; ?>flight/searchcutomer',
                    data: {
                        leadEmail: leadEmail,
                        leadMobile: leadMobile
                    },
                    dataType: 'json',
                    type: 'POST',
                    error: function() {},
                    success: function(response) {
                        if (response.success) {
                            var leadPax = (response.leadPax);
                            $("#passenger-address-1").val(leadPax.Address);
                            $("#passenger-city-1").val(leadPax.CitySysId);
                            $("#passenger-country-1").val(leadPax.CountrySysId);
                            $("#passenger-city-name-1").val(leadPax.CityTitle);
                            // $("#companyname").val(leadPax.companyname);
                            // $("#gstnnumber").val(leadPax.gstnnumber);
                            // $("#gstaddress").val(leadPax.gstaddress);
                            // $("#gstcity").val(leadPax.gstcity);
                            // $("#gststate").val(leadPax.gststate);
                            // $("#gstpincode").val(leadPax.gstpincode);
                            if (JSON.stringify(response.data).length > 0) {
                                $('#savedtraveller').show();
                                var values = 0;
                                $("#relation-1 option[value='" + values + "']").css("display", "none");
                                $('#relation-1').val(1);
                            } else {
                                $('#savedtraveller').hide();
                            }
                            var data = (response.data);
                            SetData('customerMember', JSON.stringify(data));
                            var ind = 0;
                            var Listul = $('<div></div>');
                            $.each(data, function(index, obj) {

                                if (ind == 0) {
                                    var CustomerSysId = obj.CustomerSysId;
                                } else {
                                    var CustomerSysId = obj.CustomerMemberSysId;
                                }
                                //<span class="checkmark"></span>
                                Listul.append('<div class="gst_add_align2"><label class="checkboxcontainerreviewaddons_savedlist" style="width:100%;"><input id="custMember_' + CustomerSysId + '" name="cusmemberSelected[]" onclick="Selectmember(this,' + obj.paxType + ')" type="checkbox" value="_' + CustomerSysId + '"/> ' + obj.SalutationTxt + ' ' + obj.FirstName + ' ' + obj.LastName + ' <br><span class="adult_listtitle">' + obj.RelationTxt + ' | ' + obj.paxTypeName + '</span></label></div>');
                                ind++;
                            });
                            var ListulMob = $('<div></div>');
                            $.each(data, function(index, obj) {
                                ListulMob.append(`<div class="customgst_savedlist gst_add_align2_mobile"><label class="checkboxcontainerreviewaddons_savedlist" for="custMember_` + obj.CustomerMemberSysId + `"><input type="checkbox" id="custMember_` + obj.CustomerMemberSysId + `" name="cusmemberSelected[]" onclick="Selectmember(this,` + obj.paxType + `)" value="` + obj.CustomerMemberSysId + `">` + obj.SalutationTxt + ` ` + obj.FirstName + ` ` + obj.LastName + `<br> <span class="adult_listtitle">` + obj.RelationTxt + ` | ` + obj.paxTypeName + `</span> </label></div>`);
                            });
                            var lenght = Object.keys(data).length;
                            if (lenght > 0) {
                                $(".saved_btn").show();
                            }

                            $('#dynamic_div').html(Listul);
                            $('.RefreshTraveller').show();
                            $('#dynamic_div__k').html(ListulMob);
                            setTimeout(function() {
                                $('.RefreshTraveller').removeClass("fa-spin");
                            }, 2000);

                        } else {
                            var values = 0;
                            $("#relation-1 option[value='" + values + "']").css("display", "block");
                            $('#relation-1').val(0);
                            $('#savedtraveller').hide();

                        }
                    }
                });
                return false;
            }

            function Selectmember(data, paxType) {
                var checkedornot = $("#custMember" + data.value).prop('checked');
                var customerMember = JSON.parse(GetData('customerMember'));
                var obj = customerMember[data.value];
                var totalpass = $('.adultdetails').length;
                var selectedpass = $("input[name='cusmemberSelected[]']:checked");
                //alert(totalpass);
                //alert(selectedpass);
                if (totalpass >= selectedpass.length) {
                    var b = 1;
                    //$("#custMember" + data.value).attr('disabled', 'disabled');
                    $(".familyNumber").each(function() {
                        var CustomerSysId = $.trim($("#CustomerSysId-" + b).val());
                        var firstname = $.trim($("#passenger-firstname-" + b).val());

                        if (CustomerSysId == 0 && firstname == '') {
                            if (obj.paxType == 1) {
                                var paxTypes = 'Adult';
                            } else if (obj.paxType == 2) {
                                var paxTypes = 'Child';
                            } else {
                                var paxTypes = 'Infant';
                            }
                            var DOB = obj.dobday + '/' + obj.dobmonth + '/' + obj.dobyear;
                            $("#CustomerSysId-" + b).val(obj.CustomerMemberSysId);
                            $("#CRADULT-" + b).attr('value', obj.CustomerMemberSysId);
                            $("#CRADULT-" + b).show();


                            $("#passenger-firstname-" + b).val(obj.FirstName);
                            $("#passenger-lastname-" + b).val(obj.LastName);

                            $("#travellerdetails" + b).val(obj.SalutationTxt + ' ' + obj.FirstName + ' ' + obj.LastName);
                            $("#dateofbirth-" + b).val(DOB);
                            $("#travel_details" + b).html(obj.RelationTxt + ' | ' + paxTypes);
                            $.each($("input[name='salution-" + b + "']"), function() {
                                // if (obj.Salutation == $(this).val()) {
                                //     $(".checksalution-" + b + "-" + paxType + "-" + obj.Salutation).trigger('click').prop('checked', true);
                                // }
                            });

                            $("#salution-" + b).val(obj.Salutation);
                            $("#relation-" + b).val(obj.Relation);
                            $("#PassportNationality-" + b).val(obj.PassportNation);
                            $("#passportno-" + b).val(obj.PassportNo);
                            $("#passportnoexpiry-" + b).val(obj.PassportExpiry);
                            $("#passporIssue-" + b).val(obj.passporIssue);
                            //console.log(obj);
                            return false;
                        } else {

                        }
                        b++;
                    });
                } else {
                    alert('Please select up to ' + totalpass + ' of traveller(s) or add new in the traveller details');
                    $("#custMember" + data.value).prop('checked', false);
                    return false;
                }

            }

            $(document).on('click', '.saved_btn', function() {
                var index = $(this).attr('index');
                var paxType = $(this).attr('paxTypes');
                var FirstName = $(".passenger-firstname-" + index + '-' + paxType).val();
                var LastName = $(".passenger-lastname-" + index + '-' + paxType).val();
                var DOB = $(".dateofbirth-" + index + '-' + paxType).val();
                var Salutation = $("input[name='salution-" + index + "']:checked").attr('data');
                var Relation = $(".relation-" + index + '-' + paxType).children("option:selected").text();

                if (paxType == 1) {
                    var paxTypes = 'Adult';
                } else if (paxType == 2) {
                    var paxTypes = 'Child';
                } else {
                    var paxTypes = 'Infant';
                }

                $("#travellerdetails" + index).val(Salutation + ' ' + FirstName + ' ' + LastName);
                $("#travel_details" + index).html(Relation + ' | ' + paxTypes);
                $('#ADULT' + index).modal('hide');
                $('#CHILD' + index).modal('hide');
                $('#INFANT' + index).modal('hide');
            });

            $('#isgstapply').on("click", function() {
                var isgstapply = $("input[name='isgstapply']:checked").length;
                if (isgstapply) {
                    $('.isgstapply').attr('disabled', false);
                    $('.gstdiv').show();
                } else {
                    $('.isgstapply').attr('disabled', true);
                    $('.gstdiv').hide();
                }
            });



            $(".paynowbtn22").click(function() {
                var accepttandc = $("input[name='accepttandc']:checked").length;
                if (accepttandc) {
                    return true;
                } else {
                    alert('Please accept term and condition');
                    return false;
                }
            });

            $(".checkboxcontainerreviewaddons").click(function() {
                var accepttandc = $("input[name='accepttandc']:checked").length;
                var TraceId = $('#TraceId').val();
                if (accepttandc) {
                    //$('.paynowbtn22').attr('href', 'flight/book-flight/' + TraceId + '');
                    $('.paynowbtn22').attr('href', 'flight/pay-now/' + TraceId + '');
                    $(".continue_btnddonsreview").addClass('continue_btnddonsreview_fillbg');
                } else {

                    $('.paynowbtn22').attr('href', 'javascript://');
                    $(".continue_btnddonsreview").removeClass('continue_btnddonsreview_fillbg');
                }

            });

            function savePassengerDetails() {

                var data = $("#passenger-details").serialize();
                var mobile_number = $("#leadMobile").val();
                var TraceId = $("#TraceId").val();
                var countryCode = $("#countryCode").val();
                var countryCodeISO = $('#countryCode').find('option:selected').attr('data-countrycode');
                var email_id = $("#leadEmail").val();
                var companyname = $("#companyname").val();
                var gstnnumber = $("#gstnnumber").val();
                var gstaddress = $("#gstaddress").val();
                var gstcity = $("#gstcity").val();
                var gststate = $("#gststate").val();
                var gstpincode = $("#gstpincode").val();
                var accepttandc = $("input[name='accepttandc']:checked").length;
                console.log(data);
                //return false;
                //alert(accepttandc);
                $.ajax({
                    url: '<?php echo $baseUrl; ?>flight/save-passenger-details',
                    data: data + '&leadMobile=' + mobile_number + '&leadEmail=' + email_id + '&countryCode=' + countryCode + '&gstnnumber=' + gstnnumber + '&companyname=' + companyname + '&accepttandc=' + accepttandc + '&gstaddress=' + gstaddress + '&gstcity=' + gstcity + '&gststate=' + gststate + '&gstpincode=' + gstpincode + '&traceId=' + TraceId + '&countryCodeISO=' + countryCodeISO,
                    dataType: 'json',
                    type: 'POST',
                    error: function() {},
                    beforeSend: function() {
                        $("#proceed").html("Please Wait ...");
                        //$("#proceed").prop('disabled', true);
                        $("#proceedMobile").html("Please Wait ...");
                        //$("#proceedMobile").prop('disabled', true);
                    },
                    success: function(response) {
                        if (response.success) {
                            LoadAddOns();
                            $("#proceed").html("Continue");
                            $('#accordion').accordion('option', 'active', 2);
                            $('.continue_btn_22').show();
                            return false;
                            var apiTraceId = response.apiTraceId;
                            location.href = 'flight/add-onn-service/' + apiTraceId;
                        } else {
                            alert(response.msg);
                            var elementId = response.index;
                            $("#" + elementId).focus();
                            $("#proceed").html("Continue");
                            $("#proceed").prop('disabled', false);
                            $("#proceedMobile").html("Continue");
                            $("#proceedMobile").prop('disabled', false);
                        }
                    }
                });

            }

            function opengst() {
                $('#isgstapply').prop('checked', true);
                $('.gstdiv').show();
                $('.isgstapply').attr('disabled', false);
            }

            function saveMoredetails() {

                var data = $("#passenger-details").serialize();
                var mobile_number = $("#leadMobile").val();
                var TraceId = $("#TraceId").val();
                var countryCode = $("#countryCode").val();
                var countryCodeISO = $('#countryCode').find('option:selected').attr('data-countrycode');
                var email_id = $("#leadEmail").val();
                var companyname = $("#companyname").val();
                var gstnnumber = $("#gstnnumber").val();
                var gstaddress = $("#gstaddress").val();
                var gstemail = $("#gstemail").val();
                var gststate = $("#gststate").val();
                var gstphone = $("#gstphone").val();
                var accepttandc = $("input[name='accepttandc']:checked").length;
                //                    alert(accepttandc);
                $.ajax({
                    url: '<?php echo $baseUrl; ?>flight/save-gst-details',
                    data: data + '&leadMobile=' + mobile_number + '&leadEmail=' + email_id + '&countryCode=' + countryCode + '&gstnnumber=' + gstnnumber + '&companyname=' + companyname + '&accepttandc=' + accepttandc + '&gstaddress=' + gstaddress + '&gstemail=' + gstemail + '&gststate=' + gststate + '&gstphone=' + gstphone + '&traceId=' + TraceId + '&countryCodeISO=' + countryCodeISO,
                    dataType: 'json',
                    type: 'POST',
                    error: function() {},
                    beforeSend: function() {
                        $("#proceed").html("Please Wait ...");
                        // $("#proceed").prop('disabled', true);
                        $("#proceedMobile").html("Please Wait ...");
                        // $("#proceedMobile").prop('disabled', true);
                    },
                    success: function(response) {
                        if (response.success) {

                            var apiTraceId = response.apiTraceId;
                            location.href = 'flight/add-onn-service/' + apiTraceId;
                        } else {
                            alert(response.msg);
                            var elementId = response.index;
                            $("#" + elementId).focus();
                            $("#proceed").html("Continue");
                            $("#proceed").prop('disabled', false);
                            $("#proceedMobile").html("Continue");
                            $("#proceedMobile").prop('disabled', false);
                        }
                    }
                });

            }




            $(".passportnoexpiry").datepicker({
                dateFormat: "dd/mm/yy",
                numberOfMonths: 1,
                changeMonth: true,
                changeYear: true,
            });
            $(function() {
                $(".dateofbirth,.dateofbirth2,.dateofbirth3,.passportnoexpiry,.passporIssue").datepicker({
                    Readonly: true
                }).attr('readonly', 'readonly');
            });
            var passporIssue = $(".passporIssue").datepicker({
                dateFormat: "dd/mm/yy",
                numberOfMonths: 2,
                changeMonth: true,
                changeYear: true,
                beforeShow: function() {
                    var ct = new Date(); //alert(ct)
                    var day = ct.getDate() + 1; // month (in integer 0-11)
                    var month = ct.getMonth() + 1; // month (in integer 0-11)
                    var year = ct.getFullYear(); // year
                    var minYear = year;
                    passporIssue.datepicker("option", "yearRange", '2000:' + minYear);
                    passporIssue.datepicker("option", "maxDate", minYear + '/' + month + '/' + day);
                }
            });
            var dateofbirth = $(".dateofbirth").datepicker({
                dateFormat: "dd/mm/yy",
                numberOfMonths: 1,
                changeMonth: true,
                changeYear: true,
                beforeShow: function() {
                    var ct = new Date(); //alert(ct)
                    var day = ct.getDate() + 1; // month (in integer 0-11)
                    var month = ct.getMonth() + 1; // month (in integer 0-11)
                    var year = ct.getFullYear(); // year
                    var minYear = year - 13;
                    dateofbirth.datepicker("option", "yearRange", '1945:' + minYear);
                    dateofbirth.datepicker("option", "maxDate", minYear + '/' + month + '/' + day);
                },
                onSelect: function(selectedDate, inst) {
                    var ct = new Date();
                    var year = ct.getFullYear();
                    var theDate = new Date(Date.parse($(this).datepicker('getDate')));
                    if (year == theDate.getFullYear()) {
                        var c_out_date = new Date(theDate.getFullYear() - 75, theDate.getMonth(), theDate.getDate());
                    } else {
                        var c_out_date = new Date(theDate.getFullYear(), theDate.getMonth(), theDate.getDate());
                    }
                    var dateFormatted = $.datepicker.formatDate('dd/mm/yy', c_out_date);
                    $("#dateofbirth-1").val(dateFormatted);
                }
            });
            var dateofbirth2 = $(".dateofbirth2").datepicker({
                dateFormat: "dd/mm/yy",
                numberOfMonths: 1,
                changeMonth: true,
                changeYear: true,
                beforeShow: function() {
                    var ct = new Date(); //alert(ct)
                    var day = ct.getDate() + 5; // month (in integer 0-11)
                    var month = ct.getMonth() + 1; // month (in integer 0-11)
                    var year = ct.getFullYear(); // year

                    var minYear2 = year - 12;

                    var rMin = new Date(ct.getFullYear() - 12, ct.getMonth() + 1, ct.getDate() + 5);
                    var rMax = new Date((ct.getFullYear() - 12) + 10, ct.getMonth(), ct.getDate() + 5);

                    dateofbirth2.datepicker("option", "yearRange", minYear2 + ':' + (minYear2 + 10));
                    dateofbirth2.datepicker("option", "minDate", rMin);
                    dateofbirth2.datepicker("option", "maxDate", rMax);
                }
            });
            var dateofbirth3 = $(".dateofbirth3").datepicker({
                dateFormat: "dd/mm/yy",
                numberOfMonths: 1,
                changeMonth: true,
                changeYear: true,
                beforeShow: function() {
                    var ct = new Date(); //alert(ct)
                    var day = ct.getDate() + 5; // month (in integer 0-11)
                    var month = ct.getMonth() + 1; // month (in integer 0-11)
                    var year = ct.getFullYear(); // year

                    var minYear2 = year - 2;

                    var rMin = new Date(ct.getFullYear() - 12, ct.getMonth() + 1, ct.getDate() + 5);
                    var rMax = new Date((ct.getFullYear() - 2) + 2, ct.getMonth(), ct.getDate());

                    dateofbirth3.datepicker("option", "yearRange", minYear2 + ':' + (minYear2 + 2));
                    dateofbirth3.datepicker("option", "minDate", rMin);
                    dateofbirth3.datepicker("option", "maxDate", rMax);
                }
            });
            $('.travellerconatct_detailsbox').on("click", function() {
                $(".travellerconatct_detailsbox").hide();
                $(".traveller_information_boxshow").slideToggle("slow");
            });
            $('.arrowbox_wrppercontact').on("click", function() {
                $(".traveller_information_boxshow").hide();
                $(".travellerconatct_detailsbox").slideToggle("slow");
            });
            <?php
            if (($modulename == 'default') && ($controller == 'flight') && ($action == 'payment' || $action == 'add-onn-service')) {
            ?>
                LoadAddOns();
            <?php } ?>

            function LoadAddOns() {
                var ApiResultIndex = $('#ApiResultIndex').val();
                var ApiResultIndexInb = $('#ApiResultIndexInb').val();
                var TraceId = $('#TraceId').val();
                $.ajax({
                    type: "POST",
                    url: "<?php echo $baseUrl; ?>flight/load-add-ons",
                    dataType: 'json',
                    data: {
                        TraceId: TraceId,
                        ApiResultIndex: ApiResultIndex,
                        ApiResultIndexInb: ApiResultIndexInb,

                    },
                    beforeSend: function() {
                        $("#loadaddonservice").html('<div style="text-align:center;padding-top:30px;"><img src="<?php echo $baseUrl; ?>public/images/loader.gif"/></div>');
                    },
                    success: function(data) {
                        if (data.success) {
                            $("#loadaddonservice").html(data.html);

                        } else {
                            alert(data.message);
                        }
                    }
                });
            }


            <?php
            if (($modulename == 'default') && ($controller == 'flight') && ($action == 'travellers' || $action == 'add-onn-service___ddd')) {
            ?>

                FlightFareQuote();
                //LoadAddOns();
                function FlightFareQuote() {
                    var ApiResultIndex = $('#ApiResultIndex').val();
                    var ApiResultIndexInb = $('#ApiResultIndexInb').val();
                    var TraceId = $('#TraceId').val();
                    $.ajax({
                        type: "POST",
                        url: "<?php echo $baseUrl; ?>flight/getflightfarequote",
                        dataType: 'json',
                        data: {
                            TraceId: TraceId,
                            ApiResultIndex: ApiResultIndex,
                            ApiResultIndexInb: ApiResultIndexInb,
                            page: '<?= $action ?>'
                        },
                        beforeSend: function() {
                            $('.continue_btn').hide();
                            $('.continue_btn1').hide();
                            $('.paynow_btn').hide();
                            $('.continue_btn_22').hide();
                            $("#intPublishedFare").html('<img src="<?php echo $baseUrl; ?>public/images/loader-sm.gif"/>');
                            $("#FareChangeData").html('<div style="text-align:center;padding-top:30px;"><img src="<?php echo $baseUrl; ?>public/images/loader.gif"/></div>');
                        },
                        success: function(data) {
                            if (data.success) {
                                LoadAddOns();
                                getseatpage();
                                $('.continue_btn1').show();
                                //alert(data.apiResponse[0].isDobAdult);
                                if (data.FareChange) {
                                    $("#FareChange").modal('show');
                                    $("#intPublishedFarePOP").html(data.intPublishedFare);
                                }
                                if (data.apiResponse[0].isDobAdult == true) {
                                    $('.adultdob').show();
                                } else {
                                    $('.adultdob').hide();
                                }

                                if (data.apiResponse[0].isDobChild == true) {
                                    $('.childdob').show();
                                } else {
                                    $('.childdob').hide();
                                }

                                if (data.apiResponse[0].isDobInfant == true) {
                                    $('.infantdob').show();
                                } else {
                                    $('.infantdob').hide();
                                }

                                $("#FareChangeData").html(data.html);
                                $("#intPublishedFare").html($('.price_fair_total').text());
                                var Baggagedata = (data.SSRArr.Baggage);
                                var Mealdata = (data.SSRArr.Meal);
                                if (data.SSRArrInb) {
                                    var BaggagedataInb = (data.SSRArrInb.Baggage);
                                    var MealdataInb = (data.SSRArrInb.Meal);
                                    SetData('MealdataInb', JSON.stringify(MealdataInb));
                                    SetData('BaggagedataInb', JSON.stringify(BaggagedataInb));
                                }


                                SetData('Mealdata', JSON.stringify(Mealdata));
                                SetData('Baggagedata', JSON.stringify(Baggagedata));

                                $('.continue_btn').show();
                                $('.paynow_btn').show();
                                // $('.continue_btn_22').show();
                            } else {
                                alert(data.message);
                                window.location.href = 'flight';
                            }
                        }
                    });
                }



                function ContinueAccept() {
                    $.ajax({
                        type: "POST",
                        url: "<?php echo $baseUrl; ?>flight/continue-accept",
                        dataType: 'json',
                        //                    data: {TraceId:TraceId,ApiResultIndex:ApiResultIndex},
                        beforeSend: function() {
                            $(".ContinueAccept").html('Please wait...');
                            $(".ContinueAccept").prop('disabled', true);
                        },
                        success: function(data) {
                            if (data.success) {
                                $(".ContinueAccept").html('Continue Booking');
                                $(".ContinueAccept").prop('disabled', false);
                                $("#FareChangeData").html(data.html);
                                $("#FareChange").modal('hide');
                            } else {
                                alert(data.message);
                            }
                        }
                    });

                    //                $("#fair_content").hide();
                    //                $("#FareChangeData").show();
                }
                getseatpage();

                function getseatpage() {

                    $.ajax({
                        type: "POST",
                        url: "<?php echo $baseUrl; ?>flight/getseatpage",
                        dataType: 'json',
                        beforeSend: function() {},
                        success: function(data) {
                            $("#getseatpage").html(data.html);
                        }
                    });
                }

                $(document).on('click', '.seatmapModal', function() {
                    var segmentid = $(this).attr('value');
                    $.ajax({
                        type: "POST",
                        url: "<?php echo $baseUrl; ?>flight/seatmap",
                        dataType: 'html',
                        data: {
                            segmentid: segmentid,
                        },
                        beforeSend: function() {
                            $("#loadsaetwarpper").html('<div style="text-align:center;padding-top:30px;"><img src="<?php echo $baseUrl; ?>public/images/loader.gif"/></div>');
                        },
                        success: function(data) {
                            $('.saetwarpper').html(data);
                        }
                    });
                });

                function isEmpty(seatArray) {
                    var NewArray = new Array();
                    $.each(seatArray, function(index, obj) {
                        var value = seatArray[index];
                        if (typeof value == 'string' && !value.trim() || typeof value == 'undefined' || value === null || value == 'NA') {

                        } else {
                            NewArray.push(value);
                        }
                    });
                    return NewArray;
                }
                $(document).on('click', '.continue_seatbtn', function() {
                    var segmentid = $(this).attr('segmentid');
                    var totalPax = $('#totalPax').val();
                    var seatArray = new Array();
                    var CustomerSysIdArray = new Array();
                    var paxTypeArr = new Array();
                    $('.CustomerSysId').each(function(e) {
                        var SeatNo = $(this).text();
                        var CustomerSysId = $(this).attr('CustomerSysId');
                        seatArray.push($(this).text());
                        CustomerSysIdArray.push($(this).attr('CustomerSysId'));
                        paxTypeArr.push($(this).attr('paxType'));
                    });
                    //    var seatval =  $(this).attr('value');
                    //    alert(seatval);
                    if (parseInt(totalPax) !== isEmpty(seatArray).length) {
                        alert('Please select ' + totalPax + ' seat(s)');
                        return false;
                    } else {
                        $('#seat' + segmentid).html('Change Seat');
                    }

                    $.ajax({
                        type: "POST",
                        url: "<?php echo $baseUrl; ?>flight/continuewithseatmap",
                        dataType: 'json',
                        data: {
                            CustomerSysIdArray: CustomerSysIdArray,
                            seatArray: seatArray,
                            segmentid: segmentid,
                            paxTypeArr: paxTypeArr,
                        },
                        beforeSend: function() {
                            $("#continue_seatbtn").html('Please wait..');
                        },
                        success: function(data) {
                            $("#FareChangeData").html(data.html);
                            $("#SelectedSegment" + segmentid).html(data.SelectedSegment);
                            $("#SelecButton" + segmentid).html('Change Seat');
                            $("#intPublishedFare").html(data.MobilePublishedFare);
                            $("#MobilePublishedFare").html(data.MobilePublishedFare);
                            $('#seatmapModal').modal('hide');
                        }
                    });
                });


            <?php } ?>

            <?php
            if (($modulename == 'default') && ($controller == 'flight') && ($action == 'add-onn-service')) {
            ?>
                $(".disableddiv :input").attr("disabled", true);
            <?php } ?>

            function UpdateFare(data, actiontype, CustomerSysId, tripType) {
                var ApiResultIndex = $('#ApiResultIndex').val();
                var ApiResultIndexInb = $('#ApiResultIndexInb').val();
                var TraceId = $('#TraceId').val();
                $.ajax({
                    type: "POST",
                    url: "<?php echo $baseUrl; ?>flight/updatefare",
                    dataType: 'json',
                    data: {
                        TraceId: TraceId,
                        ApiResultIndex: ApiResultIndex,
                        ApiResultIndexInb: ApiResultIndexInb,
                        CustomerSysId: CustomerSysId,
                        data: data,
                        actiontype: actiontype,
                        tripType: tripType
                    },
                    beforeSend: function() {
                        $('.continue_btn').hide();
                        $('.paynow_btn').hide();
                        $("#FareChangeData").html('<div style="text-align:center;padding-top:30px;"><img src="<?php echo $baseUrl; ?>public/images/loader.gif"/></div>');
                    },
                    success: function(data) {
                        if (data.success) {
                            $('.continue_btn').show();
                            $('.paynow_btn').show();
                            $("#FareChangeData").html(data.html);
                            $("#intPublishedFare").html(data.MobilePublishedFare);
                            $("#MobilePublishedFare").html(data.MobilePublishedFare);
                        } else {
                            alert(data.message);
                        }
                    }
                });
            }

            function UpdateFareNew(actiontype, index, CustomerSysId, segmentid) {
                var ApiResultIndex = $('#ApiResultIndex').val();
                var ApiResultIndexInb = $('#ApiResultIndexInb').val();
                var TraceId = $('#TraceId').val();
                $.ajax({
                    type: "POST",
                    url: "<?php echo $baseUrl; ?>flight/updatefare",
                    dataType: 'json',
                    data: {
                        TraceId: TraceId,
                        ApiResultIndex: ApiResultIndex,
                        ApiResultIndexInb: ApiResultIndexInb,
                        CustomerSysId: CustomerSysId,
                        actiontype: actiontype,
                        index: index,
                        segmentid: segmentid
                    },
                    beforeSend: function() {
                        $('.continue_btn').hide();
                        $('.paynow_btn').hide();
                        $("#FareChangeData").html('<div style="text-align:center;padding-top:30px;"><img src="<?php echo $baseUrl; ?>public/images/loader.gif"/></div>');
                    },
                    success: function(data) {
                        if (data.success) {
                            $('.continue_btn').show();
                            $('.paynow_btn').show();
                            $("#FareChangeData").html(data.html);
                            $("#intPublishedFare").html(data.MobilePublishedFare);
                            $("#MobilePublishedFare").html(data.MobilePublishedFare);
                        } else {
                            alert(data.message);
                        }
                    }
                });
            }
            $(document).on('change', '.SelectBaggage', function() {
                var element = $("option:selected", this);
                var index = element.attr("value");
                var CustomerSysId = element.attr("id");
                var segmentid = element.attr("segmentid");
                UpdateFareNew('baggage', index, CustomerSysId, segmentid);
            });
            $(document).on('change', '.SelectMeals', function() {
                var element = $("option:selected", this);
                var index = element.attr("value");
                var CustomerSysId = element.attr("id");
                var segmentid = element.attr("segmentid");
                UpdateFareNew('meal', index, CustomerSysId, segmentid);
            });

            function SelectMeal(index, CustomerSysId, tripType) {
                var Mealdata = JSON.parse(GetData('Mealdata'));
                console.log(Mealdata);
                $.each($(".restMeal_" + CustomerSysId), function() {
                    var $input = $(this);
                    if (index + '_' + CustomerSysId == $input.attr('index')) {
                        $('#meal_' + index + '_' + CustomerSysId).addClass('checked');
                    } else {
                        $('#meal_' + $input.attr('index')).removeClass('checked');
                    }
                });

                $('#Meal_' + index + '_' + CustomerSysId).css('display', 'block');
                //console.log(Mealdata[0][index]);return false;
                UpdateFare(Mealdata[0][index], 'meal', CustomerSysId, tripType);
            }

            function SelectMealInb(index, CustomerSysId, tripType) {
                var Mealdata = JSON.parse(GetData('Mealdata'));
                $.each($(".restMealInb_" + CustomerSysId), function() {
                    var $input = $(this);
                    if (index + '_' + CustomerSysId == $input.attr('index')) {
                        $('#mealInb_' + index + '_' + CustomerSysId).addClass('checked');
                    } else {
                        $('#mealInb_' + $input.attr('index')).removeClass('checked');
                    }
                });
                $('#MealInb_' + index + '_' + CustomerSysId).css('display', 'block');
                UpdateFare(Mealdata[1][index], 'meal', CustomerSysId, tripType);
            }



            function SelectBaggage(index, CustomerSysId, tripType) {
                var Baggagedata = JSON.parse(GetData('Baggagedata'));
                $.each($(".restBaggage_" + CustomerSysId), function() {
                    var $input = $(this);
                    if (index + '_' + CustomerSysId == $input.attr('index')) {
                        $('#baggage_' + index + '_' + CustomerSysId).addClass('checked');
                    } else {
                        $('#baggage_' + $input.attr('index')).removeClass('checked');
                    }
                });
                $('#Baggage_' + index + '_' + CustomerSysId).css('display', 'block');
                ///console.log(Baggagedata[index]);return false;
                UpdateFare(Baggagedata[0][index], 'baggage', CustomerSysId, tripType);
            }

            function SelectBaggageInb(index, CustomerSysId, tripType) {
                var Baggagedata = JSON.parse(GetData('Baggagedata'));
                $.each($(".restBaggageInb_" + CustomerSysId), function() {
                    var $input = $(this);
                    if (index + '_' + CustomerSysId == $input.attr('index')) {
                        $('#baggageInb_' + index + '_' + CustomerSysId).addClass('checked');
                    } else {
                        $('#baggageInb_' + $input.attr('index')).removeClass('checked');
                    }
                });
                $('#BaggageInb_' + index + '_' + CustomerSysId).css('display', 'block');
                UpdateFare(Baggagedata[1][index], 'baggage', CustomerSysId, tripType);
            }

            $(document).on('click', '.removeBaggage', function() {
                var CustomerSysId = $(this).attr('data');
                var segment = $(this).attr('segment');
                var type = $(this).attr('type');
                var data = $(this).attr('data');
                var index = $(this).attr('index');
                var id = $(this).attr('id');

                var Mealdata = JSON.parse(GetData('Mealdata'));
                var Baggagedata = JSON.parse(GetData('Baggagedata'));

                console.log(Mealdata);
                //var index = element.attr("value");

                var TraceId = $('#TraceId').val();
                $.ajax({
                    type: "POST",
                    url: "<?php echo $baseUrl; ?>flight/removebaggage",
                    dataType: 'json',
                    data: {
                        CustomerSysId: CustomerSysId,
                        segment: segment,
                        type: type,
                    },
                    beforeSend: function() {
                        $('.continue_btn').hide();
                    },
                    success: function(data) {
                        if (data.success) {
                            if (type == "Baggage") {
                                UpdateFare(Mealdata[0][index], 'meal', CustomerSysId, data);

                            }
                            if (type == "Meal") {
                                UpdateFare(Baggagedata[0][index], 'baggage', CustomerSysId, data);
                            }
                            $('#' + id).css('display', 'none');;

                            //window.location.href = 'flight/add-onn-service/' + TraceId;
                            // window.location.href = 'flight/travellers/' + TraceId;
                        }
                    }
                });
            });

            function GetData(key) {
                // alert(key);
                var sonuc = "";
                if (typeof(localStorage) != "undefined") {
                    //İkinci html5 localStorage desteği varmı ona bakılır
                    if (localStorage[key] != null) {
                        sonuc = localStorage[key];
                    }
                } else {
                    //son olarak cookie desteği varmı ona bakılır
                    sonuc = $.cookie(key);
                }
                return sonuc;
            }

            <?php
            if (($modulename == 'default') && ($controller == 'flight') && ($action == 'book-flight')) {
            ?>

                function GenerateTicket() {
                    var ApiResultIndex = $('#ApiResultIndex').val();
                    var TraceId = $('#TraceId').val();
                    $.ajax({
                        type: "POST",
                        url: "<?php echo $baseUrl; ?>flight/book-flight/" + TraceId,
                        dataType: 'json',
                        data: {
                            TraceId: TraceId,
                            ApiResultIndex: ApiResultIndex
                        },
                        beforeSend: function() {
                            $('.continue_btn').hide();
                            $("#FareChangeData").html('<div style="text-align:center;padding-top:30px;"><img src="<?php echo $baseUrl; ?>public/images/loader.gif"/></div>');
                        },
                        success: function(data) {
                            if (data.success) {
                                if (data.IsLCC) {
                                    GenerateNonLccTicket();
                                } else {
                                    window.location.href = 'flight/booking-confirmed';
                                }

                            } else {
                                alert(data.message);
                                window.location.href = 'flight';
                            }
                        }
                    });
                }

                function GenerateNonLccTicket() {
                    var ApiResultIndex = $('#ApiResultIndex').val();
                    var TraceId = $('#TraceId').val();
                    $.ajax({
                        type: "POST",
                        url: "<?php echo $baseUrl; ?>flight/generatenonlccticket",
                        dataType: 'json',
                        data: {
                            TraceId: TraceId,
                            ApiResultIndex: ApiResultIndex
                        },
                        beforeSend: function() {
                            $(".Pleasewaitmesg").html('Please do not refresh or press back button, we are generating your ticket....');
                        },
                        success: function(data) {
                            if (data.success) {
                                window.location.href = 'flight/booking-confirmed';
                            } else {
                                alert(data.message);
                                window.location.href = 'flight';
                            }
                        }
                    });
                }
                GenerateTicket();
            <?php } ?>

            <?php
            if (($modulename == 'default') && ($controller == 'flight') && ($action == 'pay-now')) {
            ?>

                function PayNowTicket() {
                    var ApiResultIndex = $('#ApiResultIndex').val();
                    var TraceId = $('#TraceId').val();
                    $.ajax({
                        type: "POST",
                        url: "<?php echo $baseUrl; ?>flight/pay-now/" + TraceId,
                        dataType: 'json',
                        data: {
                            TraceId: TraceId,
                            ApiResultIndex: ApiResultIndex
                        },
                        beforeSend: function() {
                            $('.continue_btn').hide();
                            $("#FareChangeData").html('<div style="text-align:center;padding-top:30px;"><img src="<?php echo $baseUrl; ?>public/images/loader.gif"/></div>');
                        },
                        success: function(response) {
                            if (response.success) {
                                console.log(response);
                                var guid = response.guid;
                                var walletCode = response.walletCode;
                                var stringData = response.stringData;
                                var strReturnURL = response.strReturnURL;
                                var TPSysId = response.TPSysId;
                                var amount = response.amount;

                                var name = response.UserData.name;
                                var emailId = response.UserData.email;
                                var mobile = response.UserData.mobile;
                                var CustomerSysId = response.UserData.CustomerSysId;


                                $("#guid").val(guid);
                                $("#securecode").val(walletCode);
                                $("#returnURL").val(strReturnURL);
                                $("#errorURL").val(strReturnURL);
                                $("#stringData").val(stringData);
                                $("#TPSysId").val(TPSysId);
                                $("#premium_val").val(amount);

                                $("#custFirstname").val(name);
                                $("#custemail").val(emailId);
                                $("#custphone").val(mobile);
                                $("#CustomerSysId").val(CustomerSysId);
                                setTimeout(function() {
                                    $("#paymentsubmit").submit();
                                }, 2000);

                            } else {
                                alert(data.message);
                                window.location.href = 'flight';
                            }
                        }
                    });
                }


                PayNowTicket();
            <?php } ?>

            function removepax() {

            }

            $(document).on('click', '.removePax', function() {
                var CustomerSysId = $(this).attr('value');
                var b = $(this).attr('data');
                $("#custMember_" + CustomerSysId).removeAttr('disabled', 'disabled');
                $("#custMember_" + CustomerSysId).removeAttr('checked', 'checked');
                $("#CustomerSysId-" + b).val('0');
                $("#passenger-firstname-" + b).val('');
                $("#passenger-lastname-" + b).val('');

                $("#travellerdetails" + b).val('');
                $("#dateofbirth-" + b).val('');
                $("#travel_details" + b).html('');


                $("#relation-" + b).val('0');
                $("#passportno-" + b).val('');
                $("#passportnoexpiry-" + b).val('');
                $("#CRADULT-" + b).hide();

            });




            $(document).on('click', '.mobile_info', function() {
                $('#myModal_faresummary').modal('show');
            });
            $('.ClearAll').click(function() {
                var checked = $('.filter-box input[type="checkbox"]:checked').length;
                if (checked >= 1) {
                    $('.filter-box input[type="checkbox"]:checked').trigger('click');
                }
            });
            Tipped.delegate('#BaseFarePOPBreackUp', {
                inline: 'BaseFareBreackUp',
                radius: true,
                hideOnClickOutside: true,
            });
            Tipped.delegate('#FeeSurchargeBreakUp', {
                inline: 'FeeSurcharge',
                radius: true,
                hideOnClickOutside: true,
            });
            // Tipped.delegate('#MobileToolTipesBreakUp', {
            //     inline: 'FareBreakUpMobileDiv',
            //     radius: true,
            //     hideOnClickOutside: true,
            // });

            Tipped.delegate('#MobileToolTipesBreakUp', {
                cache: false,
                ajax: {
                    url: '<?php echo $baseUrl; ?>flight/farebreackupmobile',
                    data: {
                        item: 'item'
                    },
                    type: 'post'
                },
                radius: true,
                position: 'topleft',
                size: 'large'
            });

            $(document).on('click', '.GetFareRules', function() {
                var IsLCC = $(this).attr('IsLCC');
                var index = $(this).attr('index');
                var TraceId = $(this).attr('TraceId');
                var ApiResultIndex = $(this).attr('ApiResultIndex');
                $('#myModal_viewmore').modal('show');
                $.ajax({
                    type: "POST",
                    url: "<?php echo $baseUrl; ?>flight/getflightfarerules",
                    dataType: 'html',
                    data: {
                        TraceId: TraceId,
                        ApiResultIndex: ApiResultIndex,
                        IsLCC: IsLCC
                    },
                    beforeSend: function() {
                        $("#FareRulesDiv").html('<div style="text-align:center;padding-top:30px;"><img src="<?php echo $baseUrl; ?>public/images/loader.gif"/></div>');
                    },
                    success: function(data) {
                        //                                    console.log(data);
                        $("#FareRulesDiv").html(data);
                    }
                });
            });

            function SetData(key, value) {
                if (typeof(localStorage) != "undefined") {
                    //ikinci önce html5 localStorage desteği varmı ona bakılır
                    try {
                        localStorage.setItem(key, value);
                        return true;
                    } catch (e) {
                        return false;
                    }

                } else {
                    //son olarak cookie desteği varmı ona bakılır
                    try {
                        $.cookie(key, value);
                        return true;
                    } catch (e) {
                        return false;
                    }
                }
            }
        </script>
        <script>
            // Get the modal
            var modal = document.getElementById('id02');

            // When the user clicks anywhere outside of the modal, close it
            window.onclick = function(event) {
                if (event.target == modal) {
                    modal.style.display = "none";
                }
            }
            $(document).ready(function() {

                setTimeout(function() {
                    $("#rightFloatInTollFreeNumber").stop().animate({
                        right: 215
                    }, 215);
                }, 4000);

                setInterval(function() {
                    $("#rightFloatInTollFreeNumber").stop().animate({
                        right: 50
                    }, 215);
                }, 10000);


                $('.rightFloat div').mouseover(function() {
                    $(this).stop().animate({
                        right: 215
                    }, 215);
                }).mouseout(function() {
                    $(this).stop().animate({
                        right: 50
                    }, 215)
                });
            });
        </script>

        <script>
            $("document").ready(function() {
                $(".tab-slider--body").hide();
                $(".tab-slider--body:first").show();
            });

            $(".tab-slider--nav li").click(function() {
                $(".tab-slider--body").hide();
                var activeTab = $(this).attr("rel");
                $("#" + activeTab).fadeIn();
                if ($(this).attr("rel") == "tab2") {
                    $('.tab-slider--tabs').addClass('slide');
                } else {
                    $('.tab-slider--tabs').removeClass('slide');
                }
                $(".tab-slider--nav li").removeClass("active");
                $(this).addClass("active");
            });
        </script>



        <script type="text/javascript">
            if (dvc == "d") {
                function fixDiv() {

                    if ($(window).scrollTop() > 420) {
                        //console.log($(window).scrollTop());
                        $('#topview1212').css({
                            'z-index': '99999',
                            'position': 'fixed',
                            'top': '118px',
                            'margin-left': '0px',
                            'width': '31%'
                        });
                    } else {
                        $('#topview1212').css({
                            'z-index': '999',
                            'position': 'initial',
                            'top': 'inherit',
                            'width': '100%'
                        });
                    }
                }
            } else {
                function fixDiv() {

                    if ($(window).scrollTop() > 100) {
                        console.log($(window).scrollTop());
                        $('.fh5co-nav-toggle').css({
                            'top': '1%'
                        });
                    } else {
                        $('.fh5co-nav-toggle').css({
                            'top': '8%'
                        });
                    }
                }
            }
            $(window).scroll(fixDiv);
        </script>
        <script>
            $(document).ready(function() {
                $('[data-toggle="tooltip"]').tooltip();
            });
        </script>


        <script>
            function showPopFilterMob(that) {
                $('.filters-container').hide();
                $('#package-filters').show();
                $('#myModalFiltersContainer').modal('show');
            }
        </script>
        <script src="public/js/sliderResponsive.js"></script>
        <script>
            $(document).ready(function() {
                $("#slider3").sliderResponsive({
                    hoverZoom: "off",
                    hideDots: "off",
                    showArrows: "off"
                });

            });

            function modifySearch() {
                $("#modifySearch").toggleClass("modifySearch");
            }
        </script>

        <script>
            $(function() {
                var icons = {
                    header: "ui-icon-circle-arrow-e",
                    activeHeader: "ui-icon-circle-arrow-s"
                };
                $("#accordion").accordion({
                    icons: icons
                });

            });
        </script>

        <script>
            // $.when(FlightFareQuote()).done(function(ajax1Results) {
            $(document).ready(function() {
                $('.continue_btn1').click(function() {
                    var leadmbile = $('#leadMobile').val();
                    var leademail = $('#leadEmail').val();
                    if (leadmbile == "") {
                        alert("Please Enter Mobile Number");
                        $('#accordion').accordion('option', 'active', 0)
                        return false;
                    }
                    if (leademail == "") {
                        alert("Please Enter Email Id");
                        $('#accordion').accordion('option', 'active', 0)
                        return false;
                    }
                });

                $("#ui-id-4, #ui-id-6, #ui-id-8").unbind("click");
            });
            //});
        </script>
        <script>
            function myFunction(id) {

            }
        </script>
        <?php if (($modulename == 'default') && ($controller == 'flight') && ($action == 'flight-search')) {
        ?>
            <?php // if ($mydevice == "mobile"){  
            ?>
            <script type="text/javascript">
                window.onbeforeunload = function(e) {
                    e.preventDefault();
                }
            </script>
            <?php //}  
            ?>
        <?php } ?>





        <?php if ($mydevice == "mobile") { ?>
            <script>

                $( "#gststate" ).focus(function() {
                    $(window).scrollTop($("#gststate").offset().top-20);
                });

                $( ".travellerinput" ).focus(function() {
                    $(window).scrollTop($(".travellerinput").offset().top-20);
                });

                $( ".travellermobile-cls" ).focus(function() {
                    $(window).scrollTop($(".travellermobile-cls").offset().top-20);
                });

                function myFunction(id) {
                    $(window).scrollTop($("." + id).offset().top);
                }
            </script>

        <?php } else { ?>
            <script>
                function myFunction(id) {

                }
            </script>
        <?php } ?>


    </body>

    <?php
    echo $seoFContent = (isset($detailLayout['seoFcontent']) && $detailLayout['seoFcontent'] != '') ? $detailLayout['seoFcontent'] : '';
    ?>

    </html>
<?php } ?>

Youez - 2016 - github.com/yon3zu
LinuXploit