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/uatb2c.hellogtx.com/public/js/hotelinv/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/uatb2c.hellogtx.com/public/js/hotelinv//function.js
function addroom() {
    var e = $("#roomlp").val(),
        o = parseInt(e) + 1;
    if (11 === o) return alert("Only 10 rooms are allowed."), !1;
    $("#roomlp").val(o), $("#rmres_" + o).show(), $(".disproom").hide(), $(".disproom_" + o).show(), $("#adult_" + parseInt(o)).focus()
}

function delroom(e) {
    var o = parseInt(e) - 1;
    $("#roomlp").val(o), $("#rmres_" + e).hide(), $(".disproom").hide(), $(".disproom_" + o).show()
}

function showextrabedbox(e) {
    $("#adult_" + e).val();
    tottravelerInRoom(e)
}

function showextrabedchildagebox(e) {
    //console.log(e);
    var sl, o, t = $("#child_" + e).val(),
        a = $("#adult_" + e).val(),
        l = $("#child_" + e).val(),
        r = $("#infant_" + e).val();
    //if (5 <= parseInt(a) + parseInt(l) + parseInt(r)) return $("#child_" + e).val(0), $(".childage_" + e).hide(), alert("Only 4 pax are allowed in each room. Please modify travelers in Room no. " + e), !1;
    for ($(".childage_" + e).hide(), o = 1; o <= t; o++) $("#childcl_" + e + "_" + o).show(), sl = $("#childSelected_" + e + "_" + o).val(), $("#childcl_" + e + "_" + o + " select").val(sl)
}

function tottravelerInRoom(e) {
    var o = $("#adult_" + e).val(),
        t = $("#child_" + e).val(),
        a = $("#infant_" + e).val();
    //if (5 <= parseInt(o) + parseInt(t) + parseInt(a)) return $("#adult_" + e).val(2), alert("Only 4 pax are allowed in each room. Please modify travelers in Room no. " + e), !1 
}

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: "/hotelsinv/index/hotel-room-pax-store",
        dataType: 'json',
        data: data,
        beforeSend: function () {},
        success: function (response) {
            $('#roominfojson').val(response.roominfojson);
            $('.submithotel').attr('disabled', false);

        }

    });


}

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

function showMoreTestimonial(e) {
    $(".showMoreTestimonialContent" + parseInt(e)).show(), $("#showMoreTestimonialBtn" + parseInt(e)).hide(), $("#hideMoreTestimonialBtn" + parseInt(e)).show()
}

function hideMoreTestimonial(e) {
    $(".showMoreTestimonialContent" + parseInt(e)).hide(), $("#showMoreTestimonialBtn" + parseInt(e)).show(), $("#hideMoreTestimonialBtn" + parseInt(e)).hide()
}
$("#hotel-search-form").submit(function (e) {
    var selectDestination = $.trim($('#selectDestination').val());
    var check_in = $.trim($('#hotel-search-form input[name="check_in"]').val());
    var check_out = $.trim($('#hotel-search-form input[name="check_out"]').val());
    if (selectDestination === '') {
        alert('Enter city name');
        return false;
    }
    if (check_in == '' || check_in == '__/__/____') {
        alert('Enter checkin date');
        return false;
    }
    if (check_out == '' || check_out == '__/__/____') {
        alert('Enter checkout date');
        return false;
    }

});



function showChildAge() {
    var totchld = $('#totchld').val();
    $('.selectchildagediv').hide();
    for (var i = 1; i <= totchld; i++) {
        $('.selectchildagediv' + parseInt(i)).show();
    }
    // var totalage = $('#totalage').val();

    // var html = htmlage = '';
    // for(var m = 0;m < 18; m++){
    // var ytext = (m==0) ? ' year old' : ' years old';
    // var selected = (m==12) ? 'selected' : '';
    // htmlage += '<option value="'+m+'" '+selected+'>'+m+ytext+'</option>';
    // }
    // for(var i = 1; i <= totchld; i++){
    // html += '<div class="selectchildage" ><div class="form-group"><select name="childage[]" class="form-control no-padding-right">'+htmlage+'</select></div></div>';
    // }
    // $('.appendChildAgeHtml').html('<div class="selectchildage" style="width:11%"> <div class="form-group"> <label for="Adults">&nbsp;</label></div></div>'+html+'<div class="clearfix"></div>');


}

function showRoomDetailFunc(id) {
    var data = $('.showRoomDetail' + id).serialize();
    
    $.ajax({
        type: "POST",
        url: "/hotelsinv/index/hotel-room-detail",
        dataType: 'html',
        data: data,
        beforeSend: function () {
            $("#viewHoteldetailsModalHtml").html('<div style="text-align:center;padding-top:30px;"><img src="<?php echo $baseUrl; ?>public/images/loader.gif"/></div>');
        },
        success: function (response) {
            $('#viewHoteldetailsModal').modal('show');
            $('#viewHoteldetailsModalHtml').html(response);
            currentSlide(1);
        }
    });
}

function showViewHotelDetail(that, id) {
    var GTXPkgId = $(that).attr('GTXPkgId');
    $.ajax({
        type: "POST",
        url: "/hotelsinv/index/hotel-detail-popup",
        dataType: 'html',
        data: {
            'type': id,
            'GTXPkgId': GTXPkgId
        },
        beforeSend: function () {
            $("#viewHoteldetailsModalHtml").html('<div style="text-align:center;padding-top:30px;"><img src="/public/images/loader.gif"/></div>');
        },
        success: function (response) {
            $('#viewHoteldetailsModal').modal('show');
            $('#viewHoteldetailsModalHtml').html(response);
        }
    });
}
$("#viewHoteldetailsModal").on('hidden.bs.modal', function () {
    $('#viewHoteldetailsModalHtml').html('');
});

function updateRoomPaxDetail(id) {
    var data = $('.showRoomDetail' + id).serialize();
    $.ajax({
        type: "POST",
        url: "/hotelsinv/index/updateroom-pax-detail",
        dataType: 'html',
        data: data,
        beforeSend: function () {
            $("#viewHoteldetailsModalHtml").html('<div style="text-align:center;padding-top:30px;"><img src="<?php echo $baseUrl; ?>public/images/loader.gif"/></div>');
        },
        success: function (response) {
            $('#viewHoteldetailsModal').modal('show');
            $('#viewHoteldetailsModalHtml').html(response);
        }
    });
}

function updateRoomPaxDetailSplitWise(id) {
    var data = $('.showRoomDetail' + id).serialize();
    $.ajax({
        type: "POST",
        url: "/hotelsinv/index/updateroom-pax-detail-splitwise",
        dataType: 'html',
        data: data,
        beforeSend: function () {
            $("#viewHoteldetailsModalHtml").html('<div style="text-align:center;padding-top:30px;"><img src="<?php echo $baseUrl; ?>public/images/loader.gif"/></div>');
        },
        success: function (response) {
            $('#viewHoteldetailsModal').modal('show');
            $('#viewHoteldetailsModalHtml').html(response);
        }
    });
}

function getPaxByHotelRoom(that, i, index) {
    var EType = $(that).val();

    var Room_MAdult = $('#Room_MAdult' + parseInt(i) + '' + parseInt(index)).val();
    var MAdultHtml = $('#MAdult' + parseInt(EType)).html();
    $('#Room_MAdult' + parseInt(i) + '' + parseInt(index)).html(MAdultHtml);
    $('#Room_MAdult' + parseInt(i) + '' + parseInt(index)).val(Room_MAdult);

    var Room_MChild = $('#Room_MChild' + parseInt(i) + '' + parseInt(index)).val();
    var MChildHtml = $('#MChild' + parseInt(EType)).html();
    $('#Room_MChild' + parseInt(i) + '' + parseInt(index)).html(MChildHtml);
    $('#Room_MChild' + parseInt(i) + '' + parseInt(index)).val(Room_MChild);

    var ETypeSplit = EType.split('__');
    var TransferIs = ETypeSplit[4];
    var IsSelected = 0;
    $("select#arrHotelRoomsDiv option").each(function () {
        if ($(this).attr('ExtraServiceSysId') != TransferIs) {
            $(this).attr("hidden", true).attr('selected', false);
        } else {
            if (IsSelected > 0) {
                $(this).removeAttr("hidden");
            } else {
                $(this).removeAttr("hidden").attr('selected', true);
                IsSelected++;
            }
        }
    });
    var arrHotelRoomsDiv = $('#arrHotelRoomsDiv').html();
    if (i == 1 && index == 1) {
        $('.getPaxByHotelRoomClass').html(arrHotelRoomsDiv);
    }

}

