Пример #1
0
//echo "</pre>";
$resourceName = BFCHelper::getLanguage($resource->Name, $this->language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags'));
$uriResource = $uri . '&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName);
if ($itemId != 0) {
    $uriResource .= '&Itemid=' . $itemId;
}
$route = JRoute::_($uriResource);
$merchant = $resource->Merchant;
$uriMerchant .= '&merchantId=' . $merchant->MerchantId . ':' . BFCHelper::getSlug($merchant->Name);
if ($itemIdMerchant != 0) {
    $uriMerchant .= '&Itemid=' . $itemIdMerchant;
}
$routeMerchant = JRoute::_($uriMerchant);
$merchantLogo = JURI::base() . "/media/com_bookingfor/images/default.png";
if ($merchant != null && $merchant->LogoUrl != '') {
    $merchantLogo = BFCHelper::getImageUrlResized('merchant', $merchant->LogoUrl, 'logobig');
}
$this->document->setTitle($resourceName . ' - ' . $merchant->Name);
$this->document->setDescription(BFCHelper::getLanguage($resource->Description, $this->language));
$completestay = null;
$stay = null;
$stayAvailability = 0;
$DiscountedPrice = 0;
$total = 0;
$calPrices = null;
$calPkgs = null;
$selPriceType = null;
$selPriceTags = '';
$priceTypes = $this->PriceTypes;
$calPricesResources = null;
//prezzi calcolari per risorsa e persone
Пример #2
0
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' => __('&laquo;'), 'next_text' => __('&raquo;'), '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);
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
if ($isportal) {
    $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 
  };
  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 ($resource->Merchant != null && $resource->Merchant->LogoUrl != '') {
    ?>
	<img src="<?php 
    echo BFCHelper::getImageUrlResized('merchant', $resource->Merchant->LogoUrl, 'merchant_gallery_full');
    ?>
"  onerror="this.onerror=null;this.src='<?php 
    echo BFCHelper::getImageUrl('merchant', $resource->Merchant->LogoUrl, 'onsellunit_default_logo');
    ?>
'"  />
<?php 
} else {
    ?>
	<img class="com_bookingforconnector_resource-img" style="float:none;" src="<?php 
    echo JURI::base();
    ?>
/media/com_bookingfor/images/default.png" />
<?php 
}
?>
</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';
?>
Пример #6
0
<?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>
//$itemIdFav = ($db->getErrorNum())? 0 : intval($db->loadResult());
$itemIdFav = intval($db->loadResult());
//-------------------pagina per i l redirect di tutte le risorsein vendita
if ($itemIdFav != 0) {
    $routeFav = JRoute::_($uriFav . '&Itemid=' . $itemIdFav);
} else {
    $routeFav = JRoute::_($uriFav);
}
$onchange = 'onchange="setOrdering(this);"';
$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('resources', "[img]", 'medium');
$resourceLogoPathError = BFCHelper::getImageUrl('resources', "[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');
$url = JFactory::getURI()->toString();
//$purl=parse_url($url);
//$oldq=$purl['query'];
//$arrTmp=array();
//parse_str($oldq,$arrTmp); //To array
//
//$arrTmp['onlystay'] = 1;
//$newq = http_build_query($arrTmp);//build again
//$action=str_replace($oldq,$newq,$url);
$action = $url;
$hidesort = "";
if (!empty($this->hidesort)) {
    $hidesort = ' style="display:none;"';
}
    // 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::getImageUrlResized('resources', $image, '');
        ?>
"><img class="rsTmb" src="<?php 
        echo BFCHelper::getImageUrlResized('resources', $image, 'onsellunit_gallery_thumb');
        ?>
" onerror="this.onerror=null;this.src='<?php 
        echo BFCHelper::getImageUrl('resources', $image, 'onsellunit_gallery_thumb');
        ?>
'" /></a>		
	<?php 
    }
    ?>
</div>

