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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/v2.hellogtx.com/public/js/custom.js
$(document).ready(function () {

    $(document).on('click', '.selectedTpId', function () {
        var PkgSysId = $('#PkgSysIdHTML').val();
        var TpSysId = $(this).attr('dataTpId');
        $('#packagetpid_' + PkgSysId).val(TpSysId);
    });


    $('.talktous input[name="mobile"]').keypress(function (e) {
        if (e.which !== 8 && e.which !== 0 && (e.which < 48 || e.which > 57)) {
            return false;
        }
    });

    $(".talktous").on('submit', function (e) {
        e.preventDefault();
        var data = $(this).serialize();
        var EmailReg = new RegExp(/^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/);
        if ($('.talktous input[name="name"]').val() == '') {
            $('.msg').html('Please enter your name').css('color', 'red').fadeIn().delay(2000).fadeOut();
            $('.talktous input[name="name"]').focus();
            return false;
        }
        if ($('.talktous input[name="email"]').val() == '') {
            $('.msg').html('Please enter your email id').css('color', 'red').fadeIn().delay(2000).fadeOut();
            $('.talktous input[name="email"]').focus();
            return false;
        }
        if (!EmailReg.test($('.talktous input[name="email"]').val())) {
            $('.msg').html('Please enter valid email address!!!').css('color', 'red').fadeIn().delay(2000).fadeOut();
            $('.talktous input[name="email"]').focus();
            return false;
        }
        if ($('.talktous input[name="mobile"]').val() == '') {
            $('.msg').html('Please enter your Mobile').css('color', 'red').fadeIn().delay(2000).fadeOut();
            $('.talktous input[name="mobile"]').focus();
            return false;
        }
        if (!$.isNumeric($('.talktous input[name="mobile"]').val())) {
            $('.msg').html('Mobile should be numeric!!').css('color', 'red').fadeIn().delay(2000).fadeOut();
            $('.talktous input[name="mobile"]').focus();
            return false;
        }
        // if ($('.talktous input[name="mobile"]').val().length != '10') {
        //     $('.msg').html('Mobile should be 10 digit?').css('color', 'red').fadeIn().delay(2000).fadeOut();
        //     $('.talktous input[name="mobile"]').focus();
        //     return false;
        // }
        if ($('.talktous textarea[name="message"]').val() == '') {
            $('.msg').html('Please enter your query!').css('color', 'red').fadeIn().delay(2000).fadeOut();
            $('.talktous textarea[name="message"]').focus();
            return false;
        }
        
        $('.msg').html('');
        $('.sendingP').attr('disabled', true);
        $.ajax({url: SITEURL + 'cms/index/sendenquiry', type: 'POST', data: data, dataType: 'json', beforeSend: function () {
                $('.sendingP').html('<i class="ace-icon fa fa-spinner fa-spin orange bigger-125"></i> Sending...');
            }, success: function (result) {
                if (result.status) {
                   $('.sendingP').html('Submit Form').css('color','green');
                    $('.msg').html(result.message)
                } else {
                    $('.sendingP').html('Submit Form').css('color','green');
                    $('.msg').html(result.message)
                }


            }, error: function (result) {
                $('.sendingP').html('Submit Form');
                alert('Some error occured.');
            }});

    });

    $("#subscribe-form").submit(function () {
        var email = $.trim($("#send_email").val());
        if (email.length == 0)
        {
            $("#eml").css('color', 'red').html("E-Mail Can't be Empty").fadeIn().delay(3000).fadeOut();
            return false;
        }
        else {
            var at = email.indexOf("@");
            var dot = email.lastIndexOf(".");
            if (at < 3 || dot - at < 3 || email.length - (dot) < 3)
            {
                $("#eml").css('color', 'red').html("Enter valid email address").fadeIn().delay(3000).fadeOut();
                return false;
            }
        }
        $.ajax({
            url: SITEURL + 'index/save-letter',
            type: 'POST',
            data: {email: email},
            dataType: 'json',
            beforeSend: function () {
                //            alert("hello");
            },
            success: function (result) {
                alert(result.msg);
                return false;
            },
            error: function () {
                alert('Oops unable to connect with server!!');
                return false;
            }
        });
        return false;
    });
});


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 validateDestinationSearch(){
  var destinationBox = $('.destinationBox').val();
  if(destinationBox == ''){
    $(".shakeThisDiv").effect("shake");  
            $('.destinationBox').css('border-color','red');
            return false;
  }
  window.location.href = 'tour-destination/'+getSeoName1(destinationBox).toLowerCase();
}
function validateActivitiesSearch(){
  var activitiesBox = $('.activitiesBox').val();
  if(activitiesBox == ''){
    $(".shakeThisDiv").effect("shake");  
            $('.activitiesBox').css('border-color','red');
            return false;
  }
  window.location.href = 'activities/'+getSeoName1(activitiesBox).toLowerCase();
}
function validateVisaSearch(){
   var visaSearchBox = $('#visaSearchBox').val();
        if(visaSearchBox == ''){
            $(".shakeThisDiv").effect("shake");  
            $('.activitiesBox').css('border-color','red');
            return false;
        }
        window.location.href = 'visa/'+getSeoName1(visaSearchBox).toLowerCase()+'-visa.html';
}

 function getSeoName1(str) {
       str = str.replace( /\s\s+/g, ' ' ).toLowerCase();
            str = str.replace(/#|(|)|,|\/|_|  +/g, '');
            str = str.split(',').join('-');
            str = str.split(' ').join('-');
            return str.replace('--', '-');
    } 
    function reviewStar(id){
    $('.reviewStar').removeClass('red');    
    for(var i = 1;i<=id;i++){
        $('.reviewStar'+parseInt(i)).addClass('red');    
    }
    $('#ReviewStarValue').val(id);
}


function submitFeedbackForm(){
        
        var data = $('.feedback_form').serialize();
        $('.msgFeed').html('');
        $('.feedbackSubmitBtn').attr('disabled', true);
        $.ajax({
            url: SITEURL+'index/send-feedback', 
            type: 'POST', 
            data: data, 
            dataType: 'json', 
            beforeSend: function () {
                $('.feedbackSubmitBtn').val('Sending...');
            }, success: function (result) {
                if (result.status) {
                   $('.feedbackSubmitBtn').val('Submit');
                    //$('.msgFeed').html(result.message).css('color','green');
                    alert(result.message);
                    $('.close').click();
                    $('.feedback_form input[name="Name"]').val('');
                    $('.feedback_form input[name="EmailId"]').val('');
                    $('.feedback_form input[name="Destination"]').val('');
                    $('.feedback_form input[name="TravelMonth"]').val('');
                    $('.feedback_form input[name="ReviewTitle"]').val('');
                    $('.feedback_form input[name="Review"]').val('');
                    $('.feedback_form input[name="TripImage"]').val('');
                    $('.feedbackSubmitBtn').attr('disabled', false);
                } else {
                    $('.feedbackSubmitBtn').val('Submit');
                    $('.msgFeed').html(result.message)
                }


            }, error: function (result) {
                $('.feedbackSubmitBtn').val('Submit');
                alert('Some error occured.');
            }});
       
};
$('.feedback_form').on('submit',function(e){
var EmailReg = new RegExp(/^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/);
        if ($('.feedback_form input[name="Name"]').val() == '') {
            $('.msgFeed').html('Please enter your name').css('color', 'red').fadeIn().delay(6000).fadeOut();
            $('.feedback_form input[name="Name"]').focus();
            return false;
        }
        if ($('.feedback_form input[name="EmailId"]').val() == '') {
            $('.msgFeed').html('Please enter your email id').css('color', 'red').fadeIn().delay(6000).fadeOut();
            $('.feedback_form input[name="EmailId"]').focus();
            return false;
        }
        if (!EmailReg.test($('.feedback_form input[name="EmailId"]').val())) {
            $('.msgFeed').html('Please enter valid email address!!!').css('color', 'red').fadeIn().delay(6000).fadeOut();
            $('.feedback_form input[name="EmailId"]').focus();
            return false;
        }
        if ($('.feedback_form input[name="Destination"]').val() == '') {
            $('.msgFeed').html('Please enter your destination').css('color', 'red').fadeIn().delay(6000).fadeOut();
            $('.feedback_form input[name="Destination"]').focus();
            return false;
        }
        if ($('.feedback_form select[name="TravelMonth"]').val() == '') {
            $('.msgFeed').html('Please select month').css('color', 'red').fadeIn().delay(6000).fadeOut();
            $('.feedback_form select[name="TravelMonth"]').focus();
            return false;
        }
        if ($('.feedback_form input[name="ReviewStarValue"]').val() == '') {
            $('.msgFeed').html('Please select overall experience?').css('color', 'red').fadeIn().delay(6000).fadeOut();
            $('.feedback_form input[name="ReviewStarValue"]').focus();
            return false;
        }
       
        if ($('.feedback_form name[name="ReviewTitle"]').val() == '') {
            $('.msgFeed').html('Please enter title of your review!').css('color', 'red').fadeIn().delay(6000).fadeOut();
            $('.feedback_form name[name="ReviewTitle"]').focus();
            return false;
        }
        if ($('.feedback_form textarea[name="Review"]').val() == '') {
            $('.msgFeed').html('Please enter your review!').css('color', 'red').fadeIn().delay(6000).fadeOut();
            $('.feedback_form textarea[name="Review"]').focus();
            return false;
        }

        var fd = new FormData();
//        var files = $('#TripImage')[0].files[0];

//        fd.append('file', files);
        
        
        var files = $('#TripImage')[0].files;
        console.log(files);
        if (files.length > 0) {
            var mArr = [];
            for (var m = 0; m < files.length; m++) {
                mArr[m] = files[m];
                fd.append('file' + parseInt(m), files[m]);
            }
        }
        
        
        $.ajax({
            url: SITEURL+'index/send-feedback-image-upload',
            type: 'post',
            data: fd,
            dataType: 'json',
            contentType: false,
            processData: false,
            beforeSend: function () {
                $('.feedbackSubmitBtn').val('Sending...');
            },
            success: function (response) {
                if (response.status == true) {

                    //$('#TripImageName').val(response.fileName);
                    var imgHtml = '';
                    if(response.total > 0){
                    for (var m = 0; m < response.total; m++) {
                        
                        //var img = "'" + response.fileArray[m].fileName + "'";
                        imgHtml += '<input type="hidden" name="TripImageName[]" id="TripImageName' + (parseInt(m) + 1) + '" value="' + response.fileNameArray[m] + '">';
                        
                    }
                }else{
                imgHtml = '';    
                }
                    console.log(imgHtml);
                    $('.appendTripimagesName').html(imgHtml);
                   
                    submitFeedbackForm();
                } else {
                     submitFeedbackForm();
                    //alert('File not uploaded');
                }
            }
        });
    });

function showMoreLessActivityDetail(type){
    if(type == 'show'){
        $('.activityMoreDetail').show();
        $('.activityDetail').hide();
    }else{
        $('.activityMoreDetail').hide();
        $('.activityDetail').show();
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit