| 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/accommodation/ |
Upload File : |
<!--Page main section start-->
<section id="min-wrapper" class="active">
<div id="main-content">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<!--Top header start-->
<h3 class="ls-top-header">Hotels List</h3>
<!--Top header end -->
<!--Top breadcrumb start -->
<ol class="breadcrumb">
<li><a href="#"><i class="fa fa-home"></i></a></li>
<li class="active">Hotels List</li>
</ol>
<!--Top breadcrumb start -->
</div>
<!--for display message div-->
<?php if (count($this->messages)) { ?>
<div class="col-md-12" id="message_hotel_list_div">
<div class="alert alert-success">
<button aria-hidden="true" id="hideHotelListMessage" class="close" type="button">×</button>
<?php foreach ($this->messages as $message) { ?>
<span id="success-message-box"><?php echo $this->escape($message); ?></span>
<?php } ?>
</div>
</div>
<?php } ?>
</div>
<script type="text/javascript">
$("#hideHotelListMessage").click( function(){
$("#message_hotel_list_div").hide();
});
</script>
<!-- Main Content Element Start-->
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Search Hotels </h3>
<ul class="panel-control">
<li><a class="minus active" href="javascript:void(0)"><i class="fa fa-square-o"></i></a></li>
</ul>
</div>
<div class="panel-body" <?php echo (!empty($this->arrGetData) )?'style="display:;"':'style="display:none;"' ?>>
<form name="search" id="search" class="ls_form" role="form" method="post" action="<?php echo $this->baseUrl('hotel/manage-hotel'); ?>">
<div class="col-md-4">
<div class="form-group">
<label>Destination</label>
<input type="text" class="form-control ui-autocomplete-input" autocomplete="off" name="city_name" id="city_name" value="<?php echo !empty($this->cityName)?$this->cityName:'' ?>" />
<input type="hidden" id="DestinationId" name="DestinationId" value="<?php echo !empty($this->DestinationId)?$this->DestinationId:'' ?>">
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label>Hotel Name</label> <br/>
<input type="text" class="form-control whbg" name="HotelName" id="HotelName" value="<?php echo !empty($this->HotelName)?$this->HotelName:'' ?>">
</div>
</div>
<?php
$arrStarRatings = Zend_Controller_Action_HelperBroker::getStaticHelper('Hotel')->getStarRatings();
?>
<div class="col-md-4">
<div class="form-group">
<label>Star Rating</label>
<select id="rating" name="rating[]" class="demo-default select-country" multiple="" placeholder="Select Star">
<option value="0">Select Star </option>
<?php
if(!empty($arrStarRatings) ) {
while ( list($key, $value) = each($arrStarRatings) ) {
if(in_array($key, $this->ratingArray)){
$selected = "selected";
} else {
$selected = "";
}
?>
<option <?php echo $selected; ?> value="<?php echo $key; ?>" <?php if((isset($this->searchArr['rating']) && ($key==$this->searchArr['rating'])) || ($key==0)) { echo "Selected"; } ?>><?php echo $value; ?></option>
<?php
}
}
?>
</select>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label>Status</label>
<select id="status" name="status" class="form-control whbg" placeholder="Select">
<option value="">Select Status </option>
<option value="1" <?php echo ($this->Status == 1)?'selected':''; ?>>Active</option>
<option value="0" <?php echo ($this->Status == 0)?'selected':''; ?>>InActive</option>
</select>
</div>
</div>
<div class="col-md-4 pull-right">
<div class="form-group form-group1 pull-right">
<button type="button" class="btn btn-primarygray" onclick="window.location.href='<?php echo $this->baseUrl('hotel/manage-hotel'); ?>'">Cancel</button>
<button type="submit" class="btn btn-primary"><i class="fa fa-search"></i> Filter</button>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="col-md-12">
<div class="leadeBorder">
<div class="panel-body">
<div class="form-group form-group1 text-right">
<?php if($this->intLoggedinUserIdSetPage!="" && $this->intLoggedinUserIdSetPage!=0) { ?>
<a href="<?php echo $this->baseUrl('hotel'); ?>" class="btn btn-default btn-sm"><i class="fa fa-fw fa-arrows"></i> My Hotel Rates</a>
<a href="<?php echo $this->baseUrl('hotel/add-hotel-inventory/key/inventory'); ?>" class="btn btn-default btn-sm"><i class="fa fa-fw fa-arrows"></i> Add Hotel Rates</a>
<a href="<?php echo $this->baseUrl('hotel/add-hotel-inventory/key/add'); ?>" class="btn btn-warning btn-sm"><i class="fa fa-fw fa-arrows"></i> Add Hotel</a>
<?php } else { ?>
<a href="<?php echo $this->baseUrl('hotel/add-hotel-inventory'); ?>" class="btn btn-warning btn-sm"><i class="fa fa-fw fa-arrows"></i> Add Hotel</a>
<?php } ?>
</div>
<div class="panel-body table-responsive no-padding">
<table class="table table-bordered">
<tr class="alert alert-success">
<th><strong>Hotel Name</strong></th>
<th><strong>Hotel Source</strong></th>
<th><strong>City (Country)</strong></th>
<th><strong>Star Rating</strong></th>
<th><strong>Type</strong></th>
<th><strong>Check In/Check Out</strong></th>
<th style="width:130px;"><strong>Action</strong></th>
</tr>
<?php
if( !empty($this->paginator) ) {
//echo "<pre>";print_r($this->paginator);echo "</pre>";
foreach($this->paginator as $hotel)
{
$ICSourceSysId = in_array($hotel['ICSourceSysId'],array(3,4))?"API":"Self";
?>
<tr>
<td><?php echo $hotel['Title']; ?></td>
<td><?php echo $ICSourceSysId; ?></td>
<td><?php echo $hotel['CityName']; ?> (<?php echo $hotel['CountryName']; ?>)</td>
<td><?php echo (!empty($hotel['Stars']) && $hotel['Stars']!= ".00")?(int)$hotel['Stars']:"NA"; ?></td>
<td><?php echo $hotel['EconomyTypeTitle']; ?></td>
<td><?php echo (!empty(trim($hotel['CheckinTime'])) && !empty(trim($hotel['CheckOutTime'])))?$hotel['CheckinTime']." / ".$hotel['CheckOutTime']:'NA'; ?></td>
<td>
<?php if($this->intLoggedinUserIdSetPage!="" && $this->intLoggedinUserIdSetPage!=0) { ?>
<a href="<?php echo $this->baseUrl('hotel/view-hotel-inventory/AccomSysId/'.base64_encode($hotel['AccomSysId']) ); ?>" class="btn btn-xs btn-warning tooltipLink" title="Edit"><i class="fa fa-pencil-square-o"></i></a>
<?php } else { ?>
<a href="<?php echo $this->baseUrl('hotel/add-hotel-inventory/AccomSysId/'.base64_encode($hotel['AccomSysId']) ); ?>" class="btn btn-xs btn-warning tooltipLink" title="Edit"><i class="fa fa-pencil-square-o"></i></a>
<?php } ?>
<a href="<?php echo $this->baseUrl("/hotel/index/id/".base64_encode($hotel['AccomSysId'])); ?>" class="btn btn-xs ls-green-btn tooltipLink" title="Hotel Inventory">
<i class="fa fa-server"></i>
</a>
<!--Active Code -->
<?php if($hotel['IsActive'] == '1') { ?>
<a href="<?php echo $this->baseUrl("/hotel/deactivate/id/".base64_encode($hotel['AccomSysId'])); ?>" class="btn btn-xs btn-danger tooltipLink" title="Deactivate"><i class="glyphicon glyphicon-ok-circle"></i></a>
<?php } else { ?>
<a href="<?php echo $this->baseUrl("/hotel/activate/id/".base64_encode($hotel['AccomSysId'])); ?>" class="btn btn-xs btn-danger tooltipLink" title="Activate"><i class="glyphicon glyphicon-remove-circle"></i></a>
<?php } ?>
</td>
</tr>
<?php
}
} else { ?>
<tr><td colspan="11">No record found.</td></tr>
<?php }
?>
</table>
</div>
<!--Table Wrapper Finish-->
<div class="panel-box clearfix">
<?php if( !empty($this->paginator) ) { ?>
<?php echo $this->paginationControl($this->paginator, 'Sliding', 'hotel_pagination.phtml', array(
'DestinationId' => @$this->searchArr['DestinationId'],
'HotelName' => @$this->searchArr['HotelName'],
'rating' => @$this->searchArr['rating']
)); ?>
<?php } ?>
</div>
</div>
</div>
</div>
</div>
<!-- Main Content Element End-->
</div>
</div>
<?php echo $this->render('copyrightfooter.phtml'); ?>
</section>
<!--Page main section end -->
<?php include_once 'application/views/scripts/newfooter.phtml';?>
<script type="text/javascript" src="<?php echo $this->baseUrl('public/assets/js/jquery.validate.min.js'); ?>"></script>
<script src="<?php echo $this->baseUrl('public/assets/js/bootstrap3-typeahead.js'); ?>"></script>
<script type="text/javascript">
$('#city_name').typeahead({
items: 'all',
source: function (query, process) {
//$('.passenger_city').val('');
return $.ajax({
url: '/buyhotel/autosuggest',
type: 'post',
data: {query: query},
dataType: 'json',
success: function (result) {
var resultList = result.map(function (item) {
var aItem = {CityId: item.CityId, label: item.label};
return JSON.stringify(aItem);
});
return process(resultList);
}
});
},
sorter: function (items) {
var beginswith = [], caseSensitive = [], caseInsensitive = [], item;
while (aItem = items.shift()) {
var item = JSON.parse(aItem);
if (!item.label.toLowerCase().indexOf(this.query.toLowerCase()))
beginswith.push(JSON.stringify(item));
else if (~item.label.indexOf(this.query))
caseSensitive.push(JSON.stringify(item));
else
caseInsensitive.push(JSON.stringify(item));
}
return beginswith.concat(caseSensitive, caseInsensitive)
},
highlighter: function (obj) {
var item = JSON.parse(obj);
var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&');
return item.label.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
return '<strong>' + match + '</strong>'
})
},
updater: function (item) {
var item = JSON.parse(item);
$('#DestinationId').val(item.CityId);
return item.label;
},
minLength: 2
// displayField: 'label',
});
</script>