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/travelbrace.com/application/layouts/scripts/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/travelbrace.com/application/layouts/scripts/layout.phtml
<?php
$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();
$this->stylecss = $options['stylecss'];
//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=1.6;
//$commonBoxVal_ = Zend_Controller_Action_HelperBroker::getStaticHelper('custom')->getCommonBoxVal();
$headerScript1 = (isset($commonBoxVal_['common_content_header_1']) && trim($commonBoxVal_['common_content_header_1']) !='') ? $commonBoxVal_['common_content_header_1'] : '';
$headerScript2 = (isset($commonBoxVal_['common_content_header_2']) && trim($commonBoxVal_['common_content_header_2']) !='') ? $commonBoxVal_['common_content_header_2'] : '';
$headerScript3 = (isset($commonBoxVal_['common_content_header_3']) && trim($commonBoxVal_['common_content_header_3']) !='') ? $commonBoxVal_['common_content_header_3'] : '';
$footerScript1 = (isset($commonBoxVal_['common_content_footer_1']) && trim($commonBoxVal_['common_content_footer_1']) !='') ? $commonBoxVal_['common_content_footer_1'] : '';
$footerScript2 = (isset($commonBoxVal_['common_content_footer_2']) && trim($commonBoxVal_['common_content_footer_2']) !='') ? $commonBoxVal_['common_content_footer_2'] : '';
$footerScript3 = (isset($commonBoxVal_['common_content_footer_3']) && trim($commonBoxVal_['common_content_footer_3']) !='') ? $commonBoxVal_['common_content_footer_3'] : '';

//echo"<pre>"; print_r($session);die();
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/upload/<?php echo $this->stylecss; ?>/images/favicon.png">
        <link rel="stylesheet" type="text/css" href="public/countrycode/style.css?v=<?= $cssversion ?>">
        <link rel="stylesheet" type="text/css" href="public/assets/css/select2.min.css">
        <link rel="stylesheet" type="text/css" href="<?php echo $baseUrl; ?>public/assets/css/bootstrap.min.css">
        <link rel="stylesheet" type="text/css" href="<?php echo $baseUrl; ?>public/assets/css/style.css">
        <link rel="stylesheet" type="text/css" href="<?php echo $baseUrl; ?>public/assets/css/custom.css">
		<link rel="stylesheet" type="text/css" href="<?php echo $baseUrl ?>public/upload/<?php echo $this->stylecss; ?>/css/style.css?v=<?= $cssversion ?>">

      
    
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">


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

    <body>
<!--    <div class="loader" >-->
<!--        <div class="loadingio-spinner-ripple-zdgradklyya">-->
<!--            <div class="ldio-50dj1g083ax">-->
<!--                <div></div> -->
<!--            </div>-->
<!--        </div>-->
<!--    </div>-->
    <?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="public/assets/js/jquery.min.js"></script>
        <script type="text/javascript" src="public/assets/js/select2.full.min.js"></script>
        <script type="text/javascript" src="public/assets/js/custom.js"></script>
        <script type="text/javascript" src="public/assets/js/jquery-scrolltofixed.js"></script>
        <script type="text/javascript" src="public/js/custom.js"></script>
        <script type="text/javascript" src="public/js/checkrate_sendenquiry.js"></script>
        <script type="text/javascript" src="public/js/common_function.js"></script>
        <script type="text/javascript" src="public/js/custom_mangal.js"></script>
        <script type="text/javascript" src="public/js/login.js"></script>

     <?php if (( $modulename == 'detail') ) { ?>
        <script type="text/javascript" src="public/js/custom_pkg.js"></script> 
        <?php } ?>
        <!-- <script type="text/javascript" src="public/js/custom_pkg.js"></script> -->

        <script type="text/javascript" src="public/js/package_customize.js"></script>
        <script type="text/javascript" src="public/js/jquery-ui.js?v=111"></script>
        <script type="text/javascript" src="public/js/jquery-ui-1.12.1.js?v=111"></script>
        <script type="text/javascript" src="public/countrycode/script.js"></script>
        

        <script src="https://apis.google.com/js/platform.js" async defer></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">
        <link rel="shortcut icon" href="<?php echo $baseUrl; ?>public/upload/<?php echo $this->stylecss; ?>/images/favicon.png">
        <?php
            $commonmetaTitle = (isset($commonBoxVal_['metaTitle']) && trim($commonBoxVal_['metaTitle']) !='') ? trim($commonBoxVal_['metaTitle']) : $siteName;
            $commonmetaKeyword = (isset($commonBoxVal_['Keyword']) && trim($commonBoxVal_['Keyword']) !='') ? trim($commonBoxVal_['Keyword']) : $siteName;
            $commonmetaDescription = (isset($commonBoxVal_['Description']) && trim($commonBoxVal_['Description']) !='') ? trim($commonBoxVal_['Description']) : $siteName;
            $detailLayout = $this->detailLayout;
            $metaTitle = (isset($detailLayout['metaTitle']) && trim($detailLayout['metaTitle']) !='')  ? $detailLayout['metaTitle'] : $commonmetaTitle;
            $metaKeyword = (isset($detailLayout['Keyword']) && trim($detailLayout['Keyword']) !='')  ? $detailLayout['Keyword'] : $commonmetaKeyword;
            $metaDescription = (isset($detailLayout['Description']) && trim($detailLayout['Description']) !='')  ? $detailLayout['Description'] : $commonmetaDescription;
        ?>
            
        <title><?php echo $metaTitle; ?></title>
        <meta name="description" content="<?php echo $metaDescription; ?>"/>
        <meta name="keywords" content="<?php echo $metaKeyword; ?>"/>

        <meta name="author" content="<?php echo $siteName;?>">	    
        <meta name="robots" content="index, follow"/>
        <meta name="language" content="English">
        <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]; ?>"/>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
               
        <base href="<?php echo Catabatic_Helper::getSiteUrl(); ?>"/>
            
     


        <?php if (($modulename == 'default') && ($controller == 'customer') && ($action == 'myprofile')) { ?>
            <link href="<?php echo $baseUrl; ?>public/css/jquery.atAccordionOrTabs.css" rel="stylesheet">
        <?php } ?>
        <link rel="shortcut icon" href="public/upload/<?php echo $this->stylecss; ?>/images/favicon.png">
        <link rel="stylesheet" type="text/css" href="public/assets/css/select2.min.css?v=<?= $cssversion ?>">
        <link rel="stylesheet" type="text/css" href="public/assets/css/bootstrap.min.css?v=<?= $cssversion ?>">
        <link rel="stylesheet" type="text/css" href="public/countrycode/style.css?v=<?= $cssversion ?>">
        <link rel="stylesheet" type="text/css" href="public/assets/css/style.css?v=<?= $cssversion ?>">
        <link rel="stylesheet" type="text/css" href="public/assets/css/header.css?v=<?= $cssversion ?>">
        <link rel="stylesheet" type="text/css" href="public/assets/css/footer.css?v=<?= $cssversion ?>">
		<link rel="stylesheet" type="text/css" href="<?php echo $baseUrl ?>public/upload/<?php echo $this->stylecss; ?>/css/style.css?v=<?= $cssversion ?>">

     <?php if (( $modulename == 'detail') ) { ?>
        <link rel="stylesheet" type="text/css" href="<?php echo $baseUrl; ?>public/assets/css/custom_pkg.css"> 
        <?php } ?>
        <!-- <link rel="stylesheet" type="text/css" href="<?php echo $baseUrl; ?>public/assets/css/custom_pkg.css"> -->
<!--        <link rel="stylesheet" href="--><?php //echo $baseUrl;?><!--public/search/css/asDatepicker.css">-->
        <link rel="stylesheet" type="text/css" href="<?php echo $baseUrl; ?>public/assets/css/testimonial.css">



        <!-- Modernizr JS -->


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

    </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">
            <?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 type="text/javascript" src="public/assets/js/jquery.min.js?v=<?= $cssversion ?>"></script>
        <script type="text/javascript" src="public/assets/js/custom.js?v=<?= $cssversion ?>"></script>
        <script type="text/javascript" src="public/js/custom.js?v=<?= $cssversion ?>"></script>
        <script type="text/javascript" src="public/js/visa.js?v=<?= $cssversion ?>"></script>
        <script type="text/javascript" src="public/js/checkrate_sendenquiry.js?v=<?= $cssversion ?>"></script>
        <script type="text/javascript" src="public/js/common_function.js?v=<?= $cssversion ?>"></script>
        <script type="text/javascript" src="public/js/custom_mangal.js?v=<?= $cssversion ?>"></script>
        <script type="text/javascript" src="public/js/package_customize.js?v=<?= $cssversion ?>"></script>
