Example #1
0
        echo '<p style="font-size:10px; font-weight:normal; text-align:center;">';
        echo JTEXT::_('HG_USERS_RATING') . '&nbsp;(' . $hotels->rate . ')';
        echo '</P>';
        echo '</div>';
    }
    echo '</div>';
    echo '</div>' . "\n";
    echo '</div>' . "\n";
    $i++;
    $k = 1 - $k;
}
echo '</div>' . "\n";
if ($this->hgconf->box == 'None') {
    echo '<div class="clear"></div>' . "\n";
} else {
    echo hg_html::boxbottom();
}
echo '<div class="clear"></div>' . "\n";
?>


    <?php 
if ($this->params->get('show_pagination', 2) != 0) {
    ?>
        <div class="pageslinks">
            <?php 
    echo $this->pageNav->getPagesLinks();
    ?>
        </div>
    
        <?php 
Example #2
0
		else if ($this->hgconf->search_option == 5 || $this->hgconf->search_option == 6)
			require(HOTELGUIDE_VIEWS.DS.'hotelguide'.DS.'tmpl'.DS.'default_search_nocountry.php');
	}
*/
if ($this->hgconf->api_key && $this->cityname[0]->lat && $this->cityname[0]->lon) {
    echo $this->loadTemplate('country');
}
echo $this->loadTemplate('destinations');
if ($this->hgconf->country_topdesti && count($this->topdestinations) > 0) {
    require HOTELGUIDE_VIEWS . DS . 'hotelguide' . DS . 'tmpl' . DS . 'default_topdestinations.php';
}
if ($this->hgconf->country_desti && count($this->destinations) > 0) {
    require HOTELGUIDE_VIEWS . DS . 'hotelguide' . DS . 'tmpl' . DS . 'default_destination.php';
}
if ($this->hgconf->country_adsense) {
    echo hg_html::showGoodleAdSense($this->hgconf->country_publisher_id, $this->hgconf->country_ad_slot, $this->hgconf->country_ad_width, $this->hgconf->country_ad_height);
}
echo '<div class="clear"></div>' . "\n";
?>
<!---
/***********************************************
* HotelGuide - © EazyTOUR (www.eazytour.com)
* REMOVAL OR MODIFICATION COPYRIGHT TEXT BELLOW IS 
* VIOLATION OF TERMS & CONDITIONS AND DEPRIVES OF 
* ANY KIND OF SUPPORTS
*
* If you want to remove copyright, 
* buy the commercial version.
*
* Visit http://www.joomla.eazytour.com/ for support
***********************************************/
 function getroomrate_by_room($rooms, $checkin, $checkout, $id)
 {
     if (strtotime($checkin) < strtotime($checkout)) {
         if (!$rooms[0]->upon_request) {
             $monthnum = date('m', strtotime($checkin));
             $beds = $rooms[0]->beds;
             $time = mktime(0, 0, 0, date('m', strtotime($checkin)), date('d', strtotime($checkin)), date('Y', strtotime($checkin)));
             $today = date('j', $time);
             $number_nights = hg_html::count_days(strtotime($checkin), strtotime($checkout));
             $output .= '<br /><table width="100%" style="border-style: solid; border-collapse: collapse; border-width: 1px;">' . "\n";
             $output .= '<thead><tr>' . "\n";
             $output .= '<td width="60%" align="center" style="border-style: solid; border-width: 1px;"><strong>' . JText::_('HG_OCCUPANCY') . '</strong></td>' . "\n";
             if ($number_nights == 1) {
                 $output .= '<td align="center" style="border-style: solid; border-width: 1px;"><strong>' . JText::_('HG_RATE') . '</strong></td>' . "\n";
             } else {
                 $output .= '<td align="center" style="border-style: solid; border-width: 1px;"><strong>' . JText::sprintf('HG_AVERAGE_DAILY_RATE', $number_nights) . '</strong></td>' . "\n";
             }
             $output .= '</tr></thead>' . "\n";
             for ($i = 0; $i < count($beds); $i++) {
                 $bed = $beds[$i];
                 switch ($monthnum) {
                     case 1:
                         $rate = explode(",", $bed->rate1);
                         $discount = explode(",", $bed->discount1);
                         $room = explode(",", $bed->room1);
                         $nextrate = explode(",", $bed->rate2);
                         $nextdiscount = explode(",", $bed->discount2);
                         break;
                     case 2:
                         $rate = explode(",", $bed->rate2);
                         $discount = explode(",", $bed->discount2);
                         $room = explode(",", $bed->room2);
                         $nextrate = explode(",", $bed->rate3);
                         $nextdiscount = explode(",", $bed->discount3);
                         break;
                     case 3:
                         $rate = explode(",", $bed->rate3);
                         $discount = explode(",", $bed->discount3);
                         $room = explode(",", $bed->room3);
                         $nextrate = explode(",", $bed->rate4);
                         $nextdiscount = explode(",", $bed->discount4);
                         break;
                     case 4:
                         $rate = explode(",", $bed->rate4);
                         $discount = explode(",", $bed->discount4);
                         $room = explode(",", $bed->room4);
                         $nextrate = explode(",", $bed->rate5);
                         $nextdiscount = explode(",", $bed->discount5);
                         break;
                     case 5:
                         $rate = explode(",", $bed->rate5);
                         $discount = explode(",", $bed->discount5);
                         $room = explode(",", $bed->room5);
                         $nextrate = explode(",", $bed->rate6);
                         $nextdiscount = explode(",", $bed->discount6);
                         break;
                     case 6:
                         $rate = explode(",", $bed->rate6);
                         $discount = explode(",", $bed->discount6);
                         $room = explode(",", $bed->room6);
                         $nextrate = explode(",", $bed->rate7);
                         $nextdiscount = explode(",", $bed->discount7);
                         break;
                     case 7:
                         $rate = explode(",", $bed->rate7);
                         $discount = explode(",", $bed->discount7);
                         $room = explode(",", $bed->room7);
                         $nextrate = explode(",", $bed->rate8);
                         $nextdiscount = explode(",", $bed->discount8);
                         break;
                     case 8:
                         $rate = explode(",", $bed->rate8);
                         $discount = explode(",", $bed->discount8);
                         $room = explode(",", $bed->room8);
                         $nextrate = explode(",", $bed->rate9);
                         $nextdiscount = explode(",", $bed->discount9);
                         break;
                     case 9:
                         $rate = explode(",", $bed->rate9);
                         $discount = explode(",", $bed->discount9);
                         $room = explode(",", $bed->room9);
                         $nextrate = explode(",", $bed->rate10);
                         $nextdiscount = explode(",", $bed->discount10);
                         break;
                     case 10:
                         $rate = explode(",", $bed->rate10);
                         $discount = explode(",", $bed->discount10);
                         $room = explode(",", $bed->room10);
                         $nextrate = explode(",", $bed->rate11);
                         $nextdiscount = explode(",", $bed->discount11);
                         break;
                     case 11:
                         $rate = explode(",", $bed->rate11);
                         $discount = explode(",", $bed->discount11);
                         $room = explode(",", $bed->room11);
                         $nextrate = explode(",", $bed->rate12);
                         $nextdiscount = explode(",", $bed->discount12);
                         break;
                     case 12:
                         $rate = explode(",", $bed->rate12);
                         $discount = explode(",", $bed->discount12);
                         $room = explode(",", $bed->room12);
                         $nextrate = explode(",", $bed->rate1);
                         $nextdiscount = explode(",", $bed->discount1);
                         break;
                 }
                 $rate = array_merge($rate, $nextrate);
                 $discount = array_merge($discount, $nextdiscount);
                 $sum_rate = 0;
                 $room_no_available = false;
                 for ($r = 0; $r < $number_nights; $r++) {
                     if ($r == 1) {
                         //Acumula los rates por dia
                         $sum_rate = $rate[$today] + $sum_rate;
                         //Verificando si existe algun dia con el rate en 0
                         if ($rate[$today] == 0.0) {
                             $room_no_available = true;
                         }
                     } else {
                         //Acumula los rates por dia
                         $sum_rate = $rate[$today + ($r - 1)] + $sum_rate;
                         //Verificando si existe algun dia con el rate en 0
                         if ($rate[$today + ($r - 1)] == 0.0) {
                             $room_no_available = true;
                         }
                     }
                 }
                 //Media promedio de precios x dias de estadia
                 $new_prom_rates = hg_html::getCurrency($id, $sum_rate / $number_nights);
                 $output .= '<tr>' . "\n";
                 //Muestra el numero maximo de personas para la habitacion
                 if ($bed->maxguest > 1) {
                     $info_maxguest = JText::sprintf('HG_MAX_PERSONS', $bed->maxguest);
                 } else {
                     $info_maxguest = JText::_('HG_SINGLE_OCCUPANCY');
                 }
                 $output .= '<td align="center" style="border-style: solid; border-width: 1px;">' . $info_maxguest . '</td>' . "\n";
                 if (!$room_no_available) {
                     $output .= '<td align="center" style="border-style: solid; border-width: 1px;">' . $new_prom_rates . '</td>' . "\n";
                 } else {
                     $output .= '<td align="center"style="border-style: solid; border-width: 1px;">' . JText::_('HG_NOT_AVAILABLE') . '</td>' . "\n";
                 }
                 $output .= '</tr>' . "\n";
             }
             $output .= '</table>' . "\n";
             $output .= '<br /><div align="center"><a href="http://' . $_SERVER[SERVER_NAME] . '/reserve/reservation01.php?num=' . $rooms[0]->id_jpmoser . '&firstinput=' . date('F d, Y', strtotime($checkin)) . '&secondinput=' . date('F d, Y', strtotime($checkout)) . '&type_room1=' . $rooms[0]->id . '" style="height:25px; width: 150px; vertical-align: middle; display:block; line-height:25px;" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only">Reserve</a></div>' . "\n";
             echo $output;
         } else {
             echo '<br /><div align="justify">' . JText::_('HG_UPON REQUEST_MESSAGE') . '</div><br /><div align="center"><a href="http://' . $_SERVER[SERVER_NAME] . '/reserve/reservation01.php?num=' . $rooms[0]->id_jpmoser . '" style="height:25px; width: 150px; vertical-align: middle; display:block; line-height:25px;" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only">Send your Request</a></div>' . "\n";
         }
     }
 }
