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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/b2bsite.hellogtx.com/public/js/hotel_itinerary(18_08_2018).js
//$('body').click(function(){
//  $(".msg1").fadeOut(7000);
//});
function addDiv(that){
    var adultsCheck = $('#adults').val();
    var selected = '';
    if(adultsCheck >= 2){
        selected = 'selected';
    }
    var totalA = 0;
    var roomType = $('#roomType2').html();
     var mealPlanType = $('#mealPlanType2').html();
   var count = 2;
   count = parseInt($('#itinerary_rooms').val());
   var selectedadult1 = $(".adults"+count).val();
   var selectedadult2 = $(".adults_bed"+count).val();
   var selectedchild1 = $(".chils_bed"+count).val();
   var selectedchild2 = $(".chils_Nobed"+count).val();
   var selectedinfant = $(".infant"+count).val();
   totalA = totalA + parseInt(selectedadult1) + parseInt(selectedadult2) + parseInt(selectedchild1) +parseInt(selectedchild2) ;
    if(totalA > 4){
       $('.msg1').show().html('More than four travellers not allowed in one room');
       return false;
   }else{
   
   $('.appendDiv').append('<div class="modal-body mob-pad inserted-room-row"><div class="add-rooms"><div class="col-md-2 mobile-padd-tab"><div class=" form-group1">'+
                               ' <label for="name">Room Type '+(parseInt(count))+'<br> <br></label>'+
                                '<div class="colspan-3"><div class="inputBox"><div class="inputBoxIn dropBg">'+
                                    '<select id="roomType'+(parseInt(count)+1)+'" name ="roomType[]" onchange="changeMealPlanType(this,'+(parseInt(count)+1)+');">'+roomType+'</select>'+
                                  '</div></div></div></div></div>'+
                                '<div class="col-md-2 mobile-padd-tab"><div class=" form-group1">'+
                              '<label for="name">Meal Plan <br> <br></label>'+
                             ' <div class="colspan-3"><div class="inputBox"><div class="inputBoxIn dropBg">'+
                                   ' <select name="mealPlanType[]" id="mealPlanType'+(parseInt(count)+1)+'" >'+mealPlanType+'</select>'+
                                 ' </div></div></div></div></div>'+
                            ' <div class="col-md-8  mobile-padd-tab "><div class="col-md-2 mobile-padd-tab"><div class=" form-group1">'+
                              '<label for="name">No of Adult <br> <br></label>'+
                              '<div class="colspan-3"><div class="inputBox"><div class="inputBoxIn dropBg">'+
                                    '<select name="adults[]" class="adults'+(parseInt(count)+1)+'"><option value="1">1 </option><option value="2" '+selected+' >2 </option><option value="3">3 </option></select>'+
                                  '</div></div></div></div></div> '+
                            '<div class="col-md-2 mobile-padd-tab"><div class=" form-group1">'+
                              '<label for="name">Adult With Extra Bed </label>'+
                              '<div class="colspan-3"><div class="inputBox"><div class="inputBoxIn dropBg">'+
                                    '<select name="adult_extra[]" class="adults_bed'+(parseInt(count)+1)+'"><option value="0">0 </option><option value="1">1 </option></select>'+
                                  '</div></div> </div></div></div> '+
                            '<div class="col-md-2 mobile-padd-tab"><div class=" form-group1">'+
                              '<label for="name">Child With Bed <br> <span class="adult-text">(Age 3 - 12 Year)</span></label>'+
                              '<div class="colspan-3"><div class="inputBox"><div class="inputBoxIn dropBg">'+
                                    '<select name="child_with[]" class="chils_bed'+(parseInt(count)+1)+'">'+
                                      '<option value="0">0 </option><option value="1">1 </option></select>'+
                                  '</div></div></div></div></div>'+
                            '<div class="col-md-2 mobile-padd-tab"><div class=" form-group1">'+
                                '<label for="name">Child W/O Bed <br> <span class="adult-text">(Age 3 - 12 Year)</span.</label>'+
                              '<div class="colspan-3"> <div class="inputBox"><div class="inputBoxIn dropBg">'+
                                    '<select name="child_without[]" class="chils_Nobed'+(parseInt(count)+1)+'">'+
                                     ' <option value="0">0 </option><option value="1">1 </option><option value="2">2 </option></select>'+
                                 ' </div></div> </div></div></div>'+
                            '<div class="col-md-2 mobile-padd-tab"><div class=" form-group1">'+
                             ' <label for="name">Infant<br> <span class="adult-text">(Below 3 Year)</span></label>'+
                              '<div class="colspan-3"><div class="inputBox"> <div class="inputBoxIn dropBg">'+
                                   ' <select name="infant[]" class="infant'+(parseInt(count)+1)+'"><option value="0">0 </option><option value="1">1 </option><option value="2">2 </option><option value="3">3 </option></select>'+
                                 ' </div></div></div></div></div>'+
                            '<div class="col-md-2 mobile-padd-tab"><div class="add-mor-room">'+
                            '<a href="javascript://" data-toggle="tooltip" data-placement="top" title="Add Room"  id="selectHotel_" onclick="addDiv(this);"> Add&nbsp;Room   </a>'+
                            '<a href="javascript://" data-toggle="tooltip" data-placement="top" title="" id="detailbtn1" class="closex1" data-original-title="Delete" onclick="removeItRoom('+count+');"><i class="fa fa-times"></i></a>'+
                            '</div></div></div></div><div class="cl"></div></div>');
   $('#itinerary_rooms').val(parseInt(count) + 1);
   } 
}


