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/travnet.co.in/public/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/travnet.co.in/public/js/piyush_functions.js
/* Added by Piyush Tiwari on Date 10-8-18 start*/
$(document).on('click', '.iamplusminus', function () {
    if ($(this).hasClass('expand')) {
        $(this).html('<i class="icon-plus"></i>').addClass('collepse').removeClass('expand').attr('title', 'More...');
        $(this).parent().css({'height': '180px'});
    } else {
        $(this).html('<i class="icon-minus"></i>').addClass('expand').removeClass('collepse').attr('title', 'Less...');
        ;
        $(this).parent().css({'height': 'auto'});
    }
});

function moreless(type, e)
{
    if (type == null) {
        $(e).parent().find('a.limore').toggleClass("hidee");
    }
    else if (type == 'li') {
        $(e).parent().parent().find('li.limore').toggleClass("hidee")
    }
    $(e).html(($(e).text() == '-') ? '+' : '-');
}

function trimcontent(showChar) {
    var moretext = "+More";
    var lesstext = "-Less";

    $('.more').each(function () {
        var content = $(this).html();

        if (content.length > showChar) {

            var c = content.substr(0, showChar);
            var h = content.substr(showChar, content.length - showChar);

            var html = '<span class="defaultcontent" >' + c + '</span><span class="morecontent">' + h + '</span>\n\
                &nbsp;&nbsp;&nbsp;<a href="javascript:void();" class="morelink btn-link btnmore">' + moretext + '</a>';
            $(this).html(html);
        }
    });

    $(".morelink").click(function () {
        if ($(this).hasClass("less")) {
            $(this).removeClass("less").html(moretext);
        } else {
            $(this).addClass("less").html(lesstext);
        }
//        $(this).parent().prev().toggle();
        $(this).prev().toggle();
        return false;
    });

    $('span.morecontent').hide();
    $('.defaultcontent , .morecontent').css({'font-size': '12px', 'text-transform': 'none', 'font-weight': 'normal'});
}

function trimcontentHotel(showChar) {
    var moretext = "+More";
    var lesstext = "-Less";

    $('.morehotel').each(function () {
        var content = $(this).html();

        if (content.length > showChar) {

            var c = content.substr(0, showChar);
            var h = content.substr(showChar, content.length - showChar);

            var html = '<div class="defaultcontent" >' + c + '</div><div class="morecontent">' + h + '</div>\n\
                &nbsp;&nbsp;&nbsp;<a href="javascript:void();" class="morelinkh btn-link btnmore">' + moretext + '</a>';
            $(this).html(html);
        }
    });

    $(".morelinkh").click(function () {
        if ($(this).hasClass("less")) {
            $(this).removeClass("less").html(moretext);
        } else {
            $(this).addClass("less").html(lesstext);
        }
//        $(this).parent().prev().toggle();
        $(this).prev().toggle();
        return false;
    });

    $('div.morecontent').hide();
    $('.defaultcontent , .morecontent').css({'font-size': '12px', 'text-transform': 'none', 'font-weight': 'normal'});
}

$('.addmore').click(function () {
    var count = 1;
    var room = 2;
    count = parseInt($('#itinerary_inputs').val());
    room = parseInt($('#itinerary_rooms').val());
    CONST_PACKAGE_TRAVELER_MAX_ROOM = parseInt(CONST_PACKAGE_TRAVELER_MAX_ROOM);
    if (room > CONST_PACKAGE_TRAVELER_MAX_ROOM) {
        alert("Can not add more than " + CONST_PACKAGE_TRAVELER_MAX_ROOM + " rooms.");
        return false;
    }
    $('#checkRatePopUpId').append('<div class="panel-dropdown inserted-room-row">'+
                                '<a href="#">Room '+room+' <span class="qtyTotal">1</span></a>'+
                                '<div class="panel-dropdown-content right">'+
                                    '<div class="qtyButtons">'+
                                        '<label>Adults</label>'+
                                        '<input type="text" name="adult[]" value="1">'+
                                    '</div>'+
                                    '<div class="qtyButtons">'+
                                        '<label>Childrens</label>'+
                                        '<input type="text" name="child[]" value="0">'+
                                    '</div>'+
                                    '<div class="qtyButtons">'+
                                        '<label>Infant</label>'+
                                        '<input type="text" name="infant[]" value="0">'+
                                    '</div>'+                                                           
                                '</div>'+
                        '</div>');
    $('#itinerary_inputs').val(parseInt(count) + 1);
    $('#itinerary_rooms').val(parseInt(room) + 1);
});

//$(document).on('click', '.removeit', function () {
//    var count = $('#itinerary_inputs').val();
//    var rooms = $('#itinerary_rooms').val();
//    if (count == 1) {
//        return false;
//    }
//    $('#itinerary_inputs').val(parseInt(count) - 1);
//    $('#itinerary_rooms').val(parseInt(rooms) - 1);
//    $('#checkRatePopUpId').find('.inserted-room-row:last').remove();
//});

//function checkTravellers(that, rownumber) {
//
//    var div = $(that).closest('.room-rows-container');
//
////    console.log( div );
//
//    var totalpax = 0;
//    var adults = div.find('#traveler_adult_' + rownumber).val();
//    var kids = div.find('#traveler_kids_' + rownumber).val();
//    var infant = div.find('#traveler_infant_' + rownumber).val();
//    totalpax = parseInt(adults) + parseInt(kids) + parseInt(infant);
//
//    if (parseInt(totalpax) > 4) {
//        alert("Total pax can not be more than 4 in a room. Please modify travellers in room " + rownumber);
//
//        if ($(that).hasClass('traveler_adult'))
//            $(that).val(1); // reset the current value
//        else
//            $(that).val(0); // reset the current value
//
//        return false;
//    }
//    else {
//        if (parseInt(adults) == 3) {
//            div.find('#room-row-adult-bedtype-' + rownumber).show();
//            div.find('#room-row-adult-bedtype-' + rownumber + ' select').val('withoutbed');
//        } else {
//            div.find('#room-row-adult-bedtype-' + rownumber).hide();
//            div.find('#room-row-adult-bedtype-' + rownumber + ' select').val('');
//        }
//
//        div.find('.room-row-child-bedtype-' + rownumber).hide(); // hide all select box
//        if (parseInt(kids) > 0) {
//            for (var i = 1; i <= parseInt(kids); i++) {
//                div.find('#room-row-child-bedtype-' + rownumber + "-" + i).show();
//            }
//        }
//    }
//
//}
/* Added by Piyush Tiwari on Date 10-8-18 end*/
/* Added by Mangal on Date 14-08-2018 start*/
function trimcontentBlog( showChar )
{
    var moretext = "+More";
    var lesstext = "-Less";

    $('.moreblog').each(function() {
        var content = $(this).html();

        if(content.length > showChar) {
 
            var c = content.substr(0, showChar);
            var h = content.substr(showChar, content.length - showChar);
 
            var html = '<span class="defaultcontent" >' + c + '</span>';
            $(this).html(html);
        }
    });

}
/* Added by Mangal on Date 14-08-2018 end*/


$("#changeCurrencyForm").on('submit', function (e) {
    e.preventDefault();
    var data = $(this).serialize();
    
    
    if ($('.changeCurrencyForm input[name="amount"]').val() == '') {
        $('.messageCurrency').show().html('Please enter amount').css({'color': 'red'});
        $('.changeCurrencyForm input[name="amount"]').focus();
        return false;
    }
    if ($('.changeCurrencyForm select[name="Tocurrency"]').val() == '0') {
        $('.messageCurrency').show().html('Please select currency').css({'color': 'red'});
        $('.changeCurrencyForm select[name="Tocurrency"]').focus();
        return false;
    }
  
    $.ajax({url:  'gtxwebservices/send-enquiry/change-currency', type: 'POST', data: data, dataType: 'json', 
        beforeSend: function () {
                  $('.currencySubmit').val('Sending..').attr('disabled', 'disabled');
                $('.messageCurrency').html('');
        }, success: function (result) {
            
            
                 var showHtml = result.currencyType+' '+result.ammount;
            $('.messageCurrency').html(showHtml).css({'color': 'green'});;

              }, error: function (result) {
                  
              }
          });
    
    
    
    

    });


Youez - 2016 - github.com/yon3zu
LinuXploit