<!--        <script type="text/javascript" src="public/js/jquery-ui.js"></script>-->
<!--        <script type="text/javascript" src="public/js/jquery-ui-1.12.1.js"></script>-->
        <script type="text/javascript" src="public/assets/js/select2.full.min.js?v=<?= $cssversion ?>"></script>
        <script type="text/javascript" src="public/countrycode/script.js?v=<?= $cssversion ?>"></script>
        <script src="https://apis.google.com/js/api.js?v=<?= $cssversion ?>" async defer></script>
        <script src="https://apis.google.com/js/platform.js?v=<?= $cssversion ?>" async defer></script>
        <script type="text/javascript" src="public/js/login.js?v=<?= $cssversion ?>"></script>
        <?php if (( $modulename == 'detail') ) { ?>
        <script type="text/javascript" src="public/js/custom_pkg.js"></script> 
        <?php } ?>
		<script src="<?php echo $baseUrl; ?>public/js/jquery.datetimepicker.js"></script>
        <script src="<?php echo $baseUrl; ?>public/js/pickerTool.js"></script>
        
    <script>
        function onSignIn(googleUser) {
           var profile = googleUser.getBasicProfile();
           
            var familyname = profile.getFamilyName();
            var name = profile.getName();
            var image = profile.getImageUrl();
            var email = profile.getEmail();
            var gid = profile.getId();

            $.ajax({
                    type: "POST",
                    url: "<?php echo $baseUrl; ?>customer/loginwith-google",
                   // dataType: 'html',
                    data: {
                        name: name,
                        email: email,
                    },
                    success: function(data) {
                      console.log(data);
                      
                    }
                });


            }


            function signOut() {
                    var auth2 = gapi.auth2.getAuthInstance();
                    auth2.signOut().then(function () {
                    console.log('User signed out.');
                    });
                }
        </script>
        <script type="text/javascript">
            $(document).on('click', '.ViewDetails', function() {
                var TraceId = $(this).attr('data');
                var journeyType = $(this).attr('journeyType');
                $('#myModalViewDetails').modal('show');
                $.ajax({
                    type: "POST",
                    url: "<?php echo $baseUrl; ?>flight/view-details",
                    dataType: 'html',
                    data: {
                        TraceId: TraceId,
                        journeyType: journeyType,
                    },
                    beforeSend: function() {
                        $("#ViewDetailsLoad").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);
                        $("#ViewDetailsLoad").html(data);
                    }
                });

            });



            $(document).ready(function() {
                $('.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 (mytrip_city_from === '') {
                        alert('Please enter from city name');
                        $('input[name="mytrip_city_from"]').focus();
                        return false;
                    }
                    if (mytrip_city_to === '') {
                        alert('Please enter to city name');
                        $('input[name="mytrip_city_to"]').focus();
                        return false;
                    }
                    if (source === '') {
                        alert('Please enter from city name');
                        $('input[name="source"]').focus();
                        return false;
                    }

                    if (destination === '') {
                        alert('Please enter to city name');
                        $('input[name="destination"]').focus();
                        return false;
                    }
                    if (source_city === '') {
                        alert('Please enter valif from city name');
                        $('input[name="source"]').focus();
                        return false;
                    }
                    if (destination_city === '') {
                        alert('Please enter valif to city name');
                        $('input[name="destination"]').focus();
                        return false;
                    }

                });

                setTimeout(function() {


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

                    $.getJSON(SITEURL + 'public/data/dynamic/flight_destinations.json', function(source) {

                        $(".airport_search").autocomplete({
                            minLength: 3,
                            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));
                            },
                            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 + ')';
                                $('.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);

                            }
                        });

                    });
                }, 1000);


                $('.sorting').click(function() {
                    $(this).children('i').toggleClass('icon-angle-down icon-angle-up');
                });
                $('.sortingRound').click(function() {
                    $(this).children('i').toggleClass('icon-angle-down icon-angle-up');
                });
                $("#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");

                            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);
                        }
                    },
                    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);
                        }


                    }
                });
                var tripType = $('.SelectClass:checked').val();
                var htmlval = $('#optionsRadios' + tripType).attr('data'); // retrieve the html value
                $('.TravellersClass').html(htmlval);
                $(document).on('click', '.onewayflight', function() {
                    var index = $(this).attr('index');
                    $('div.SingleSelect').removeClass("mobile_roundflight_active");
                    $('#SingleSelect_' + index).addClass("mobile_roundflight_active");
                });
                $(document).on('click', '.twowayflight', function() {
                    var index = $(this).attr('index');
                    $('div.roundSelect').removeClass("mobile_roundflight_active");
                    $('#roundSelect_' + index).addClass("mobile_roundflight_active");
                });
                $(document).on('click', '.tripType', function() {
                    ///alert('test');
                   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").removeClass("disabledcls");
                    } else {
                        $('#to').val('');
                        $('.Return').html('');
                        $('#return_date').val('');
                        $("#to").attr("readonly", "readonly");
                        $("#to").addClass("disabledcls");
                    }

                });

                
                $(".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);
                        }
                    });

                function openSearch() {
                    document.getElementById("mySidenavsearch").style.width = "100%";
                }

                function closeSearch() {
                    document.getElementById("mySidenavsearch").style.width = "0";
                }

                $('.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 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;
                    }
                    if (destination === '') {
                        alert('Please enter to city name');
                        $('input[name="destination"]').focus();
                        return false;
                    }
                    if (source_city === '') {
                        alert('Please enter valif from city name');
                        $('input[name="source"]').focus();
                        return false;
                    }
                    if (destination_city === '') {
                        alert('Please enter valif to city name');
                        $('input[name="destination"]').focus();
                        return false;
                    }

                });

            });

            $(document).ready(function() {
                $('.sorting').click(function() {
                    $(this).children('i').toggleClass('icon-angle-down icon-angle-up');
                });
                $('.sortingRound').click(function() {
                    $(this).children('i').toggleClass('icon-angle-down icon-angle-up');
                });
                $("#datepicker, #datepicker_return").datepicker({
                    //defaultDate: "+1w",
                    changeMonth: false,
                    dateFormat: "d M yy",
                    numberOfMonths: 2,
                    minDate: 0,
                    buttonImage: true,
                    buttonImageOnly: true,
                    beforeShow: function() {
                        if (this.id == 'datepicker') {
                            var dateMin = $('#datepicker').datepicker("getDate");
                            var TodateMin = $('#datepicker_return').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
                            $('#datepicker_return').datepicker("option", "minDate", rMin);
                            $('#datepicker_return').datepicker("option", "maxDate", rMax);
                            $('#datepicker_return').datepicker("setDate", c_out_date);
                        }
                    },
                    onSelect: function(selectedDate, inst) {
                        var tripType = $('.tripType:checked').val(); // retrieve the value
                        if (this.id == 'datepicker') {
                            var dateMin = $('#datepicker').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) {
                                $('#datepicker_return').datepicker("option", "minDate", rMin);
                                $('#datepicker_return').datepicker("option", "maxDate", rMax);

                                $('#datepicker_return').datepicker("setDate", c_out_date);
                                $('.date-parent').html(dateFormatted);

                            }
                            //                            console.log(c_out_date);

                            ///$('#to').focus();return false;
                        } else {
                            var dateMin = $('#datepicker_return').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);
                            $('.date-parent').html(dateFormatted);
                            $('#return_date').val(ToFormatted);
                            //                            console.log(ToFormatted);
                        }


                    }
                });
                var tripType = $('.SelectClass:checked').val();
                var htmlval = $('#optionsRadios' + tripType).attr('data'); // retrieve the html value
                $('.TravellersClass').html(htmlval);
                $(document).on('click', '.onewayflight', function() {
                    var index = $(this).attr('index');
                    $('div.SingleSelect').removeClass("mobile_roundflight_active");
                    $('#SingleSelect_' + index).addClass("mobile_roundflight_active");
                });
                $(document).on('click', '.twowayflight', function() {
                    var index = $(this).attr('index');
                    $('div.roundSelect').removeClass("mobile_roundflight_active");
                    $('#roundSelect_' + index).addClass("mobile_roundflight_active");
                });

                


                // $(document).ready(function(){
                //     $('.down_count-cls1').click(function(e){
                //         var button_classes, value = +$('.counter1').val();
                //         button_classes = $(e.currentTarget).prop('class');
                //         if(button_classes.indexOf('up_count') !== -1){
                //             value = (value) + 1;
                //         } else {
                //             value = (value) - 1;
                //         }
                //         value = value < 1 ? 1 : value;
                //         $('.counter1').val(value);
                //     });
                //     $('.counter1, .counter2, .counter3').click(function(){
                //         $(this).focus().select();
                //     });
                // });

                // $(document).ready(function(){
                //     $('.down_count-cls2').click(function(e){
                //         var button_classes, value = +$('.counter2').val();
                //         button_classes = $(e.currentTarget).prop('class');
                //         if(button_classes.indexOf('up_count') !== -1){
                //             value = (value) + 1;
                //         } else {
                //             value = (value) - 1;
                //         }
                //         value = value < 0 ? 0 : value;
                //         $('.counter2').val(value);
                //     });
                //     $('.counter2').click(function(){
                //         $(this).focus().select();
                //     });
                // });

                // $(document).ready(function(){
                //     $('.down_count-cls3').click(function(e){
                //         var button_classes, value = +$('.counter3').val();
                //         button_classes = $(e.currentTarget).prop('class');
                //         if(button_classes.indexOf('up_count') !== -1){
                //             value = (value) + 1;
                //         } else {
                //             value = (value) - 1;
                //         }
                //         value = value < 0 ? 0 : value;
                //         $('.counter3').val(value);
                //     });
                //     $('.counter3').click(function(){
                //         $(this).focus().select();
                //     });
                // });
               
               

                
                $('.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);
                        }
                    });

                $(document).mouseup(function (e) {
                    if ($(e.target).closest(".hotelrooombox_main").length
                        === 0) {
                        $(".hotelrooombox_main").hide();
                    }
                });

                $('.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);
                });

                function openSearch() {
                    document.getElementById("mySidenavsearch").style.width = "100%";
                }

                function closeSearch() {
                    document.getElementById("mySidenavsearch").style.width = "0";
                }

                $('.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 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;
                    }
                    if (destination === '') {
                        alert('Please enter to city name');
                        $('input[name="destination"]').focus();
                        return false;
                    }
                    if (source_city === '') {
                        alert('Please enter valif from city name');
                        $('input[name="source"]').focus();
                        return false;
                    }
                    if (destination_city === '') {
                        alert('Please enter valif to city name');
                        $('input[name="destination"]').focus();
                        return false;
                    }

                });

            });

            $(document).ready(function() {
                setTimeout(function() {
                    $.getJSON('public/data/dynamic/car_station.json', function(destinations) {
                        $("#car-select").autocomplete({
                            minLength: 3,
                            source: destinations,
                            autoFocus: true,
                            select: function(event, ui) {
                                var code = ui.item.code;
                                var cityid = ui.item.id;
                                console.log(cityid);
                                $(".cityid").val(cityid);
                                $(".hcode").val(code);
                            }
                        });
                    });
                }, 1000);
            });

            $("#car-Start_Date, #car-end-Date").datepicker({
                    //defaultDate: "+1w",
                    changeMonth: false,
                    dateFormat: "d-M-yy",
                    numberOfMonths: 2,
                    minDate: 0,
                    buttonImage: true,
                    buttonImageOnly: true,
                    beforeShow: function() {
                        if (this.id == 'car-end-Date') {
                            var dateMin = $('#car-Start_Date').datepicker("getDate");
                            var TodateMin = $('#car-end-Date').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
                            $('#car-end-Date').datepicker("option", "minDate", rMin);
                            $('#car-end-Date').datepicker("option", "maxDate", rMax);
                            $('#car-end-Date').datepicker("setDate", c_out_date);
                        }
                    },
                    onSelect: function(selectedDate, inst) {
                        var tripType = $('.tripType:checked').val(); // retrieve the value
                        if (this.id == 'car-Start_Date') {
                            var dateMin = $('#car-Start_Date').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);
                                $('#car-end-Date').datepicker("option", "minDate", rMin);
                                $('#car-end-Date').datepicker("option", "maxDate", rMax);

                                $('#car-end-Date').datepicker("setDate", c_out_date);
                                $('.Return').html(dateFormatted);
                        } 
                    }
                });