function removeItRoom(countno){
    

    var count = $('#itinerary_rooms').val();
    if (count == 1) {
        return false;
    }
    $('.appendDiv').find('.inserted-room-row:last').remove();
             
              $('#itinerary_rooms').val(parseInt(count) - 1);    
}

function setHotel(hotelId,destId,ref,destIndex){
    var arrRoomType =   { "1": "Deluxe","2":"Luxury",3:"Super Deluxe","4":"Standard","5":"Standard Single","7":"Standard Double","8":"Standard Triple","9":"Standard Twin","10":"Deluxe Twin",
                          "11":"Premium","12":"Superior","13":"Suite Room","14":"Executive Suite","15":"Karumba Suite","16":"Club Suite","17":"AC Luxury Houseboat","18":"Wild Orchid Suite",
                          "19":"Deluxe Cottage with Private Garden","20":"Sea Facing Deluxe suite","21":"Premium Cottage Sea View","22":"Executive Suite Palace wing","23":"Periyar Cottage",
                          "24":"Cottage","25":"Heritage Wing","26":"Lake Facing Room","27":"Standard Bamboo Cottage","28":"Wooden Cottage","29":"Fixed Tent","30":"Comfort Tent",
                          "31":"Double Room A Block","32":"Double Room B Block","33":"Standard Hut","34":"Standard Cottage","35":"Deluxe Cottage","36":"Deluxe Swiss Tents"
                        }; 
    var arrMealType =   { "9": "EP", "6": "CP", "8": "AP","7":"MAP" }; 

    
    var checkHotelWithDesti = $("#check_hotel"+destIndex+"_"+destId+"_"+hotelId).val();
    
    var checkVal = destIndex+'_'+destId+'_'+hotelId;
    if(checkHotelWithDesti != checkVal) {
    var countOp = $('#count_option').val();
    var countHotel = $('#count_hotel').val();
    var optionVal = $('#option_'+destId+'_'+destIndex).val();
    
    var valuesRoomType = [];
    $("select[name='roomType[]']").each(function() {
        valuesRoomType.push($(this).val());
    });

    var roomTypeid = '';
    var economyTypeTitleName = [];
    for(var g=0;g<valuesRoomType.length;g++){
        for(var key in arrRoomType)
        {
            if(valuesRoomType[g]==key){
                 economyTypeTitleName.push(arrRoomType[key]);
            }
        }
        roomTypeid += '<input type="hidden" name="roomType'+(parseInt(countHotel))+'_'+destId+'_'+hotelId+'[]" value="'+valuesRoomType[g]+'" >';
    }
    
    var valuesmealPlanType = [];
    $("select[name='mealPlanType[]']").each(function() {
        valuesmealPlanType.push($(this).val());
    });
//    console.log(valuesmealPlanType);
    var mealPlanTypeid = '';
    var mealPlanTitleName = [];
    for(var g=0;g<valuesmealPlanType.length;g++){
        for(var key in arrMealType)
        {
            if(valuesmealPlanType[g]==key){
                mealPlanTitleName.push(arrMealType[key]);
            }
        }
        mealPlanTypeid += '<input type="hidden" name="mealPlanType'+(parseInt(countHotel))+'_'+destId+'_'+hotelId+'[]" value="'+valuesmealPlanType[g]+'" >';
    }

    var valuesadult = [];
    $("select[name='adults[]']").each(function() {
        valuesadult.push($(this).val());
    });
    var adultid = '';

    for(var g=0;g<valuesadult.length;g++){

        adultid += '<input type="hidden" name="adult'+(parseInt(countHotel))+'_'+destId+'_'+hotelId+'[]" value="'+valuesadult[g]+'" >';
    }
    
    var values_extra_adult = [];
    $("select[name='adult_extra[]']").each(function() {
        values_extra_adult.push($(this).val());
    });
    var extra_adultid = '';

    for(var g=0;g<values_extra_adult.length;g++){

        extra_adultid += '<input type="hidden" name="adult_extra'+(parseInt(countHotel))+'_'+destId+'_'+hotelId+'[]" value="'+values_extra_adult[g]+'" >';
    }
    
    var values_child_with = [];
    $("select[name='child_with[]']").each(function() {
        values_child_with.push($(this).val());
    });
    var child_withid = '';

    for(var g=0;g<values_child_with.length;g++){

        child_withid += '<input type="hidden" name="child_with'+(parseInt(countHotel))+'_'+destId+'_'+hotelId+'[]" value="'+values_child_with[g]+'" >';
    }
    
    var values_child_without = [];
    $("select[name='child_without[]']").each(function() {
        values_child_without.push($(this).val());
    });
    var child_withoutid = '';

    for(var g=0;g<values_child_without.length;g++){

        child_withoutid += '<input type="hidden" name="child_without'+(parseInt(countHotel))+'_'+destId+'_'+hotelId+'[]" value="'+values_child_without[g]+'" >';
    }
    
    var values_infant = [];
    $("select[name='infant[]']").each(function() {
        values_infant.push($(this).val());
    });
    var infantid = '';

    for(var g=0;g<values_infant.length;g++){

        infantid += '<input type="hidden" name="infant'+(parseInt(countHotel))+'_'+destId+'_'+hotelId+'[]" value="'+values_infant[g]+'" >';
    }
    
    var romm_meal = '';
    for(var j=0;j<economyTypeTitleName.length;j++){
        romm_meal +=  'Room Type '+(parseInt(j)+1)+' : '+economyTypeTitleName[j]+' | '+mealPlanTitleName[j]+'<br>';                
    }
    
        var hotel__count_no = $('#hotel__count_no').val();
        var destSysId_no = $('#destSysId'+destId+'_'+hotel__count_no).val();

    var deatIdName = '<input type="hidden" name="destSysId[]" value="'+destSysId_no+'" >';
    


    $(destId).css('display','hide');
    $(destId).html('Selected').addClass('disabled');
   
    var hotelName = $("#hotelName").val();


    $("#proceed"+destId+'_'+destIndex).append('<div class="cartptro" id="selected_hotel_'+destIndex+'_'+destId+'_'+hotelId+'"><input type="hidden" name="count_hotel_seq[]" value="'+(parseInt(countHotel))+'" ><input type="hidden" name="count_no'+destId+'[]" value="'+optionVal+'" ><input type="hidden" id="check_hotel'+destIndex+'_'+destId+'_'+hotelId+'" value="'+destIndex+'_'+destId+'_'+hotelId+'" ><input type="hidden" name="refId" value="'+ref+'" ><input type="hidden" name="hotelId[]" value="'+hotelId+'" ><input type="hidden" name="DestinationId[]" value="'+destId+'" >'+deatIdName+
                             '<div class="cartptroIn">'+
                               '<div class="closeEnquiry" onclick="closeDiv('+hotelId+','+destId+','+destIndex+');"></div>'+
                               '<div class="packageId packageId'+destId+'"><strong>Options <span id="opation_value'+destId+'_'+optionVal+'" class="opation_value'+destId+'_'+optionVal+'">'+(parseInt(optionVal))+'</span></strong></div>'+
                               '<div class="packageDay"><span>'+hotelName+'</span></div>'+

                               '<div class="packagePrice">'+roomTypeid+mealPlanTypeid+adultid+extra_adultid+child_withid+child_withoutid+infantid+romm_meal+

//                               '<div class="packagePrice"><input type="text" name="'+destIndex+'_'+destId+'_'+hotelId+'" value="'+formData+'" ><input type="hidden" name="RoomTypeId[]" value="'+economyTypeTitle+'" ><input type="hidden" name="MealPlanId[]" value="'+mealPlanTitle+'" >'+economyTypeTitleName+' | '+mealPlanTitleName+'</div>'+

//                               '<div class="packagePrice">'+$("#economyTypeTitle"+hiddenId[2]).html()+' | '+$("#mealPlanTitle"+hiddenId[2]).html()+'</div>'+
                               '</div><div class="clear"></div>'+
                             '</div>'+
                            '</div>');
    
//  $(".proceed_id").append();
    $("#proceddData"+destId).append('<td class="insertedRowFinalData_'+hotelId+'_'+destId+'">'+hotelName+'('+$("#economyTypeTitle"+hotelId).html()+','+$("#mealPlanTitle"+hotelId).html()+')'+'</td>');
    $("#proceddDataPrice"+destId).append('<td>'+
                                             '<p>'+$("#roomPrice"+hotelId).html()+$("#proceddDataPrice"+destId).val()+'</p>'+   
                                             '<a href="#">Select</a>'+
                                            '</td>');
                                    
                                    
   
    $('#count_hotel').val(parseInt(countHotel) + 1);
    $('#count_option').val(parseInt(countOp) + 1);
    $('#option_'+destId+'_'+destIndex).val(parseInt(optionVal) + 1);
    
    $("#selectHotel_"+hotelId+"_"+destIndex+"_"+destId).html("Room Selected");
     $("#selectHotel_"+hotelId+"_"+destIndex+"_"+destId).removeClass('btn-primary').addClass('btn-success');
     
    var gethrefval = $("#selectHotel_"+hotelId+"_"+destIndex+"_"+destId).attr("href");
    $("#hrefdata_"+hotelId+"_"+destIndex+"_"+destId).val(gethrefval);
    $("#selectHotel_"+hotelId+"_"+destIndex+"_"+destId).removeAttr("href");
    $("#selectHotel_"+hotelId+"_"+destIndex+"_"+destId).removeAttr("data-target");
    
    
   var select_room_dest1 = $("#select_room_dest"+destId).val();
//    alert(select_room_dest);
    $('#select_room_dest'+destId).val(parseInt(select_room_dest1) + 1);
    var select_room_dest2 = $("#select_room_dest"+destId).val();
    if(select_room_dest2 >= 1){
        $("#select_room_span"+destId).html("Room Selected");
    }else{
         $("#select_room_span"+destId).html("Select Room");
    }
    
} else {
    alert("This hotel already added.");
}
  var disable_proceed_in = $('#disable_proceed_'+destId+'_'+destIndex).val();
  $('#disable_proceed_'+destId+'_'+destIndex).val(parseInt(disable_proceed_in) + 1);
 
var destination_ids = [];
    $("input[name='destination_ids[]']").each(function() {
        destination_ids.push($(this).val());
    });

var disable_proceed = 0;
    for(var m = 0;m < destination_ids.length; m++){
       var disable_p = $('#disable_proceed_'+destination_ids[m]+'_'+(parseInt(m)+1)).val();
       if(disable_p >= 1){
           disable_p = 1;
       }
       disable_proceed = parseInt(disable_proceed) + parseInt(disable_p);
    
    }
    

if(disable_proceed == destination_ids.length){
   $(".proceedButton").prop('disabled',false); 
}
}
function closeDiv(hotelId,destId,destIndex){
    var gethrefval = $("#hrefdata_"+hotelId+"_"+destIndex+"_"+destId).val();
    $("#selectHotel_"+hotelId+"_"+destIndex+"_"+destId).html("Select Room");
     $("#selectHotel_"+hotelId+"_"+destIndex+"_"+destId).removeClass('btn-success').addClass('btn-primary');
    $("#selectHotel_"+hotelId+"_"+destIndex+"_"+destId).attr("href",gethrefval);
    $("#selectHotel_"+hotelId+"_"+destIndex+"_"+destId).attr("data-target","#myModalroomdetail");
    $("#selected_hotel_"+destIndex+"_"+destId+"_"+hotelId).remove();
    //$("#selectHotel_"+destinationName+"_"+id).removeClass('disabled').html('Select');
    
    
     var select_room_dest1 = $("#select_room_dest"+destId).val();
//    alert(select_room_dest);
    $('#select_room_dest'+destId).val(parseInt(select_room_dest1) - 1);
    var select_room_dest2 = $("#select_room_dest"+destId).val();
    if(select_room_dest2 >= 1){
        $("#select_room_span"+destId).html("Room Selected");
    }else{
         $("#select_room_span"+destId).html("Select Room");
    }

    
    var disable_proceed_in = $('#disable_proceed_'+destId+'_'+destIndex).val();
    $('#disable_proceed_'+destId+'_'+destIndex).val(parseInt(disable_proceed_in) - 1);
    var disable_proceed_in1 = $('#disable_proceed_'+destId+'_'+destIndex).val();
    if(disable_proceed_in1 == 0){
        $(".proceedButton").prop('disabled',true); 
    }
    
    var optionVal = $('#option_'+destId+'_'+destIndex).val();
    $('#option_'+destId+'_'+destIndex).val(parseInt(optionVal) - 1);
    
    for(var m=1;m<=select_room_dest2;m++){
        
        $('.opation_value'+destId+'_'+(parseInt(m)+1)).removeClass().addClass('opation_value'+destId+'_'+parseInt(m));
        $('.opation_value'+destId+'_'+(parseInt(m))).html(m);
    }
    
    
}
function validAdult(hotelId,destId,ref,destIndex){

    var count = $('#itinerary_rooms').val();
    var mfirst_roomdata_count = $('#mfirst_roomdata_count').val();
     var mfirst_data_div = '';

    var adults = $('#adults').val();
    var childs = $('#childs').val();
    var infants = $('#infants').val();
    var totaladult = 0;
    var totalchild = 0;
    var totalinfant = 0;
    for(var i=2;i<=count;i++){
   
        var selectedadult1 = $(".adults"+i).val();
        var selectedadult2 = $(".adults_bed"+i).val();
        totaladult = totaladult + parseInt(selectedadult1)+ parseInt(selectedadult2);

        var selectedchild1 = $(".chils_bed"+i).val();
        var selectedchild2 = $(".chils_Nobed"+i).val();
        totalchild = totalchild + parseInt(selectedchild1)+ parseInt(selectedchild2);

         var selectedinfant = $(".infant"+i).val();

        totalinfant = totalinfant + parseInt(selectedinfant);
        var totalA = 0;
       totalA =  parseInt(selectedadult1)+ parseInt(selectedadult2) + parseInt(selectedchild1)+ parseInt(selectedchild2)  ;
        if(totalA > 4){

           $('.msg1').show().html('More than four travellers not allowed in room '+parseInt(i-1));
           return false;
       }  

       
        if((parseInt(selectedadult2)+ parseInt(selectedchild1)) == 2){
           $('.msg1').show().html('Adult and Child both with bed are not allowed in room '+parseInt(i-1));
           return false;
        }
        if((parseInt(selectedadult1)+ parseInt(selectedadult2)) > 3){
           $('.msg1').show().html('Adult & Adult with bed more than 3 are not allowed in room '+parseInt(i-1));
           return false;
        }
/*for date which is selected on first hotel room start*/

        if(mfirst_roomdata_count == 1){
       
        mfirst_data_div +=  '<input type="hidden" name="mAdult[]" id="mAdult'+i+'" value="'+selectedadult1+'">'+
                    '<input type="hidden" name="mAdult_bed[]" id="mAdult_bed'+i+'" value="'+selectedadult2+'">'+
                    '<input type="hidden" name="mChild_bed[]" id="mChild_bed'+i+'" value="'+selectedchild1+'">'+
                    '<input type="hidden" name="mChild_no_bed[]" id="mChild_no_bed'+i+'" value="'+selectedchild2+'">'+
                    '<input type="hidden" name="mInfant[]" id="mInfant'+i+'" value="'+selectedinfant+'">';                  
            
        }
    
     
 /*for date which is selected on first hotel room end*/    
        
    }
    if(mfirst_data_div != ''){   
     $("#mfirst_roomdata_div").append(mfirst_data_div);
     $('#mfirst_roomdata_count').val(2); 
     $('#mfirst_roomdata_count_total').val(count); 

    }

    if((totaladult != adults) || (totalchild != childs) ||(totalinfant != infants)   ){
         $('.msg1').show().html('Your previous and current member`s selection are different. Previous selection - (Adult : '+adults+', Child : '+childs+' , Infant : '+infants+' )');
        return false;

        }else{

          setHotel(hotelId,destId,ref,destIndex);
         $('.close').click();
    }

    

    
}


