| 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/application/views/scripts/buyhotel/ |
Upload File : |
<script type="text/javascript" src="<?php echo $this->baseUrl('public/assets/js/jquery.validate.min.js'); ?>"></script>
<?php
$hotelFromDate = $this->searchParams['hotelFromDateSession'] ? $this->searchParams['hotelFromDateSession'] : '';
$hotelToDate = $this->searchParams['hotelToDateSession'] ? $this->searchParams['hotelToDateSession'] : '';
if (isset($this->searchParams['searchType']) && !empty($this->searchParams['searchType']) && $this->searchParams['searchType'] == 'DIRECTHOTELSEARCH') {
$displayhotel = 'block';
$searchType = 'DIRECTHOTELSEARCH';
$hotelFromDate = $this->searchParams['hotelFromDateSession'] ? $this->searchParams['hotelFromDateSession'] : '';
$hotelToDate = $this->searchParams['hotelToDateSession'] ? $this->searchParams['hotelToDateSession'] : '';
$customerId = $this->searchParams['customerId'];
} else {
$displayhotel = 'none';
$searchType = 'CRMHOTELSEARCH';
//$hotelFromDate= isset($this->leadDetail['hotelFromDate'])?$this->leadDetail['hotelFromDate']->format('m/d/Y'):'';
//$hotelToDate= isset($this->leadDetail['hotelToDate'])?$this->leadDetail['hotelToDate']->format('m/d/Y'):'';
$hotelFromDate = $this->searchParams['hotelFromDateSession'] ? $this->searchParams['hotelFromDateSession'] : '';
$hotelToDate = $this->searchParams['hotelToDateSession'] ? $this->searchParams['hotelToDateSession'] : '';
$customerId = $this->searchParams['customerId'];
} ?>
<div class="col-md-12 no-padding" style="display:block; margin-top:15px;" id="modhoteldetail">
<form method="post" name="search-form" id="search-form">
<div class="leadeBorder" style="padding:15px 0;">
<div class="col-md-12 no-padding">
<div class="col-md-6">
<div class="form-group dropdown">
<label><strong>Destination</strong></label>
<input type="text" class="form-control ui-autocomplete-input" value="<?php echo $this->searchParams['hotelCityTitle']; ?>" autocomplete="off" name="Hotel_name_city" id="selectDestination" />
<input type="hidden" id="hidden_selected_hotel_id" name="hidden_selected_hotel_id" value="<?php echo $this->searchParams['hidden_selected_hotel_id']; ?>">
<input type="hidden" id="hidden_selected_hotel_cityid" name="hidden_selected_hotel_cityid" value="<?php echo isset($this->searchParams['hotelXrefCityId']) ? $this->searchParams['hotelXrefCityId'] : ''; ?>">
</div>
</div>
</div>
<div class="col-md-12 no-padding">
<div class="col-md-3">
<div class="form-group dropdown">
<label>Check In </label>
<div class="input-group ls-group-input">
<input class="form-control datePickerOnly" type="text" name="chekInDate" id="chekInDate" value="<?php echo $hotelFromDate; ?>" />
<span onclick="runDatePicker('chekInDate');" class="input-group-addon dateTimePickerCustom1"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="col-md-3">
<div class="form-group dropdown">
<label>Nights </label>
<input type="number" value="<?php echo $this->searchParams['hotelTotalNights'] ? $this->searchParams['hotelTotalNights'] : 0; ?>" placeholder="1" class="form-control whbg" name="nights" id="nights" maxlength="3" onchange="addCheckOutDate(this.value);">
</div>
</div>
<div class="col-md-3">
<div class="form-group dropdown">
<label>Check Out </label>
<div class="input-group ls-group-input">
<input class="form-control datePickerOnly" type="text" name="chekOutDate" id="chekOutDate" value="<?php echo $hotelToDate; ?>" />
<span class="input-group-addon dateTimePickerCustom1" onclick="runDatePicker('chekOutDate');"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="col-md-3">
<div class="form-group dropdown">
<?php
$objCountry = new Travel_Model_TblCountry();
$country = $objCountry->getCountryList();
?>
<label>Nationality </label>
<select id="selectNationality" name="selectNationality" class="demo-default select-country" placeholder="Select Nationality">
<?php foreach ($country as $val) { ?>
<option <?php if (trim($val['Title']) == 'India') echo 'selected'; ?> value="<?php echo trim($val['TBBContId']); ?>"><?php echo $val['Title']; ?></option>
<?php } ?>
</select>
</div>
</div>
</div>
<div class="col-md-12 no-padding">
<div class="col-md-3">
<div class="form-group dropdown">
<label>Star Rating </label>
<?php $starRatingArray = array(1 => 1.00, 2 => 2.00, 3 => 3.00, 4 => 4.00, 5 => 5.00, 'All' => 6.00); ?>
<select id="selectStarRating" name="selectStarRating" class="demo-default select-country" placeholder="Select">
<?php foreach ($starRatingArray as $key => $value) { ?>
<option value="<?php echo $value; ?>" <?php if ($this->searchParams['hotelStarRating'] == $value) {
echo "selected";
} ?>><?php echo $key; ?></option>
<?php } ?>
</select>
</div>
</div>
<div class="col-md-3">
<div class="form-group dropdown">
<label>Rooms </label>
<?php $roomsArray = array(0 => '', 1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8); ?>
<select id="select-rooms3" class="demo-default select-country" placeholder="Select" name="selectRoom" onchange="getRooms(this.value);">
<?php foreach ($roomsArray as $key => $value) { ?>
<option value="<?php echo $value; ?>" <?php if ($this->searchParams['hotelTotalRooms'] == $value) {
echo "selected";
} ?>><?php echo $key; ?></option>
<?php } ?>
</select>
</div>
</div>
<?php if (isset($this->customerId) && !empty($this->customerId)) { ?>
<div class="col-md-6">
<div class="form-group dropdown">
<label>Add Remarks </label>
<input name="leadRemark" type="text" class="form-control whbg" value="" autocomplete="off" id="leadRemark" placeholder="Enter Remarks" title="Spaces are not allowed" />
</div>
</div>
<?php } ?>
</div>
<div class="col-md-12 no-padding" id="roomselection">
<?php
$s = 1;
for ($i = 0; $i < $this->searchParams['hotelTotalRooms']; $i++) {
?>
<div id="room_details" class="col-md-12">
<div class="col-md-2 col-sm-2">
<div class="form-group form-group1 dropdown">
<label style="line-height: 34px;"><strong>Room <?php echo $s; ?></strong></label>
</div>
</div>
<div class="col-md-2 col-sm-2">
<div class="form-group form-group1 dropdown">
<label>Adults <span class="graytxt">(18+)</span></label>
<select placeholder="Select" class="demo-default select-country noOfAdults" name="noOfAdults<?php echo $s; ?>" id="selectnoOfAdults<?php echo $s; ?>">
<option value="">0</option>
<option value="1" <?php if ($this->searchParams['memberDetails'][$i]['AdultPax'] == 1) {
echo "selected";
} ?>>1</option>
<option value="2" <?php if ($this->searchParams['memberDetails'][$i]['AdultPax'] == 2) {
echo "selected";
} ?>>2</option>
<option value="3" <?php if ($this->searchParams['memberDetails'][$i]['AdultPax'] == 3) {
echo "selected";
} ?>>3</option>
<option value="4" <?php if ($this->searchParams['memberDetails'][$i]['AdultPax'] == 4) {
echo "selected";
} ?>>4</option>
</select>
</div>
</div>
<div class="col-md-2 col-sm-2">
<div class="form-group form-group1 dropdown">
<label>Children <span class="graytxt">(0-12 )</span></label>
<select placeholder="Select" class="demo-default select-country noOfChilds" name="select-noOfChild<?php echo $s; ?>" onchange="getChildrens(this.value,<?php echo $s; ?>);">
<option value="0" <?php if ($this->searchParams['memberDetails'][$i]['ChildPax'] == 0) {
echo "selected";
} ?>>0</option>
<option value="1" <?php if ($this->searchParams['memberDetails'][$i]['ChildPax'] == 1) {
echo "selected";
} ?>>1</option>
<option value="2" <?php if ($this->searchParams['memberDetails'][$i]['ChildPax'] == 2) {
echo "selected";
} ?>>2</option>
<option value="3" <?php if ($this->searchParams['memberDetails'][$i]['ChildPax'] == 3) {
echo "selected";
} ?>>3</option>
</select>
</div>
</div>
<div id="appendchildren<?php echo $s; ?>" class="col-md-6 childcls col-sm-6" style="display: block;">
<?php
if ($this->searchParams['memberDetails'][$i]['ChildPax'] > 0) {
$explodeChildage = explode(",", $this->searchParams['memberDetails'][$i]['ChildsAge']);
$childAgeArray = array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 11 => 11, 12 => 12);
$c = 1;
foreach ($explodeChildage as $key => $value) {
?>
<div class="col-md-4 col-sm-4">
<div class="form-group form-group1 dropdown">
<label>Age of Child <?php echo $c; ?> </label>
<select placeholder="Select" class="demo-default select-country" name="select-childAge_<?php echo $s; ?>_<?php echo $c; ?>" id="select-childAge_<?php echo $s; ?>_<?php echo $c; ?>">
<?php foreach ($childAgeArray as $key1 => $value1) { ?>
<option value="<?php echo $value1; ?>" <?php if ($value == $value1) {
echo "selected";
} ?>><?php echo $key1; ?></option>
<?php } ?>
</select>
</div>
</div>
<?php $c++;
}
} ?>
</div>
</div>
<?php $s++;
} ?>
</div>
<div class="col-md-6">
<div class="col-md-6">
<div class="ls-group-input">
<span id="INPROCESS">
<button type="submit" class="btn btn btn-danger btn-lg ladda-button" id="searchHotelButton" name="" value=""><span class="ladda-label">Search Hotel </span></button>
</span>
<input type="hidden" name="countryCode" value="<?php echo isset($this->searchParams['countryCode']) ? $this->searchParams['countryCode'] : ''; ?>" id="countryCode" />
<input type="hidden" name="customerId" id="customerId" value="<?php echo base64_encode($this->customerId ? $this->customerId : $customerId); ?>" />
<input type="hidden" name="ajaxdropdown_css" class="ajaxdropdown_css" value="<?php echo 0; ?>" />
<input type="hidden" id="editLeadId" value="<?php echo isset($this->searchParams['TPSysId']) ? base64_encode($this->leadDetail['TPSysId']) : ''; ?>" name="editLeadId" />
<input type="hidden" id="editTravelItenaryId" value="<?php echo isset($this->searchParams['TPIntSysId']) ? base64_encode($this->searchParams['TPIntSysId']) : ''; ?>" name="editTravelItenaryId" />
<input type="hidden" name="searchType" id="searchType" value="<?php echo base64_encode($searchType); ?>" />
<input type="hidden" name="additionalRequirement" id="additionalRequirement" value="" />
<input type="hidden" name="countryCode" value="<?php echo isset($this->searchParams['countryCode']) ? $this->searchParams['countryCode'] : ''; ?>" id="countryCode" />
</div>
</div>
</div>
</div>
</form>
</div>
<script type="text/javascript">
$("#search-form").validate({
//debug: true,
highlight: function(error, element) {
var name = $(element).attr("name");
$("input[name=" + name + "]").removeClass('error');
},
rules: {
"hidden_selected_hotel_cityid": {
required: true,
noStartEndWhiteSpaces: true
},
"chekInDate": {
required: true,
date: {
format: 'MM/DD/YYYY',
message: 'The date is not a valid'
}
},
"nights": {
required: true,
noStartEndWhiteSpaces: true,
min: 1,
maxlength: 3
//ignore: 0,
},
"chekOutDate": {
required: true,
date: {
format: 'MM/DD/YYYY',
message: 'The date is not a valid'
}
},
"selectNationality": {
required: true,
},
"selectStarRating": {
required: true,
},
"selectRoom": {
required: true,
},
},
messages: {
'nights': 'Please select check out date.'
},
submitHandler: function() {
var is_visa = $("#checkRed1").prop("checked");
var is_forex = $("#checkRed2").prop("checked");
var is_insurance = $("#checkRed3").prop("checked");
if (is_visa == true) {
var visaval = '1';
} else {
var visaval = '0';
}
if (is_forex == true) {
var forexval = '1';
} else {
var forexval = '0';
}
if (is_insurance == true) {
var insureval = '1';
} else {
var insureval = '0';
}
var addrequirement = visaval + forexval + insureval;
$("#additionalRequirement").val(addrequirement);
var data = $('#search-form').serialize();
$.ajax({
url: '/buyhotel/save-search-query',
data: data,
type: 'POST',
dataType: 'json',
beforeSend: function(data) {
$("#INPROCESS").html('<img src="<?php echo $this->baseUrl('public/assets/images/loader.gif'); ?>">');
},
success: function(response) {
if (response.success) {
location.href = "/buyhotel/search-results";
} else {
$("#INPROCESS").html('<button type="submit" class="btn btn btn-danger btn-lg ladda-button" id="searchHotelButton" name="" value=""><span class="ladda-label">Search Hotel </span></button>');
alert("Oops! there might be some technical issue, Please try after some time");
}
},
error: function() {
$("#INPROCESS").html('<button type="submit" class="btn btn btn-danger btn-lg ladda-button" id="searchHotelButton" name="" value=""><span class="ladda-label">Search Hotel </span></button>');
alert("Oops! there might be some technical issue, Please try after some time");
}
});
},
});
</script>