$("#travelerDatePicker,#travelerDatePickerdetail").datepicker({
                    //defaultDate: "+1w",
                    changeMonth: false,
                    dateFormat: "d/m/yy",
                    numberOfMonths: 1,
                    minDate: 0,
                    buttonImage: true,
                    buttonImageOnly: true,
                    beforeShow: function() {
                        
                    },
                    onSelect: function(selectedDate, inst) {
                         
                    }
                });
            setTimeout(function() {
                $.getJSON('public/data/dynamic/package_destinations.json', function(destinations) {

                    $(".destinationBox").autocomplete({
                        minLength: 3,
                        source: destinations,
                        autoFocus: true,
                        select: function(event, ui) {
                            var code = ui.item.code;
                            var cityid = ui.item.id;
                            // console.log(cityid);
                            $(".cityid").val(cityid);
                            $(".hcode").val(code);
                        }
                    });
                });
            }, 1000);

            setTimeout(function() {
                $.getJSON('public/data/dynamic/package_destinations.json', function(visa) {

                    $(".visaSearchBox").autocomplete({
                        minLength: 3,
                        source: visa,
                        autoFocus: true,
                        select: function(event, ui) {
                            var code = ui.item.code;
                            var cityid = ui.item.id;
                            console.log(cityid);
                            $(".cityid").val(cityid);
                            $(".hcode").val(code);
                        }
                    });
                });
            }, 1000);

            setTimeout(function() {
                $.getJSON('public/data/dynamic/package_destinations.json', function(destinations) {

                    $(".activitiesBox").autocomplete({
                        minLength: 3,
                        source: destinations,
                        autoFocus: true,
                        select: function(event, ui) {
                            var code = ui.item.code;
                            var cityid = ui.item.id;
                            //console.log(cityid);
                            $(".cityid").val(cityid);
                            $(".hcode").val(code);
                        }
                    });
                });
            }, 1000);

        </script>


        <?php
        $scriptsAngular = $this->headScript(); // include the angular js here

        $scriptsAngular->appendFile($baseUrl . "public/js/ng/angular.min.js")
            ->appendFile($baseUrl . "public/js/ng/angular-route.min.js")
            ->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/filters.js");


        if (($modulename == 'tours') && ($controller == 'package') && ($action == 'index')) {
            $scriptsAngular->appendFile($baseUrl . "public/js/ng/package_search.js?=1111111111");
        }
        if (($modulename == 'tours') && ($controller == 'activity') && ($action == 'index')) {
            $scriptsAngular->appendFile($baseUrl . "public/js/ng/activities_search.js?=111112222");
        }
        if (($modulename == 'car') && ($controller == 'index') && ($action == 'search-results')) {
            $scriptsAngular->appendFile($baseUrl . "public/js/ng/car-search-result.js?1112121");
        }
        $scriptsAngular->appendFile($baseUrl . "public/js/ng/ng-infinite-scroll.min.js");
        $scriptsAngular->appendFile($baseUrl . "public/js/ng/ng-infinite-scroll.js");
        echo $scriptsAngular;
        ?>

      <?php
        if (($modulename == 'detail') && ($controller == 'index') && ($action == 'index' || $action == 'index-ajax-data')) {
            $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,
            ];
            echo $this->partial('models/send-enquiry-modal.phtml', $data);
            echo $this->partial('models/modal-change-options.phtml', ['baseUrl' => $baseUrl]);
            //                echo $this->partial('models/modal-checkrate-enquiry.phtml', $data);
            echo $this->partial('models/modal-hotel-view-and-options.phtml', ['baseUrl' => $baseUrl]);
            if ($mydevice == "mobile")
                $charlimit = 150;
            else
                $charlimit = 400;
        ?>
           <?php }
        ?>

        <?php
        if (($modulename == 'detail') && ($controller == 'index') && ($action == 'index' || $action == 'index-ajax-data')) {
            $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,
            ];
            echo $this->partial('models/send-enquiry-modal.phtml', $data);
            echo $this->partial('models/modal-change-options.phtml', ['baseUrl' => $baseUrl]);
            //                echo $this->partial('models/modal-checkrate-enquiry.phtml', $data);
            echo $this->partial('models/modal-hotel-view-and-options.phtml', ['baseUrl' => $baseUrl]);
            if ($mydevice == "mobile")
                $charlimit = 150;
            else
                $charlimit = 400;
            ?>
            <script type="text/javascript">
                trimcontent(<?php echo $charlimit; ?>);

                function openpopupModel(n, type) {
                    var hotelId = n;
                    var type = type;
                    var categoryId = $("#categoryId").val();
                    var packageId = $("#packageId").val();
                    var gtxID = $("#gtxID").val();

                    $.ajax({
                        type: "POST",
                        url: "<?php echo $baseUrl; ?>detail/index/get-hotel-detail",
                        async: true,
                        data: "type=" + type + "&hotelId=" + hotelId + "&categoryId=" + categoryId + "&packageId=" + packageId + "&gtxID=" + gtxID,
                        beforeSend: function() {
                            $("#myModa1hotelview").modal('show');
                            $('#hotelDetailViewList').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);
                            $("#hotelDetailViewList").html(data);
                            return false;
                        }
                    });
                }

                $("#selectDestination").autocomplete({
                    source: function(request, response) {
                        var query = $("#selectDestination").val();
                        var countryId = '';
                        $.getJSON("/index/autosuggest", {
                                query: query,
                                countryId: countryId
                            },
                            response);
                    },
                    minLength: 2,
                    autoFocus: true,
                    select: function(event, ui) {
                        var CityId = ui.item.CityId;
                        var CityName = ui.item.CityName;
                        $("#hidden_selected_hotel_cityid").val(CityId);
                        $("#hidden_selected_city_name").val(CityName);
                    }
                });

                $('#travelerDatePicker').datepicker({
                    dateFormat: 'dd/mm/yy',
                    minDate: 0,
                    numberOfMonths: 1,
                });
            </script>


        <?php }
        ?>

        <script>
		    $("#selectDestinationHotel").autocomplete({
			  source: function(request, response) {
				var query = $("#selectDestinationHotel").val();
				var countryId = '';
				$.getJSON("hotels/index/get-city-hoteldata", {
					query: query,
					countryId: countryId
				  },
				  response);
			  },
			  minLength: 0,
              autoFocus: true,
			  select: function(event, ui) {
				var CityId = ui.item.CityId;
				var TBBCityId = ui.item.TBBCityId;
				var CityName = ui.item.CityName;
				$("#hidden_selected_hotel_cityid").val(CityId);
				$("#hidden_selected_hotel_TBBCityId").val(TBBCityId);
				$("#hidden_selected_city_name").val(CityName);
			  }
			}).focus(function() {
				$(this).autocomplete('search','');
			});
            setTimeout(function() {
                $.getJSON('public/data/dynamic/package_destinations.json', function(destinations) {

                    $(".destinationBox").autocomplete({
                        minLength: 3,
                        source: destinations,
                        autoFocus: true,
                        select: function(event, ui) {
                            var code = ui.item.code;
                            var cityid = ui.item.id;
                            // console.log(cityid);
                            $(".cityid").val(cityid);
                            $(".hcode").val(code);
                        }
                    });
                });
            }, 1000);

            setTimeout(function() {
                $.getJSON('public/data/dynamic/package_destinations.json', function(visa) {

                    $(".visaSearchBox").autocomplete({
                        minLength: 3,
                        source: visa,
                        autoFocus: true,
                        select: function(event, ui) {
                            var code = ui.item.code;
                            var cityid = ui.item.id;
                            console.log(cityid);
                            $(".cityid").val(cityid);
                            $(".hcode").val(code);
                        }
                    });
                });
            }, 1000);
            
        </script>
 <script>
                var acc = document.getElementsByClassName("accordion");
                var i;

                for (i = 0; i < acc.length; i++) {
                    acc[i].addEventListener("click", function() {
                        this.classList.toggle("active");
                        var panel = this.nextElementSibling;
                        if (panel.style.maxHeight) {
                            panel.style.maxHeight = null;
                        } else {
                            panel.style.maxHeight = panel.scrollHeight + "px";

                        }
                    });
                }

                $(function() {
                    var $tabButtonItem = $('#tab-button li'),
                        $tabSelect = $('#tab-select'),
                        $tabContents = $('.tab-contents'),
                        activeClass = 'is-active';

                    $tabButtonItem.first().addClass(activeClass);
                    $tabContents.not(':first').hide();

                    $tabButtonItem.find('a').on('click', function(e) {
                        var target = $(this).attr('href');

                        $tabButtonItem.removeClass(activeClass);
                        $(this).parent().addClass(activeClass);
                        $tabSelect.val(target);
                        $tabContents.hide();
                        $(target).show();
                        e.preventDefault();
                    });

                    $tabSelect.on('change', function() {
                        var target = $(this).val(),
                            targetSelectNum = $(this).prop('selectedIndex');

                        $tabButtonItem.removeClass(activeClass);
                        $tabButtonItem.eq(targetSelectNum).addClass(activeClass);
                        $tabContents.hide();
                        $(target).show();
                    });
                });

                $('#travller_search').on("click", function() {
                    $(".roomBoxMain").toggle("show_hiddenpart_hidden");
                });
                $('.done_traveller').on("click", function() {
                    $(".roomBoxMain").toggle("show_hiddenpart_hidden");
                });