$("#proceedButton_form").on('submit', function(e) {
    
    
     var data = $("#proceedButton_form").serialize();
        $.ajax({url: SITEURL + 'byo/index/get-proceed-data', type: 'POST', data: data, dataType: 'text', beforeSend: function() {
           
        }, success: function(result) {

                  $("#processPricedetail").html(result);
                  $('#myModalpricetable').modal('show');
       
        }
    
    })
    
});
 

function autosuggest_Itinerary(startCity,endCity,id){
    $("#selectItinerary"+id).autocomplete({
    source: 'byo/index/get-itinerary-description-data/startCity/'+startCity+'/endCity/'+endCity,
    minLength: 0,
    autoFocus: true,
    select: function (event, ui) {
       
         $("#itenararyDesc_"+id).val(ui.item.Description);
    }
  });
}  

$("#save_itinerary").on('submit', function(e) {
    
     var data = $("#save_itinerary").serialize();
//       console.log(data);
     $.ajax({url: SITEURL + 'byo/index/save-itinerary-detail-data', type: 'POST', data: data, dataType: 'json', beforeSend: function() {
           
        }, success: function(result) {
                 var form = '';
//       alert(result.TPSysId)
            form += '<input type="hidden" name="TPSysId" value="'+result.TPSysId+'">';
       
        $('<form action="' + SITEURL + 'byo/index/choose-vehicle" method="POST">' + form + '</form>').appendTo($(document.body)).submit();
               
       
        }
    
    })
});


function mGetPreFillData(){

  var mfirst_roomdata_count = $('#mfirst_roomdata_count').val(); 
  var count_total = $('#mfirst_roomdata_count_total').val(); 
 
  if(mfirst_roomdata_count == 2){

      var mAdult_first = $('#mAdult'+(parseInt(2))).val();
      var mAdult_bed_first = $('#mAdult_bed'+(parseInt(2))).val();
      var mChild_bed_first = $('#mChild_bed'+(parseInt(2))).val();
      var mChild_no_bed_first = $('#mChild_no_bed'+(parseInt(2))).val();
      var mInfant_first = $('#mInfant'+(parseInt(2))).val();
      
        $('.adults'+(parseInt(2))).val(mAdult_first);
        $('.adults_bed'+(parseInt(2))).val(mAdult_bed_first);
        $('.chils_bed'+(parseInt(2))).val(mChild_bed_first);
        $('.chils_Nobed'+(parseInt(2))).val(mChild_no_bed_first);
        $('.infant'+(parseInt(2))).val(mInfant_first);
//      alert(count_total);
for(var m=2;m<count_total;m++){
//      alert(mfirst_roomdata_count);
var count = $('#itinerary_rooms').val();

      var roomTypeVal = $('#roomType2').html();
      var mealPlanTypeVal = $('#mealPlanType2').html();
      var mAdult = $('#mAdult'+(parseInt(m)+1)).val();
      var mAdult_bed = $('#mAdult_bed'+(parseInt(m)+1)).val();
      var mChild_bed = $('#mChild_bed'+(parseInt(m)+1)).val();
      var mChild_no_bed = $('#mChild_no_bed'+(parseInt(m)+1)).val();
      var mInfant = $('#mInfant'+(parseInt(m)+1)).val();

      $('#mangal').val(2);
      $('.appendDiv').append('<div class="modal-body mob-pad inserted-room-row"><div class="add-rooms"><div class="col-md-2 mobile-padd-tab"><div class=" form-group1">'+
                               ' <label for="name">Room Type '+m+'<br> <br></label>'+
                                '<div class="colspan-3"><div class="inputBox"><div class="inputBoxIn dropBg">'+
                                    '<select id="roomType'+(parseInt(m)+1)+'" name ="roomType[]" onchange="changeMealPlanType(this,'+(parseInt(m)+1)+');">'+roomTypeVal+'</select>'+
                                  '</div></div></div></div></div>'+
                                '<div class="col-md-2 mobile-padd-tab"><div class=" form-group1">'+
                              '<label for="name">Meal Plan <br> <br></label>'+
                             ' <div class="colspan-3"><div class="inputBox"><div class="inputBoxIn dropBg">'+
                                   ' <select name="mealPlanType[]" id="mealPlanType'+(parseInt(m)+1)+'" >'+mealPlanTypeVal+'</select>'+
                                 ' </div></div></div></div></div>'+
                            ' <div class="col-md-8  mobile-padd-tab "><div class="col-md-2 mobile-padd-tab"><div class=" form-group1">'+
                              '<label for="name">No of Adult <br> <br></label>'+
                              '<div class="colspan-3"><div class="inputBox"><div class="inputBoxIn dropBg">'+
                                    '<select name="adults[]" class="adults'+(parseInt(m)+1)+'"><option value="1" >1 </option><option value="2" >2 </option><option value="3" >3 </option></select>'+
                                  '</div></div></div></div></div> '+
                            '<div class="col-md-2 mobile-padd-tab"><div class=" form-group1">'+
                              '<label for="name">Adult With Extra Bed </label>'+
                              '<div class="colspan-3"><div class="inputBox"><div class="inputBoxIn dropBg">'+
                                    '<select name="adult_extra[]" class="adults_bed'+(parseInt(m)+1)+'"><option value="0" >0 </option><option value="1" >1 </option></select>'+
                                  '</div></div> </div></div></div> '+
                            '<div class="col-md-2 mobile-padd-tab"><div class=" form-group1">'+
                              '<label for="name">Child With Bed <br> <span class="adult-text">(Age 3 - 12 Year)</span></label>'+
                              '<div class="colspan-3"><div class="inputBox"><div class="inputBoxIn dropBg">'+
                                    '<select name="child_with[]" class="chils_bed'+(parseInt(m)+1)+'">'+
                                      '<option value="0" >0 </option><option value="1">1 </option></select>'+
                                  '</div></div></div></div></div>'+
                            '<div class="col-md-2 mobile-padd-tab"><div class=" form-group1">'+
                                '<label for="name">Child W/O Bed <br> <span class="adult-text">(Age 3 - 12 Year)</span.</label>'+
                              '<div class="colspan-3"> <div class="inputBox"><div class="inputBoxIn dropBg">'+
                                    '<select name="child_without[]" class="chils_Nobed'+(parseInt(m)+1)+'">'+
                                     ' <option value="0" >0 </option><option value="1" >1 </option><option value="2" >2 </option></select>'+
                                 ' </div></div> </div></div></div>'+
                            '<div class="col-md-2 mobile-padd-tab"><div class=" form-group1">'+
                             ' <label for="name">Infant<br> <span class="adult-text">(Below 3 Year)</span></label>'+
                              '<div class="colspan-3"><div class="inputBox"> <div class="inputBoxIn dropBg">'+
                                   ' <select name="infant[]" class="infant'+(parseInt(m)+1)+'"><option value="0">0 </option><option value="1">1 </option><option value="2" >2 </option><option value="3" >3 </option></select>'+
                                 ' </div></div></div></div></div>'+
                            '<div class="col-md-2 mobile-padd-tab"><div class="add-mor-room">'+
                            '<a href="javascript://" data-toggle="tooltip" data-placement="top" title="Add Room"  id="selectHotel_" onclick="addDiv(this);"> Add&nbsp;Room   </a>'+
                            '<a href="javascript://" data-toggle="tooltip" data-placement="top" title="" id="detailbtn1" class="closex1" data-original-title="Delete" onclick="removeItRoom('+m+');"><i class="fa fa-times"></i></a>'+
                            '</div></div></div></div><div class="cl"></div></div>');
  
  $('.adults'+(parseInt(m)+1)).val(mAdult);
  $('.adults_bed'+(parseInt(m)+1)).val(mAdult_bed);
  $('.chils_bed'+(parseInt(m)+1)).val(mChild_bed);
  $('.chils_Nobed'+(parseInt(m)+1)).val(mChild_no_bed);
  $('.infant'+(parseInt(m)+1)).val(mInfant);
  
   $('#itinerary_rooms').val(parseInt(count) + 1);
  }
  
  
  }
  

  
}

function changeMealPlanType(that,i){
    var arrMealType =   { "9": "EP", "6": "CP", "8": "AP","7":"MAP" };
      var roomTypeVAl = $(that).val();
    var values_extra = '';
    $("input[class^='mmealType"+roomTypeVAl+"']").each(function (i) {
       
        for(var key in arrMealType)
        {
            if($(this).val()==key){
               var keyname =  key;
               var valname =  arrMealType[key];
            }
        }
          values_extra += '<option value="'+keyname+'">'+valname+'</option>';
    });
    $('#mealPlanType'+i).html(values_extra);
      
  }
  


        $(document).ready(function(){
            $('#sidebar-2').stickySidebar({
                containerSelector: '.top_package_detail_price ',
                innerWrapperClass: 'sidebarCount',
                topSpacing:0,
                bottomSpacing: 0
            });
        });

Youez - 2016 - github.com/yon3zu
LinuXploit