<script type="text/javascript">
<!--
jQuery(document).ready(function() {
  jQuery('#resourcePlanimetrygallery').royalSlider({
    fullscreen: {
Пример #9
0
        ?>
		<?php 
        $rating = $merchant->Rating;
        $currUriMerchant = $uriMerchant . '&merchantId=' . $merchant->MerchantId . ':' . BFCHelper::getSlug($merchant->Name);
        if ($itemIdMerchant != 0) {
            $currUriMerchant .= '&Itemid=' . $itemIdMerchant;
        }
        $routeMerchant = JRoute::_($currUriMerchant);
        $currMerchantImageUrl = $merchantImageUrl;
        if (!empty($merchant->DefaultImg)) {
            $currMerchantImageUrl = BFCHelper::getImageUrlResized('merchant', $merchant->DefaultImg, 'small');
        }
        $urls = array();
        if (!empty($merchant->ImageData)) {
            $images = explode(",", $merchant->ImageData);
            $currMerchantImageUrl = BFCHelper::getImageUrlResized('merchant', $images[0], 'small');
            foreach ($images as $i => $url) {
                if (!empty($url)) {
                    $imgLogo = str_replace("[img]", $url, $merchantImagePath);
                    $urls[] = '<div class="item ' . ($i == 0 ? 'active' : '') . '><img src="$imgLogo"></div>';
                }
            }
        }
        ?>
		<div class="item<?php 
        echo $mrcKey == 0 ? " active" : "";
        ?>
 merchant_highlight"><!-- style="padding-left: 5px!important; padding-right: 5px!important; flex:1;"-->
			<div class="<?php 
        echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL . 12 / $cols;
        ?>
    $availability = 0;
    $ribbonofferdisplay = "hidden";
    $classofferdisplay = "";
    $stay = new StdClass();
    $discount = 0;
    $availability = $result->Availability;
    $bookingType = $result->BookingType;
    if ($result->Price < $result->TotalPrice || $result->IsOffer) {
        $ribbonofferdisplay = "";
        $classofferdisplay = "com_bookingforconnector_highlight";
    }
    if (!empty($result->RateplanId)) {
        $route .= "?pricetype=" . $result->RateplanId;
    }
    if (!empty($result->ImageUrl)) {
        $resourceImageUrl = BFCHelper::getImageUrlResized('resources', $result->ImageUrl, 'medium');
    }
    //		$images = array($resourceImageUrl);
    $resource->SimpleDiscountIds = "";
    $resource->DiscountIds = json_decode($resource->DiscountIds);
    if (is_array($resource->DiscountIds) && count($resource->DiscountIds) > 0) {
        $resource->SimpleDiscountIds = implode(',', $resource->DiscountIds);
    }
    $rating = $result->ResRating;
    if ($rating > 10) {
        $rating = $rating / 10;
    }
    ?>
			<div class="<?php 
    echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL;
    ?>
        ?>
"><img class="rsTmb" src="<?php 
        echo BFCHelper::getImageUrlResized('onsellunits', $image, 'onsellunit_gallery_thumb');
        ?>
"></a>		
	<?php 
    }
    ?>
</div>
<?php 
} elseif (count($images) == 1) {
    ?>
<div class="com_bookingforconnector_resource-image">
	<img src="<?php 
    echo BFCHelper::getImageUrlResized('onsellunits', $images[0], 'onsellunit_mono_full');
    ?>
" />
</div>
<?php 
} elseif ($resource->Merchant != null && $resource->Merchant->LogoUrl != '') {
    ?>
	<img src="<?php 
    echo BFCHelper::getImageUrlResized('merchant', $resource->Merchant->LogoUrl, 'onsellunit_default_logo');
    ?>
" />
<?php 
} else {
    ?>
	<img src="/media/com_bookingfor/images/default.png" />
<?php 
}
Пример #12
0
$language = $this->language;
//$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) {
echo implode(",", $listsId);
?>
";

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;
?>
';
	function setStars(option) {
		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 
    // 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::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: {
        ?>
'" />
						</li>		
						<?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 {
    ?>
                    $vals = explode(':', $se);
                    if (count($vals) < 2 || $vals[0] != $selPrice->PriceId) {
                        continue;
                    }
                    $selectedExtra = $se . '';
                    // secure cast to string
                    break;
                }
            }
            ?>
				<tr>
					<td class="resourceimage tab">
							<?php 
            $selPriceImageUrl = Juri::root() . "components/com_bookingforconnector/assets/images/defaults/default-s6.jpeg";
            if (!empty($selPrice->DefaultImg)) {
                $selPriceImageUrl = BFCHelper::getImageUrlResized('prices', $selPrice->DefaultImg, 'small');
            }
            ?>
							<img src="<?php 
            echo $selPriceImageUrl;
            ?>
"  class="img-responsive" >
							<span class="com_bookingforconnector_resourcelist-resourcename name-selectableprice<?php 
            echo $selPrice->PriceId;
            ?>
 "><i class="fa fa-check-circle" aria-hidden="true"></i> <?php 
            echo $selPrice->Name;
            ?>
</span>
					</td>
					<td><?php 
<?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 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 
}
?>

";
var listToCheck = "<?php 
echo implode(",", $listsId);
?>
";
//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 
    $showResourceMap = $resourceLat != null && $resourceLon != null && $isMapVisible && $isMapMarkerVisible;
    if ($itemId != 0) {
        $route = JRoute::_($uri . '&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName) . '&Itemid=' . $itemId);
    } else {
        $route = JRoute::_($uri . '&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName));
    }
    if ($itemIdMerchant != 0) {
        $uriMerchant .= '&merchantId=' . $resource->MerchantId . ':' . BFCHelper::getSlug($resource->MerchantName) . '&Itemid=' . $itemIdMerchant;
    } else {
        $uriMerchant .= '&merchantId=' . $resource->MerchantId . ':' . BFCHelper::getSlug($resource->MerchantName);
    }
    $routeMerchant = JRoute::_($uriMerchant);
    $routeInfoRequest = JRoute::_('index.php?option=com_bookingforconnector&view=onsellunit&layout=inforequestpopup&tmpl=component&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName));
    $routeRapidView = JRoute::_('index.php?option=com_bookingforconnector&view=onsellunit&layout=rapidview&tmpl=component&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName));
    if (!empty($result->ImageUrl)) {
        $resourceImageUrl = BFCHelper::getImageUrlResized('onsellunits', $result->ImageUrl, 'medium');
    }
    ?>
	<div class="<?php 
    echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL;
    ?>
12 com_bookingforconnector-item-col" >
		<div class="com_bookingforconnector-search-resource com_bookingforconnector-item <?php 
    echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_ROW;
    ?>
">
			<div class="mrcgroup" id="bfcmerchantgroup<?php 
    echo $result->ResourceId;
    ?>
"><span class="bfcmerchantgroup"></span></div>
				<div class="com_bookingforconnector-item-details  <?php 
    navigateByClick: true,
    keyboardNavEnabled: true,
    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 
}
?>
        $currUriMerchant .= '&Itemid=' . $this->item->MerchantId;
    }
    $routeMerchant = JRoute::_($currUriMerchant);
}
$offerImageUrl = "";
if (!empty($offer->DefaultImg)) {
    $offerImageUrl = BFCHelper::getImageUrlResized('offers', $offer->DefaultImg, 'medium');
}
if ($offer->DefaultImg != '') {
    $images = BFCHelper::getImageUrlResized('offers', $offer->DefaultImg, 'medium');
} elseif ($merchant->LogoUrl != '') {
    $images = BFCHelper::getImageUrlResized('merchant', $merchant->LogoUrl, 'medium');
}
$merchantLogoUrl = Juri::root() . "components/com_bookingforconnector/assets/images/defaults/default-s1.jpeg";
if (!empty($merchant->LogoUrl)) {
    $merchantLogoUrl = BFCHelper::getImageUrlResized('merchant', $merchant->LogoUrl, 'logomedium');
}
?>

		<div class="<?php 
echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL;
?>
12 com_bookingforconnector-item-col" >
			<div class="com_bookingforconnector-search-resource com_bookingforconnector-item <?php 
echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_ROW;
?>
">
				<div class="mrcgroup" id="bfcmerchantgroup<?php 
echo $offer->OfferId;
?>
"><span class="bfcmerchantgroup"></span></div>
Пример #24
0
//		$tmpservices[] = BFCHelper::getLanguage($service->Name, $this->language);
//	}
//	$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 
    $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;
?>
12 com_bookingforconnector-item-col" style="padding: 10px !important;" >
        <div class="com_bookingforconnector-offers-item com_bookingforconnector-item <?php 
echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_ROW;
?>
">
          <div class="<?php 
echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL;