else echo hg_html::boxbottom();*/ } ?> </form> <?php //} ?> <?php echo '<div id="rate" style="display:none">' . "\n"; if (isset($this->rooms[0]->beds[0]) || isset($this->rooms[0]->subrate[0]->beds[0])) { if ($this->hgconf->ratelayout == 1) { echo hg_html::getroomrate($this->rooms, $yearnum, $monthnum, $todaynum, $this->item->id); } else { echo hg_html::getroomrate_second($this->rooms, $yearnum, $monthnum, $todaynum, $this->item->id); } } echo '</div>' . "\n"; echo '<div id="tab-container-1" class="tablayout">' . "\n"; echo '<ul id="tab-container-1-nav" class="tablayout">' . "\n"; if ($this->item->location || $this->item->rooms || $this->item->restaurant || $this->item->general) { echo '<li class="activeli"><a class="active" href="#rooms">' . JText::_('HG_ROOMS') . '</a></li>' . "\n"; } if ($this->hgconf->box != 'None') { echo '<li><a href="#location_map">' . JText::_('HG_LOCATION_MAP') . '</a></li>' . "\n"; } if (count($this->rooms) > 0 || $this->item->roomgeneral) { echo '<li><a href="#overview">' . htmlentities(JText::_('HG_OVERVIEW')) . '</a></li>' . "\n"; } if (count($this->restaurants) > 0 || $this->item->resto) {
function getroomrate_second() { $id = JRequest::getInt('id', 0); $yearnum = JRequest::getInt('year', 0); $monthnum = JRequest::getInt('month', 0); $todaynum = JRequest::getInt('today', 0); $departure = JRequest::getVar('departure'); $model = $this->getModel('hotel'); $arrival_date = $yearnum . '-' . $monthnum . '-' . $todaynum; $departure_date = date('Y-m-d', strtotime(str_replace(',', '-', $departure))); //Le pase el parametro $yearnum a getRoom() para que me muestre resultados solo del ano consultado //Ademas le paso fechas from - to de la reserva para hacer calculos con fecha closing period $rooms = $model->getRoom($id, $yearnum, $arrival_date, $departure_date); $output = hg_html::getroomrate_second($rooms, $yearnum, $monthnum, $todaynum, $id, $departure); echo $output; }