function addMoreHotelRoom(i) {
    var count = parseInt($('#totalRoom' + parseInt(i)).val()) + 1;
    var EType = $('#roomInfoEType').val();
    var MAdultHtml = $('#MAdult' + parseInt(EType)).html();

    var MChildHtml = $('#MChild' + parseInt(EType)).html();

    var arrHotelRoomsDiv = $('#arrHotelRoomsDiv').html();

    var html = '<div class="hotelRoomDiv' + parseInt(i) + parseInt(count) + '"><div class="col-lg-6 col-md-6 col-sm-12 col-xs-12  col-3"><span class="roomText">&nbsp;</span><br>' +
        '<select class="form-control getPaxByHotelRoomClass" name="hotelRoomName[]" style="display: inline-block;" onchange="getPaxByHotelRoom(this,' + parseInt(i) + ',' + parseInt(count) + ')">' + arrHotelRoomsDiv + '</select></div>' +
        '<div class="col-lg-2 col-md-2 col-xs-12 col-sm-12 col-3"><span>&nbsp;</span><br>' +
        '<select class="form-control" id="Room_MAdult' + parseInt(count) + '" name="MAdult[]" style="display: inline-block;">' + MAdultHtml + '</select></div>' +
        '<div class="col-lg-2 col-md-2 col-xs-12 col-sm-12 col-3"><span class="child-pax-text-margin-">&nbsp;</span><br>' +
        '<select class="form-control" id="Room_MChild' + parseInt(count) + '" name="MChild[]" style="display: inline-block;">' + MChildHtml + '</select></div>' +
        '<div class="col-lg-2 col-md-2 col-xs-12 col-sm-12 col-3"><a style="margin-top: 20px;" href="javascript://" class="btn btn-default" onclick="removeMoreHotelRoom(' + parseInt(i) + ',' + parseInt(count) + ')">Remove</a></div></div> <div class="clearfix"></div>';
    $('#appendRoomDiv' + parseInt(i)).append(html);
    $('#totalRoom' + parseInt(i)).val(parseInt(count));
    //					$('.roomText').each(function(e){
    //							$(this).html('Room '+(parseInt(e)+1));
    //					})

}

function removeMoreHotelRoom(i, id) {
    $('.hotelRoomDiv' + parseInt(i) + parseInt(id)).remove();
    //					$('.roomText').each(function(e){
    //							$(this).html('Room '+(parseInt(e)+1));
    //					})
}
$(document).on('submit', '.hotel-room-pax', function () {
    var data = $(this).serialize();
    $.ajax({
        type: "POST",
        url: "/hotelsinv/index/check-Updated-room-pax-detail",
        dataType: 'json',
        data: data,
        beforeSend: function () {
            $(".continue").html('please wait..').attr('disabled', true);
        },
        success: function (response) {
            $(".continue").html('Continue').attr('disabled', false);
            if (response.status == true) {
                $('.message').html(response.message).css({
                    'color': 'green'
                });
                window.location.href = response.redirecturl;
            } else {
                $('.message').html(response.message).css({
                    'color': 'red'
                });
                return false;
            }

        }
    });
})
$(document).on('submit', '.hotel-room-pax-split', function () {
    $('.disabledClass').attr('disabled', false);
    var data = $(this).serialize();
    $.ajax({
        type: "POST",
        url: "/hotelsinv/index/check-Updated-room-pax-detail-split",
        dataType: 'json',
        data: data,
        beforeSend: function () {
            $(".continue").html('please wait..').attr('disabled', true);
        },
        success: function (response) {
            $(".continue").html('Continue').attr('disabled', false);
            $('.disabledClass').attr('disabled', true);
            if (response.status == true) {
                $('.message').html(response.message).css({
                    'color': 'green'
                });
                window.location.href = response.redirecturl;
            } else {
                $('.message').html(response.message).css({
                    'color': 'red'
                });
                return false;
            }

        }
    });
})

function copyLeadpax(input) {
    if (input == 'FirstName') {
        $('#passenger-firstname-1').val($('#leadFirstname').val());
    } else if (input == 'LastName') {
        $('#passenger-lastname-1').val($('#leadLastname').val());
    } else if (input == 'Salutation') {
        $('#salution-1').val($('#leadSalution').val());
    }
}

function calculateDateights(i) {
    var check_out = $('.checkInDate' + parseInt(i)).val();
    var NoofNights = $('.NoofNights' + parseInt(i)).val();
    var check_out1 = check_out.split('/');
    var mDay = check_out1[0];
    var mMonth = check_out1[1];
    var mYear = check_out1[2];
    var check_outNew = mMonth + '/' + mDay + '/' + mYear;
    var newdate = new Date(check_outNew);
    newdate.setDate(newdate.getDate() + parseInt(NoofNights));
    var dd = ("0" + newdate.getDate()).slice(-2);
    var mm = ("0" + (newdate.getMonth() + 1)).slice(-2);
    var y = newdate.getFullYear();
    var addDate = dd + '/' + mm + '/' + y;
    $('.checkInDate' + (parseInt(i) + 1)).val(addDate);
}

Youez - 2016 - github.com/yon3zu
LinuXploit