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/greenvalley/public/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/greenvalley/public/js/car.js
carMaster(2);
function carMaster(traveltype){
    var triptype = $("input[name=tripTypeOption]:checked").val();
    $.ajax({
        type: "POST",
        url: SITEURL+"car/index/getcarsource",
        dataType: 'html',
        data: {triptype:triptype,traveltype:traveltype},
        success: function(result) {
        var source = JSON.parse(result);
        $( "#car_mytrip_city_from").autocomplete({  
            minLength: 2,
            autoFocus: true,
            source: source,
            select: function(index, value) {
               var city = value.item.value;
               var airport = value.item.Name;
               
                var cityval = $('#car_mytrip_city_from').val();
                    if(cityval != ''){
                            var pick = 'pickup';
                            var triptype = $("input[name=tripTypeOption]:checked").val();
                            var traveltype = $('#car-select').val();
                            var destination = 1;
                            $.ajax({
                                type: "POST",
                                url: SITEURL+"car/index/getcarsource",
                                dataType: 'html',
                                data: {triptype:triptype,traveltype:traveltype,destination:destination,pick:pick,city:cityval},
                                success: function(result) {
                                    var source = JSON.parse(result);
                                    var option1 = '<option value="">Drop Up Location</option>';
                                   var term = $('#car_mytrip_city_from').val();
                                   $( source ).each(function( index, element ) {
                                        if(element.City == term){
                                             console.log(element.City);
                                             console.log(element.Name);
                                            option1 += '<option value="'+element.Name+'">'+element.Name+'</option>';
                                        }
                                    }); 
                                    $('#airport').html(option1);
                                
                                }

                            });
                    
                    }
                    else{
                    alert('Please select source city');
                    }
                
                    setTimeout(function() {
                    $.getJSON('public/data/dynamic/carhotelmaster.json', function(source) {
                    // console.log(source);
                        var term = city;
                        var option = '<option value="">Drop Up Location</option>';
                        if(term !=''){
                              $( source ).each(function( index, element ) {
                                if(element.City == term){
                                    option += '<option value="'+element.label+'">'+element.label+'</option>';
                                }
                             }); 
                             //console.log( option ); 
                            $('#droplocation').html(option);
                            }else{
                            alert('Please select source');
                        }
                        
                    });
                }, 1000);


           }
        
        });
    }

    });

}

$(function () {
    var minlength = 2;
    $("#car_mycartrip_city_to").keyup(function () {
        //alert('test');
        var that = this,
        value = $(this).val();

        if (value.length >= minlength ) {
            var triptype = $("input[name=tripTypeOption]:checked").val();
            var traveltype = $('#car-select').val();
            var destination = 1;
                $.ajax({
                    type: "POST",
                    url: SITEURL+"car/index/getcarsource",
                    dataType: 'html',
                    data: {triptype:triptype,traveltype:traveltype,destination:destination},
                    success: function(result) {
                    var source = JSON.parse(result);
                    $( "#car_mycartrip_city_to").autocomplete({  
                        minLength: 2,
                        autoFocus: true,
                        source: source,
                        select: function(index, value) {
                        console.log(value);
                        var city = value.item.value;
                        var airport = value.item.Name;
                        }
                    
                    });
                }

                });
        }
    });
});


