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/b2b.hellogtx.com/public/asset/assets/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/b2b.hellogtx.com/public/asset/assets/js/autocompletesr.js
function countWords(tx) {
    return tx ? tx.replace(/ +/g, " ").replace(/\w+| $|^ /g, "").length + 1 : 0;
}
var HotelsTags = [];
var DefaultCityTJ = [
    { "CityId": 0, "TBBCityId": 725862, "CityName": "DELHI", "countryTitle": "INDIA", "CountryId": "101", "label": "DELHI (INDIA)", "CountryCode": "IN" }, { "CityId": 0, "TBBCityId": 699261, "CityName": "MUMBAI", "countryTitle": "INDIA", "CountryId": "101", "label": "MUMBAI (INDIA)", "CountryCode": "IN" },
    { "CityId": 0, "TBBCityId": 699356, "CityName": "GOA", "countryTitle": "INDIA", "CountryId": "101", "label": "GOA (INDIA)", "CountryCode": "IN" }, {
        "CityId": 0, "TBBCityId": 740075, "CityName": "BENGALURU", "countryTitle": "INDIA", "CountryId": "101", "label": "BENGALURU (INDIA)", "CountryCode": "IN"
    }, { "CityId": 0, "TBBCityId": 738801, "CityName": "CHENNAI", "countryTitle": "INDIA", "CountryId": "101", "label": "CHENNAI (INDIA)", "CountryCode": "IN" }, { "CityId": 0, "TBBCityId": 739947, "CityName": "KOLKATA", "countryTitle": "INDIA", "CountryId": "101", "label": "KOLKATA (INDIA)", "CountryCode": "IN" }, { "CityId": 0, "TBBCityId": 697486, "CityName": "JAIPUR DISTRICT", "countryTitle": "INDIA", "CountryId": "101", "label": "JAIPUR DISTRICT (INDIA)", "CountryCode": "IN" }, { "CityId": 0, "TBBCityId": 738891, "CityName": "LUCKNOW", "countryTitle": "INDIA", "CountryId": "101", "label": "LUCKNOW (INDIA)", "CountryCode": "IN" }, { "CityId": 0, "TBBCityId": 738356, "CityName": "PATNA", "countryTitle": "INDIA", "CountryId": "101", "label": "PATNA (INDIA)", "CountryCode": "IN" }, { "CityId": 0, "TBBCityId": 707176, "CityName": "PUNE", "countryTitle": "INDIA", "CountryId": "101", "label": "PUNE (INDIA)", "CountryCode": "IN" }, { "CityId": 0, "TBBCityId": 697010, "CityName": "DUBAI", "countryTitle": "UNITED ARAB EMIRATES", "CountryId": "228", "label": "DUBAI (UNITED ARAB EMIRATES)", "CountryCode": "AE" }, { "CityId": 0, "TBBCityId": 727326, "CityName": "BANGKOK", "countryTitle": "THAILAND", "CountryId": "215", "label": "BANGKOK (THAILAND)", "CountryCode": "TH" }, { "CityId": 0, "TBBCityId": 738005, "CityName": "SINGAPORE", "countryTitle": "SINGAPORE", "CountryId": "190", "label": "SINGAPORE (SINGAPORE)", "CountryCode": "SG" }, { "CityId": 0, "TBBCityId": 695869, "CityName": "PATTAYA", "countryTitle": "THAILAND", "CountryId": "3623", "label": "PATTAYA (THAILAND)", "CountryCode": "TH" }, { "CityId": 0, "TBBCityId": 111003, "CityName": "KAYSERSBERG", "countryTitle": "FRANCE", "CountryId": "76", "label": "KAYSERSBERG (FRANCE)", "CountryCode": "FR" }, { "CityId": 0, "TBBCityId": 111142, "CityName": "LA CALEVIE", "countryTitle": "FRANCE", "CountryId": "76", "label": "LA CALEVIE (FRANCE)", "CountryCode": "FR" }, { "CityId": 0, "TBBCityId": 111290, "CityName": "LENTIER", "countryTitle": "FRANCE", "CountryId": "76", "label": "LENTIER (FRANCE)", "CountryCode": "FR" }, { "CityId": 0, "TBBCityId": 113113, "CityName": "BAIHU", "countryTitle": "CHINA", "CountryId": "46", "label": "BAIHU (CHINA)", "CountryCode": "CN" }];