Example #4
0
    echo '<h3 style="text-align:center">' . JText::_('HG_RELATED_ARTICLES') . '</h3>' . "\n";
    echo '<div style="clear:both;padding-bottom:10px;"></div>' . "\n";
    foreach ($this->articles as $article) {
        $link = "index.php?option=com_content&amp;view=article&amp;id=" . (int) $article->contentid;
        echo '<div class="ratetitle" style="font-weight:normal"><a href="' . $link . '"  target="_blank" title="' . $article->articletitle . '">' . $article->articletitle . '</a></div>' . "\n";
    }
    echo '<div style="clear:both;padding-bottom:25px;"></div>' . "\n";
}
//Comente esta linea para no mostrar lo terminos en la pagina del hotel sino mas bien en el formulario de reserva
/*if ($this->item->condition) {
	echo '<h3 style="text-align:center; color:#D1D1D1; font-size:14px">'.JText::_('HG_TERMS_CONDITIONS').'</h3>' . "\n";
	echo '<div style="color:##D1D1D1;">'.$this->item->condition.'</div>';
	//echo '<div style="clear:both;padding-bottom:25px;"></div>' . "\n";
}*/
if ($this->hgconf->social) {
    echo hg_html::showSocial($this->item);
}
echo '<div style="clear:both;padding-bottom:10px;"></div>' . "\n";
echo '<div style="text-align: right"><a id="homepage_ancla" href="#homepage_target" title="Go Back to Home Page" style="color:#ffffff">Go Back to Home Page</a></div>';
?>

<!-- Item navigation 
    <div class="itemNav">
    	<?php 
/*if ($this->prevItem) { 
      echo '<a class="itemPrevious" href="'.$this->prevItem->prevLink.'">&laquo;'.JText::_('HG_PREV').'</a>' . "\n";
  } 
  if ($this->nextItem) { 
      echo '<a class="itemNext" href="'.$this->nextItem->nextLink.'">'.JText::_('HG_NEXT').'&raquo;</a>' . "\n";
  }*/
?>
    }
    echo '<a href="' . $link . '" title="' . $sponsor->title . '">';
    if ($sponsor->mainimage) {
        echo '<img style="margin: 0; border:1px solid #bbbbbb;" src="' . JURI::base() . 'images/hotelguide/gallery/hotel_' . $sponsor->id . '/crop/' . $sponsor->mainimage . '" width="120px" alt="' . $sponsor->title . '" /></a>' . "\n";
    } else {
        echo '<img style="margin: 0; border:1px solid #cccccc;" src="' . JURI::base() . 'components/com_hotelguide/assets/images/no_image.gif" /></a>' . "\n";
    }
    echo '</div>' . "\n";
    echo '<div class="cap">' . "\n";
    echo '<div class="captionbar">' . "\n";
    echo '<a href="' . $link . '" title="' . $sponsor->title . '"><i>' . "\n";
    echo JText::_($sponsor->title);
    echo '</i></a></div>' . "\n";
    echo '</div>' . "\n";
    echo '</div></div>' . "\n";
    $i++;
    $n++;
    if ($total - $i == 0 && $n != $this->hgconf->no_sponsorrow) {
        echo '</div>' . "\n";
    }
    if ($n == $this->hgconf->no_sponsorrow) {
        echo '</div>' . "\n";
        $n = 0;
    }
}
echo '</div>' . "\n";
echo '</div>' . "\n";
if ($adsense) {
    echo '<div class="clear"></div>' . "\n";
    echo hg_html::showGoodleAdSense($publisher_id, $ad_slot, $ad_width, $ad_height);
}
Example #6
0
 function getroomrate()
 {
     global $hgconf;
     $id = JRequest::getInt('id', 0);
     $yearnum = JRequest::getInt('year', 0);
     $monthnum = JRequest::getInt('month', 0);
     $todaynum = JRequest::getInt('today', 0);
     $model = $this->getModel('hotel');
     //Le pase el parametro $yearnum a getRoom() para que me muestre resultados solo del ano consultado
     $rooms = $model->getRoom($id, $yearnum);
     $JApp =& JFactory::getApplication();
     $JUser =& JFactory::getUser();
     $JDate = JFactory::getDate();
     $JDate->setOffset($JApp->getCfg('offset'));
     $time = mktime(0, 0, 0, $monthnum, $todaynum, $yearnum);
     $today = date('j', $time);
     $second = date('j', $time + 86400);
     $third = date('j', $time + 86400 * 2);
     $fourth = date('j', $time + 86400 * 3);
     $fifth = date('j', $time + 86400 * 4);
     $sixth = date('j', $time + 86400 * 5);
     $seventh = date('j', $time + 86400 * 6);
     $day = $JDate->_dayToString(date('w', $time), true);
     $month = $JDate->_monthToString(date('m', $time), true);
     $secondday = $JDate->_dayToString(date('w', $time + 86400), true);
     $thirdday = $JDate->_dayToString(date('w', $time + 86400 * 2), true);
     $fourthday = $JDate->_dayToString(date('w', $time + 86400 * 3), true);
     $fifthday = $JDate->_dayToString(date('w', $time + 86400 * 4), true);
     $sixthday = $JDate->_dayToString(date('w', $time + 86400 * 5), true);
     $seventhday = $JDate->_dayToString(date('w', $time + 86400 * 6), true);
     $output = '';
     if ($hgconf->box == 'None') {
         $output .= '<div style="clear:both;padding-bottom:10px;"></div>' . "\n";
     } else {
         $output .= hg_html::boxtop();
     }
     $output .= '<h3 class="title">' . "\n";
     $output .= JText::_('HG_CHOOSE_YOUR_ROOM_AND_RATE');
     $output .= '</h3>' . "\n";
     $room_no = count($rooms);
     $output .= '<div class="table">' . "\n";
     $output .= '<div class="th"><div class="td" style="width: 19%; height:22px; line-height:24px; border-left: 1px solid #fff;">' . JText::_('HG_ROOM_TYPE') . '</div><div class="td" style="height:22px; line-height:12px;">' . $day . '<br/>' . $today . '&nbsp;' . $month . '</div><div class="td" style="height:22px; line-height:12px;">' . $secondday . '<br/>' . $second . '&nbsp;' . $JDate->_monthToString(date('m', mktime(0, 0, 0, $monthnum, $todaynum + 1, $yearnum)), true) . '</div><div class="td" style="height:22px; line-height:12px;">' . $thirdday . '<br/>' . $third . '&nbsp;' . $JDate->_monthToString(date('m', mktime(0, 0, 0, $monthnum, $todaynum + 2, $yearnum)), true) . '</div><div class="td" style="height:22px; line-height:12px;">' . $fourthday . '<br/>' . $fourth . '&nbsp;' . $JDate->_monthToString(date('m', mktime(0, 0, 0, $monthnum, $todaynum + 3, $yearnum)), true) . '</div><div class="td" style="height:22px; line-height:12px;">' . $fifthday . '<br/>' . $fifth . '&nbsp;' . $JDate->_monthToString(date('m', mktime(0, 0, 0, $monthnum, $todaynum + 4, $yearnum)), true) . '</div><div class="td" style="height:22px; line-height:12px;">' . $sixthday . '<br/>' . $sixth . '&nbsp;' . $JDate->_monthToString(date('m', mktime(0, 0, 0, $monthnum, $todaynum + 5, $yearnum)), true) . '</div><div class="td" style="height:22px; line-height:12px;">' . $seventhday . '<br/>' . $seventh . '&nbsp;' . $JDate->_monthToString(date('m', mktime(0, 0, 0, $monthnum, $todaynum + 6, $yearnum)), true) . '</div><div class="td" style="width:18%; height:22px; line-height:12px; margin-right:-3px;"></div><div style="clear: both;"></div></div>' . "\n";
     for ($i = 0, $n = $room_no; $i < $n; $i++) {
         $beds = $rooms[$i]->beds;
         $bed_count = count($rooms[$i]->beds);
         if ($bed_count > 0) {
             //$output .= '<div class="ratetitle" style="margin-top:10px;"><strong>'.$rooms[$i]->title.'</strong></div>' . "\n";
             if ($rooms[$i]->roomsoffer) {
                 $output .= '<br /><span style="padding-right:5px;"><img src="' . JURI::base() . 'components/com_hotelguide/assets/images/specialoffer.png" alt="Special Offer"/></span><span style="font-size:11px; vertical-align:top; color:#6a71ff;">' . $this->rooms[$i]->roomsoffer . '</span><br />' . "\n";
             }
             //$output .= '<div class="table">' . "\n";
             //$output .= '<div class="th"><div class="td" style="width: 15%; height:22px; line-height:24px; border-left: 1px solid #fff;">'.JText::_('HG_BED_TYPES').'</div><div class="td" style="height:22px; line-height:12px;">'.$day.'<br/>'.$today.'&nbsp;'.$month.'</div><div class="td" style="height:22px; line-height:12px;">'.$secondday.'<br/>'.$second.'&nbsp;'.$JDate->_monthToString(date( 'm', mktime(0, 0, 0, $monthnum, $todaynum+1, $yearnum)), true).'</div><div class="td" style="height:22px; line-height:12px;">'.$thirdday.'<br/>'.$third.'&nbsp;'.$JDate->_monthToString(date( 'm', mktime(0, 0, 0, $monthnum, $todaynum+2, $yearnum)), true).'</div><div class="td" style="height:22px; line-height:12px;">'.$fourthday.'<br/>'.$fourth.'&nbsp;'.$JDate->_monthToString(date( 'm', mktime(0, 0, 0, $monthnum, $todaynum+3, $yearnum)), true).'</div><div class="td" style="height:22px; line-height:12px;">'.$fifthday.'<br/>'.$fifth.'&nbsp;'.$JDate->_monthToString(date( 'm', mktime(0, 0, 0, $monthnum, $todaynum+4, $yearnum)), true).'</div><div class="td" style="height:22px; line-height:12px;">'.$sixthday.'<br/>'.$sixth.'&nbsp;'.$JDate->_monthToString(date( 'm', mktime(0, 0, 0, $monthnum, $todaynum+5, $yearnum)), true).'</div><div class="td" style="height:22px; line-height:12px;">'.$seventhday.'<br/>'.$seventh.'&nbsp;'.$JDate->_monthToString(date( 'm', mktime(0, 0, 0, $monthnum, $todaynum+6, $yearnum)), true).'</div><div class="td" style="width:18%; height:22px; line-height:12px; margin-right:-3px;"></div><div style="clear: both;"></div></div>' . "\n";
             for ($j = 0; $j < $bed_count; $j++) {
                 $bed =& $beds[$j];
                 switch ($monthnum) {
                     case 1:
                         $rate = explode(",", $bed->rate1);
                         $discount = explode(",", $bed->discount1);
                         $room = explode(",", $bed->room1);
                         $nextrate = explode(",", $bed->rate2);
                         $nextdiscount = explode(",", $bed->discount2);
                         break;
                     case 2:
                         $rate = explode(",", $bed->rate2);
                         $discount = explode(",", $bed->discount2);
                         $room = explode(",", $bed->room2);
                         $nextrate = explode(",", $bed->rate3);
                         $nextdiscount = explode(",", $bed->discount3);
                         break;
                     case 3:
                         $rate = explode(",", $bed->rate3);
                         $discount = explode(",", $bed->discount3);
                         $room = explode(",", $bed->room3);
                         $nextrate = explode(",", $bed->rate4);
                         $nextdiscount = explode(",", $bed->discount4);
                         break;
                     case 4:
                         $rate = explode(",", $bed->rate4);
                         $discount = explode(",", $bed->discount4);
                         $room = explode(",", $bed->room4);
                         $nextrate = explode(",", $bed->rate5);
                         $nextdiscount = explode(",", $bed->discount5);
                         break;
                     case 5:
                         $rate = explode(",", $bed->rate5);
                         $discount = explode(",", $bed->discount5);
                         $room = explode(",", $bed->room5);
                         $nextrate = explode(",", $bed->rate6);
                         $nextdiscount = explode(",", $bed->discount6);
                         break;
                     case 6:
                         $rate = explode(",", $bed->rate6);
                         $discount = explode(",", $bed->discount6);
                         $room = explode(",", $bed->room6);
                         $nextrate = explode(",", $bed->rate7);
                         $nextdiscount = explode(",", $bed->discount7);
                         break;
                     case 7:
                         $rate = explode(",", $bed->rate7);
                         $discount = explode(",", $bed->discount7);
                         $room = explode(",", $bed->room7);
                         $nextrate = explode(",", $bed->rate8);
                         $nextdiscount = explode(",", $bed->discount8);
                         break;
                     case 8:
                         $rate = explode(",", $bed->rate8);
                         $discount = explode(",", $bed->discount8);
                         $room = explode(",", $bed->room8);
                         $nextrate = explode(",", $bed->rate9);
                         $nextdiscount = explode(",", $bed->discount9);
                         break;
                     case 9:
                         $rate = explode(",", $bed->rate9);
                         $discount = explode(",", $bed->discount9);
                         $room = explode(",", $bed->room9);
                         $nextrate = explode(",", $bed->rate10);
                         $nextdiscount = explode(",", $bed->discount19);
                         break;
                     case 10:
                         $rate = explode(",", $bed->rate10);
                         $discount = explode(",", $bed->discount10);
                         $room = explode(",", $bed->room10);
                         $nextrate = explode(",", $bed->rate11);
                         $nextdiscount = explode(",", $bed->discount11);
                         break;
                     case 11:
                         $rate = explode(",", $bed->rate11);
                         $discount = explode(",", $bed->discount11);
                         $room = explode(",", $bed->room11);
                         $nextrate = explode(",", $bed->rate12);
                         $nextdiscount = explode(",", $bed->discount12);
                         break;
                     case 12:
                         $rate = explode(",", $bed->rate12);
                         $discount = explode(",", $bed->discount12);
                         $room = explode(",", $bed->room12);
                         $nextrate = explode(",", $bed->rate1);
                         $nextdiscount = explode(",", $bed->discount1);
                         break;
                 }
                 $daysofmonth = count($rate) . "\n";
                 $leftdays = $daysofmonth - $today + 1;
                 if ($leftdays < 7) {
                     $rate = array_merge($rate, $nextrate);
                     $discount = array_merge($discount, $nextdiscount);
                 }
                 if (max($discount) > 0) {
                     if ($bed->breakfast == 2) {
                         $output .= '<div class="tr"><div class="td" style="width: 19%; border-left: 1px solid #fff; text-align:left;">&nbsp;&nbsp;' . $bed->bedtype . '<br/>';
                         $output .= '<p style="color:#333acc; font-style:italic; font-weight:normal;">&nbsp;&nbsp;' . JText::_('HG_BREAKFAST_INCLUDED') . '</p></div>';
                     } else {
                         $output .= '<div class="tr"><div class="td" style="width: 19%; font-weight:bold; line-height:40px; border-left: 1px solid #fff; text-align:left;">&nbsp;&nbsp;' . $bed->bedtype;
                         $output .= '</div>';
                     }
                     if ($rate[$today - 1]) {
                         $output .= '<div class="td"><p style="text-decoration:line-through; text-align:center; margin:0;">' . hg_html::getCurrency($id, $rate[$today - 1]) . '</p>';
                         $newrate = $rate[$today - 1] * (100 - $discount[$today - 1]) / 100;
                         $output .= '<p style="font-size:1.2em; color:' . $hgconf->pricecolor . '; text-align:center; font-weight:bold;">' . hg_html::getCurrency($id, $newrate) . '</p></div>';
                     } else {
                         //Modifique esta linea para que me mostrara el mensaje Contact cuando el rate para un dia especifico este todo en todos
                         //los campos en cero (0), esta de esta manera: $output .= JText::_('HG_CONTACT');
                         $output .= '<div class="td">' . JText::_('HG_CONTACT') . '</div>';
                     }
                     $output .= '<div class="td">';
                     if ($rate[$today]) {
                         $output .= '<p style="text-decoration:line-through; text-align:center; margin:0;">' . hg_html::getCurrency($id, $rate[$today]) . '</p>';
                         $newrate = $rate[$today] * (100 - $discount[$today]) / 100;
                         $output .= '<p style="font-size:1.2em; color:' . $hgconf->pricecolor . '; text-align:center; font-weight:bold;">' . hg_html::getCurrency($id, $newrate) . '</p></div>';
                     } else {
                         $output .= JText::_('HG_CONTACT') . '</div>';
                     }
                     $output .= '<div class="td">';
                     if ($rate[$today + 1]) {
                         $output .= '<p style="text-decoration:line-through; text-align:center; margin:0;">' . hg_html::getCurrency($id, $rate[$today + 1]) . '</p>';
                         $newrate = $rate[$today + 1] * (100 - $discount[$today + 1]) / 100;
                         $output .= '<p style="font-size:1.2em; color:' . $hgconf->pricecolor . '; text-align:center; font-weight:bold;">' . hg_html::getCurrency($id, $newrate) . '</p></div>';
                     } else {
                         $output .= JText::_('HG_CONTACT') . '</div>';
                     }
                     $output .= '<div class="td">';
                     if ($rate[$today + 2]) {
                         $output .= '<p style="text-decoration:line-through; text-align:center; margin:0;">' . hg_html::getCurrency($id, $rate[$today + 2]) . '</p>';
                         $newrate = $rate[$today + 2] * (100 - $discount[$today + 2]) / 100;
                         $output .= '<p style="font-size:1.2em; color:' . $hgconf->pricecolor . '; text-align:center; font-weight:bold;">' . hg_html::getCurrency($id, $newrate) . '</p></div>';
                     } else {
                         $output .= JText::_('HG_CONTACT') . '</div>';
                     }
                     $output .= '<div class="td">';
                     if ($rate[$today + 3]) {
                         $output .= '<p style="text-decoration:line-through; text-align:center; margin:0;">' . hg_html::getCurrency($id, $rate[$today + 3]) . '</p>';
                         $newrate = $rate[$today + 3] * (100 - $discount[$today + 3]) / 100;
                         $output .= '<p style="font-size:1.2em; color:' . $hgconf->pricecolor . '; text-align:center; font-weight:bold;">' . hg_html::getCurrency($id, $newrate) . '</p></div>';
                     } else {
                         $output .= JText::_('HG_CONTACT') . '</div>';
                     }
                     $output .= '<div class="td">';
                     if ($rate[$today + 4]) {
                         $output .= '<p style="text-decoration:line-through; text-align:center; margin:0;">' . hg_html::getCurrency($id, $rate[$today + 4]) . '</p>';
                         $newrate = $rate[$today + 4] * (100 - $discount[$today + 4]) / 100;
                         $output .= '<p style="font-size:1.2em; color:' . $hgconf->pricecolor . '; text-align:center; font-weight:bold;">' . hg_html::getCurrency($id, $newrate) . '</p></div>';
                     } else {
                         $output .= JText::_('HG_CONTACT') . '</div>';
                     }
                     $output .= '<div class="td">';
                     if ($rate[$today + 5]) {
                         $output .= '<p style="text-decoration:line-through; text-align:center; margin:0;">' . hg_html::getCurrency($id, $rate[$today + 5]) . '</p>';
                         $newrate = $rate[$today + 5] * (100 - $discount[$today + 5]) / 100;
                         $output .= '<p style="font-size:1.2em; color:' . $hgconf->pricecolor . '; text-align:center; font-weight:bold;">' . hg_html::getCurrency($id, $newrate) . '</p></div>';
                     } else {
                         $output .= JText::_('HG_CONTACT') . '</div>';
                     }
                     $output .= '<div class="td" style="width: 18%; margin-right:-3px;">';
                     $output .= '<button class="button" type="button" id="bookingbutton" onclick="submitbutton(\'' . $rooms[$i]->hotel . '\', \'' . $rooms[$i]->id . '\', \'-1\', \'' . $bed->id . '\'); return false;">' . JText::_('HG_BOOK_NOW') . '</button><p style="padding:0 3px; color:#ffffff; font-style:italic; text-align:center;">';
                     if ($room[$today - 1] == 0) {
                     } else {
                         if ($room[$today - 1] == 1) {
                             $output .= JText::sprintf('HG_LAST_CHANCE_ONLY_ROOM_LEFT', $room[$today - 1]);
                         } else {
                             if ($room[$today - 1] > 1 && $room[$today - 1] < 6) {
                                 $output .= JText::sprintf('HG_ONLY_ROOMS_LEFT', $room[$today - 1]);
                             } else {
                             }
                         }
                     }
                     $output .= '</p>' . "\n";
                     $output .= '</div><div style="clear: both;"></div></div>' . "\n";
                 } else {
                     if ($bed->breakfast == 2) {
                         $output .= '<div class="tr"><div class="td" style="width: 19%; border-left: 1px solid #fff; text-align:left;">&nbsp;' . $bed->bedtype . '<br/>';
                         $output .= '&nbsp;<span style="font-size:10px">' . JText::_('HG_BREAKFAST_INCLUDED') . '</span></div>';
                     } else {
                         $output .= '<div class="tr"><div class="td" style="width: 19%; line-height:40px; border-left: 1px solid #fff; text-align:left;">&nbsp;' . $bed->bedtype;
                         $output .= '</div>';
                     }
                     if ($rate[$today - 1]) {
                         $output .= '<div class="td"><p style="font-size:1.2em; color:' . $hgconf->pricecolor . '; text-align:center; font-weight:bold;">' . hg_html::getCurrency($id, $rate[$today - 1]) . '</p></div>';
                     } else {
                         $output .= '<div class="td">' . JText::_('HG_CONTACT') . '</div>';
                     }
                     if ($rate[$today]) {
                         $output .= '<div class="td"><p style="font-size:1.2em; color:' . $hgconf->pricecolor . '; text-align:center; font-weight:bold;">' . hg_html::getCurrency($id, $rate[$today]) . '</p></div>';
                     } else {
                         $output .= '<div class="td">' . JText::_('HG_CONTACT') . '</div>';
                     }
                     if ($rate[$today + 1]) {
                         $output .= '<div class="td"><p style="font-size:1.2em; color:' . $hgconf->pricecolor . '; text-align:center; font-weight:bold;">' . hg_html::getCurrency($id, $rate[$today + 1]) . '</p></div>';
                     } else {
                         $output .= '<div class="td">' . JText::_('HG_CONTACT') . '</div>';
                     }
                     if ($rate[$today + 2]) {
                         $output .= '<div class="td"><p style="font-size:1.2em; color:' . $hgconf->pricecolor . '; text-align:center; font-weight:bold;">' . hg_html::getCurrency($id, $rate[$today + 2]) . '</p></div>';
                     } else {
                         $output .= '<div class="td">' . JText::_('HG_CONTACT') . '</div>';
                     }
                     if ($rate[$today + 3]) {
                         $output .= '<div class="td"><p style="font-size:1.2em; color:' . $hgconf->pricecolor . '; text-align:center; font-weight:bold;">' . hg_html::getCurrency($id, $rate[$today + 3]) . '</p></div>';
                     } else {
                         $output .= '<div class="td">' . JText::_('HG_CONTACT') . '</div>';
                     }
                     if ($rate[$today + 4]) {
                         $output .= '<div class="td"><p style="font-size:1.2em; color:' . $hgconf->pricecolor . '; text-align:center; font-weight:bold;">' . hg_html::getCurrency($id, $rate[$today + 4]) . '</p></div>';
                     } else {
                         $output .= '<div class="td">' . JText::_('HG_CONTACT') . '</div>';
                     }
                     if ($rate[$today + 5]) {
                         $output .= '<div class="td"><p style="font-size:1.2em; color:' . $hgconf->pricecolor . '; text-align:center; font-weight:bold;">' . hg_html::getCurrency($id, $rate[$today + 5]) . '</p></div>';
                     } else {
                         $output .= '<div class="td">' . JText::_('HG_CONTACT') . '</div>';
                     }
                     $output .= '<div class="td" style="width: 18%; margin-right:-3px;">';
                     $output .= '<button class="button" type="button" id="bookingbutton" onclick="submitbutton(\'' . $rooms[$i]->hotel . '\', \'' . $rooms[$i]->id . '\', \'-1\', \'' . $bed->id . '\'); return false;">' . JText::_('HG_BOOK_NOW') . '</button><p style="padding:0 3px; color:#ffffff; font-style:italic; text-align:center;">';
                     if ($room[$today - 1] == 0) {
                     } else {
                         if ($room[$today - 1] == 1) {
                             $output .= JText::sprintf('HG_LAST_CHANCE_ONLY_ROOM_LEFT', $room[$today - 1]);
                         } else {
                             if ($room[$today - 1] > 1 && $room[$today - 1] < 6) {
                                 $output .= JText::sprintf('HG_ONLY_ROOMS_LEFT', $room[$today - 1]);
                             } else {
                             }
                         }
                     }
                     $output .= '</p>' . "\n";
                     $output .= '</div><div style="clear: both;"></div></div>' . "\n";
                 }
             }
             //$output .= '</div>' . "\n";
             $output .= '<div class="slidebox">' . "\n";
             if ($rooms[$i]->rate_details) {
                 $output .= '<div class="left" style="padding-left: 5px;"><div class="slide_wrapper2">' . "\n";
                 $output .= '<fieldset class="layout" style="border:none">' . "\n";
                 $output .= '<legend style="font-size:11px"><a href="javascript:void(0)" style="color:#fff">' . JText::_('HG_RATE_DETAILS') . '</a></legend>' . "\n";
                 $output .= '<div class="slidevisible2" style="text-align:left;">' . "\n";
                 $output .= '<p style="font-size:11px">';
                 $output .= $rooms[$i]->rate_details;
                 $output .= '</p>';
                 $output .= '</div>' . "\n";
                 $output .= '</fieldset>' . "\n";
                 $output .= '</div></div>' . "\n";
             }
             if ($rooms[$i]->cancellation) {
                 $output .= '<div class="right" style="padding-left: 5px;"><div class="slide_wrapper2">' . "\n";
                 $output .= '<fieldset class="layout" style="border:none">' . "\n";
                 $output .= '<legend style="font-size:11px"><a href="javascript:void(0)" style="color:#fff">' . JText::_('HG_CANCELLATION_POLICY') . '</a></legend>' . "\n";
                 $output .= '<div class="slidevisible2" style="text-align:left;">' . "\n";
                 $output .= '<p style="font-size:11px">';
                 $output .= $rooms[$i]->cancellation;
                 $output .= '</p>';
                 $output .= '</div>' . "\n";
                 $output .= '</fieldset>' . "\n";
                 $output .= '</div></div>' . "\n";
             }
             $output .= '</div>' . "\n";
             $output .= '<div style="clear:both;"></div>' . "\n";
         }
         $subrate_count = count($rooms[$i]->subrate);
         if ($subrate_count > 0) {
             for ($m = 0; $m < $subrate_count; $m++) {
                 $beds = $rooms[$i]->subrate[$m]->beds;
                 $bed_count = count($beds);
                 if ($bed_count > 0) {
                     //$output .= '<div class="ratetitle" style="margin-top:10px;"><strong>'.$rooms[$i]->title.'&nbsp;-&nbsp;'.$rooms[$i]->subrate[$m]->title.'</strong></div>' . "\n";
                     if ($rooms[$i]->roomsoffer) {
                         $output .= '<br /><span style="padding-right:5px;"><img src="' . JURI::base() . 'components/com_hotelguide/assets/images/specialoffer.png" alt="Special Offer"/></span><span style="font-size:11px; vertical-align:top; color:#6a71ff;">' . $rooms[$i]->roomsoffer . '</span><br />' . "\n";
                     }
                     $output .= '<div class="table">' . "\n";
                     $output .= '<div class="th"><div class="td" style="width: 19%; height:22px; line-height:24px; border-left: 1px solid #fff;">' . JText::_('HG_BED_TYPES') . '</div><div class="td" style="height:22px; line-height:12px;">' . $day . '<br/>' . $today . '&nbsp;' . $month . '</div><div class="td" style="height:22px; line-height:12px;">' . $secondday . '<br/>' . $second . '&nbsp;' . $JDate->_monthToString(date('m', mktime(0, 0, 0, $monthnum, $todaynum + 1, $yearnum)), true) . '</div><div class="td" style="height:22px; line-height:12px;">' . $thirdday . '<br/>' . $third . '&nbsp;' . $JDate->_monthToString(date('m', mktime(0, 0, 0, $monthnum, $todaynum + 2, $yearnum)), true) . '</div><div class="td" style="height:22px; line-height:12px;">' . $fourthday . '<br/>' . $fourth . '&nbsp;' . $JDate->_monthToString(date('m', mktime(0, 0, 0, $monthnum, $todaynum + 3, $yearnum)), true) . '</div><div class="td" style="height:22px; line-height:12px;">' . $fifthday . '<br/>' . $fifth . '&nbsp;' . $JDate->_monthToString(date('m', mktime(0, 0, 0, $monthnum, $todaynum + 4, $yearnum)), true) . '</div><div class="td" style="height:22px; line-height:12px;">' . $sixthday . '<br/>' . $sixth . '&nbsp;' . $JDate->_monthToString(date('m', mktime(0, 0, 0, $monthnum, $todaynum + 5, $yearnum)), true) . '</div><div class="td" style="height:22px; line-height:12px;">' . $seventhday . '<br/>' . $seventh . '&nbsp;' . $JDate->_monthToString(date('m', mktime(0, 0, 0, $monthnum, $todaynum + 6, $yearnum)), true) . '</div><div class="td" style="width:18%; height:22px; line-height:12px; margin-right:-3px;"></div><div style="clear: both;"></div></div>' . "\n";
                     for ($j = 0; $j < $bed_count; $j++) {
                         $bed =& $beds[$j];
                         switch ($monthnum) {
                             case 1:
                                 $rate = explode(",", $bed->rate1);
                                 $discount = explode(",", $bed->discount1);
                                 $room = explode(",", $bed->room1);
                                 $nextrate = explode(",", $bed->rate2);
                                 $nextdiscount = explode(",", $bed->discount2);
                                 break;
                             case 2:
                                 $rate = explode(",", $bed->rate2);
                                 $discount = explode(",", $bed->discount2);
                                 $room = explode(",", $bed->room2);
                                 $nextrate = explode(",", $bed->rate3);
                                 $nextdiscount = explode(",", $bed->discount3);
                                 break;
                             case 3:
                                 $rate = explode(",", $bed->rate3);
                                 $discount = explode(",", $bed->discount3);
                                 $room = explode(",", $bed->room3);
                                 $nextrate = explode(",", $bed->rate4);
                                 $nextdiscount = explode(",", $bed->discount4);
                                 break;
                             case 4:
                                 $rate = explode(",", $bed->rate4);
                                 $discount = explode(",", $bed->discount4);
                                 $room = explode(",", $bed->room4);
                                 $nextrate = explode(",", $bed->rate5);
                                 $nextdiscount = explode(",", $bed->discount5);
                                 break;
                             case 5:
                                 $rate = explode(",", $bed->rate5);
                                 $discount = explode(",", $bed->discount5);
                                 $room = explode(",", $bed->room5);
                                 $nextrate = explode(",", $bed->rate6);
                                 $nextdiscount = explode(",", $bed->discount6);
                                 break;
                             case 6:
                                 $rate = explode(",", $bed->rate6);
                                 $discount = explode(",", $bed->discount6);
                                 $room = explode(",", $bed->room6);
                                 $nextrate = explode(",", $bed->rate7);
                                 $nextdiscount = explode(",", $bed->discount7);
                                 break;
                             case 7:
                                 $rate = explode(",", $bed->rate7);
                                 $discount = explode(",", $bed->discount7);
                                 $room = explode(",", $bed->room7);
                                 $nextrate = explode(",", $bed->rate8);
                                 $nextdiscount = explode(",", $bed->discount8);
                                 break;
                             case 8:
                                 $rate = explode(",", $bed->rate8);
                                 $discount = explode(",", $bed->discount8);
                                 $room = explode(",", $bed->room8);
                                 $nextrate = explode(",", $bed->rate9);
                                 $nextdiscount = explode(",", $bed->discount9);
                                 break;
                             case 9:
                                 $rate = explode(",", $bed->rate9);
                                 $discount = explode(",", $bed->discount9);
                                 $room = explode(",", $bed->room9);
                                 $nextrate = explode(",", $bed->rate10);
                                 $nextdiscount = explode(",", $bed->discount19);
                                 break;
                             case 10:
                                 $rate = explode(",", $bed->rate10);
                                 $discount = explode(",", $bed->discount10);
                                 $room = explode(",", $bed->room10);
                                 $nextrate = explode(",", $bed->rate11);
                                 $nextdiscount = explode(",", $bed->discount11);
                                 break;
                             case 11:
                                 $rate = explode(",", $bed->rate11);
                                 $discount = explode(",", $bed->discount11);
                                 $room = explode(",", $bed->room11);
                                 $nextrate = explode(",", $bed->rate12);
                                 $nextdiscount = explode(",", $bed->discount12);
                                 break;
                             case 12:
                                 $rate = explode(",", $bed->rate12);
                                 $discount = explode(",", $bed->discount12);
                                 $room = explode(",", $bed->room12);
                                 $nextrate = explode(",", $bed->rate1);
                                 $nextdiscount = explode(",", $bed->discount1);
                                 break;
                         }
                         //			$rate = explode(",", $bed->rate2);
                         //			$discount = explode(",", $bed->discount2);
                         //			$room = explode(",", $bed->room2);
                         $daysofmonth = count($rate) . "\n";
                         $leftdays = $daysofmonth - $today + 1;
                         if ($leftdays < 8) {
                             $rate = array_merge($rate, $nextrate);
                             $discount = array_merge($discount, $nextdiscount);
                         }
                         if (max($discount) > 0) {
                             if ($bed->breakfast == 2) {
                                 $output .= '<div class="tr"><div class="td" style="width: 19%; border-left: 1px solid #fff; text-align:left;">&nbsp;&nbsp;' . $bed->bedtype;
                                 $output .= '<p style="color:#333acc; font-style:italic; font-weight:normal;">&nbsp;&nbsp;&nbsp;' . JText::_('HG_BREAKFAST_INCLUDED') . '</p></div>';
                             } else {
                                 $output .= '<div class="tr"><div class="td" style="width: 19%; font-weight:bold; line-height:40px; border-left: 1px solid #fff; text-align:left;">&nbsp;&nbsp;' . $bed->bedtype;
                                 $output .= '</div>';
                             }
                             if ($rate[$today - 1]) {
                                 $output .= '<div class="td"><p style="text-decoration:line-through; text-align:center; margin:0;">' . hg_html::getCurrency($id, $rate[$today - 1]) . '</p>';
                                 $newrate = $rate[$today - 1] * (100 - $discount[$today - 1]) / 100;
                                 $output .= '<p style="font-size:1.2em; color:' . $hgconf->pricecolor . '; text-align:center; font-weight:bold;">' . hg_html::getCurrency($id, $newrate) . '</p></div>';
                             } else {
                                 $output .= JText::_('HG_CONTACT');
                             }
                             $output .= '<div class="td">';
                             if ($rate[$today]) {
                                 $output .= '<p style="text-decoration:line-through; text-align:center; margin:0;">' . hg_html::getCurrency($id, $rate[$today]) . '</p>';
                                 $newrate = $rate[$today] * (100 - $discount[$today]) / 100;
                                 $output .= '<p style="font-size:1.2em; color:' . $hgconf->pricecolor . '; text-align:center; font-weight:bold;">' . hg_html::getCurrency($id, $newrate) . '</p></div>';
                             } else {
                                 $output .= JText::_('HG_CONTACT');
                             }
                             $output .= '<div class="td">';
                             if ($rate[$today + 1]) {
                                 $output .= '<p style="text-decoration:line-through; text-align:center; margin:0;">' . hg_html::getCurrency($id, $rate[$today + 1]) . '</p>';
                                 $newrate = $rate[$today + 1] * (100 - $discount[$today + 1]) / 100;
                                 $output .= '<p style="font-size:1.2em; color:' . $hgconf->pricecolor . '; text-align:center; font-weight:bold;">' . hg_html::getCurrency($id, $newrate) . '</p></div>';
                             } else {
                                 $output .= JText::_('HG_CONTACT');
                             }
                             $output .= '<div class="td">';
                             if ($rate[$today + 2]) {
                                 $output .= '<p style="text-decoration:line-through; text-align:center; margin:0;">' . hg_html::getCurrency($id, $rate[$today + 2]) . '</p>';
                                 $newrate = $rate[$today + 2] * (100 - $discount[$today + 2]) / 100;
                                 $output .= '<p style="font-size:1.2em; color:' . $hgconf->pricecolor . '; text-align:center; font-weight:bold;">' . hg_html::getCurrency($id, $newrate) . '</p></div>';
                             } else {
                                 $output .= JText::_('HG_CONTACT');
                             }
                             $output .= '<div class="td">';
                             if ($rate[$today + 3]) {
                                 $output .= '<p style="text-decoration:line-through; text-align:center; margin:0;">' . hg_html::getCurrency($id, $rate[$today + 3]) . '</p>';
                                 $newrate = $rate[$today + 3] * (100 - $discount[$today + 3]) / 100;
                                 $output .= '<p style="font-size:1.2em; color:' . $hgconf->pricecolor . '; text-align:center; font-weight:bold;">' . hg_html::getCurrency($id, $newrate) . '</p></div>';
                             } else {
                                 $output .= JText::_('HG_CONTACT');
                             }
                             $output .= '<div class="td">';
                             if ($rate[$today + 4]) {
                                 $output .= '<p style="text-decoration:line-through; text-align:center; margin:0;">' . hg_html::getCurrency($id, $rate[$today + 4]) . '</p>';
                                 $newrate = $rate[$today + 4] * (100 - $discount[$today + 4]) / 100;
                                 $output .= '<p style="font-size:1.2em; color:' . $hgconf->pricecolor . '; text-align:center; font-weight:bold;">' . hg_html::getCurrency($id, $newrate) . '</p></div>';
                             } else {
                                 $output .= JText::_('HG_CONTACT');
                             }
                             $output .= '<div class="td">';
                             if ($rate[$today + 5]) {
                                 $output .= '<p style="text-decoration:line-through; text-align:center; margin:0;">' . hg_html::getCurrency($id, $rate[$today + 5]) . '</p>';
                                 $newrate = $rate[$today + 5] * (100 - $discount[$today + 5]) / 100;
                                 $output .= '<p style="font-size:1.2em; color:' . $hgconf->pricecolor . '; text-align:center; font-weight:bold;">' . hg_html::getCurrency($id, $newrate) . '</p></div>';
                             } else {
                                 $output .= JText::_('HG_CONTACT');
                             }
                             $output .= '<div class="td" style="width: 18%; margin-right:-3px;">';
                             $output .= '<button class="button" type="button" id="bookingbutton" onclick="submitbutton(\'' . $rooms[$i]->hotel . '\', \'' . $rooms[$i]->id . '\', \'' . $rooms[$i]->subrate[$m]->id . '\', \'' . $bed->id . '\'); return false;">' . JText::_('HG_BOOK_NOW') . '</button><p style="padding:0 3px; color:#ffffff; font-style:italic; text-align:center;">';
                             if ($room[$today - 1] == 0) {
                                 $output .= JText::_('HG_NOT_AVAILABLE');
                             } else {
                                 if ($room[$today - 1] == 1) {
                                     $output .= JText::sprintf('HG_LAST_CHANCE_ONLY_ROOM_LEFT', $room[$today - 1]);
                                 } else {
                                     if ($room[$today - 1] > 1 && $room[$today - 1] < 6) {
                                         $output .= JText::sprintf('HG_ONLY_ROOMS_LEFT', $room[$today - 1]);
                                     } else {
                                     }
                                 }
                             }
                             $output .= '</p>' . "\n";
                             $output .= '</div></div>' . "\n";
                         } else {
                             $output .= '<div class="tr" style="background:none"><div class="td" style="width: 19%; border-left: 1px solid #fff; text-align:left;">&nbsp;&nbsp;' . $bed->bedtype;
                             if ($bed->breakfast == 2) {
                                 $output .= '<p style="padding-bottom:5px; line-height:26px; color:#333acc; font-style:italic; font-weight:normal;">&nbsp;' . JText::_('HG_BREAKFAST_INCLUDED') . '</p></div><div class="td" style="line-height:34px; font-weight:bold; color:' . $hgconf->pricecolor . ';">';
                             } else {
                                 $output .= '</div><div class="td" style="line-height:34px; font-weight:bold; color:' . $hgconf->pricecolor . ';">';
                             }
                             if ($rate[$today - 1]) {
                                 $output .= hg_html::getCurrency($id, $rate[$today - 1]);
                             } else {
                                 $output .= JText::_('HG_CONTACT');
                             }
                             $output .= '</div><div class="td" style="line-height:34px; font-weight:bold; color:' . $hgconf->pricecolor . ';">';
                             if ($rate[$today]) {
                                 $output .= hg_html::getCurrency($id, $rate[$today]);
                             } else {
                                 $output .= JText::_('HG_CONTACT');
                             }
                             $output .= '</div><div class="td" style="line-height:34px; font-weight:bold; color:' . $hgconf->pricecolor . ';">';
                             if ($rate[$today + 1]) {
                                 $output .= hg_html::getCurrency($id, $rate[$today + 1]);
                             } else {
                                 $output .= JText::_('HG_CONTACT');
                             }
                             $output .= '</div><div class="td" style="line-height:34px; font-weight:bold; color:' . $hgconf->pricecolor . ';">';
                             if ($rate[$today + 2]) {
                                 $output .= hg_html::getCurrency($id, $rate[$today + 2]);
                             } else {
                                 $output .= JText::_('HG_CONTACT');
                             }
                             $output .= '</div><div class="td" style="line-height:34px; font-weight:bold; color:' . $hgconf->pricecolor . ';">';
                             if ($rate[$today + 3]) {
                                 $output .= hg_html::getCurrency($id, $rate[$today + 3]);
                             } else {
                                 $output .= JText::_('HG_CONTACT');
                             }
                             $output .= '</div><div class="td" style="line-height:34px; font-weight:bold; color:' . $hgconf->pricecolor . ';">';
                             if ($rate[$today + 4]) {
                                 $output .= hg_html::getCurrency($id, $rate[$today + 4]);
                             } else {
                                 echo JText::_('HG_CONTACT');
                             }
                             $output .= '</div><div class="td" style="line-height:34px; font-weight:bold; color:' . $hgconf->pricecolor . ';">';
                             if ($rate[$today + 5]) {
                                 $output .= hg_html::getCurrency($id, $rate[$today + 5]);
                             } else {
                                 $output .= JText::_('HG_CONTACT');
                             }
                             $output .= '</div><div class="td" style="line-height:14px; width: 22%; margin-right:-3px;">';
                             $output .= '<button class="button" type="button" id="bookingbutton" onclick="submitbutton(\'' . $rooms[$i]->hotel . '\', \'' . $rooms[$i]->id . '\', \'' . $rooms[$i]->subrate[$m]->id . '\', \'' . $bed->id . '\'); return false;">' . JText::_('HG_BOOK_NOW') . '</button><p style="padding:0 3px; color:#ffffff; font-style:italic; text-align:center;">';
                             if ($room[$today - 1] == 0) {
                             } else {
                                 if ($room[$today - 1] == 1) {
                                     $output .= JText::sprintf('HG_LAST_CHANCE_ONLY_ROOM_LEFT', $room[$today - 1]);
                                 } else {
                                     if ($room[$today - 1] > 1 && $room[$today - 1] < 6) {
                                         $output .= JText::sprintf('HG_ONLY_ROOMS_LEFT', $room[$today - 1]);
                                     } else {
                                     }
                                 }
                             }
                             $output .= '</p>' . "\n";
                             $output .= '</div></div>' . "\n";
                         }
                     }
                     $output .= '</div>' . "\n";
                     $output .= '<div class="slidebox">' . "\n";
                     if ($rooms[$i]->subrate[$m]->rate_details) {
                         $output .= '<div class="left"><div class="slide_wrapper2">' . "\n";
                         $output .= '<fieldset class="layout" style="border:none">' . "\n";
                         $output .= '<legend style="font-size:11px"><a href="javascript:void(0)" style="color:#fff">' . JText::_('HG_RATE_DETAILS') . '</a></legend>' . "\n";
                         $output .= '<div class="slidevisible2" style="text-align:left;">' . "\n";
                         $output .= '<p style="font-size:11px">';
                         $output .= $rooms[$i]->subrate[$m]->rate_details;
                         $output .= '</p>';
                         $output .= '</div>' . "\n";
                         $output .= '</fieldset>' . "\n";
                         $output .= '</div></div>' . "\n";
                     }
                     if ($rooms[$i]->subrate[$m]->cancellation) {
                         $output .= '<div class="right"><div class="slide_wrapper2">' . "\n";
                         $output .= '<fieldset class="layout" style="border:none">' . "\n";
                         $output .= '<legend style="font-size:11px"><a href="javascript:void(0)" style="color:#fff">' . JText::_('HG_CANCELLATION_POLICY') . '</a></legend>' . "\n";
                         $output .= '<div class="slidevisible2" style="text-align:left;">' . "\n";
                         $output .= '<p style="font-size:11px">';
                         $output .= $rooms[$i]->subrate[$m]->cancellation;
                         $output .= '</p>';
                         $output .= '</div>' . "\n";
                         $output .= '</fieldset>' . "\n";
                         $output .= '</div></div>' . "\n";
                     }
                     $output .= '</div>' . "\n";
                     $output .= '<div style="clear:both;"></div>' . "\n";
                 }
             }
         }
     }
     $output .= '</div>' . "\n";
     if ($hgconf->box == 'None') {
         $output .= '<div style="clear:both;padding-bottom:10px;"></div>' . "\n";
     } else {
         $output .= hg_html::boxbottom();
     }
     echo $output;
 }