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/b2bzend/gtxlp/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/b2bzend/gtxlp/js/common-function.js
function putPackageSysIdEnquiryForm(packageId, packageName, IsFixedDeparturePackage) {
    $('.FirstName').focus();
    if (packageId != '') {
        $('#packageSysId').val(packageId);
        getFixedDepartureDates(1);
//        if (IsFixedDeparturePackage == 1) {
//            $('#IsFixedDeparturePackage').val(1);
//            var FixedDeparturePackageDateDiv = $('#FixedDeparturePackageDateDiv' + parseInt(packageId)).html();
//            $('#PKGCheckInDateDiv').html(FixedDeparturePackageDateDiv);
//        } else {
//            $('#IsFixedDeparturePackage').val(0);
//            $('#PKGCheckInDateDiv').html('<label class="sr-only" for="c-form-1-subject">Travel Date</label> <input type="text" name="PKGCheckInDate" placeholder="Travel Date" class="c-form-1-subject form-control whbg PKGCheckInDateNew" id="PKGCheckInDate" autocomplete="off">');
//            $(".PKGCheckInDateNew").datepicker({minDate: 0, dateFormat: 'dd/mm/yy'});
//        }
    } else {
        $('#packageSysId').val(0);
        $('#IsFixedDeparturePackage').val(0);
        $('#PKGCheckInDateDiv').html('<label class="sr-only" for="c-form-1-subject">Travel Date</label> <input type="text" name="PKGCheckInDate" placeholder="Travel Date" class="c-form-1-subject form-control whbg PKGCheckInDateNew" id="PKGCheckInDate" autocomplete="off">');
        $(".PKGCheckInDateNew").datepicker({minDate: 0, dateFormat: 'dd/mm/yy'});
    }

//    alert(packageName);
    $('#packageNameHtml').html('<b>Send Enquiry For ' + packageName + '</b>');
    $('.FirstName').focus();
}
function runfromDestination(){
    var PlanType = $('#PlanType').val();
    var baseUrlUrl = baseUrl + '/webservice/master-data/destination';
    if(PlanType == 6){
        baseUrlUrl = baseUrl + '/webservice/master-data/countrysearch';
    } 
    $.getJSON(baseUrlUrl, function (destinations) {
        $(".fromDestination").autocomplete({source: destinations, minLength: 3, autoFocus: true, focus: function (event, ui) {
                event.preventDefault();
            }, select: function (event, ui) {
                var value = ui.item.label.replace('"', '');
                this.value = value.replace('"', '');
                var v = ui.item.value;
                $('#FromDestinationId').val(v);
                return false;
            }});
        $(".ToDestination").autocomplete({source: destinations, minLength: 3, autoFocus: true, focus: function (event, ui) {
                event.preventDefault();
            }, select: function (event, ui) {
                var value = ui.item.label.replace('"', '');
                this.value = value.replace('"', '');
                var v = ui.item.value;
                $('#ToDestinationId').val(v);
                return false;
            }});
    });
}
$(document).ready(function () {
    setTimeout(function () {
        runfromDestination();
    }, 500);
    

    $("#submitEnquiryForm").submit(function (event) { 
        $(".msg").text('');
        var EmailReg = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
        event.preventDefault();
        if ($(".FirstName").val() === "") {
            $(".msg").text("Please Enter First Name").show().css({'color': 'red'}).fadeOut(5000);
            //                $("#register").effect("shake");
            $(".FirstName").focus();
            return false;
        }

        if ($(".LastName").val() === "") {
            $(".msg").text("Please Enter Last Name").show().css({'color': 'red'}).fadeOut(5000);
            $(".LastName").focus();
            return false;
        }

        if ($(".EmailId").val() == "") {
            $(".msg").text("Please Enter Email Id").show().css({'color': 'red'}).fadeOut(5000);
            $(".EmailId").focus();
            return false;
        }
         
        if (!EmailReg.test($('.EmailId').val())) {
            $(".msg").text("Please Enter Valid Email Id").show().css({'color': 'red'}).fadeOut(5000);
            $(".EmailId").focus();
            return false;
        }
        if ($(".Mobile").val() === "") {
            $(".msg").text("Please Enter Mobile Number").show().css({'color': 'red'}).fadeOut(5000);
            $(".Mobile").focus();
            return false;
        } else if (isNaN($(".Mobile").val())) {

            $(".msg").text("Please Enter Valid Mobile Number").show().css({'color': 'red'}).fadeOut(5000);
            $(".Mobile").focus();
            return false;
        }

//        else if ($(".Mobile").val().length !== 10) {
//            $(".msg").text("Mobile Number Length Should be of 10 digit").css({'color': 'red'}).show().fadeOut(5000);
//            $(".Mobile").focus();
//            return false;
//        }


        var leadsend = $('#leadsend').val();
        if (leadsend == 1) {

            if ($('#submitEnquiryForm select[name="packageSysId"]').val() == '0') {
                $(".msg").text("Please Select Package").show().css({'color': 'red'}).fadeOut(10000);
                $('#submitEnquiryForm select[name="packageSysId"]').focus();
                return false;
            }
            if ($(".PKGCheckInDate").val() === "") {
                $(".msg").text("Please Enter Date ").show().css({'color': 'red'}).fadeOut(10000);
                $(".PKGCheckInDate ").focus();
                return false;
            }


        }  
        var data = $(this).serialize();
        $.ajax({
            url: 'sendquery.php',
            data: data,
            dataType: 'json',
            type: 'post',
            beforeSend: function () {
                $('.sendEnquiryBtn').html('<i class="ace-icon fa fa-spinner fa-spin bigger-125"></i> Please Wait..').attr('disabled', true);
            },
            success: function (response) {
                var sendEnquiryBtnText = $('#sendEnquiryBtnText').val() != undefined ? $('#sendEnquiryBtnText').val() : 'Get Instant Quote';
                if (response.queryType == 'lead') {
                    $('#leadsend').val(1);
                    $('#leadID').val(response.leadID);
                    $('#BookingType').val(response.BookingType);
                    $('#PkgType').val(response.PkgType);
                    $('#DestinationValue').val(response.DestinationValue);
                    $('#DestinationId').val(response.DestinationId);
                    $('#byopacktypeCat').val(response.byopacktypeCat);
                    if ($('#LeadPageType').val() != 6) {
                        $('.Noofdays').val(response.noofday);
                    }

                    $('.sendEnquiryBtn').html(sendEnquiryBtnText).attr('disabled', false);
                    $('.showQueryForm').show();
                    //alert($('#LeadPageType').val());alert(leadsend);
                    if ($('#LeadPageType').val() == 6 && leadsend == 0) {
                        $("#submitEnquiryForm").submit();
                    }
                    if (response.BookingType == 1) {
                        $('.totalTravellersDiv').hide();
                        $('.totalTravellersRoomwiseDiv').show();
                    } else {
                        $('.totalTravellersDiv').show();
                        $('.totalTravellersRoomwiseDiv').hide();
                    }
                    if ($('#AgencySysId').val() == '48') {
                        gtag('event', 'conversion', {'send_to': 'AW-954359114/LvTyCPGLiMQBEMq6iccD', });
                    }
                    if ($('#AgencySysId').val() == '4650') {
                        gtag('event', 'conversion', {'send_to': 'AW-983990709/qjvwCIyI8pUBELWDmtUD'});
                    }
                } else {
                    $('.sendEnquiryBtn').html(sendEnquiryBtnText).attr('disabled', false);
                    if (response.status == true) {

                        if (response.data.IsBooking == true) {
                            if ($('#AgencySysId').val() == '4995') {
                                $('.msg').html('Thank you for registering for our Trip.').show().css({'color': '#fff'});
                            } else {
                                $('.msg').html('Thank you for your query. we will get back to you soon.').show().css({'color': '#fff'});
                            }
                            $('.sendEnquiryBtn').hide();
                            $('.sendEnquiryBookNowBtn').show().attr('href', response.data.url);
                            window.location.href = response.data.url;
                        } else {
                            if ($('#AgencySysId').val() == '4995') {
                                $('.msg').html('Thank you for registering for our Trip.').show().css({'color': '#fff'});
                            } else {
                                $('.msg').html('Thank you for your query. we will get back to you soon.').show().css({'color': '#fff'});
                            }
                        }
                    } else {
                        if ($('#AgencySysId').val() == '4995') {
                            $('.msg').html('Thank you for registering for our Trip.').show().css({'color': '#fff'});
                        } else {
                            $('.msg').html('Thank you for your query. we will get back to you soon.').show().css({'color': '#fff'});
                        }
                    }



                }
            },
        });
    });
});
function showDiv() {
    document.getElementById('tarvller_show').style.display = "block";
    $("i", ".tarveller_rotate").toggleClass("fa-angle-down fa-angle-up");
}