var DefaultCityTBO = [{ "id": 72165, "CityId": 0, "TBBCityId": 130443, "CountryId": 0, "CountryCode": "IN", "CityName": "New Delhi", "countryTitle": "India", "label": "New Delhi (India)" }, { "id": 72166, "CityId": 18676, "TBBCityId": 144306, "CountryId": 101, "CountryCode": "IN", "CityName": "Mumbai", "countryTitle": "India", "label": "Mumbai (India)" }, { "id": 72171, "CityId": 10576, "TBBCityId": 119805, "CountryId": 101, "CountryCode": "IN", "CityName": "Goa", "countryTitle": "India", "label": "Goa (India)" }, { "id": 72167, "CityId": 0, "TBBCityId": 111124, "CountryId": 0, "CountryCode": "IN", "CityName": "Bangalore", "countryTitle": "India", "label": "Bangalore (India)" }, { "id": 72169, "CityId": 6000, "TBBCityId": 127343, "CountryId": 101, "CountryCode": "IN", "CityName": "Chennai", "countryTitle": "India", "label": "Chennai (India)" }, { "id": 72168, "CityId": 22238, "TBBCityId": 133133, "CountryId": 101, "CountryCode": "IN", "CityName": "Pune", "countryTitle": "India", "label": "Pune (India)" }, { "id": 91811, "CityId": 0, "TBBCityId": 115936, "CountryId": 0, "CountryCode": "AE", "CityName": "Dubai", "countryTitle": "United Arab Emirates", "label": "Dubai (United Arab Emirates)" }, { "id": 90735, "CityId": 2266, "TBBCityId": 144092, "CountryId": 215, "CountryCode": "TH", "CityName": "Bangkok", "countryTitle": "Thailand", "label": "Bangkok (Thailand)" }, { "id": 85012, "CityId": 25278, "TBBCityId": 138703, "CountryId": 190, "CountryCode": "SG", "CityName": "Singapore", "countryTitle": "Singapore", "label": "Singapore (Singapore)" }, { "id": 90736, "CityId": 20925, "TBBCityId": 132068, "CountryId": 215, "CountryCode": "TH", "CityName": "Pattaya", "countryTitle": "Thailand", "label": "Pattaya (Thailand)" }];
$(".hotel_name_search").autocomplete({
    // search: function(event, ui) {
    //     $('.spinner').show();
    // },
    source: function (request, response) {
        var IsTJHotelAPI = $('#IsTJHotelAPI').val();
        if (IsTJHotelAPI == '1') {
            var DefaultCity = DefaultCityTJ;
        } else {
            var DefaultCity = DefaultCityTBO;
        }
        if (request.term.replace(/ /g, '').length > 2) {
            var query = request.term;
            $.getJSON("/hotels/index/hotel-city", 'query=' + query, function (source) {
                var term = $.ui.autocomplete.escapeRegex(request.term),
                    startsWithMatcher = new RegExp("^" + term, "i"),
                    startsWith = $.grep(source, function (value) {
                        return startsWithMatcher.test(value.CityName || 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, 15));
            });
        } else {
            source = DefaultCity;
            var query = 'd';
            var term = $.ui.autocomplete.escapeRegex(query),
                startsWithMatcher = new RegExp("^" + term, "i"),
                startsWith = $.grep(source, function (value) {
                    return startsWithMatcher.test(value.CityName || 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, 15));
        }
    },

    minLength: 0,
    autoFocus: true,
    select: function (event, ui) {
        var index = $(this).attr('index');
        var value = ui.item.value;
        $('#hidden_selected_hotel_cityid').val(ui.item.CityId);
        $('#hidden_selected_hotel_TBBCityId').val(ui.item.TBBCityId);
        $("#hidden_selected_city_name").val(ui.item.CityName);
        $("#hidden_selected_CountryId").val(ui.item.CountryId);
        $("#hotel_countryCode").val(ui.item.CountryCode);
    }
}).focus(function () {
    $(this).autocomplete('search');
});

Youez - 2016 - github.com/yon3zu
LinuXploit