| 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 : |
<link rel="stylesheet" href="<?php echo $this->baseUrl('public/assets/css/plugins/summernote.css'); ?>">
<form name="frmHotelOverview" id="frmHotelOverview" method="post" enctype="multipart/form-data">
<!-- Tab panes -->
<div class="tab-content tab-border">
<div class="tab-pane fade in active" id="home">
<div class="col-md-12 no-padding no-margin">
<div class="col-md-6">
<div class="form-group">
<label>Hotel Name</label>
<?php if (!empty($this->arrHotelInfo['AccomSysId'])) { ?>
<input type="text" name="edit_hotel_name" id="edit_hotel_name" value="<?php echo $this->arrHotelInfo['Title']; ?>" class="form-control" maxlength="200">
<?php }else{ ?>
<input type="text" name="hotel_name" id="hotel_name" value="<?php if (!empty($this->arrHotelInfo['CityName'])) {
echo $this->arrHotelInfo['Title'] . ", " . $this->arrHotelInfo['CityName'];
} ?>" class="form-control" maxlength="200">
<?php } ?>
<input type="hidden" name="hidden_selected_hotel_id" id="hidden_selected_hotel_id" value="<?php if ($this->arrHotelInfo['AccomSysId']) {
echo $this->arrHotelInfo['AccomSysId'];
} else {
echo "0";
} ?>" class="form-control" maxlength="200">
<?php if ($this->arrHotelInfo['AccomSysId']) { ?>
<a href="javascript:void(0)" id="change-hotel" onclick="changeHotel();">Change Hotel</a>
<?php } ?>
</div>
<div class="form-group">
<label>Hotel Chain</label>
<select id="hotel_chain" name="hotel_chain" class="form-control" placeholder="Select">
<option value="0">Select</option>
<?php
if (!empty($this->arrAccomodationGroups) ) {
foreach ($this->arrAccomodationGroups as $group) {
?>
<option value="<?php echo $group['AccomGrSysId']; ?>" <?php if ($this->arrHotelGroupInfo['AccomGrSysId'] == $group['AccomGrSysId']) {
echo "Selected";
} ?>><?php echo $group['Title']; ?></option>
<?php
}
}
?>
</select>
</div>
<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
if (!empty($this->arrAccomodationEconomyType)) {
foreach ($this->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>
<?php /* ?>
<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(count($arrRoomTypes) > 0 ) {
foreach($arrRoomTypes as $room) { ?>
<option value="<?php echo $room['RoomType']; ?>" <?php if(isset($this->arrHotelRoomIds) && in_array($room['RoomType'],$this->arrHotelRoomIds)) echo "selected"; ?> ><?php echo $room['Title']; ?></option>
<?php
}
}
?>
</select>
</div>
<?php */ ?>
<?php
$arrStarRatings = Zend_Controller_Action_HelperBroker::getStaticHelper('Hotel')->getStarRatings();
?>
<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 class="form-group">
<label>Check-In Time</label>
<input type="text" id="CheckinTime" name="CheckinTime" class="form-control timePickerOnly" value="<?php echo trim($this->arrHotelInfo['CheckinTime']); ?>">
<!-- <span class="input-group-addon dateTimePickerCustom1"><i class="fa fa-calendar"></i></span>-->
</div>
<div class="form-group">
<label>Check-Out Time</label>
<input type="text" id="CheckOutTime" name="CheckOutTime" class="form-control timePickerOnly" value="<?php echo trim($this->arrHotelInfo['CheckOutTime']); ?>">
<!-- <span class="input-group-addon dateTimePickerCustom1"><i class="fa fa-calendar"></i></span>-->
</div>
<!-- <div class="form-group">
<label>Total Room Capacity</label>
<input type="text" id="RoomCounts" name="RoomCounts" class="form-control numberonly" value="<?php //echo $this->arrHotelInfo['RoomCounts']; ?>" maxlength="4">
</div>-->
<?php
// echo '<pre>';
// print_r($this->arrCountryList);
// exit;
?>
<div class="form-group">
<label>Country </label>
<?php if (!empty($this->arrHotelInfo['CountryName'])) { ?>
<select class="form-control" id="select-hotel-country" name="select-hotel-country">
<option value="<?php echo $this->arrHotelInfo['ContSysId']; ?>"><?php echo $this->arrHotelInfo['CountryName']; ?></option>
</select>
<?php } else { ?>
<select id="select-hotel-country" name="select-hotel-country" class="form-control" placeholder="Select" onchange="populateCity();">
<option value="0">Select</option>
<?php
if (!empty($this->arrCountryList) ) {
foreach ($this->arrCountryList as $country) {
?>
<option value="<?php echo $country['ContId']; ?>" <?php if ($this->arrHotelInfo['ContSysId'] == $country['ContId']) {
echo "Selected";
} ?>><?php echo $country['Title']; ?></option>
<?php
}
}
?>
</select>
<?php } ?>
</div>
<!-- <div class="form-group">
<label>State </label>
<select id="select-hotel-state" name="select-hotel-state" class="form-control" placeholder="Select">
<option value="0">Select</option>
</select>
</div>-->
<div class="form-group">
<label>City </label>
<?php if (!empty($this->arrHotelInfo['CityName'])) { ?>
<select id="select-hotel-city" name="select-hotel-city" class="form-control" placeholder="Select">
<option value="<?php echo $this->arrHotelInfo['CitySysId']; ?>"><?php echo $this->arrHotelInfo['CityName']; ?></option>
</select>
<?php } else { ?>
<select id="select-hotel-city" name="select-hotel-city" class="form-control" placeholder="Select">
<option value="0">Select</option>
</select>
<?php } ?>
</div>
<div class="form-group">
<label>Pin Code</label>
<input type="text" id="pinCode" name="pinCode" class="form-control numberonly" value="<?php echo trim($this->arrHotelInfo['PinCode']); ?>" maxlength="6">
</div>
<div class="form-group">
<label>Hotel Address</label>
<textarea placeholder="" name="address" id="address" class="form-control" ><?php echo trim($this->arrHotelInfo['Address']); ?></textarea>
</div>
<div class="form-group">
<label>Latitude</label>
<input type="text" id="latitude" name="latitude" class="form-control numberonly" value="<?php echo trim(@$this->arrHotelInfo['GeoLat']); ?>" maxlength="20">
</div>
<div class="form-group">
<label>Longitude</label>
<input type="text" id="longitude" name="longitude" class="form-control numberonly" value="<?php echo trim(@$this->arrHotelInfo['GeoLong']); ?>" maxlength="20">
</div>
</div>
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">About Hotel</h3>
</div>
<div class="panel-body">
<!-- <div class="summernote">Enter ...</div>-->
<textarea id="aboutHotelBrief" name="brief" class="form-control summernote"><?php echo $this->arrHotelInfo['Brief']; ?></textarea>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-search"></i> Find Location</h3>
</div>
<div class="panel-body no-padding">
<div id="findLocation">
</div>
<div class="mapDirectionsData">
<!-- <form id="findLocationForm" class="form-inline lsn_form" role="form" action="#">
<div class="form-group form-group1">
<input class="form-control" type="text" id="findLocationArea" value="" placeholder="Address here"/>
</div>
<button id="findLocationSubmit" type="submit" class="btn ls-red-btn"><i class="fa fa-search"></i> Search</button>
</form>-->
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-upload"></i> Upload Main Image</h3>
</div>
<div class="panel-body">
<input type="hidden" class="file whbg" name="hiddenuserImage" value ="<?php echo $this->arrHotelInfo['DetailImg']; ?>">
<input type="file" class="file whbg" name="userImage" id="userImage" data-preview-file-type="any">
<?php if($this->arrHotelInfo['DetailImg'] != '') {?>
<img src="<?php echo $this->arrHotelInfo['DetailImg']; ?>" width="60" height="60">
<?php } ?>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-upload"></i> Upload Other Images</h3>
</div>
<div class="panel-body">
<input type="file" class="file whbg" id="userOtherImage" name="userOtherImage[]" multiple=true data-preview-file-type="any">
<?php if(!empty($this->arrHotelImages)) {
foreach($this->arrHotelImages as $val){
$spanId = "remove-".$val['ImgIndex']."-".$val['AccomSysId'];
?>
<span id="<?php echo $spanId; ?>">
<input type="hidden" class="file whbg" name="userOtherHiddenImage[]" value ="<?php echo $val['Details']; ?>">
<img src="<?php echo $val['Details']; ?>" width="60" height="60"> <a href="javascript://" onclick="DeleteImg('<?php echo $spanId; ?>');">Delete</a>
</span>
<?php } } ?>
</div>
</div>
</div>
</div>
<div class="clear"></div></div>
</div>
<div class="col-md-12 no-padding no-margin">
<div class="panel-footer text-right">
<!-- <button type="button" class="btn btn-success" id="save-overview" onclick="saveIndividualHotelOverview();">Save</button>-->
<!-- <button type="submit" class="btn btn-success" id="save-overview" >Save</button>-->
<input type="submit" value="Submit" class="btn btn-success" />
</div>
</div>
</form>
<?php //echo $this->render('hotel/add-new.phtml'); ?>
<!-- Date & Time Picker Library Script Start -->
<script src="<?php echo $this->baseUrl('public/assets/js/jquery.datetimepicker.js'); ?>"></script>
<!-- Date & Time Picker Library Script End -->
<!--Demo for Date, Time Color Picker Script Start -->
<script src="<?php echo $this->baseUrl('public/assets/js/pages/pickerTool.js'); ?>"></script>
<!--Demo for Date, Time Color Picker Script End -->
<!--selectize Library start-->
<script src="<?php echo $this->baseUrl('public/assets/js/selectize.min.js'); ?>"></script>
<!--selectize Library End-->
<!--Select & Tag demo start-->
<script src="<?php echo $this->baseUrl('public/assets/js/pages/selectTag.js'); ?>"></script>
<!--Select & Tag demo end-->
<script type="text/javascript">
$(document).ready(function () {
var val1 = '<?php if (isset($this->arrHotelInfo['CheckinTime'])) {
echo trim($this->arrHotelInfo['CheckinTime']);
} else {
echo "__:__";
} ?>';
//alert(val1);
var val2 = '<?php if (isset($this->arrHotelInfo['CheckOutTime'])) {
echo trim($this->arrHotelInfo['CheckOutTime']);
} else {
echo "__:__";
} ?>';
$('#CheckinTime').val(val1);
$('#CheckOutTime').val(val2);
});
</script>
<script type="text/javascript">
function disableOverviewForm() {
$("#hotel_name").attr("readonly", true);
$("#hotel_chain").attr("readonly", true);
$("#star-rating").attr("readonly", true);
$("#hotel-type").attr("readonly", true);
$("#CheckinTime").attr("readonly", true);
$("#CheckOutTime").attr("readonly", true);
$("#RoomCounts").attr("readonly", true);
$("#select-hotel-country").attr("readonly", true);
$("#select-hotel-state").attr("readonly", true);
$("#select-hotel-city").attr("readonly", true);
$("#address").attr("readonly", true);
$("#pinCode").attr("readonly", true);
$("#change-hotel").css("display", "block");
$("#save-overview").css("display", "none");
enableHotelTabs();
}
function enableOverviewForm() {
$("#hotel_name").attr("readonly", false);
$("#hotel_chain").attr("readonly", false);
$("#star-rating").attr("readonly", false);
$("#hotel-type").attr("readonly", false);
$("#CheckinTime").attr("readonly", false);
$("#CheckOutTime").attr("readonly", false);
$("#RoomCounts").attr("readonly", false);
$("#select-hotel-country").attr("readonly", false);
$("#select-hotel-state").attr("readonly", false);
$("#select-hotel-city").attr("readonly", false);
$("#address").attr("readonly", false);
$("#pinCode").attr("readonly", false);
$("#frmHotelOverview").find("input[type=text], textarea, select").val("");
$("#hidden_selected_hotel_id").val('');
$("#save-overview").css("display", "inline-block");
$("#change-hotel").css("display", "none");
}
</script>
<link rel="stylesheet" href="<?php echo $this->baseUrl('public/assets/css/autosuggest-jquery-ui.css'); ?>">
<!--Advance Radio and checkbox demo start-->
<script src="<?php echo $this->baseUrl('public/assets/js/jquery-ui.js'); ?>"></script>
<!--Advance Radio and checkbox demo start-->
<script type="text/javascript">
$(document).ready(function (e) {
$("#frmHotelOverview").on('submit',(function(e) {
e.preventDefault();
$.ajax({
url: "<?php echo $this->baseUrl('/hotel/save-individual-hotel-overview') ?>",
type: "POST",
data: new FormData(this),
contentType: false,
cache: false,
processData:false,
dataType: 'json',
success: function(response)
{
if (response.success) {
$("#hidden_selected_hotel_id").val(response.intLastInsertId);
showHotelAddRoomsTab();
}
else {
alert(response.msg);
}
},
error: function()
{
}
});
}));
});
$().ready(function () {
$("input[name=hotel_name]").autocomplete({
source: '/hotel/autosuggest-agent',
focus: function (event, ui) {
event.preventDefault();
$("#tags").val(ui.item.label);
},
messages: {
noResults: '',
results: function () {
}
},
minLength: 3,
select: function (event, ui) {
event.preventDefault();
// if(ui.item.value == '-1') {
// $("#hidden_new_hotel_added_via_page").val('DETAIL');
// addNewHotelPopup();
// return false;
// }
//disableOverviewForm();
$("#change-hotel").show();
$("input[name=hotel_name]").val(ui.item.label);
$("#hidden_selected_hotel_id").val(ui.item.value).trigger('change');
showHotelOverviewTab();
}
});
});
function populateState() {
var intCountyId = $("#select-hotel-country").val();
$.ajax({
url: '<?php echo $this->baseUrl('/general/getstatedropdown') ?>',
data: {intCountyId: intCountyId},
type: 'POST',
dataType: 'html',
beforeSend: function () {
$("#select-hotel-state").empty();
},
success: function (response) {
$("#select-hotel-state").append(response);
}
});
}
function populateCity() {
var intCountryId = $("#select-hotel-country").val();
$.ajax({
url: '<?php echo $this->baseUrl('/general/getcitydropdown') ?>',
data: {intCountryId: intCountryId},
type: 'POST',
dataType: 'html',
beforeSend: function () {
$("#select-hotel-city").empty();
},
success: function (response) {
$("#select-hotel-city").append(response);
}
});
}
function changeHotel() {
$("#hidden_selected_hotel_id").val('');
showHotelOverviewTab();
// enableOverviewForm();
}
function DeleteImg(spanId){
if(confirm("Are you sure delete this image?")){
$("#"+spanId).html('');
}
}
$("#userImage,#userOtherImage").on('change', function () {
//Get count of selected files
var countFiles = $(this)[0].files.length;
var imgPath = $(this)[0].value;
var extn = imgPath.substring(imgPath.lastIndexOf('.') + 1).toLowerCase();
var image_holder = $("#image-holder");
image_holder.empty();
if (extn == "gif" || extn == "png" || extn == "jpg" || extn == "jpeg") {
if (typeof (FileReader) != "undefined") {
//loop for each file selected for uploaded.
for (var i = 0; i < countFiles; i++) {
var reader = new FileReader();
reader.onload = function (e) {
$("<img />", {
"src": e.target.result,
"class": "thumb-image"
}).appendTo(image_holder);
}
image_holder.show();
reader.readAsDataURL($(this)[0].files[i]);
}
} else {
alert("This browser does not support FileReader.");
}
} else {
alert("Pls select only images");
}
});
</script>
<?php //} ?>