| 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/hotel/ |
Upload File : |
<div class="modal fade" id="addNewHotelForm" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<form name="frmAddHotel" id="frmAddHotel" method="post">
<input type="hidden" name="hidden_hotel_module_name" id="hidden_hotel_module_name" class="form-control whbg">
<input type="hidden" name="hidden_hotel_module_id_name" id="hidden_hotel_module_id_name" class="form-control whbg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">Add Hotel</h4>
</div>
<div class="modal-body">
<div class="alert alert-danger" id="hotel-popup-error-message-box" style="display:none">
<span id="hotel-popup-error-message"></span>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Country</label>
<?php
$objCountry = new Travel_Model_TblCountry();
$arrCountyList = $objCountry->getCountryList();
?>
<select name="hotel-country" id="hotel-country" class="form-control" placeholder="Select" onchange="populateHotelCity();">
<option value="0">Select</option>
<?php
if(!empty($arrCountyList) ) {
foreach($arrCountyList as $country) { ?>
<option value="<?php echo $country['ContId']; ?>"><?php echo $country['Title']; ?></option>
<?php
}
}
?>
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>City</label>
<select id="hotel-city" name="hotel-city" class="form-control" placeholder="Select">
<option value="0">Select</option>
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Hotel Name</label>
<input type="text" name="popup_hotel_name" id="popup_hotel_name" class="form-control whbg" maxlength="200">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Accommodation Type</label>
<select id="hotel-type" name="hotel-type" class="form-control" placeholder="Select">
<option value="0">Select</option>
<?php
$objHotel = new Travel_Model_TblHotel();
$arrAccomodationEconomyType = $objHotel->getAccomodationEconomyType();
if(!empty($arrAccomodationEconomyType) ) {
foreach($arrAccomodationEconomyType as $type) { ?>
<option value="<?php echo $type['EconomyType']; ?>" <?php if($this->arrHotelInfo['EconomyTypeId'] == $type['EconomyType']) echo "selected"; ?>><?php echo $type['Title']; ?></option>
<?php }
}
?>
</select>
</div>
</div>
<?php
$arrStarRatings = Zend_Controller_Action_HelperBroker::getStaticHelper('Hotel')->getStarRatings();
?>
<div class="col-md-6">
<div class="form-group">
<label>Star Rating</label>
<select id="star-rating" name="star-rating" class="form-control" placeholder="Select">
<option value="">Select</option>
<?php
if(!empty($arrStarRatings) ) {
while ( list($key, $value) = each($arrStarRatings) ) { ?>
<option value="<?php echo $key; ?>" <?php if($this->arrHotelInfo['Stars'] == $key) echo "selected"; ?>><?php echo $value; ?></option>
<?php
}
}
?>
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Room Types</label>
<select id="hotel-room-types" multiple="multiple" name="hotel-room-types[]" class="form-control select-state" placeholder="Select">
<!-- <option value="0">Select</option>-->
<?php
$arrRoomTypes = Zend_Controller_Action_HelperBroker::getStaticHelper('Hotel')->getRoomTypes();
if(!empty($arrRoomTypes) ) {
foreach($arrRoomTypes as $room) { ?>
<option value="<?php echo $room['RoomType']; ?>" <?php if($this->arrRoomDetail['RoomType'] == $room['RoomType']) echo "selected"; ?> ><?php echo $room['Title']; ?></option>
<?php
}
}
?>
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Pin Code</label>
<input type="text" id="pinCode" name="pinCode" class="form-control whbg numberonly" maxlength="6">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Address</label>
<input type="text" id="hotel-address" name="hotel-address" class="form-control whbg" maxlength="250">
</div>
</div>
<div class="clear"></div></div>
<div class="modal-footer">
<input type="hidden" id="hidden_new_hotel_added_via_page" name="hidden_new_hotel_added_via_page" value="DETAIL" class="form-control whbg" maxlength="250">
<button type="button" id="close_hotel_popup" class="btn btn-default btn-sm " data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-warning btn-sm" id="add-new-hotel" onclick="addNewHotel();">Submit</button>
</div>
</div>
</form>
</div>
</div>
<?php //echo $this->render('commonjs.phtml'); ?>
<script type="text/javascript" src="<?php echo $this->baseUrl('public/js/functions.js'); ?>"></script>
<script type="text/javascript">
//This function work for get city list by country id
function populateHotelCity() {
var intCountryId = $("#hotel-country").val();
getCityList(intCountryId, 'hotel-city');
}
function addNewHotel() {
var data = $("#frmAddHotel").serialize();
var hidden_hotel_module_name = $("#hidden_hotel_module_name").val();
var hidden_hotel_module_id = $("#hidden_hotel_module_id_name").val();
$.ajax({
url : '<?php echo $this->baseUrl('/hotel/add-new') ?>',
data : data ,
type : 'POST',
dataType : 'json',
beforeSend : function() {
},
success : function(response) {
if(response.success) {
/* window.opener.document.frmAddHotelInventory.hotel_name.value = response.Title;
window.opener.document.frmAddHotelInventory.hidden_selected_hotel_id.value = response.intLastInsertId;
self.close(); */
$('.modal-backdrop').remove();
$("#close_hotel_popup").trigger('click');
if(hidden_hotel_module_name!='' && hidden_hotel_module_name=='bulk_package' && hidden_hotel_module_id!='')
{
$("#hotelId_" + hidden_hotel_module_id).val(response.Title);
$("#hidden_selected_hotel_id_" + hidden_hotel_module_id).val(response.intLastInsertId);
var full_name_city = response.Title + ', ' + response.CityName;
$("#hotelKeyName_" + hidden_hotel_module_id).val(response.Title);
$("#selected_hotel_span_div_" + hidden_hotel_module_id).html(full_name_city);
$("#selected_hotel_Stars_" + hidden_hotel_module_id).html(response.Stars);
$("#hidden_selected_hotel_star_" + hidden_hotel_module_id).val(response.Stars);
var price_range = response.PriceRange;
//alert(price_range);
if(price_range!='')
{
var splitted_str = price_range.split("-");
var price_range1 = splitted_str[0];
var price_range2 = splitted_str[1];
$("#Min_Price_Range_" + hidden_hotel_module_id).val(price_range1);
$("#Max_Price_Range_" + hidden_hotel_module_id).val(price_range2);
} else {
var price_range1 = '';
var price_range2 = '';
$("#Min_Price_Range_" + hidden_hotel_module_id).val(price_range1);
$("#Max_Price_Range_" + hidden_hotel_module_id).val(price_range2);
}
} else {
$("#hotel_name").val(response.Title);
$("#hidden_new_insert_id").val(response.intLastInsertId);
$("#hidden_selected_hotel_id").val(response.intLastInsertId);
var page = $("#hidden_new_hotel_added_via_page").val();
if(page == 'DETAIL') {
showHotelOverviewTab();
}else {
$("#hidden_selected_hotel_id").trigger('change');
populateRoomType(response.intLastInsertId);
}
}
}
else {
//alert('<?php echo TECHNICAL_ERROR_MSG; ?>');
// alert(response.msg);
$("#hotel-popup-error-message-box").css("display","block");
$("#hotel-popup-error-message").html(response.msg);
}
}
});
}
</script>