//function close_room() {
// document.getElementById('tarvller_show').style.display = "none";
// $("i", ".tarveller_rotate").toggleClass("fa-angle-up fa-angle-down");
// }


$(document).ready(function () {
    getFixedDepartureDates(1);
})
function getFixedDepartureDates(that) {
    var packageId = $('#packageSysId').val();
    var IsFixedDeparturePackage = $('#IsFixedDeparturePackage' + parseInt(packageId)).val();
    var PlanType = $('#PlanType').val();
    var placeholder = 'From Destination';
    if(PlanType == 6){
        placeholder = 'Nationality';
    }
    if (IsFixedDeparturePackage == 1) {
        $('#IsFixedDeparturePackage').val(1);
        var FixedDeparturePackageDateDiv = $('#FixedDeparturePackageDateDiv' + parseInt(packageId)).html();
        var FixedDeparturePackageDestinationDiv = $('#FixedDeparturePackageDestinationDiv' + parseInt(packageId)).html();
        if(FixedDeparturePackageDateDiv.trim() != ''){
            $('#PKGCheckInDateDiv').html(FixedDeparturePackageDateDiv);
        }else{
            $('#PKGCheckInDateDiv').html('<label class="sr-only" for="c-form-1-subject">Travel Date</label> <input type="text" name="PKGCheckInDate" placeholder="Travel Date" class="c-form-1-subject form-control whbg form-control PKGCheckInDateNew" id="PKGCheckInDate" autocomplete="off">');
            $(".PKGCheckInDateNew").datepicker({minDate: 0, dateFormat: 'dd/mm/yy'});
        }
        
        if(FixedDeparturePackageDestinationDiv.trim() != ''){
            $('#DestinationDiv').html(FixedDeparturePackageDestinationDiv);
        }else{
            $('#DestinationDiv').html('<label class="sr-only" for="c-form-1-subject">Destination</label> <input type="text" id="FromDestination" name="Destination" value="" class="form-control destinations1 fromDestination" placeholder="'+placeholder+'"><input type="hidden" name="FromDestinationId" id="FromDestinationId" value="">');
            runfromDestination();
        }
        
    } else {
        $('#IsFixedDeparturePackage').val(0);
        $('#PKGCheckInDateDiv').html('<label class="sr-only" for="c-form-1-subject">Travel Date</label> <input type="text" name="PKGCheckInDate" placeholder="Travel Date" class="c-form-1-subject form-control whbg form-control PKGCheckInDateNew" id="PKGCheckInDate" autocomplete="off">');
        $('#DestinationDiv').html('<label class="sr-only" for="c-form-1-subject">Destination</label> <input type="text" id="FromDestination" name="Destination" value="" class="form-control destinations1 fromDestination" placeholder="'+placeholder+'"><input type="hidden" name="FromDestinationId" id="FromDestinationId" value="">');
        $(".PKGCheckInDateNew").datepicker({minDate: 0, dateFormat: 'dd/mm/yy'});
        runfromDestination();
    }
}

$(".PKGCheckInDate").datepicker({minDate: 0, dateFormat: 'dd/mm/yy'});
//$(".PKGCheckInDateNew").datepicker({minDate: 0, dateFormat: 'dd/mm/yy'});

Youez - 2016 - github.com/yon3zu
LinuXploit