}); //--> </script> <?php } elseif (count($images) == 1) { ?> <div class="com_bookingforconnector_resource-image"> <img src="<?php echo BFCHelper::getImageUrl('resources', $images[0], 'resource_mono_full'); ?> " /> </div> <?php } ?>
$uri = 'index.php?option=com_bookingforconnector&view=resource'; $db->setQuery('SELECT id FROM #__menu WHERE link LIKE ' . $db->Quote($uri) . ' AND (language=' . $db->Quote($language) . ' OR language=' . $db->Quote('*') . ') AND published = 1 LIMIT 1'); //$itemId = ($db->getErrorNum())? 0 : intval($db->loadResult()); $itemId = intval($db->loadResult()); //------------------- pagina per i l redirect di tutte le risorse //$route = JRoute::_('index.php?option=com_bookingforconnector&view=resource&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName)); if ($itemId != 0) { $route = JRoute::_($uri . '&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName) . '&Itemid=' . $itemId); } else { $route = JRoute::_($uri . '&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName)); } $img = JURI::root() . "components/com_bookingforconnector/assets/images/defaults/default-s6.jpeg"; $imgError = JURI::root() . "components/com_bookingforconnector/assets/images/defaults/default-s6.jpeg"; if ($resource->ImageUrl != '') { $img = BFCHelper::getImageUrlResized('resources', $resource->ImageUrl, 'medium'); $imgError = BFCHelper::getImageUrl('resources', $resource->ImageUrl, 'medium'); } $imageData = $resource->ImageData; $images = array(); $merchantLogoPath = BFCHelper::getImageUrlResized('merchant', $merchant->LogoUrl, 'logomedium'); if ($resource->ImageData != null) { foreach (explode(',', $imageData) as $image) { $images[] = BFCHelper::getImageUrlResized('resources', $image, 'medium'); } } else { $images[] = $img; } ?> <div class="<?php echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL; ?>
var form = option.form; form.submit(); } //--> </script> </fieldset> </form> <div class="com_bookingforconnector-merchantlist"> <?php foreach ($condominiums as $condominium) { $counter = 0; $resourceName = BFCHelper::getLanguage($condominium->Name, $this->language); //$route = JRoute::_('index.php?option=com_bookingforconnector&view=condominium&ResourceId=' . $condominium->CondominiumId . ':' . BFCHelper::getSlug($resourceName)); $imgdefault = JURI::root() . "images/default.jpg"; $imagesPath = BFCHelper::getImageUrlResized('condominium', "[img]", 'condominium_list_default'); $imagesPathError = BFCHelper::getImageUrl('condominium', "[img]", 'condominium_list_default'); if ($itemId != 0) { $route = JRoute::_($uri . '&resourceId=' . $condominium->CondominiumId . ':' . BFCHelper::getSlug($resourceName) . '&Itemid=' . $itemId); } else { $route = JRoute::_($uri . '&resourceId=' . $condominium->CondominiumId . ':' . BFCHelper::getSlug($resourceName) . ''); } ?> <div class="com_bookingforconnector_search-merchant"> <div class="com_bookingforconnector-merchantlist-merchant com_bookingforconnector-merchantlist-merchant-t"> <div class="com_bookingforconnector-merchantlist-merchant-features"> <div class="pull-left"> <a class="com_bookingforconnector-merchantlist-merchant-imgAnchor" href="<?php echo $route; ?> " id="imgAnchor<?php echo $condominium->CondominiumId;
autoScaleSlider: true, arrowsNav:true }); }); //--> </script> <?php } elseif ($merchant != null && $merchant->LogoUrl != '') { ?> <img src="<?php echo BFCHelper::getImageUrlResized('merchant', $merchant->LogoUrl, 'resource_mono_full'); ?> " onerror="this.onerror=null;this.src='<?php echo BFCHelper::getImageUrl('merchant', $merchant->LogoUrl, 'resource_mono_full'); ?> '" /> <?php } else { ?> <img class="" src="<?php echo JURI::base(false); ?> /media/com_bookingfor/images/default.png" /> <?php } ?>
// suppressing any errors } ?> <?php if (count($images) > 0) { ?> <div class="royalSlider rsUni" id="resourcePlanimetrygallery"> <?php foreach ($images as $image) { ?> <a class="rsImg" href="<?php echo BFCHelper::getImageUrl('onsellunits', $image); ?> "><img class="rsTmb" src="<?php echo BFCHelper::getImageUrl('onsellunits', $image, 'onsellunit_gallery_thumb'); ?> "></a> <?php } ?> </div> <script type="text/javascript"> <!-- jQuery(document).ready(function() { jQuery('#resourcePlanimetrygallery').royalSlider({ fullscreen: { enabled: true, nativeFS: true },
<?php global $base_url; $maxItemsView = 3; $language = "en-gb"; $onlystay = $_SESSION['search.params']['onlystay'] ?: true; $img = $base_url . "/" . drupal_get_path('module', 'bfi') . "/images/default.png"; $imgError = $base_url . "/" . drupal_get_path('module', 'bfi') . "/images/default.png"; $merchantLogo = $base_url . "/" . drupal_get_path('module', 'bfi') . "/images/default.png"; $offersDefault = $base_url . "/" . drupal_get_path('module', 'bfi') . "/images/offertDefault.jpg"; $resourceImageUrl = $base_url . "/" . drupal_get_path('module', 'bfi') . "/images/default.png"; $merchantImageUrl = $base_url . "/" . drupal_get_path('module', 'bfi') . "/images/DefaultLogoList.jpg"; $resourceLogoPath = BFCHelper::getImageUrlResized('resources', "[img]", 'resource_list_default'); $resourceLogoPathError = BFCHelper::getImageUrl('resources', "[img]", 'resource_list_default'); $merchantLogoPath = BFCHelper::getImageUrlResized('merchant', "[img]", 'resource_list_merchant_logo'); $merchantLogoPathError = BFCHelper::getImageUrl('merchant', "[img]", 'resource_list_merchant_logo'); $offersDefault = $base_url . "/" . drupal_get_path('module', 'bfi') . "/images/offertDefault.jpg"; $filters = null; $filtersstars = null; if (!empty($_SESSION['search.params']['filters'])) { $filters = $_SESSION['search.params']['filters']; if (!empty($filters['stars'])) { $filtersstars = $filters['stars']; } } $routeRating = ''; $routeInfoRequest = ''; ?> <div class="com_bookingforconnector-resourcelist"> <?php foreach ($items as $result) {
"; //var imgPath = "<?php echo $merchantLogoPath; ?> "; //var imgPathError = "<?php echo $merchantLogoPathError; ?> "; var strAddress = "[indirizzo] - [cap] - [comune] ([provincia])"; var imgPathMG = "<?php echo BFCHelper::getImageUrlResized('merchantgroup', '[img]', 'merchant_merchantgroup'); ?> "; var imgPathMGError = "<?php echo BFCHelper::getImageUrl('merchantgroup', '[img]', 'merchant_merchantgroup'); ?> "; var cultureCodeMG = '<?php echo $language; ?> '; var defaultcultureCodeMG = '<?php echo BFCHelper::$defaultFallbackCode; ?> '; var defaultcultureCode = '<?php echo BFCHelper::$defaultFallbackCode; ?> ';
// No direct access to this file defined('_JEXEC') or die('Restricted access'); $document = JFactory::getDocument(); $language = $document->getLanguage(); $cols = $params->get('itemspage', 4); $carouselid = uniqid(); $document->addScriptDeclaration("\njQuery(document).ready(function() {\n\tjQuery('#{$carouselid} .item').each(function(){\n\t var next = jQuery(this).next();\n\t if (!next.length) {\n\t\tnext = jQuery(this).siblings(':first');\n\t }\n\t next.children(':first-child').clone().appendTo(jQuery(this));\n\t \n\t for (var i = 0;i < ({$cols} - 2); i++) {\n\t\tnext=next.next();\n\t\tif (!next.length) {\n\t\t\tnext = jQuery(this).siblings(':first');\n\t\t}\n\t\tnext.children(':first-child').clone().appendTo(jQuery(this));\n\t }\n\t});\n});\n"); $db = JFactory::getDBO(); $lang = JFactory::getLanguage()->getTag(); $uriMerchant = 'index.php?option=com_bookingforconnector&view=merchantdetails'; $currModID = uniqid('merchantdetails'); $db->setQuery('SELECT id FROM #__menu WHERE link LIKE ' . $db->Quote($uriMerchant . '%') . ' AND (language=' . $db->Quote($language) . ' OR language=' . $db->Quote('*') . ') AND published = 1 LIMIT 1'); $itemIdMerchant = $db->getErrorNum() ? 0 : intval($db->loadResult()); $merchantImageUrl = Juri::root() . "components/com_bookingforconnector/assets/images/defaults/default-s6.jpeg"; $merchantImagePath = BFCHelper::getImageUrlResized('merchant', "[img]", 'small'); $merchantImagePathError = BFCHelper::getImageUrl('merchant', "[img]", 'small'); if ($itemIdMerchant != 0) { $formAction = JRoute::_('index.php?Itemid=' . $itemIdMerchant); } else { $formAction = JRoute::_($uriMerchant); } $tags = $params->get('tags'); $maxitems = $params->get('maxitems', 10); $merchants = BFCHelper::getMerchantsExt($tags, 0, $maxitems); if (count($merchants) > 0) { ?> <div id="<?php echo $carouselid; ?>
<?php if (count($images) > 0) { ?> <div class="royalSlider rsUni" id="resourcePlanimetrygallery"> <?php foreach ($images as $image) { ?> <a class="rsImg" href="<?php echo BFCHelper::getImageUrlResized('merchant', $image, ''); ?> "><img class="rsTmb" src="<?php echo BFCHelper::getImageUrlResized('merchant', $image, 'resource_gallery_thumb'); ?> " onerror="this.onerror=null;this.src='<?php echo BFCHelper::getImageUrl('merchant', $image, 'resource_gallery_thumb'); ?> '" /></a> <?php } ?> </div> <script type="text/javascript"> <!-- jQuery(document).ready(function() { jQuery('#resourcePlanimetrygallery').royalSlider({ fullscreen: { enabled: true, nativeFS: true },
//$resourceName = BFCHelper::getLanguage($resource->Name, $this->language); $resourceName = BFCHelper::getLanguage($resource->Name, $this->language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags')); $resourceDescription = BFCHelper::getLanguage($resource->Description, $this->language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags')); $route = JRoute::_('index.php?option=com_bookingforconnector&view=onsellunit&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName)); $typeName = BFCHelper::getLanguage($resource->CategoryName, $this->language); $zone = $resource->LocationZone; $location = $resource->LocationName; $contractType = $resource->ContractType ? JTEXT::_('COM_BOOKINGFORCONNECTOR_VIEWS_ONSELLUNIT_CONTRACTTYPE1') : JTEXT::_('COM_BOOKINGFORCONNECTOR_VIEWS_ONSELLUNIT_CONTRACTTYPE'); $img = JURI::root() . "images/default.png"; $imgError = JURI::root() . "images/default.png"; if ($resource->ImageUrl != '') { $img = BFCHelper::getImageUrlResized('onsellunits', $resource->ImageUrl, 'onsellunit_map_default'); $imgError = BFCHelper::getImageUrl('onsellunits', $resource->ImageUrl, 'onsellunit_map_default'); } elseif ($merchant->LogoUrl != '') { $img = BFCHelper::getImageUrlResized('merchant', $merchant->LogoUrl, 'onsellunit_map_default'); $imgError = BFCHelper::getImageUrl('merchant', $merchant->LogoUrl, 'onsellunit_map_default'); } //-------------------pagina per i l redirect di tutte le risorse in vendita $db = JFactory::getDBO(); $uri = 'index.php?option=com_bookingforconnector&view=onsellunit'; $db->setQuery('SELECT id FROM #__menu WHERE link LIKE ' . $db->Quote($uri) . ' AND (language=' . $db->Quote($language) . ' OR language=' . $db->Quote('*') . ') AND published = 1 LIMIT 1'); $itemId = $db->getErrorNum() ? 0 : intval($db->loadResult()); //-------------------pagina per i l redirect di tutte le risorsein vendita //-------------------pagina per il redirect di tutti i merchant $uriMerchant = 'index.php?option=com_bookingforconnector&view=merchantdetails'; $db->setQuery('SELECT id FROM #__menu WHERE link LIKE ' . $db->Quote($uriMerchant . '%') . ' AND (language=' . $db->Quote($language) . ' OR language=' . $db->Quote('*') . ') AND published = 1 LIMIT 1'); $itemIdMerchant = $db->getErrorNum() ? 0 : intval($db->loadResult()); //-------------------pagina per il redirect di tutti i merchant //$route = JRoute::_('index.php?option=com_bookingforconnector&view=onsellunit&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName)); if ($itemId != 0) { $uri .= '&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName) . '&Itemid=' . $itemId;
slideshow: true }); }); //--> </script> <?php } elseif (count($images) == 1) { ?> <div class="com_bookingforconnector_resource-image"> <img src="<?php echo BFCHelper::getImageUrl('resources', $images[0], 'resource_mono_full'); ?> " /> </div> <?php } elseif ($resource->Merchant != null && $resource->Merchant->LogoUrl != '') { ?> <img src="<?php echo BFCHelper::getImageUrl('merchant', $resource->Merchant->LogoUrl, 'resource_list_default_logo'); ?> " /> <?php } else { ?> <img class="com_bookingforconnector_resource-img" src="/media/com_bookingfor/images/default.png" /> <?php } ?>
var imgPath = "<?php echo $merchantImagePath; ?> "; var imgPathError = "<?php echo $merchantImagePathError; ?> "; var strAddress = "[indirizzo] - [cap] - [comune] ([provincia])"; var imgPathMG = "<?php echo BFCHelper::getImageUrlResized('tag', '[img]', 'tag24'); ?> "; var imgPathMGError = "<?php echo BFCHelper::getImageUrl('tag', '[img]', 'tag24'); ?> "; var cultureCodeMG = '<?php echo $language; ?> '; var defaultcultureCodeMG = '<?php echo BFCHelper::$defaultFallbackCode; ?> '; var strRatingNoResult = "<?php echo JTEXT::_('COM_BOOKINGFORCONNECTOR_DEFAULT_RATING_NO_RESULT'); ?> ";
if (!empty($resource->AddressData)) { $arrData[] = $resource->AddressData; } //} //if(!empty($zone)){ // $arrData[] = ($zone); //} //if(!empty($location)){ // $arrData[] = ($location); //} $addressData = implode(" - ", $arrData); $resourceImageUrl = JURI::base() . "media/com_bookingfor/images/default.png"; if ($resource->ImageUrl != '') { $resourceImageUrl = BFCHelper::getImageUrl('condominiums', $resource->ImageUrl, 'condominium_map_default'); } elseif ($merchant->LogoUrl != '') { $resourceImageUrl = BFCHelper::getImageUrl('merchant', $merchant->LogoUrl, 'condominium_map_default'); } //-------------------pagina per i l redirect di tutte le risorse in vendita $db = JFactory::getDBO(); $uri = 'index.php?option=com_bookingforconnector&view=condominium'; $db->setQuery('SELECT id FROM #__menu WHERE link LIKE ' . $db->Quote($uri) . ' AND (language=' . $db->Quote($language) . ' OR language=' . $db->Quote('*') . ') AND published = 1 LIMIT 1'); $itemId = $db->getErrorNum() ? 0 : intval($db->loadResult()); //-------------------pagina per i l redirect di tutte le risorsein vendita //-------------------pagina per il redirect di tutti i merchant $uriMerchant = 'index.php?option=com_bookingforconnector&view=merchantdetails'; $db->setQuery('SELECT id FROM #__menu WHERE link LIKE ' . $db->Quote($uriMerchant . '%') . ' AND (language=' . $db->Quote($language) . ' OR language=' . $db->Quote('*') . ') AND published = 1 LIMIT 1'); $itemIdMerchant = $db->getErrorNum() ? 0 : intval($db->loadResult()); //-------------------pagina per il redirect di tutti i merchant //$route = JRoute::_('index.php?option=com_bookingforconnector&view=condominium&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName)); if ($itemId != 0) { $uri .= '&resourceId=' . $resource->CondominiumId . ':' . BFCHelper::getSlug($resourceName) . '&Itemid=' . $itemId;
// echo "</pre>"; ?> <div class="com_bookingforconnector-merchantlist-merchant com_bookingforconnector-merchantlist-merchant-t<?php echo $merchant->MerchantTypeId; ?> "> <div class="com_bookingforconnector-merchantlist-merchant-features"> <div class="pull-left"> <?php if ($merchant->LogoUrl != '') { ?> <a class="com_bookingforconnector-merchantlist-merchant-imgAnchor" href="<?php echo $route; ?> "><img class="com_bookingforconnector-merchantlist-logo" src="<?php echo BFCHelper::getImageUrl('merchant', $merchant->LogoUrl, 'merchant_list_default'); ?> " /></a> <?php } else { ?> <a class="com_bookingforconnector-merchantlist-merchant-imgAnchor" href="<?php echo $route; ?> "><img class="com_bookingforconnector-merchantlist-logo" src="<?php echo JURI::base(); ?> images/default.png" /></a> <?php } ?>
<?php } ?> </ul> </div> <div id="carouselResource" class="flexslider"> <ul class="slides"> <?php foreach ($images as $image) { ?> <li> <img src="<?php echo BFCHelper::getImageUrlResized('resources', $image, 'resource_gallery_thumb_rapidview'); ?> " onerror="this.onerror=null;this.src='<?php echo BFCHelper::getImageUrl('resources', $image, 'resource_gallery_thumb_rapidview'); ?> '" /> </li> <?php } ?> </ul> </div> </div> <?php } else { ?> <div id="gallery" > <div id="sliderResource" class="flexslider"> <ul class="slides">
var slider = jQuery('#resourcegallery').data('royalSlider'); slider.exitFullscreen = function(preventNative) { jQuery.rsProto.exitFullscreen.call(this, preventNative); jQuery('#resourcegallery').hide(); }; slider.enterFullscreen = function(preventNative) { jQuery.rsProto.enterFullscreen.call(this, preventNative); jQuery('#resourcegallery').show(); }; jQuery('.launch-fullscreen').click(function() { jQuery('#resourcegallery').royalSlider('enterFullscreen'); }); jQuery('.showall').click(function() { jQuery('#resourcegallery').royalSlider('enterFullscreen'); }); }); //--> </script> <?php } elseif ($merchant != null && $merchant->LogoUrl != '') { ?> <img src="<?php echo BFCHelper::getImageUrlResized('merchant', $merchant->LogoUrl, 'big'); ?> " onerror="this.onerror=null;this.src='<?php echo BFCHelper::getImageUrl('merchant', $merchant->LogoUrl, 'big'); ?> '" /> <?php } ?>
echo BFCHelper::getImageUrl('onsellunits', $image, 'resource_gallery_thumb_rapidview'); ?> " /> </li> <?php } ?> </ul> </div> </div> <?php } elseif (count($images) == 1) { ?> <div class="com_bookingforconnector_resource-image"> <img src="<?php echo BFCHelper::getImageUrl('onsellunits', $images[0], 'resource_mono_full_rapidview'); ?> " /> </div> <?php } ?> </div> <div class="<?php echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL; ?> 6" id="divmapstatic"> <img src="<?php echo Juri::base(); ?> images/nomap.jpg" alt="nomap.jpg" style="max-width:100%;" />
if ($zoneiddefault != 0 && $lz == $zoneiddefault) { $locationZoneSelectedName = $lz; } $listlocationZones[] = JHTML::_('select.option', $lz); } } } $listsId = array(); $resourceImageUrl = Juri::root() . "components/com_bookingforconnector/assets/images/defaults/default-s6.jpeg"; $merchantLogoUrl = Juri::root() . "components/com_bookingforconnector/assets/images/defaults/default-s1.jpeg"; $resourceLogoPath = BFCHelper::getImageUrlResized('onsellunits', "[img]", 'medium'); $resourceLogoPathError = BFCHelper::getImageUrl('onsellunits', "[img]", 'medium'); $merchantImageUrl = Juri::root() . "components/com_bookingforconnector/assets/images/defaults/default-s6.jpeg"; $merchantLogoUrl = Juri::root() . "components/com_bookingforconnector/assets/images/defaults/default-s6.jpeg"; $merchantLogoPath = BFCHelper::getImageUrlResized('merchant', "[img]", 'logomedium'); $merchantLogoPathError = BFCHelper::getImageUrl('merchant', "[img]", 'logomedium'); $merchantId = $this->params['merchantId']; if (isset($merchantId) && $merchantId > 0) { $merchant = BFCHelper::getMerchantFromServicebyId($merchantId); $route = JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&merchantId=' . $merchant->MerchantId . ':' . BFCHelper::getSlug($resource->MerchantName)); ?> <h3 class="mod_bookingforconnector_merchantdetails-menuTitle"><a href="<?php echo $route; ?> " class="item"><span class="fn org"><?php echo ""; ?> </span></a></h3> <?php } //-------------------pagina per i l redirect di tutte le risorse in vendita
</span> </span> </h3> <div style="clear:both;"></div> <div > <?php $merchantgroups = BFCHelper::getMerchantGroups(); $merchantGroupIdList = explode(",", $merchant->MerchantGroupIdList); $html = ""; if (isset($merchantgroups)) { $html .= '<span class="bfcmerchantgroup">'; foreach ($merchantgroups as $merchantgroup) { if (!empty($merchantgroup->ImageUrl) && in_array($merchantgroup->MerchantGroupId, $merchantGroupIdList)) { $name = BFCHelper::getLanguage($merchantgroup->Name, $language); $imageurl = BFCHelper::getImageUrlResized('merchantgroup', $merchantgroup->ImageUrl, 'merchant_merchantgroup'); $imageurlError = BFCHelper::getImageUrl('merchantgroup', $merchantgroup->ImageUrl, 'merchant_merchantgroup'); $image = '<img src="' . $imageurl . '" alt="' . $name . '" title="' . $name . '" onerror="this.onerror=null;this.src=\'' . $imageurlError . ' \'" />'; $html .= $image; } } $html .= '</span>'; } echo $html; ?> </div> <table class="mod_bookingforconnector-resource-table" cellspacing="0" cellpadding="0" border="0"> <tr> <td class="mod_bookingforconnector-resource-table-label noborder"><?php echo 'Address'; ?> :</td>
$addressData = $resource->AddressData; // if ($addressData == null || $addressData == ''){ // $merchantAddressData = $merchant->AddressData; ////echo ("<pre>"); ////echo (print_r($merchant)); ////echo ("</pre>"); // $addressData = sprintf("%s - %s - %s (%s)",BFCHelper::getItem($merchantAddressData, 'indirizzo'), BFCHelper::getItem($merchantAddressData, 'cap'), BFCHelper::getItem($merchantAddressData, 'comune'), BFCHelper::getItem($merchantAddressData, 'provincia') ); // } $resourceLat = $resource->XGooglePos; $resourceLon = $resource->YGooglePos; $showResourceMap = $resourceLat != null && $resourceLon != null; // $route = JRoute::_('index.php?option=com_bookingforconnector&view=resource&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName)); // $routeMerchant = JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&merchantId=' . $merchant->MerchantId . ':' . BFCHelper::getSlug($merchant->Name)); $resourceImageUrl = JURI::root() . "images/default.jpg"; if ($resource->ImageUrl != '') { $resourceImageUrl = BFCHelper::getImageUrl('condominium', $resource->ImageUrl, 'condominium_list_default'); // }elseif ($merchant->LogoUrl != ''){ // $resourceImageUrl = BFCHelper::getImageUrl('merchant',$merchant->LogoUrl, 'resource_list_default_logo'); } // $stay = $resource->Stay; if ($itemId != 0) { $route = JRoute::_($uri . '&resourceId=' . $resource->CondominiumId . ':' . BFCHelper::getSlug($resourceName) . '&Itemid=' . $itemId); } else { $route = JRoute::_($uri . '&resourceId=' . $resource->CondominiumId . ':' . BFCHelper::getSlug($resourceName)); } // if($isportal){ // if ($itemIdMerchant<>0) // $uriMerchant.='&merchantId=' . $resource->MerchantId . ':' . BFCHelper::getSlug($merchant->Name).'&Itemid='.$itemIdMerchant; // else // $uriMerchant.='&merchantId=' . $resource->MerchantId . ':' . BFCHelper::getSlug($merchant->Name); // }
<?php $merchant = $this->item; $offer = $this->item->currentOffer; $offerName = BFCHelper::getLanguage($offer->Name, $this->language); $offer->OfferId = $offer->PackageId; $offer->Price = $offer->Value; $route = JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&layout=offer&merchantId=' . $merchant->MerchantId . ':' . BFCHelper::getSlug($merchant->Name) . '&offerId=' . $offer->OfferId . ':' . BFCHelper::getSlug($offerName)); $img = JURI::root() . "media/com_bookingfor/images/default.png"; $imgError = JURI::root() . "media/com_bookingfor/images/default.png"; if ($offer->DefaultImg != '') { $img = BFCHelper::getImageUrlResized('offers', $offer->DefaultImg, 'offer_list_default'); $imgError = BFCHelper::getImageUrl('offers', $offer->DefaultImg, 'offer_list_default'); } elseif ($merchant->LogoUrl != '') { $img = BFCHelper::getImageUrlResized('merchant', $merchant->LogoUrl, 'resource_list_default_logo'); $imgError = BFCHelper::getImageUrl('merchant', $merchant->LogoUrl, 'resource_list_default_logo'); } ?> <div class="com_bookingforconnector_search-resource"> <div class="com_bookingforconnector_merchantdetails-resource com_bookingforconnector_merchantdetails-resource-t"> <div class="com_bookingforconnector_merchantdetails-resource-features"> <a class="com_bookingforconnector_resource-imgAnchor" href="<?php echo $route; ?> "><img class="com_bookingforconnector_resource-img" src="<?php echo $img; ?> " onerror="this.onerror=null;this.src='<?php echo $imgError; ?> '" /></a>
}); }); //--> </script> <?php } elseif (count($images) == 1) { ?> <div class="com_bookingforconnector_resource-image"> <img src="<?php echo BFCHelper::getImageUrl('onsellunits', $images[0], 'onsellunit_mono_full'); ?> " /> </div> <?php } elseif ($resource->Merchant != null && $resource->Merchant->LogoUrl != '') { ?> <img src="<?php echo BFCHelper::getImageUrl('merchant', $resource->Merchant->LogoUrl, 'onsellunit_default_logo'); ?> " /> <?php } else { ?> <img class="com_bookingforconnector_resource-img" src="/media/com_bookingfor/images/default.png" /> <?php } ?>
$db->setQuery('SELECT id FROM #__menu WHERE link LIKE ' . $db->Quote($uriMerchant . '%') . ' AND (language=' . $db->Quote($language) . ' OR language=' . $db->Quote('*') . ') AND published = 1 LIMIT 1'); $itemIdMerchant = intval($db->loadResult()); } if ($itemId == 0) { $itemId = $itemIdMerchant; } $img = JURI::root() . "components/com_bookingforconnector/assets/images/defaults/default-s6.jpeg"; $imgError = JURI::root() . "components/com_bookingforconnector/assets/images/defaults/default-s6.jpeg"; $merchantLogo = Juri::root() . "components/com_bookingforconnector/assets/images/defaults/default-s1.jpeg"; $merchantLogoError = Juri::root() . "components/com_bookingforconnector/assets/images/defaults/default-s1.jpeg"; $merchantImageUrl = Juri::root() . "components/com_bookingforconnector/assets/images/defaults/default-s6.jpeg"; $merchantLogoUrl = Juri::root() . "components/com_bookingforconnector/assets/images/defaults/default-s6.jpeg"; $merchantLogoPath = BFCHelper::getImageUrlResized('merchant', "[img]", 'logomedium'); $merchantLogoPathError = BFCHelper::getImageUrl('merchant', "[img]", 'logomedium'); $merchantImagePath = BFCHelper::getImageUrlResized('condominium', "[img]", 'medium'); $merchantImagePathError = BFCHelper::getImageUrl('condominium', "[img]", 'medium'); $url = JFactory::getURI()->toString(); $action = $url; $hidesort = ""; if (!empty($this->hidesort)) { $hidesort = ' style="display:none;"'; } ?> <div class="com_bookingforconnector-search-menu"> <form action="<?php echo $action; ?> " method="post" name="bookingforsearchForm" id="bookingforsearchFilterForm"> <fieldset class="filters"> <input type="hidden" class="filterOrder" name="filter_order" value="<?php echo $listOrder;
function search_availability() { bfi_get_locale(); if (!isset($_REQUEST['task'])) { unset($_SESSION['search.filterparams']); setSessionFromSubmittedData(); $page = isset($_REQUEST['page']) ? $_REQUEST['page'] : 1; $num_per_page = 20; $start = ($page - 1) * $num_per_page; $searchmodel = new BookingForConnectorModelSearch(); $items = $searchmodel->getItems(false, false, $start); $items = is_array($items) ? $items : array(); $total = 0; if (!empty($_SESSION['search.results']) && !empty($_SESSION['search.results']['totalresultcount'])) { $total = $_SESSION['search.results']['totalresultcount']; } $pages = ceil($total / $num_per_page); $output = ''; $output = $output . '<div id="bfcmerchantlist"><div id="searchitems" rel="' . htmlspecialchars(json_encode($items)) . '"></div> <div class="resourcetabmenu"> <a class="resources" rel="resources"><i class="fa fa-list-ul"></i> ' . __('List', 'bfi') . '</a><a id="maptab" class="mappa" rel="mappa"> ' . __('Map', 'bfi') . '</a> </div> <div class="resourcetabcontainer"> <div id="resources" class="tabcontent"> <div class="com_bookingforconnector-merchantlist">'; echo $output; $merchant_ids = ''; if ($_SESSION['search.params']['merchantResults']) { $resource_ids = array(); if (is_array($items)) { $merchant_ids = array(); foreach ($items as $merchant) { $merchant_ids[] = $merchant->MerchantId; } $merchant_ids = implode(',', $merchant_ids); } echo '<div id="idsforajax" rel="' . $merchant_ids . '"></div>'; include 'templates/search-listing.php'; } else { $resource_ids = array(); foreach ($items as $resource) { $resource_ids[] = $resource->ResourceId; } $resource_ids = implode(',', $resource_ids); echo '<div id="idsforajax" rel="' . $resource_ids . '"></div>'; include 'templates/search-listing-resources.php'; } $output = ''; $output = $output . '</div> </div> <div id="mappa" class="tabcontent"> <div id="map_canvassearch" class="searchmap" style="width:100%; min-height:400px"></div> </div>'; $url = $_SERVER['REQUEST_URI']; $pagination_args = array('base' => $url . '%_%', 'format' => '&page=%#%', 'total' => $pages, 'current' => $page, 'show_all' => false, 'end_size' => 5, 'mid_size' => 2, 'prev_next' => true, 'prev_text' => __('«'), 'next_text' => __('»'), 'type' => 'plain', 'add_args' => false, 'add_fragment' => ''); $paginate_links = paginate_links($pagination_args); if ($paginate_links) { echo "<nav class='custom-pagination'>"; // echo "<span class='page-numbers page-num'>Page " . $page . " of " . $numpages . "</span> "; echo "<span class='page-numbers page-num'>" . __('Page', 'bfi') . " </span> "; print $paginate_links; echo "</nav>"; } $output = $output . "</div></div>"; echo $output; } else { $task = $_REQUEST['task']; if ($task == 'GetMerchantsByIds') { $lists = $_REQUEST['merchantsId']; $merchants = BFCHelper::getMerchantsByIds($lists, $GLOBALS['bfi_lang']); die($merchants); } else { if ($task == 'getMerchantGroups') { $merchantgroups = BFCHelper::getMerchantGroups(); wp_send_json($merchantgroups); } else { if ($task == 'GetPhoneByMerchantId') { $merchantId = $_REQUEST['merchantid']; $language = $GLOBALS['bfi_lang']; $phno = BFCHelper::GetPhoneByMerchantId($merchantId, $language); wp_send_json($phno); } else { if ($task == 'GetResourcesByIds') { $lists = $_REQUEST['resourcesId']; $language = $GLOBALS['bfi_lang']; $resources = BFCHelper::GetResourcesByIds($lists, $language); @header('Content-Type: application/json; charset=' . get_option('blog_charset')); echo $resources; die; } else { if ($task == 'getmarketinfo') { $base_url = get_site_url(); $merchant_id = $_REQUEST['merchantId']; $model = new BookingForConnectorModelMerchantDetails(); $merchant = $model->getItem($merchant_id); $output = '<div class="com_bookingforconnector_map_merchantdetails" style="display:block;height:150px;overflow:auto; width: 300px;"> <div class="com_bookingforconnector_merchantdetails com_bookingforconnector_merchantdetails-t257"> <h3 style="margin:0;" class="com_bookingforconnector_merchantdetails-name"><a class="com_bookingforconnector_merchantdetails-nameAnchor" href="' . $base_url . '/merchant-details/merchantdetails/' . $merchant->MerchantId . '-' . seoUrl($merchant->Name) . '">' . $merchant->Name . '</a> <br/><span class="com_bookingforconnector_merchantdetails-rating com_bookingforconnector_merchantdetails-rating' . $merchant->Rating . '"> <span class="com_bookingforconnector_merchantdetails-ratingText">Rating ' . $merchant->Rating . '</span> </span> </h3> <div class="com_bookingforconnector_merchantdetails-contacts" style="display:none;"> <h3>' . __('Facility contacts data', 'bfi') . '</h3> <div>' . __('Phone', 'bfi') . ': <br/> <!-- Fax: --> </div> </div> </div> </div>'; die($output); } else { if ($task == 'getmarketinforesource') { $base_url = get_site_url(); $resource_id = $_REQUEST['resourceId']; $model = new BookingForConnectorModelResource(); $resource = $model->getItem($resource_id); $merchant = $resource->Merchant; $output = '<div class="com_bookingforconnector_map_merchantdetails" style="display:block;height:150px;overflow:auto; width: 300px;"> <div class="com_bookingforconnector_merchantdetails com_bookingforconnector_merchantdetails-t257"> <h3 style="margin:0;" class="com_bookingforconnector_merchantdetails-name"><a class="com_bookingforconnector_merchantdetails-nameAnchor" href="' . $base_url . '/accommodation-details/resource/' . $resource->ResourceId . '-' . seoUrl($resource->Name) . '">' . $resource->Name . '</a> <br/><span class="com_bookingforconnector_merchantdetails-rating com_bookingforconnector_merchantdetails-rating' . $merchant->Rating . '"> <span class="com_bookingforconnector_merchantdetails-ratingText">Rating ' . $merchant->Rating . '</span> </span> </h3> <div class="com_bookingforconnector_merchantdetails-contacts" style="display:none;"> <h3>' . __('Facility contacts data', 'bfi') . '</h3> <div>' . __('Phone', 'bfi') . ': <br/> Fax: </div> </div> </div> </div>'; die($output); } else { if ($task == 'getmarketinforesourceonsell') { $base_url = get_site_url(); $resource_id = $_REQUEST['resourceId']; $model = new BookingForConnectorModelOnSellUnit(); $resource = $model->getItem($resource_id); $merchant = $resource->Merchant; $resource->Price = $resource->MinPrice; $resourceName = BFCHelper::getLanguage($resource->Name, $language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags')); $resourceDescription = BFCHelper::getLanguage($resource->Description, $language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags')); $zone = $resource->LocationZone; $location = $resource->LocationName; $contractType = $resource->ContractType ? 'contacttype1' : 'contacttype'; // $img = "/images/default.png"; // $imgError = "/images/default.png"; $img = plugins_url("images/default.png", dirname(__FILE__)); $imgError = plugins_url("images/default.png", dirname(__FILE__)); $route = '/merchant-details/sale/' . $resource_id . '-' . seoUrl($resource->Name); if ($resource->ImageUrl != '') { $img = BFCHelper::getImageUrlResized('onsellunits', $resource->ImageUrl, 'onsellunit_map_default'); $imgError = BFCHelper::getImageUrl('onsellunits', $resource->ImageUrl, 'onsellunit_map_default'); } elseif ($merchant->LogoUrl != '') { $img = BFCHelper::getImageUrlResized('merchant', $merchant->LogoUrl, 'onsellunit_map_default'); $imgError = BFCHelper::getImageUrl('merchant', $merchant->LogoUrl, 'onsellunit_map_default'); } ob_start(); include 'templates/onsellmapmarker.php'; $output = ob_get_contents(); ob_end_clean(); die($output); } } } } } } } } }
// } // $services = implode(', ',$tmpservices); //} //$resource->Price /**** for search similar *****/ //add counter $model = new BookingForConnectorModelOnSellUnit(); $retCounter = $model->setCounterByResourceId($resource->ResourceId, "details", $language); //BFCHelper::setState($resource->Merchant, 'merchant', 'merchant'); //-------------------pagina per il redirect di tutte le risorsein vendita $routeMerchant = $base_url . '/merchant-details/merchantdetails/' . $resource->MerchantId . '-' . seoUrl($merchant->Name); $merchantLogo = plugins_url("images/default.png", dirname(__FILE__)); $merchantLogoError = plugins_url("images/default.png", dirname(__FILE__)); if ($merchant->LogoUrl != '') { $merchantLogo = BFCHelper::getImageUrlResized('merchant', $merchant->LogoUrl, 'merchant_logo_small_top'); $merchantLogoError = BFCHelper::getImageUrl('merchant', $merchant->LogoUrl, 'merchant_logo_small_top'); } $addressDataMerchant = $merchant->AddressData; $PlanimetryData = $resource->PlanimetryData; $showResourcePlanimetria = !empty($PlanimetryData); $VideoData = $resource->VideoData; $showResourceVideo = !empty($VideoData); $unitfloor = array('unitfloor_value' => __('ND', 'bfi'), 'unitfloor_value0' => __('Ground floor', 'bfi'), 'unitfloor_value-1' => __('Top floor', 'bfi'), 'unitfloor_value-2' => __('Mansarda', 'bfi'), 'unitfloor_value-3' => __('multi-level', 'bfi')); $centralizedheating = array('centralizedheating_value-2' => __('ND', 'bfi'), 'centralizedheating_value-1' => __('Accounted', 'bfi'), 'centralizedheating_value0' => __('Autonomous', 'bfi'), 'centralizedheating_value1' => __('Centralized', 'bfi')); echo $sellonsearchform; ?> <div class="com_bookingforconnector_resource com_bookingforconnector_resource-mt<?php echo $merchant->MerchantTypeId; ?> com_bookingforconnector_resource-t<?php echo $resource->CategoryId;
} } $route = JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&merchantId=' . $merchant->MerchantId . ':' . BFCHelper::getSlug($merchant->Name)); ?> <div class="mod_bookingforconnector-resource com_bookingforconnector_merchantdetails-t<?php echo $merchant->MerchantTypeId; ?> ""> <?php if ($merchant->LogoUrl != '') { ?> <a href="<?php echo $route; ?> "><img style="float:left;" class="com_bookingforconnector_merchantdetails-logo" src="<?php echo BFCHelper::getImageUrl('merchant', $merchant->LogoUrl, 'merchant_logo_small'); ?> "></a> <?php } else { ?> <a href="<?php echo $route; ?> "><img style="float:left;" class="com_bookingforconnector_merchantdetails-logo" src="<?php echo JURI::base(); ?> /images/default.png" /></a> <?php } ?>