$(function() {
    $('#car-select').change(function(){
        var traveltype = $(this).val();
        if(traveltype == 1){
            $('.outstaion').show();
            $('.local').hide();
            $('.transfer').hide();
            $('#car_RoundTrip').prop('checked',true);
            $('.carcitytoo').show();
            $('#pickuplocat').hide();
            $('#droplocat').hide();

            $('#airport').val('');
            $('#droplocation').val('');
            carMaster(traveltype);
        }

        if(traveltype == 2){
            $('.local').show();
            $('.transfer').hide();
            $('.outstaion').hide();
            $('#car_fullday').prop('checked',true);

            $('.carcitytoo').hide();
            $('#pickuplocat').hide();
            $('#droplocat').hide();

             $('#car_mycartrip_city_to').val('');   

            $('#airport').val('');
            $('#droplocation').val('');
            carMaster(traveltype);
        }

        if(traveltype == 3){
            $('.transfer').show();
            $('.local').hide();
            $('.outstaion').hide();
            $('#car_airport').prop('checked',true);
            $('.carcitytoo').hide();
            $('#car_mycartrip_city_to').val('');
            $('#pickuplocat').show();
            $('#droplocat').show();
            carMaster(traveltype);

        }
    });

    
});


    function triptypeoption(id){
       
       if(id == 'car_RoundTrip'){
           $('.car-end-Date').show();
       }
       
      if(id == 'car_OneWay'){
           $('.car-end-Date').hide();
           $('#car-end-Date').val('');

       }

       if(id == 'car_MultiWay'){
            $('.car-end-Date').show();
        }

        if(id == 'car_fullday' ){
            $('.carcitytoo').hide();
            $('#car_mycartrip_city_to').val('');
        }
       
        if(id == 'car_halfday' ){
            $('.carcitytoo').hide();
            $('#car_mycartrip_city_to').val('');
        }

    }


    function selectnumberofcars(selectid){
        var amount = $("#totalamt"+selectid).html();
        var singleamt = $("#totalinputamt"+selectid).val();
        var cars = $(".selectcars"+selectid).val();
        var totalamt = parseInt(singleamt) * parseInt(cars);
        
        $("#totalamt"+selectid).html(totalamt);
        console.log(totalamt);
        
    }

    function getSearchCutomer() {
        var leadMobile = $('#leadMobile').val();
        var leadEmail = $('#leadEmail').val();
        console.log(leadMobile);
        console.log(leadEmail);
        console.log(SITEURL);
        if (leadMobile === '') {
            alert('Please enter mobile number');
            $("#leadMobile").focus();
            $("#leadEmail").val('');
            return false;
        }
        $.ajax({
            url: SITEURL+'/car/search-cutomer/',
            data: {
                leadEmail: leadEmail,
                leadMobile: leadMobile
            },
            dataType: 'json',
            type: 'POST',
            error: function() {},
            success: function(response) {
                if (response.success) {
                    console.log(response);
                    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);
                    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;
                        }
                        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 + ' <span class="checkmark"></span><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">
                                    <input type="checkbox" id="custMember_` + obj.CustomerMemberSysId + `" name="cusmemberSelected[]" onclick="Selectmember(this,` + obj.paxType + `)" value="` + obj.CustomerMemberSysId + `"><label for="custMember_` + obj.CustomerMemberSysId + `">` + obj.SalutationTxt + ` ` + obj.FirstName + ` ` + obj.LastName + `<br> <span class="adult_listtitle">` + obj.RelationTxt + ` | ` + obj.paxTypeName + `</span> </label>
                                    <img src="public/flight/images/pencil-fill.svg" class="editimage_mobile editPax_` + obj.paxType + `">
                                </div>`);
                    });
                    $('#dynamic_div').html(Listul);
                    $('.RefreshTraveller').show();
                    
                    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 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;
            }
        }
    }

    function savePassengerDetails() {
        //alert('test');
        var data = $("#passenger-details").serialize();
        var mobile_number = $("#leadMobile").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 = $("#gstPIN").val();
        var accepttandc = $("input[name='accepttandc']:checked").length;
        //alert(accepttandc);
        $.ajax({
            url: SITEURL+'car/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 + '&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) {
                alert('test');
                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 Selectmember(data, paxType) {
            console.log(data);
            var checkedornot = $("#custMember" + data.value).prop('checked');
            var customerMember = JSON.parse(GetData('customerMember'));
            var obj = customerMember[data.value];
            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';
                    }
                    var DOB = obj.dobday + '/' + obj.dobmonth + '/' + obj.dobyear;
                    $("#CustomerSysId-" + b).val(obj.CustomerMemberSysId);
                    $("#CRADULT-1").attr('value', obj.CustomerMemberSysId);
                    $("#CRADULT-1").show();


                    $("#passenger-firstname-" + b).val(obj.FirstName);
                    $("#passenger-lastname-" + b).val(obj.LastName);
                    $("#guestCity").val(obj.CityTitle);
                    $("#guestCountry").val('India');
                    $("#pickUpaddress").val(obj.Address);
                    
                    $("#travellerdetails" + b).val(obj.SalutationTxt + ' ' + obj.FirstName + ' ' + obj.LastName);
                    
                    $("#dateofbirth-" + b).val(DOB);
                    $("#salution").val(obj.Salutation);
                    return false;
                } else {

                }
                b++;
            });
        }

        function GetData(key) {
            var sonuc = "";
            if (typeof(localStorage) != "undefined") {
                if (localStorage[key] != null) {
                    sonuc = localStorage[key];
                }
            } else {
                sonuc = $.cookie(key);
            }
            return sonuc;
        }

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

            $("#guestCity").val('');
            $("#guestCountry").val('');
            $("#pickUpaddress").val('');
            
            $("#dateofbirth-").val('');
            $("#travel_details").html('');
            $("#CRADULT-1").hide();

        });

Youez - 2016 - github.com/yon3zu
LinuXploit