function tottravellerhotel() {
    var e = 0, o = 0, t = 0, a = $("#roomlp").val();
    for (j = 1; j <= a; j++)e = parseInt(e) + parseInt($("#adult_" + j).val()), o = parseInt(o) + parseInt($("#child_" + j).val()), t = parseInt(t) + parseInt($("#infant_" + j).val());
    var l = parseInt(e) + parseInt(o) + parseInt(t);
    //if (4 * parseInt(a) < l) return alert("Only 4 pax are allowed in each room. Please modify travelers"), !1;
	$("#totadlt").val(e), $("#totchld").val(o), $("#totinfnt").val(t), $("#totaltravelers").html(l),
        $("#totaltravelersHtml").html('<span class="qtyTotal">' + parseInt(l) + "</span>"), $('.GuestTotal').html(parseInt(l)), $('.RoomsTotal').html(a);
    var r = '[{"totalRoom" : ' + a + '},{"totalTraveler" : ' + l + '},{"totaladult" : ' + e + '},{"totalchild" : ' + o + '},{"totalinfant" : ' + t + "}]"; $("#roominfojson").val(r), $("#tarvller_show___").hide(), $("#Noofdays").focus()

	var data = $('#hotel-search-form').serialize();
	$('.submithotel').attr('disabled',true);
					$.ajax({
						type: "POST",
                        url: "/hotels/index/hotel-room-pax-store",
                        dataType: 'json',
                        data: data,
                        beforeSend: function() {  },
                        success: function(response) {
							$('#roominfojson').val(response.roominfojson);
							$('.submithotel').attr('disabled',false);
                        }
						
                });

	
}
            </script>

    <script>


        <?php
        if (($modulename == 'tours') && ($controller == 'package')) {
           ?>

       <style>
            .filter-icon {
                display: none;
            }
                    @media (max-width: 767px){
        .filter-icon {
                display: block;
            }
        }
    </style>
      <?php  }
        ?>






    </script>

        <?php 
        if( (($modulename == 'default')) && (($controller == 'customer')) && ($action == 'login') ) {
        ?>
        <script type="text/javascript">
        Continue_login();
        </script>
        <?php } ?>
        <?php 
        if( (($modulename == 'default')) && (($controller == 'customer')) && ($action == 'loginfacebook') ) {
        ?>
        <script type="text/javascript">
        Continue_loginfacebook();
        </script>
        <?php } ?>

    </body>


    <?php  
        echo $footerScript1;
        echo $footerScript2;
        echo $footerScript3;
    ?>

    </html>
<?php } ?>

Youez - 2016 - github.com/yon3zu
LinuXploit