Ejemplo n.º 1
0
$i = 0;
if ($this->hgconf->listheight_hotel) {
    $margin = $this->hgconf->listheight_hotel;
} else {
    $margin = 84;
}
echo '<div id="itembox">' . "\n";
foreach ($this->items as $hotels) {
    if ($k == 0) {
        echo '<div class="titlerow" style="height:' . $margin . 'px; background: transparent url(' . JURI::base() . 'components/com_hotelguide/assets/images/back_light.png) 0 0 repeat;">' . "\n";
    } else {
        echo '<div class="titlerow" style="height:' . $margin . 'px; background: transparent url(' . JURI::base() . 'components/com_hotelguide/assets/images/back_dark.png) 0 0 repeat;">' . "\n";
    }
    echo '<div class="leftcell">' . "\n";
    echo '<div class="inner">' . "\n";
    $link = JRoute::_(hotelguideHelperRoute::getItemRoute($hotels->slug));
    if ($hotels->mainimage) {
        echo '<a href="' . $link . '"><img class="img_left imgshadow" style="padding:4px; border-color:' . $this->hgconf->bordercolor . '" src="' . JURI::base() . 'images/hotelguide/gallery/hotel_' . $hotels->id . '/thumb/' . $hotels->mainimage . '"  width="' . $margin . 'px"; title="' . htmlentities($hotels->title) . '" alt="' . htmlentities($hotels->title) . '"/></a>';
    } else {
        echo '<a href="' . $link . '"><img class="img_left imgshadow" style="padding:4px; border-color:' . $this->hgconf->bordercolor . '" src="' . JURI::base() . 'components/com_hotelguide/assets/images/no_thumb.gif" width="' . $margin . 'px"; title="No Image" alt="No Image"/></a>';
    }
    echo '</div>' . "\n";
    echo '</div>' . "\n";
    echo '<div class="centercell">' . "\n";
    echo '<div class="inner" style="text-align:left;">' . "\n";
    echo '<p style="margin-right:10px; position:relative;"><a class="titleitem" style="font-weight:bold;" href="' . $link . '">';
    echo stripslashes($hotels->title);
    echo '</a>';
    if ($hotels->starrate && $this->hgconf->showstarrate) {
        echo '&nbsp;&nbsp;<img style="margin:0" src="' . JURI::base() . 'components/com_hotelguide/assets/images/' . $hotels->starrate . 'star.png"  alt="Star Rate"/>';
    }
Ejemplo n.º 2
0
 function showtags($tags)
 {
     $html = '';
     $html .= '<div class="tags">';
     $html .= '<span class="tag_label">' . JText::_('HG_TAGS') . ': </span>';
     $count = count($tags);
     $i = 1;
     foreach ($tags as $tag) {
         $html .= '<span class="tag" style="font-size:12px;">';
         $html .= '<a href="' . JRoute::_(hotelguideHelperRoute::getTagRoute($tag->slug)) . '" style="color:#fff; font-weight: bold;">';
         $html .= JText::_($tag->name) . '</a></span>';
         if ($i < $count) {
             $html .= ' | ';
         }
         $i++;
     }
     $html .= '</div>';
     return $html;
 }
Ejemplo n.º 3
0
 * modify it under the terms of the GNU General Public License 2
 * as published by the Free Software Foundation.
 * HotelGuide is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with HOTELGUIDE; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
defined('_JEXEC') or die('Restricted access');
echo '<div id="hotel"><div class="hotellist" style="width:100%">' . "\n";
echo '<div class="hotel_row">' . "\n";
foreach ($hotels as $sub) {
    echo '<div class="inbox" style="width:25%;"><div class="hotel_col">';
    $link = hotelguideHelperRoute::getItemRoute($sub->slug);
    echo '<div class="inframe">' . "\n";
    echo '<div class="trans">' . "\n";
    if ($sub->starrate > 0) {
        echo '<img src="' . JURI::base() . 'components/com_hotelguide/assets/images/' . $sub->starrate . 'star.png"  alt="Star Rate"/>';
    }
    echo '</div>' . "\n";
    echo '<a href="' . $link . '" title="' . $sub->title . '">';
    if ($sub->mainimage) {
        echo '<img style="border:1px solid #bbbbbb;" src="' . JURI::base() . 'images/hotelguide/gallery/hotel_' . $sub->id . '/crop/' . $sub->mainimage . '" width="120px" alt="" /></a></div>' . "\n";
    } else {
        echo '<img src="' . JURI::base() . 'components/com_hotelguide/assets/images/no_image.gif" /></a></div>' . "\n";
    }
    echo '<div class="cap">' . "\n";
    //		echo '<div class="caption">' . "\n";
    echo '<i style="height:3em">' . "\n";
    function showmap($config, $base, $mapdatas, $regione, $cattitle, $child, $ajaxmap, $googlead, $adid, $slot)
    {
        $lat = $base['lat'];
        $lon = $base['lon'];
        $zoom = $base['zoom'];
        $maptype = $base['maptype'];
        if (!$maptype) {
            $maptype = 'Map';
        }
        switch ($maptype) {
            case 'Map':
            case 'roadmap':
                $maptype = 'G_NORMAL_MAP';
                break;
            case 'Satellite':
                $maptype = 'G_SATELLITE_MAP';
                break;
            case 'Hybrid':
            case 'hybrid':
                $maptype = 'G_HYBRID_MAP';
                break;
            case 'Terrain':
            case 'terrain':
                $maptype = 'G_PHYSICAL_MAP';
                break;
        }
        ?>

		<script language="javascript" type="text/javascript">
            var map;
            var container;
            var lat;
            var lon;
            var maptype;
            var title;
            var thumbLink;
            var point;
			var toggle = 0;

			function loadMap() {

				container = document.getElementById("map_canvas");
					   
				lat = <?php 
        echo $lat;
        ?>
;
				lon = <?php 
        echo $lon;
        ?>
;
				zoom = <?php 
        echo $zoom;
        ?>
;
				maptype = <?php 
        echo $maptype;
        ?>
;
				point = new GLatLng (lat, lon);
				map = new google.maps.Map2(container); 
				map.addControl(new GLargeMapControl3D(), new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(0,5)));
				map.addControl(new GMenuMapTypeControl(), new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(7,7)));
				map.addMapType(G_PHYSICAL_MAP);
				map.addControl(new GScaleControl());
				map.setCenter(new google.maps.LatLng(lat, lon), zoom, maptype);

				//var clusterer = new Clusterer(map); 
				//var sidebar = new SideBar(document.getElementById("sidebar"));
		
				GEvent.addListener(map, "mouseover", function(){
					map.showControls();
				});
				GEvent.addListener(map, "mouseout", function(){
					map.hideControls(); 
				});
	
				// ================= infoOpened LISTENER ===========
				GEvent.addListener(map, "infowindowopen", function()  {
					infoOpened = true;	// set infoOpened to true to change the history text
					Slimbox.scanPage();
				});
		
				// ================= infoClosed LISTENER ===========
				GEvent.addListener(map, "infowindowclose", function()  {
					infoOpened = false;	// set infoOpened to false
				});
		
				var autoCenterBounds = new GLatLngBounds();
				var maxZoom = 0;	
				var marker; 
				var width;
				var height;
				var ratio;
				var imagelink;
				var itemlink;
				var slimboxlink;
				var logopath;
				var logowidth = <?php 
        echo $config->logowidth;
        ?>
;
				var logoheight = <?php 
        echo $config->logoheight;
        ?>
;
				toggle = 1;
				<?php 
        if ($config->logoimage) {
            ?>
					logopath = "<?php 
            echo JURI::base();
            ?>
administrator/components/com_hotelguide/assets/images/<?php 
            echo $config->logoimage;
            ?>
"; <?php 
        } else {
            ?>
					logopath = "<?php 
            echo JURI::base();
            ?>
administrator/components/com_hotelguide/assets/images/yourlogo.gif";
					logowidth = 160;
					logoheight = 25; <?php 
        }
        ?>
				
				<?php 
        if ($child) {
            foreach ($mapdatas as $mapdata) {
                $text = substr($mapdata[0]->hoteltype, 0, 18) . "....";
                ?>
						CreateMarker(clusterer, sidebar, "", "", "", "", "", "", "","", "", "", "", "", "", "<?php 
                echo $text;
                ?>
");
						<?php 
                foreach ($mapdata as $item) {
                    if ($item->lon == 0) {
                        continue;
                    }
                    ?>
							point = new GLatLng(<?php 
                    echo $item->lat;
                    ?>
, <?php 
                    echo $item->lon;
                    ?>
);
							<?php 
                    if ($item->zoom < 1 || !$item->zoom) {
                        $item->zoom = 3;
                    }
                    ?>
							maxZoom = Math.max(maxZoom, <?php 
                    echo $item->zoom;
                    ?>
);
							autoCenterBounds.extend(point);
							
							<?php 
                    if ($regione == 'hotel' && $item->mainimage) {
                        ?>
                                                                        
								itemlink = "<?php 
                        echo JRoute::_(hotelguideHelperRoute::getItemRoute($item->slug));
                        ?>
";
								thumblink = "<?php 
                        echo JURI::base();
                        ?>
images/hotelguide/gallery/hotel_<?php 
                        echo $item->id;
                        ?>
/smallcrop/<?php 
                        echo $item->mainimage;
                        ?>
";
								imagelink = "<?php 
                        echo JURI::base();
                        ?>
images/hotelguide/gallery/hotel_<?php 
                        echo $item->id;
                        ?>
/resize/<?php 
                        echo $item->mainimage;
                        ?>
";
								slimboxlink = "<?php 
                        echo JURI::base();
                        ?>
images/hotelguide/gallery/hotel_<?php 
                        echo $item->id;
                        ?>
/album/<?php 
                        echo $item->mainimage;
                        ?>
";
							<?php 
                    } else {
                        ?>
								thumblink = "<?php 
                        echo JURI::base();
                        ?>
components/com_hotelguide/assets/images/no_list.gif";
								imagelink = "<?php 
                        echo JURI::base();
                        ?>
components/com_hotelguide/assets/images/no_image.gif";
								slimboxlink = "<?php 
                        echo JURI::base();
                        ?>
components/com_hotelguide/assets/images/no_thumb.jpg";
								<?php 
                        $item->imagewidth = 160;
                        $item->imageheight = 120;
                    }
                    $desc = $item->title;
                    ?>
							
							//CreateMarker(clusterer, sidebar, <?php 
                    //echo $item->lat;
                    ?>
, <?php 
                    //echo $item->lon;
                    ?>
, "<?php 
                    //echo $desc;
                    ?>
", thumblink, imagelink, itemlink, slimboxlink, <?php 
                    //echo $item->zoom;
                    ?>
, <?php 
                    //echo $item->imagewidth;
                    ?>
, <?php 
                    //echo $item->imageheight;
                    ?>
, logopath, logowidth, logoheight, ""); <?php 
                }
            }
        } else {
            if ($regione == 'city') {
                $cattitle = JText::sprintf('HG_ACCOMMODATIONS_IN', $cattitle);
            } else {
                if ($regione == 'country' || $regione == 'states') {
                    $cattitle = JText::sprintf('HG_CITIES_IN', $cattitle);
                } else {
                    if ($regione == 'continent') {
                        $cattitle = JText::sprintf('HG_COUNTRIES_IN', $cattitle);
                    }
                }
            }
            ?>
						
					//CreateMarker(clusterer, sidebar, "", "", "", "", "", "", "","", "", "", "", "", "", "<?php 
            //echo $cattitle;
            ?>
");
					<?php 
            foreach ($mapdatas as $item) {
                if ($item->lon == 0) {
                    continue;
                }
                ?>
						point = new GLatLng(<?php 
                echo $item->lat;
                ?>
, <?php 
                echo $item->lon;
                ?>
);
						<?php 
                if ($item->zoom < 1 || !$item->zoom) {
                    $item->zoom = 3;
                }
                ?>
						maxZoom = Math.max(maxZoom, <?php 
                echo $item->zoom;
                ?>
);
						autoCenterBounds.extend(point);
						
						<?php 
                if (($regione == 'city' || $regione == 'states') && $item->image) {
                    ?>
							itemlink = "<?php 
                    echo JRoute::_(hotelguideHelperRoute::getCityRoute($item->cityslug));
                    ?>
";
							thumblink = "<?php 
                    echo JURI::base();
                    ?>
images/hotelguide/city/scrop/<?php 
                    echo $item->image;
                    ?>
";
							imagelink = "<?php 
                    echo JURI::base();
                    ?>
images/hotelguide/city/resize/<?php 
                    echo $item->image;
                    ?>
";
							slimboxlink = "<?php 
                    echo JURI::base();
                    ?>
images/hotelguide/city/album/<?php 
                    echo $item->image;
                    ?>
";
						<?php 
                } else {
                    if (($regione == 'country' || $regione == 'continent') && $item->image) {
                        ?>
							itemlink = "<?php 
                        echo JRoute::_(hotelguideHelperRoute::getCountryRoute($item->slug));
                        ?>
";
							thumblink = "<?php 
                        echo JURI::base();
                        ?>
images/hotelguide/country/scrop/<?php 
                        echo $item->image;
                        ?>
";
							imagelink = "<?php 
                        echo JURI::base();
                        ?>
images/hotelguide/country/resize/<?php 
                        echo $item->image;
                        ?>
";
							slimboxlink = "<?php 
                        echo JURI::base();
                        ?>
images/hotelguide/country/album/<?php 
                        echo $item->image;
                        ?>
";
						<?php 
                    } else {
                        if ($regione == 'hotel' && $item->mainimage) {
                            ?>
							itemlink = "<?php 
                            echo JRoute::_(hotelguideHelperRoute::getItemRoute($item->slug));
                            ?>
";
							thumblink = "<?php 
                            echo JURI::base();
                            ?>
images/hotelguide/gallery/hotel_<?php 
                            echo $item->id;
                            ?>
/smallcrop/<?php 
                            echo $item->mainimage;
                            ?>
";
							imagelink = "<?php 
                            echo JURI::base();
                            ?>
images/hotelguide/gallery/hotel_<?php 
                            echo $item->id;
                            ?>
/resize/<?php 
                            echo $item->mainimage;
                            ?>
";
							slimboxlink = "<?php 
                            echo JURI::base();
                            ?>
images/hotelguide/gallery/hotel_<?php 
                            echo $item->id;
                            ?>
/album/<?php 
                            echo $item->mainimage;
                            ?>
";
						<?php 
                        } else {
                            ?>
							//thumblink = "<?php 
                            echo JURI::base();
                            ?>
components/com_hotelguide/assets/images/no_list.gif";
                                                        thumblink = "<?php 
                            echo JURI::base();
                            ?>
images/hotelguide/gallery/hotel_<?php 
                            echo $item->id;
                            ?>
/smallcrop/<?php 
                            echo $item->mainimage;
                            ?>
";
                                                        imagelink = "<?php 
                            echo JURI::base();
                            ?>
images/hotelguide/gallery/hotel_<?php 
                            echo $item->id;
                            ?>
/resize/<?php 
                            echo $item->mainimage;
                            ?>
";
							slimboxlink = "<?php 
                            echo JURI::base();
                            ?>
images/hotelguide/gallery/hotel_<?php 
                            echo $item->id;
                            ?>
/album/<?php 
                            echo $item->mainimage;
                            ?>
";
							//imagelink = "<?php 
                            echo JURI::base();
                            ?>
components/com_hotelguide/assets/images/no_image.gif";
							//slimboxlink = "<?php 
                            echo JURI::base();
                            ?>
components/com_hotelguide/assets/images/no_image.gif";
							<?php 
                            $item->imagewidth = 120;
                            $item->imageheight = 120;
                        }
                    }
                }
                if (isset($item->assignedrestos)) {
                    $desc = JText::sprintf('HG_MAP_ACCOMMODATIONS', $item->nam, $item->assignedrestos);
                } else {
                    if ($regione == 'hotel') {
                        $desc = $item->title;
                    } else {
                        $desc = $item->title;
                    }
                }
                ?>
				
						//CreateMarker(clusterer, sidebar, <?php 
                //echo $item->lat;
                ?>
, <?php 
                //echo $item->lat;
                ?>
, "<?php 
                //echo $desc;
                ?>
", thumblink, imagelink, itemlink, slimboxlink, <?php 
                //echo $item->zoom;
                ?>
, <?php 
                //echo $item->imagewidth;
                ?>
, <?php 
                //echo $item->imageheight;
                ?>
, logopath, logowidth, logoheight, "");
						
					<?php 
            }
        }
        ?>
                                        
                                // Create our "tiny" marker icon
                                var blueIcon = new GIcon(G_DEFAULT_ICON);
                                blueIcon.image = "http://gmaps-samples.googlecode.com/svn/trunk/markers/red/blank.png";

                                // Set up our GMarkerOptions object
                                markerOptions = { icon:blueIcon };
                                var latlng = new GLatLng(<?php 
        echo $item->lat;
        ?>
,<?php 
        echo $item->lon;
        ?>
);
                                map.addOverlay(new GMarker(latlng, markerOptions));
				map.setCenter(autoCenterBounds.getCenter(), Math.min(map.getBoundsZoomLevel(autoCenterBounds), maxZoom), maptype);
				
				<?php 
        /*if ($googlead) { ?>
        					var publisherID = '<?php echo $adid ?>';
        	
        					var adsManagerOptions = {
        						maxAdsOnMap : 1,
        						style: G_ADSMANAGER_STYLE_ADUNIT,
        						// The channel field is optional - replace this field with a channel number 
        						// of your own for Google AdSense tracking
        						channel: '<?php echo $slot ?>' 
        					};
        					
        					adsManager = new GAdsManager(map, publisherID, adsManagerOptions);
        					adsManager.enable();
        					<?php
        				}*/
        ?>
				
				//give the map a little time to fully load then remove the background
				setTimeout('document.getElementById("map_canvas").style.backgroundImage = "";',1000);
			}

			<?php 
        if ($ajaxmap) {
            ?>
				function loadScript() {
					if (toggle == 0) {
						loadMap();
						
					}
				}
			<?php 
        } else {
            ?>
				function addLoadEvent(func) { 
					var oldonload = window.onload; 
					if (typeof window.onload != 'function'){ 
						window.onload = func
					} else { 
						window.onload = function() {
							oldonload();
							func();
						}
					}
				}
				 
				addLoadEvent(loadMap); 
			<?php 
        }
        ?>
		
		</script> 
<?php 
    }
        //$friendlyurl Extrae unicamente el url del hotel
        list($url_path, $friendlyurl) = explode(":", $link);
        echo '<div class="accordionitem"><a href="../' . $friendlyurl . '.html" style="color:#fff">' . stripslashes($hotel->title) . '</a>';
        if ($hotel->starrate) {
            echo '<span style="padding:0 7px;"><img style="margin:0" src="' . JURI::base() . 'components/com_hotelguide/assets/images/' . $hotel->starrate . 'star.png"  alt="Star Rate"/></span>';
        }
        if ($hotel->price) {
            echo '<span style="position: absolute; right:5px; font-size:12px; font-weight:bold; color:' . $this->hgconf->pricecolor . ';">' . JText::_('HG_FROM') . '&nbsp;' . hg_html::getCurrency($hotel->id, $hotel->price);
            echo '</span>';
        }
        echo '</div>';
    }
    echo '<div style="clear:both;"></div>' . "\n";
    if (count($item->hotels) > 0) {
        echo '<p style="text-align:right; margin-right:5px">';
        $alllink = JRoute::_(hotelguideHelperRoute::getCityRoute($item->slug));
        echo '<a href="' . $alllink . '" style="color:#fff">';
        echo JText::sprintf('HG_SEE_ALL_ACCOMMODATIONS', $item->assignedhotels, $item->name);
        echo '</a></p>';
    } else {
        echo '<p style="text-align:right; margin-right:5px">';
        echo JText::_('HG_NO_ACCOMMODATION');
        echo '</p>';
    }
    echo '</div>' . "\n";
    echo '</div>' . "\n";
    echo '</div>' . "\n";
    echo '</dd>' . "\n";
    $k = 1 - $k;
    $n++;
}
Ejemplo n.º 6
0
                    echo '<li id="oceania"><a href="' . $wlink . '">' . JText::_('HG_PACIFIC_OCEAN_AUSTRALIA') . '</a></li>' . "\n";
                } else {
                    if ($continent->value == 5 && $continent->published == 1) {
                        $wlink = JRoute::_(hotelguideHelperRoute::getContinentRoute($continent->slug));
                        echo '<li id="europe"><a href="' . $wlink . '">' . JText::_('HG_EUROPE') . '</a></li>' . "\n";
                    } else {
                        if ($continent->value == 6 && $continent->published == 1) {
                            $wlink = JRoute::_(hotelguideHelperRoute::getContinentRoute($continent->slug));
                            echo '<li id="namerica"><a href="' . $wlink . '">' . JText::_('HG_NORTH_AMERICA') . '</a></li>' . "\n";
                        } else {
                            if ($continent->value == 7 && $continent->published == 1) {
                                $wlink = JRoute::_(hotelguideHelperRoute::getContinentRoute($continent->slug));
                                echo '<li id="camerica"><a href="' . $wlink . '">' . JText::_('HG_CENTRAL_AMERICA') . '</a></li>' . "\n";
                            } else {
                                if ($continent->value == 8 && $continent->published == 1) {
                                    $wlink = JRoute::_(hotelguideHelperRoute::getContinentRoute($continent->slug));
                                    echo '<li id="samerica"><a href="' . $wlink . '">' . JText::_('HG_SOUTH_AMERICA') . '</a></li>' . "\n";
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
echo '</ul>' . "\n";
echo '</div>' . "\n";
echo '</div>' . "\n";
echo '</div>' . "\n";
if ($this->hgconf->world_links && count($this->sponsors) > 0) {
Ejemplo n.º 7
0
        $ad_width = $this->hgconf->world_ad_width;
        $ad_height = $this->hgconf->world_ad_height;
        break;
}
$n = 0;
$i = 0;
$total = count($this->sponsors);
$norow = 100 / $this->hgconf->no_sponsorrow;
echo '<div class="boxlist">' . "\n";
echo '<div class="box_row">' . "\n";
foreach ($this->sponsors as $sponsor) {
    if ($n == 0) {
        echo '<div class="box_row">' . "\n";
    }
    echo '<div class="inbox" style="width:' . $norow . '%;"><div class="hg_box">';
    $link = JRoute::_(hotelguideHelperRoute::getItemRoute($sponsor->slug));
    echo '<div class="inframe">' . "\n";
    if ($sponsor->starrate > 0) {
        echo '<div class="trans">' . "\n";
        echo '<img src="' . JURI::base() . 'components/com_hotelguide/assets/images/' . $sponsor->starrate . 'star.png" alt="Star Rate"/>';
        echo '</div>' . "\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";
Ejemplo n.º 8
0
            echo JHTML::_('date', $subitem->startdates, JText::_('DATE_FORMAT_LC3'));
            echo '</div>' . "\n";
            echo '</div>' . "\n";
            echo '<div class="centercell">' . "\n";
            echo '<div class="inner" style="text-align:left; overflow:hidden;">' . "\n";
            echo '<a href="' . $link . '">' . stripslashes($subitem->title) . '</a>';
            echo '</div>' . "\n";
            echo '</div>' . "\n";
            echo '</div>' . "\n";
            /*
            									echo '<p style="text-align:left;">';
            									echo JHTML::_('date',  $subitem->startdates,  JText::_('DATE_FORMAT_LC3') ).'&nbsp;&nbsp;';
            									echo '<a href="'. $link.'">'.stripslashes($subitem->title).'</a>'; 
            									echo '</p>'; */
            echo '</div>' . "\n";
            $x = 1 - $x;
        }
    }
    echo '<div class="clear"></div>' . "\n";
    echo '<p style="text-align:right;">';
    $parentlink = JRoute::_(hotelguideHelperRoute::getEventRoute($this->events[$i]->slug));
    echo '<a href="' . $parentlink . '">' . JText::_('HG_VIEW_ALL') . '&nbsp;&raquo</a>';
    echo '</p>';
    echo '</div>' . "\n";
    echo '</div>' . "\n";
    echo '</div>' . "\n";
}
echo '</div>' . "\n";
echo '</div>' . "\n";
echo "<script type=\"text/javascript\">\n\twindow.addEvent('domready', function(){ \n\tvar opt = {\n\t\t\tautoplay: true,\n\t\t\tdelay:9000,\n\t\t\tflexHeight: true,\n\t\t\tscrolling: 'rl'\t\t\n\t\t};\n\tvar t2 = new QTabs('tab', opt); \n})\n</script>" . "\n";
echo '<div class="clear"></div>' . "\n";
Ejemplo n.º 9
0
 /**
  * Creates the item page
  *
  * @since 1.0
  */
 function display($tpl = null)
 {
     global $mainframe, $hgconf, $option;
     //initialize variables
     $document =& JFactory::getDocument();
     $user =& JFactory::getUser();
     $menus =& JSite::getMenu();
     $lang =& JFactory::getLanguage();
     $menu = $menus->getActive();
     $db =& JFactory::getDBO();
     $uri =& JFactory::getURI();
     $task = JRequest::getVar('task');
     $limitstart = JRequest::getVar('limitstart', 0, '', 'int');
     $cid = JRequest::getInt('cid', 0);
     //get hotel item data
     $model =& $this->getModel();
     $item =& $this->get('Item');
     $mapdatas =& $this->get('MapData');
     $rooms =& $this->get('Rooms');
     $restaurants =& $this->get('Restaurants');
     $spas =& $this->get('Spas');
     $promotions =& $this->get('Promotions');
     $galleries =& $this->get('Gallery');
     $articles =& $this->get('Articles');
     //Begin Jquery UI
     //Va primero la libreria Jquery para no crear conflictos con Mootools
     $document->addScript($this->baseurl . '/media/system/jquery/js/jquery-1.6.2.min.js');
     $document->addScript($this->baseurl . '/media/system/jquery/js/jquery-ui-1.8.16.custom.min.js');
     $document->addStyleSheet($this->baseurl . '/media/system/jquery/css/redmond/jquery-ui-1.8.16.custom.css');
     //End Jquery UI
     //add css file
     JHTML::_('behavior.mootools');
     if ($item->slideshow == 1 && count($galleries) > 0) {
         //$document->addScript( $this->baseurl.'/components/com_hotelguide/assets/js/jd.gallery.js');
         //$document->addScript( $this->baseurl.'/components/com_hotelguide/assets/js/jd.gallery.transitions.js');
         $document->addScript($this->baseurl . '/components/com_hotelguide/assets/js/galleria/galleria-1.2.8.min.js');
     }
     //$document->addScript( $this->baseurl.'/components/com_hotelguide/assets/js/slider.js');
     $document->addScript($this->baseurl . '/components/com_hotelguide/assets/js/slimbox.js');
     //$document->addScript( $this->baseurl.'/components/com_hotelguide/assets/js/qtabs.js');
     $document->addScript($this->baseurl . '/media/system/js/tabview.js');
     $document->addScript($this->baseurl . '/components/com_hotelguide/assets/js/roomrate.js');
     $document->addScript('http://www.jpmoser.com/hotelheading/js/collapsible_reviews.js');
     /*$document->addScript( $this->baseurl.'/components/com_hotelguide/assets/js/datepicker.packed_v6.js');
       $document->addStyleSheet($this->baseurl.'/components/com_hotelguide/assets/css/datepicker.css');*/
     $document->addScript($this->baseurl . '/media/system/js/modal.js');
     $document->addStyleSheet($this->baseurl . '/media/system/css/modal.css');
     //$document->addStyleSheet($this->baseurl.'/media/system/jquery/captcha/captcha.css');
     $key = $hgconf->api_key;
     $a_lang = explode('-', $document->getLanguage());
     if ($key && $hgconf->conti_map == 1) {
         $document->addScript('http://maps.google.com/maps?file=api&amp;v=2.x&amp;key=' . $key . '&amp;hl=' . $a_lang[0]);
         //$document->addScript( $this->baseurl.'/components/com_hotelguide/assets/js/hotel_cluster.js');
     }
     JPluginHelper::importPlugin('content');
     $dispatcher =& JDispatcher::getInstance();
     $params =& $mainframe->getParams('com_content');
     //call the params from content
     $results = $dispatcher->trigger('onPrepareContent', array(&$item, &$params, 1));
     $filter_class = $mainframe->getUserStateFromRequest($option . '.hotel.filter_class', 'filter_class', '*', 'word');
     if ($filter_class == '*') {
         $filter_class = $hgconf->classification;
     }
     if ($this->getLayout() == 'form') {
         $db->setQuery("SELECT * FROM #__hg_facilities WHERE published = 1 ORDER BY name ASC");
         $facilities = $db->loadObjectList();
         if ($db->getErrorNum()) {
             return $db->getErrorMsg();
         }
         $aSelected = explode(",", $item->facilities);
         $i = 1;
         $facilityList = "";
         foreach ($facilities as $facility) {
             $bChecked = false;
             if (in_array($facility->id, $aSelected)) {
                 $bChecked = true;
             }
             if ($i == 1) {
                 $facilityList .= "<tr>";
             }
             $facilityList .= '<td width="300"><input type="checkbox" name="isFacility" value="' . $facility->id . '" onClick="updateCheckedList();" ';
             $facilityList .= $bChecked ? " checked" : "";
             $facilityList .= "/>";
             $facilityList .= $facility->name;
             $facilityList .= "</td>";
             if ($i == 2) {
                 $i = 1;
                 $facilityList .= "</tr>";
             } else {
                 $i++;
             }
         }
         $db->setQuery("SELECT * FROM #__hg_roomfacilities WHERE published = 1 ORDER BY name ASC");
         $roomfacilities = $db->loadObjectList();
         if ($db->getErrorNum()) {
             return $db->getErrorMsg();
         }
         $bSelected = explode(",", $item->roomfacilities);
         $i = 1;
         $roomfacilityList = "";
         foreach ($roomfacilities as $roomfacility) {
             $bChecked = false;
             if (in_array($roomfacility->id, $bSelected)) {
                 $bChecked = true;
             }
             if ($i == 1) {
                 $roomfacilityList .= "<tr>";
             }
             $roomfacilityList .= '<td width="300"><input type="checkbox" name="isRoomFacility" value="' . $roomfacility->id . '" onClick="updateCheckedRoomList();" ';
             $roomfacilityList .= $bChecked ? " checked" : "";
             $roomfacilityList .= "/>";
             $roomfacilityList .= $roomfacility->name;
             $roomfacilityList .= "</td>";
             if ($i == 2) {
                 $i = 1;
                 $roomfacilityList .= "</tr>";
             } else {
                 $i++;
             }
         }
         $this->assignRef('hgconf', $hgconf);
         $this->assignRef('facilityList', $facilityList);
         $this->assignRef('roomfacilityList', $roomfacilityList);
         $this->_displayForm($tpl);
         return;
     }
     $iparams =& $item->attribs;
     $params->merge($iparams);
     if ($item->id == 0) {
         $id = JRequest::getInt('id', 0);
         //			return JError::raiseError( 404, JText::sprintf( 'ITEM #%d NOT FOUND', $id ) );
     } else {
         $nextItem = $model->getNextItem($item->id, $item->ordering);
         if ($nextItem) {
             $nextItem->nextLink = urldecode(JRoute::_(hotelguideHelperRoute::getItemRoute(urlencode($nextItem->slug))));
         }
         $prevItem = $model->getPreviousItem($item->id, $item->ordering);
         if ($prevItem) {
             $prevItem->prevLink = urldecode(JRoute::_(hotelguideHelperRoute::getItemRoute(urlencode($prevItem->slug))));
         }
         // Absolute URL
         $item->absoluteURL = $uri->_uri;
         //Email link
         $item->emailLink = JRoute::_('index.php?option=com_mailto&tmpl=component&link=' . base64_encode($item->absoluteURL));
         //Social link
         $item->socialLink = urlencode($item->absoluteURL);
     }
     //get tags if enabled
     //		if ($params->get('show_tags')) {
     //        	$tags		= & $this->get('Tags');
     //		}
     if ($hgconf->show_favourite) {
         $favourites =& $this->get('Favourites');
         $favoured =& $this->get('Favoured');
     }
     //pathway
     //		$cats		= new hotelguide_cats($cid);
     //        $parents	= $cats->getParentlist();
     $pathway =& $mainframe->getPathWay();
     //		foreach($parents as $parent) {
     //			$pathway->addItem( $this->escape($parent->title), JRoute::_('index.php?view=category&cid='.$parent->categoryslug));
     //		}
     $pathway->addItem($this->escape($item->title), JRoute::_('index.php?view=hotel&id=' . $item->slug));
     // because the application sets a default page title, we need to get it
     // right from the menu item itself
     // Get the menu item object
     if (is_object($menu)) {
         $menu_params = new JParameter($menu->params);
         if (!$menu_params->get('page_title')) {
             $params->set('page_title', $item->title);
         }
     } else {
         $params->set('page_title', $item->title);
     }
     /*
     		if($cid) {
     			$parentcat = array_pop($parents);
     			$doc_title = $item->title.' - '.$parentcat->title;
     		} else {
     			$doc_title = $params->get( 'page_title' );
     		}
     
     		$document->setTitle($doc_title);
     */
     if ($item->meta_description) {
         $document->setDescription($item->meta_description);
     }
     if ($item->meta_keywords) {
         $document->setMetadata('keywords', $item->meta_keywords);
     }
     if ($mainframe->getCfg('MetaTitle') == '1') {
         $mainframe->addMetaTag('title', $item->title . ' - ' . $item->cityinfo->name . ' - ' . $item->countryinfo->name);
     }
     if ($mainframe->getCfg('MetaAuthor') == '1') {
         $mainframe->addMetaTag('author', $item->author);
     }
     $mdata = new JParameter($item->metadata);
     $mdata = $mdata->toArray();
     foreach ($mdata as $k => $v) {
         if ($v) {
             $document->setMetadata($k, $v);
         }
     }
     $print_link = JRoute::_('index.php?view=hotel&id=' . $item->slug . '&pop=1&tmpl=component');
     if (isset($item->facilitylist)) {
         $i = 0;
         $facilityList = '<div id="dropdown_3columns">';
         foreach ($item->facilitylist as $facility) {
             $imagelink = JURI::base() . 'images/hotelguide/pictogram/' . $facility->pictogram;
             $facilityList .= '<div class="col_1" style="width:22%">';
             if (strlen(strip_tags($facility->name)) > 25) {
                 $facilityList .= '<p style="height:30px; line-height:14px; display:inline"><img src="' . $imagelink . '" width="19px" height="19px" class="img_left imgshadow" style="padding:1px;" align="left" alt="' . $facility->name . '" />';
             } else {
                 //$facilityList .= '<p style="height:30px; line-height:30px; display:inline"><img src="'.$imagelink. '" width="19px" height="19px" class="img_left imgshadow" style="padding:1px;" align="left" alt="'.$facility->name.'" />';
                 $facilityList .= '<p style="height:30px; line-height:18px; display:inline"><img src="' . $imagelink . '" width="19px" height="19px" class="img_left imgshadow" style="padding:1px;" align="left" alt="' . $facility->name . '" />';
             }
             $facilityList .= $facility->name . '</p></div>';
             if ($i == 3) {
                 $i = 0;
                 $facilityList .= '<div style="clear:both;"></div>' . "\n";
             } else {
                 $i++;
             }
         }
         $facilityList .= "</div>";
     }
     /*		
     		if ($item->roomfacilities) {
     			$db->setQuery( "SELECT * FROM #__hg_roomfacilities WHERE id IN (".$item->roomfacilities.") ORDER BY name ASC");
     			$roomfacilities = $db->loadObjectList();
     	
     			if ($db->getErrorNum()) 
     			{
     				return $db->getErrorMsg();
     			}
     
     			$roomfacilityList = '<div id="list_wrapper"><ul class="multiple_columns">' . "\n";
     			foreach ( $roomfacilities as $roomfacility )
     			{
     				$roomfacilityList .= '<li>';
     				$roomfacilityList .= $roomfacility->name;
     				$roomfacilityList .='</li>' . "\n";
     			}
     			$roomfacilityList .= '</ul></div>' . "\n";
     			$roomfacilityList .= '<div style="clear:both;padding-bottom:10px;"></div>' . "\n";
     		}
     */
     $modelcity =& $this->getModel('city');
     $modelcity->setId($item->city);
     $modelcity->setState('limit', 1000);
     $hotelitems = $modelcity->getData();
     $totalhotels = 0;
     /*$hotelList = '<ul id="menu" style="margin-bottom:10px">' . "\n";
     		$hotelList .= '<li><a href="#" class="drop">'.JText::_('HG_OTHER_ACCOMMODATIONS').'</a>' . "\n";
     		$hotelList .= '<div class="dropdown_4columns">' . "\n";
     		$i = 0;
     		foreach ( $hotelitems as $hotel ) {
     			if ($hotel->id == $item->id) continue;
     			$link =  JRoute::_( hotelguideHelperRoute::getItemRoute($hotel->slug));
     				
     			if ($hotel->mainimage)
     				$imagelink = JURI::base() .'images/hotelguide/gallery/hotel_'.$hotel->id.'/smallcrop/' .$hotel->mainimage;
     			else
     				$imagelink = JURI::base() .'/components/com_hotelguide/assets/images/no_list.gif';
     
     			$hotelList .= '<div class="col_1" style="height:34px; overflow:hidden;">';
     			if (strlen(strip_tags($hotel->title)) > 22) {
     				$hotel->text = substr($hotel->text, 0, 30);
     				$hotel->text = trim($hotel->text) . "...\n\n";
     				$hotelList .= '<p style="line-height:16px;"><a href="'.$link.'"><img src="'.$imagelink.'" width="20px" class="img_left imgshadow" align="left" alt="'.$hotel->title.'" />';
     			} else {
     				$hotelList .= '<p style="line-height:32px;"><a href="'.$link.'"><img src="'.$imagelink.'" width="20px" class="img_left imgshadow" align="left" alt="'.$hotel->title.'" />';
     			}
     			$hotelList .= JText::_($hotel->title).'</a></p></div>';
     				
     			$i++;
     			if ($i == 4) {
     				$hotelList .= '<div style="clear:both;"></div>' . "\n"; 
     				$i = 0;
     			}  
     			$totalhotels++;
     		} 
     		$hotelList .= '</div></li>' . "\n";	
     		
     		if ($user->id > 0) {
     			$hotelList .= '<li>'.hg_html::favoure( $item, $favoured ).'</li>' . "\n";
     			$hotelList .= '<li>'.hg_html::favourites().'</li>' . "\n";
     //			$hotelList .= '<li class="dif">'.hg_html::registerhotel().'<b class="s4"></b>' . "\n";
     		}
     		$hotelList .= '<li>'.hg_html::search().'</li>' . "\n";
     		
     		$hotelList .= '</ul>' . "\n";*/
     $modelreview =& $this->getModel('Userrates');
     $modelreview->setId($item->id);
     $testimonials = $modelreview->getTestimonial();
     $totaltestimonials = $modelreview->getTotalTestimonials();
     $edittestimonials = $modelreview->getEditTestimonial();
     $editor =& JFactory::getEditor();
     $lan = substr($lang->_lang, 0, 2);
     $this->assignRef('hgconf', $hgconf);
     $this->assignRef('db', $db);
     $this->assignRef('url', $url);
     $this->assignRef('user', $user);
     $this->assignRef('document', $document);
     $this->assignRef('a_lang', $a_lang);
     $this->assignRef('model', $model);
     $this->assignRef('item', $item);
     $this->assignRef('rooms', $rooms);
     $this->assignRef('categories', $categories);
     $this->assignRef('restaurants', $restaurants);
     $this->assignRef('spas', $spas);
     $this->assignRef('promotions', $promotions);
     $this->assignRef('galleries', $galleries);
     $this->assignRef('user', $user);
     $this->assignRef('params', $params);
     $this->assignRef('print_link', $print_link);
     $this->assignRef('facilityList', $facilityList);
     $this->assignRef('mapdatas', $mapdatas);
     $this->assignRef('directory', $directory);
     $this->assignRef('prevItem', $prevItem);
     $this->assignRef('nextItem', $nextItem);
     $this->assignRef('hotelList', $hotelList);
     $this->assignRef('articles', $articles);
     $this->assignRef('totalhotels', $totalhotels);
     $this->assignRef('task', $task);
     $this->assignRef('lan', $lan);
     $this->assignRef('favourites', $favourites);
     $this->assignRef('favoured', $favoured);
     $this->assignRef('totaltestimonials', $totaltestimonials);
     $this->assignRef('testimonials', $testimonials);
     $this->assignRef('edittestimonials', $edittestimonials);
     /*
     		echo "<pre>";
     		echo "view=";
     		print_r($rooms);
     		echo "</pre>";
     */
     parent::display($tpl);
 }
Ejemplo n.º 10
0
 function getBookingRoute($id)
 {
     //Create the link
     $link = hotelguideHelperRoute::root() . '&amp;view=booking&amp;id=' . $id;
     return $link;
 }
if ($this->states->image) {
    echo '<a href="' . JURI::base() . 'images/hotelguide/states/album/' . $this->states->image . '" rel="lightbox" title="' . $this->states->image . '"><img class="img_left imgshadow" style="padding:4px; margin: 6px 10px 0 0; border-color:' . $this->hgconf->bordercolor . '" src="' . JURI::base() . 'images/hotelguide/states/resize/' . $this->states->image . '" align="left" width="' . $this->states->imagewidth . 'px" height="' . $this->states->imageheight . 'px" alt="' . htmlentities($this->states->name) . '" /></a>';
}
if ($this->states->description != '') {
    echo '<p style="text-align:left">';
    echo $this->states->description;
    echo '</p>';
    echo '<div style="clear:both;"></div>' . "\n";
}
echo '<h3 class="title" style="margin-top:20px">';
echo JText::sprintf('HG_ALL_CITIES_IN', $this->states->name);
echo '</h3>';
echo '<div id="list_wrapper"><ul class="multiple_columns">' . "\n";
foreach ($this->cityname as $city) {
    echo '<li style="width:28%">' . "\n";
    $link = JRoute::_(hotelguideHelperRoute::getCityRoute($city->cityslug));
    echo '<a href="' . $link . '">' . $city->name . '</a>' . "\n";
    echo '</li>' . "\n";
}
echo '</ul></div>' . "\n";
echo '<div style="clear:both;"></div>' . "\n";
if ($this->hgconf->states_links && count($this->sponsors) > 0) {
    echo '<h3 class="title" style="margin:10px 0 0 0; text-align:right;">';
    echo '<span style="font-size:11px; font-weight:normal;">' . JText::_('HG_SPONSOR_LINKS') . '</span>';
    echo '</h3>';
    echo '<div style="clear:both;padding-top:5px;"></div>' . "\n";
    require HOTELGUIDE_VIEWS . DS . 'hotelguide' . DS . 'tmpl' . DS . 'default_sponsors.php';
}
if ($this->hgconf->box == 'None') {
    echo '<div class="clear"></div>' . "\n";
} else {
Ejemplo n.º 12
0
 /**
  * Creates the item page
  *
  * @since 1.0
  */
 function display($tpl = null)
 {
     global $mainframe, $hgconf;
     //initialize variables
     $db = JFactory::getDBO();
     $document =& JFactory::getDocument();
     $menus =& JSite::getMenu();
     $lang =& JFactory::getLanguage();
     $menu = $menus->getActive();
     $uri =& JFactory::getURI();
     $params = $mainframe->getParams('com_hotelguide');
     JHTML::_('behavior.mootools');
     $filter_order = JRequest::getCmd('filter_order', 'i.title');
     $filter_order_Dir = JRequest::getCmd('filter_order_Dir', 'ASC');
     /*
     	$search				= JRequest::getString('search');
     	$search 			= $db->getEscaped( trim(JString::strtolower( $search ) ) );
     	
     	if ($hgconf->tag_search) {
     		$filter_country 	= JRequest::getInt('filter_country', 0);
     		$filter_states 		= JRequest::getInt('filter_states', 0);
     		$filter_city 		= JRequest::getInt('filter_city', 0);
     		$filter_facility	= JRequest::getVar('facility_search', array(), '', 'array');	
     		$filter_type		= JRequest::getVar('type_search', array(), '', 'array');
     	}
     */
     $limitstart = JRequest::getInt('limitstart');
     $limit = $mainframe->getUserStateFromRequest('com_hotelguide.' . $this->getLayout() . '.limit', 'limit', $hgconf->search_limit, 'int');
     /*
     		if ($hgconf->tag_search && ($hgconf->search_option == 1 || $hgconf->search_option == 3 || $hgconf->search_option == 5)) {
     			$document->addScript( $this->baseurl.'/components/com_hotelguide/assets/js/slider.js');	
     			$document->addScript( $this->baseurl.'/components/com_hotelguide/assets/js/jquery-1.4.2.js');
     			$document->addScript( $this->baseurl.'/components/com_hotelguide/assets/js/jquery.dependClass.js');
     			$document->addScript( $this->baseurl.'/components/com_hotelguide/assets/js/jquery.slider-min.js');
     		}
     		
     		if ($hgconf->tag_search && ($hgconf->search_option == 1 || $hgconf->search_option == 5)) {
     			$document->addScript( $this->baseurl.'/components/com_hotelguide/assets/js/datepicker.packed.js');	
     		}
     */
     $model =& $this->getModel();
     $items =& $this->get('Data');
     $tag =& $this->get('Tag');
     $total =& $this->get('Total');
     $alltags = $model->getAlltags($items[0]->user_id, 30);
     $counttags = $model->getLimitTags($items[0]->user_id, 150);
     //set 404 if tag doesn't exist or access isn't permitted
     if (empty($tag)) {
         return JError::raiseError(404, JText::sprintf('Tag #%d not found', $tid));
     }
     $title = JTEXT::_("HG_TAGS") . JTEXT::_(":: ") . $tag->name;
     $params->set('page_title', $title);
     //pathway
     $pathway =& $mainframe->getPathway();
     $pathway->addItem(JText::sprintf('HG_ACCOMMODATIONS_IN', $title));
     //Set Page title
     //		if (!@$item->name) {
     $document->setTitle($params->get('page_title'));
     $document->setMetadata('keywords', $params->get('page_title'));
     //		}
     $max = (int) $alltags[0];
     $min = (int) $alltags[sizeof($alltags) - 1];
     $minsize = 1;
     $maxsize = 10;
     $i = 0;
     $taglists = array();
     foreach ($counttags as $subtag) {
         $taglists[$i]->size = $this->sizer($min, $max, $subtag->no, $minsize, $maxsize);
         $taglists[$i]->name = $subtag->name . '&nbsp;&nbsp;';
         $taglists[$i]->screenreader = JText::sprintf('NR_ITEMS_TAGGED', $subtag->no);
         $taglists[$i]->link = JRoute::_(hotelguideHelperRoute::getTagRoute($subtag->slug));
         $i++;
     }
     //ordering
     $lists = array();
     $lists['filter_order'] = $filter_order;
     $lists['filter_order_Dir'] = $filter_order_Dir;
     //		$lists['search']			= $search;
     $sort_links = array();
     $sort_links[] = $this->sort('HG_POPULARITY', 'hits', $lists['filter_order_Dir'], $lists['filter_order']);
     $sort_links[] = $this->sort('HG_HIGHEST_RATED', 'votes', $lists['filter_order_Dir'], $lists['filter_order']);
     $sort_links[] = $this->sort('HG_NAME', 'title', $lists['filter_order_Dir'], $lists['filter_order']);
     $sort_links[] = $this->sort('HG_TYPE', 'type', $lists['filter_order_Dir'], $lists['filter_order']);
     $modelguide =& $this->getModel('hotelguide');
     if ($hgconf->tag_topdesti) {
         $topdestinations = $modelguide->getTopDestinations($hgconf->tag_top_limit);
     }
     if ($hgconf->tag_desti) {
         $destinations = $modelguide->getDestinations($hgconf->tag_city_limit, $hgconf->tag_hotel_limit);
     }
     // Create the pagination object
     jimport('joomla.html.pagination');
     $pageNav = new JPagination($total, $limitstart, $limit);
     $currentpage = 'tags';
     $this->assign('action', $uri->toString());
     $this->assignRef('items', $items);
     $this->assignRef('tag', $tag);
     $this->assignRef('alltags', $alltags);
     $this->assignRef('taglists', $taglists);
     $this->assignRef('user', $user);
     $this->assignRef('params', $params);
     $this->assignRef('pageNav', $pageNav);
     $this->assignRef('lists', $lists);
     $this->assignRef('hgconf', $hgconf);
     $this->assignRef('sort_links', $sort_links);
     $this->assignRef('topdestinations', $topdestinations);
     $this->assignRef('destinations', $destinations);
     $this->assignRef('filter_country', $filter_country);
     $this->assignRef('filter_states', $filter_states);
     $this->assignRef('filter_city', $filter_city);
     $this->assignRef('filter_rate', $filter_rate);
     $this->assignRef('filter_facility', $filter_facility);
     $this->assignRef('filter_type', $filter_type);
     $this->assignRef('currentpage', $currentpage);
     /*
     		echo "<pre>";
     		echo "view=";
     		print_r($destinations);
     		echo "</pre>";	
     */
     parent::display($tpl);
 }
Ejemplo n.º 13
0
 echo '<div class="colmask">' . "\n";
 $imagewidth = $this->event->imagewidth + 30;
 if ($this->event->image) {
     echo '<div class="leftcol" style="width:' . $imagewidth . 'px">' . "\n";
     echo '<img class="img_left imgshadow" style="padding:4px; margin: 6px 6px; border-color:' . $this->hgconf->bordercolor . '" src="' . JURI::base() . 'images/hotelguide/event/resize/' . $this->event->image . '" align="left" width="' . $this->event->imagewidth . 'px" height="' . $this->event->imageheight . 'px" />';
     if ($this->event->lat) {
         echo '<div class="clear"></div>' . "\n";
         echo '<div class="img_left imgshadow" style="width: ' . $this->event->imagewidth . 'px; padding:4px; margin: 6px 6px; border-color:' . $this->hgconf->bordercolor . '">' . "\n";
         echo '<h2 style="font-size: 1.0em; line-height:1.4em; text-align: center; color: #888; background-color: #1B1B1B; margin:0;">' . JText::_('HG_LOCATION_MAP') . '</h2>' . "\n";
         echo '<div id="map" ><div id="map_canvas" style="width: ' . $this->event->imagewidth . 'px; height: ' . $this->event->imagewidth . 'px; border:none;"></div></div>' . "\n";
         echo '</div>' . "\n";
     }
     echo '</div>' . "\n";
 }
 if ($this->event->description) {
     $link = JRoute::_(hotelguideHelperRoute::getItemRoute($this->event->hotelslug));
     echo '<div class="rightcol" style="margin:10px 0 0 10px">' . "\n";
     if ($this->event->hits > 0) {
         echo '<p><span style="position: absolute; right:0px; font-size:11px;">';
         if ($this->event->hits == 1) {
             echo JText::_('HG_VISIT');
         }
         if ($this->event->hits > 1) {
             echo JText::sprintf('HG_VISITS', $this->event->hits);
         }
         echo '</span></p>' . "\n";
     }
     echo '<ul id="top" class="feature">' . "\n";
     echo '<li class="feature">' . "\n";
     echo '<strong>' . JText::_('HOTEL') . ':&nbsp;</strong>' . "\n";
     echo '<a href="' . $link . '">' . $this->event->hotelname . '</a></li>' . "\n";
Ejemplo n.º 14
0
echo '<div class="content">' . "\n";
echo '<h3 class="title">';
echo JText::_('HG_EVENT_LIST');
echo '</h3>' . "\n";
$k = 0;
if ($this->hgconf->listheight_des > 0) {
    $margin = $this->hgconf->listheight_des;
} else {
    $margin = 80;
}
echo '<div id="itembox">' . "\n";
foreach ($this->events as $sub) {
    if ($sub->published == 0) {
        continue;
    }
    $link = JRoute::_(hotelguideHelperRoute::getEventRoute($sub->slug));
    if ($k == 0) {
        echo '<div class="titlerow" style="height:' . $margin . 'px; background: transparent url(' . JURI::base() . 'components/com_hotelguide/assets/images/back_light.png) 0 0 repeat;">' . "\n";
    } else {
        echo '<div class="titlerow" style="height:' . $margin . 'px; background: transparent url(' . JURI::base() . 'components/com_hotelguide/assets/images/back_dark.png) 0 0 repeat;">' . "\n";
    }
    echo '<div class="leftcell">' . "\n";
    echo '<div class="inner">' . "\n";
    if ($sub->image) {
        echo '<a href="' . $link . '"><img class="img_left imgshadow" style="padding:4px; margin: 6px 10px 6px 0; border-color:' . $this->hgconf->bordercolor . '" style="border-color:' . $this->hgconf->bordercolor . '" src="' . JURI::base() . 'images/hotelguide/event/thumb/' . $sub->image . '" alt="' . htmlentities($sub->title) . '"></a>';
    } else {
        echo '<a href="' . $link . '"><img class="img_left imgshadow" style="padding:4px; margin: 6px 10px 6px 0; border-color:' . $this->hgconf->bordercolor . '" style="border-color:' . $this->hgconf->bordercolor . '" src="' . JURI::base() . 'components/com_hotelguide/assets/images/no_thumb.gif" title="No Image" alt="No Image" ></a>';
    }
    echo '</div>' . "\n";
    echo '</div>' . "\n";
    echo '<div class="centercell">' . "\n";