function setBreadcrumb($merchant, $layout = '')
 {
     $mainframe = JFactory::getApplication();
     $pathway = $mainframe->getPathway();
     $pathway->addItem($merchant->Name, JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&merchantId=' . $merchant->MerchantId . ':' . BFCHelper::getSlug($merchant->Name)));
     if ($layout != '') {
         $pathway->addItem(JTEXT::_('COM_BOOKINGFORCONNECTOR_VIEWS_MERCHANTDETAILS_LAYOUT_' . strtoupper($layout)), JRoute::_('index.php?layout=' . $layout . '&option=com_bookingforconnector&view=merchantdetails&merchantId=' . $merchant->MerchantId . ':' . BFCHelper::getSlug($merchant->Name)));
     }
 }
Esempio n. 2
0
 function setBreadcrumb($resource, $layout = '')
 {
     $mainframe = JFactory::getApplication();
     $pathway = $mainframe->getPathway();
     $pathway->addItem($resource->Merchant->Name, JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&merchantId=' . $resource->Merchant->MerchantId . ':' . BFCHelper::getSlug($resource->Merchant->Name)));
     $pathway->addItem(JTEXT::_('COM_BOOKINGFORCONNECTOR_VIEWS_MERCHANTDETAILS_LAYOUT_' . strtoupper($layout)), JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&layout=' . $layout . '&merchantId=' . $resource->Merchant->MerchantId . ':' . BFCHelper::getSlug($resource->Merchant->Name)));
     //		$resourceName = BFCHelper::getLanguage($resource->Name, $this->Language);
     $resourceName = BFCHelper::getLanguage($resource->Name, $this->language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags'));
     $pathway->addItem($resourceName, JRoute::_('index.php?option=com_bookingforconnector&view=resource&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName)));
 }
 function setBreadcrumb($resource, $layout = '', $language)
 {
     if (!empty($resource)) {
         $mainframe = JFactory::getApplication();
         $pathway = $mainframe->getPathway();
         // resetto il pathway
         $pathway->setPathway(null);
         //				$resourceName = BFCHelper::getLanguage($resource->Name, $language);
         $resourceName = BFCHelper::getLanguage($resource->Name, $this->language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags'));
         $pathway->addItem($resource->MerchantName, JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&merchantId=' . $resource->MerchantId . ':' . BFCHelper::getSlug($resource->MerchantName)));
         $pathway->addItem($resourceName, JRoute::_('index.php?option=com_bookingforconnector&view=onsellunit&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName)));
     }
 }
 function setBreadcrumb($resource, $layout = '', $language)
 {
     if (!empty($resource)) {
         $mainframe = JFactory::getApplication();
         $pathway = $mainframe->getPathway();
         // resetto il pathway
         //				$pathway->setPathway(null);
         $count = count($pathway);
         $newPathway = array();
         if ($count > 1) {
             $newPathway = array_pop($pathway);
         }
         $pathway->setPathway($newPathway);
         //				$resourceName = BFCHelper::getLanguage($resource->Name, $language);
         $resourceName = BFCHelper::getLanguage($resource->Name, $this->language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags'));
         //				$pathway->addItem(
         //					$resource->Merchant->Name,
         //					JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&merchantId=' . $resource->MerchantId . ':' . BFCHelper::getSlug($resource->Merchant->Name))
         //				);
         $pathway->addItem($resourceName, JRoute::_('index.php?option=com_bookingforconnector&view=condominium&resourceId=' . $resource->CondominiumId . ':' . BFCHelper::getSlug($resourceName)));
     }
 }
Esempio n. 5
0
//$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
if ($itemId != 0) {
    $uri .= '&resourceId=' . $resource->CondominiumId . ':' . BFCHelper::getSlug($resourceName) . '&Itemid=' . $itemId;
} else {
    $uri .= '&resourceId=' . $resource->CondominiumId . ':' . BFCHelper::getSlug($resourceName);
}
$route = JRoute::_($uri);
$indirizzo = "";
$cap = "";
$comune = "";
$provincia = "";
if (empty($resource->AddressData)) {
    $indirizzo = $resource->Address;
    $cap = $resource->ZipCode;
    $comune = $resource->CityName;
    $provincia = $resource->RegionName;
} else {
    $addressData = $resource->AddressData;
    $indirizzo = BFCHelper::getItem($addressData, 'indirizzo');
    $cap = BFCHelper::getItem($addressData, 'cap');
   </div>
		<?php 
} else {
    ?>
			<?php 
    if ($merchant->RatingsContext !== 0 && $merchant->RatingsContext !== 2) {
        ?>
				<div class="alert alert-block">
					<?php 
        echo JTEXT::_('COM_BOOKINGFORCONNECTOR_MERCHANTS_VIEW_MERCHANTDETAILS_RATING_NO_RESULT');
        ?>
					<?php 
        if (($this->item->RatingsContext === 1 || $this->item->RatingsContext === 3) && ($this->item->RatingsType == 0 || $this->item->RatingsType == 2)) {
            ?>
						<?php 
            echo JHTML::link(JRoute::_('index.php?option=com_bookingforconnector&layout=rating&view=merchantdetails&merchantId=' . $this->item->MerchantId . ':' . BFCHelper::getSlug($this->item->Name), true, -1), JTEXT::_('COM_BOOKINGFORCONNECTOR_MERCHANTS_VIEW_MERCHANTDETAILS_RATING_BUTTON_COMMENT'), array('class' => 'btn btn-info'));
            ?>
					<?php 
        }
        ?>
	
				</div>
			<?php 
    }
    ?>
	
		<?php 
}
?>
	
</div>
/**
 * @package   Bookingforconnector
 * @copyright Copyright (c)2006-2016 Ipertrade
 * @license   GNU General Public License version 3, or later
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$this->document->setTitle($this->item->Name);
$this->document->setDescription(BFCHelper::getLanguage($this->item->Description, $this->language));
$merchant = $this->item;
$db = JFactory::getDBO();
$uriMerchant = 'index.php?option=com_bookingforconnector&view=merchantdetails';
$db->setQuery('SELECT id FROM #__menu WHERE link LIKE ' . $db->Quote($uriMerchant . '%') . ' AND (language=' . $db->Quote($this->language) . ' OR language=' . $db->Quote('*') . ') AND published = 1 LIMIT 1');
$itemIdMerchant = $db->getErrorNum() ? 0 : intval($db->loadResult());
//$itemIdMerchant = intval($db->loadResult());
$uriMerchant .= '&merchantId=' . $merchant->MerchantId . ':' . BFCHelper::getSlug($merchant->Name);
if ($itemIdMerchant != 0) {
    $uriMerchant .= '&Itemid=' . $itemIdMerchant;
}
$uriMerchantthanks = $uriMerchant . '&layout=thanks';
$uriMerchant .= '&layout=contacts';
$route = JRoute::_($uriMerchant);
$routeThanks = JRoute::_($uriMerchantthanks);
$cNationList = BFCHelper::parseArrayList(JTEXT::_('COM_BOOKINGFORCONNECTOR_VIEW_CONSTANTS_NATIONSLIST'));
//$cLanguageList = BFCHelper::parseArrayList(JTEXT::_('COM_BOOKINGFORCONNECTOR_VIEW_CONSTANTS_LANGUAGESLIST'));
$cultureCode = strtolower(substr($this->language, 0, 2));
$nationCode = strlen($this->language) == 5 ? strtolower(substr($this->language, 3, 2)) : $cultureCode;
$keys = array_keys($cNationList);
$nations = array_values(array_filter($keys, function ($item) use($nationCode) {
    return strtolower($item) == $nationCode;
}));
    $isMapMarkerVisible = $resource->IsMapMarkerVisible;
    $showResourceMap = false;
    //(($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($merchant->Name) . '&Itemid=' . $itemIdMerchant;
    } else {
        $uriMerchant .= '&merchantId=' . $resource->MerchantId . ':' . BFCHelper::getSlug($merchant->Name);
    }
    $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));
    ?>
	<div class="com_bookingforconnector_search-resource">
		<div class="com_bookingforconnector_merchantdetails-resource" id="container<?php 
    echo $resource->ResourceId;
    ?>
"> 
			<div class="<?php 
    echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_ROW;
    ?>
 ">
					<div class="<?php 
    echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL;
    ?>
9 borderright minhlist">
						<div class="com_bookingforconnector_merchantdetails-resource-features">
Esempio n. 9
0
//echo ("<pre>");
//echo (print_r($user));
//echo ("</pre>");
?>
<div class="com_bookingforconnector_resource com_bookingforconnector_resource-mt<?php 
echo $merchant->MerchantTypeId;
?>
 com_bookingforconnector_resource-t<?php 
echo $resource->MasterTypologyId;
?>
">
	<?php 
if ($merchant->RatingsContext === 2 || $merchant->RatingsContext === 3) {
    ?>
		<?php 
    echo JHTML::link(JRoute::_('index.php?option=com_bookingforconnector&view=resource&resourceId=' . $resource->UnitId . ':' . BFCHelper::getSlug($resourceName), true, -1), JTEXT::_('COM_BOOKINGFORCONNECTOR_MERCHANTS_VIEW_MERCHANTDETAILS_RATING_RETURN'), array('class' => ' pull-right'));
    ?>
	<?php 
}
?>
	<h2 class="com_bookingforconnector_resource-name"><?php 
echo $resourceName;
?>
 
		<span class="com_bookingforconnector_resource-rating com_bookingforconnector_resource-rating<?php 
echo $merchant->Rating;
?>
">
			<!-- <span class="com_bookingforconnector_resource-ratingText">Rating <?php 
echo $merchant->Rating;
?>
Esempio n. 10
0
		</div>	
		<?php 
    }
    ?>
	
	</div>

		<?php 
} else {
    ?>
		<div class="alert alert-block">
			<?php 
    echo JTEXT::_('COM_BOOKINGFORCONNECTOR_MERCHANTS_VIEW_MERCHANTDETAILS_RATING_NO_RESULT');
    ?>
			<?php 
    echo JHTML::link(JRoute::_('index.php?option=com_bookingforconnector&layout=rating&view=resource&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName), true, -1), JTEXT::_('COM_BOOKINGFORCONNECTOR_MERCHANTS_VIEW_MERCHANTDETAILS_RATING_BUTTON_COMMENT'), array('class' => ' btn btn-info'));
    ?>
		</div>
		<?php 
}
?>
	
</div>
<script type="text/javascript">
jQuery(function($) {
	$('.moduletable-insearch').show();
	$('span.expander').expander({
		slicePoint: 280,
		expandText:'<?php 
echo JTEXT::_('COM_BOOKINGFORCONNECTOR_MERCHANTS_VIEW_MERCHANTDETAILS_RATING_PLUS');
?>
     $result->Price = 0;
     $result->TotalPrice = 0;
     $onlystay = false;
 }
 $showResourceMap = $resourceLat != null && $resourceLon != null;
 $currUriresource = $uri . '&resourceId=' . $result->ResourceId . ':' . BFCHelper::getSlug($resourceName);
 if ($itemId != 0) {
     $currUriresource .= '&Itemid=' . $itemId;
 }
 $route = JRoute::_($currUriresource);
 $routeRating = JRoute::_($currUriresource . '&layout=rating');
 $routeInfoRequest = JRoute::_($currUriresource . '&layout=inforequestpopup&tmpl=component');
 $routeRapidView = JRoute::_($currUriresource . '&layout=rapidview&tmpl=component');
 $routeMerchant = "";
 if ($isportal) {
     $currUriMerchant = $uriMerchant . '&merchantId=' . $result->MerchantId . ':' . BFCHelper::getSlug($result->MrcName);
     if ($itemIdMerchant != 0) {
         $currUriMerchant .= '&Itemid=' . $itemIdMerchant;
     }
     $routeMerchant = JRoute::_($currUriMerchant);
 }
 $bookingType = 0;
 $availability = 0;
 $ribbonofferdisplay = "hidden";
 $classofferdisplay = "";
 $stay = new StdClass();
 if ($isFromSearch) {
     $availability = $result->Availability;
     $bookingType = $result->BookingType;
     if ($result->Price < $result->TotalPrice || $result->IsOffer) {
         $ribbonofferdisplay = "";
<?php

$merchant = $this->item;
$resource = $this->item->currentOnSellUnit;
$resourceName = BFCHelper::getLanguage($resource->Name, $this->language);
$addressData = $resource->Address;
//$merchantAddress = false;
//if ($addressData == '' || $addressData == null || $merchant->MerchantTypeId != 2) {
//	$addressData = $merchant->AddressData;
//	$merchantAddress = true;
//}
$route = JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&layout=onsellunit&merchantId=' . $merchant->MerchantId . ':' . BFCHelper::getSlug($merchant->Name) . '&onsellunitid=' . $resource->OnSellUnitId . ':' . BFCHelper::getSlug($resourceName));
$resourceImageUrl = "/media/com_bookingfor/images/default.png";
if ($resource->ImageUrl != '') {
    $resourceImageUrl = BFCHelper::getImageUrl('onsellunits', $resource->ImageUrl, 'onsellunit_list_default');
} elseif ($merchant->LogoUrl != '') {
    $resourceImageUrl = BFCHelper::getImageUrl('merchant', $merchant->LogoUrl, 'resource_list_default_logo');
}
?>

	<div class="com_bookingforconnector_search-resource">
		<div class="com_bookingforconnector_merchantdetails-resource">
			<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 $resourceImageUrl;
?>
" /></a>
				<h3 class="com_bookingforconnector_merchantdetails-resource-name"><a class="com_bookingforconnector_resource-resource-nameAnchor" href="<?php 
 function setBreadcrumb($resource, $layout = '', $language)
 {
     if (!empty($resource)) {
         $mainframe = JFactory::getApplication();
         $pathway = $mainframe->getPathway();
         $count = count($pathway);
         $newPathway = array();
         if ($count > 1) {
             $newPathway = array_pop($pathway);
         }
         $pathway->setPathway($newPathway);
         //		$pathway->addItem(
         //			$resource->Merchant->Name,
         //			JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&merchantId=' . $resource->Merchant->MerchantId . ':' . BFCHelper::getSlug($resource->Merchant->Name))
         //		);
         //		$pathway->addItem(
         //			JTEXT::_('COM_BOOKINGFORCONNECTOR_VIEWS_MERCHANTDETAILS_LAYOUT_' . strtoupper($layout) ),
         //			JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&layout=' . $layout . '&merchantId=' . $resource->Merchant->MerchantId . ':' . BFCHelper::getSlug($resource->Merchant->Name))
         //		);
         //		$resourceName = BFCHelper::getLanguage($resource->Name, $language);
         $resourceName = BFCHelper::getLanguage($resource->Name, $this->language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags'));
         //		echo "<pre>";
         //		echo print_r($resource);
         //		echo "</pre>";
         $pathway->addItem($resourceName, JRoute::_('index.php?option=com_bookingforconnector&view=resource&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName)));
     }
 }
Esempio n. 14
0
 public function getCategoryPriceMqAverages($language = '', $locationid)
 {
     $options = array('path' => $this->urlCategoryPriceMqAverages, 'data' => array('$format' => 'json', 'start' => '', 'end' => '', 'locationzone' => ''));
     if (isset($locationid) && $locationid != 0) {
         $options['data']['locationid'] = $locationid . "L";
         // se è un Long il dato deve essere passato come stringa $locationid;
     }
     $url = $this->helper->getQuery($options);
     $resources = null;
     $r = $this->helper->executeQuery($url);
     if (isset($r)) {
         $res = json_decode($r);
         if (!empty($res->d->results)) {
             $resources = $res->d->results;
         } elseif (!empty($res->d)) {
             $resources = $res->d;
         }
         ///		$route = JRoute::_('index.php?option=com_bookingforconnector&view=onsellunit&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName));
         if (!empty($resources)) {
             foreach ($resources as $resource) {
                 $resourceName = BFCHelper::getLanguage($resource->Name, $language);
                 $resource->Url = JRoute::_('index.php?option=com_bookingforconnector&view=onsellunit&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName));
                 //				LocationID
                 if (!empty($resource->CityId)) {
                     $resource->LocationId = $resource->CityId;
                 }
                 //				UnitCategoryID
                 if (!empty($resource->CategoryId)) {
                     $resource->UnitCategoryID = $resource->CategoryId;
                 }
                 //				UnitCategoryName
                 if (!empty($resource->CategoryName)) {
                     $resource->UnitCategoryName = $resource->CategoryName;
                 }
                 //				LocationZone
                 if (!empty($resource->ZoneName)) {
                     $resource->LocationZone = $resource->ZoneName;
                 }
                 //				LocationAndUnitCategoryAverage
                 if (!empty($resource->ZoneCategoryAverage)) {
                     $resource->LocationAndUnitCategoryAverage = $resource->ZoneCategoryAverage;
                 }
                 //				UnitCategoryAverage
                 if (!empty($resource->CategoryAverage)) {
                     $resource->UnitCategoryAverage = $resource->CategoryAverage;
                 }
             }
         }
     }
     return $resources;
 }
Esempio n. 15
0
&task=GetPhoneByMerchantId&language=' + cultureCode,this)"  id="phone<?php 
            echo $merchant->MerchantId;
            ?>
"><?php 
            echo JTEXT::_('COM_BOOKINGFORCONNECTOR_MERCHANTS_VIEW_MERCHANTDETAILS_SHOWPHONE');
            ?>
</a></span>					
						<?php 
        }
        ?>
						<?php 
        if ($merchantSiteUrl != '') {
            ?>
 
						- <?php 
            echo JHTML::link(JRoute::_('index.php?option=com_bookingforconnector&layout=redirect&view=merchantdetails&tmpl=component&merchantId=' . $merchant->MerchantId . ':' . BFCHelper::getSlug($merchant->Name), true, -1), JTEXT::_('COM_BOOKINGFORCONNECTOR_MERCHANTS_VIEW_MERCHANTLIST_SITEGO'), 'target="_blank"');
            ?>
						<!-- - <?php 
            echo JTEXT::_('COM_BOOKINGFORCONNECTOR_MERCHANTS_VIEW_MERCHANTDETAILS_URL');
            ?>
: <a href="<?php 
            echo $merchantSiteUrl;
            ?>
" target="_blank"><?php 
            echo $merchant->SiteUrl;
            ?>
</a> -->
						<?php 
        }
        ?>
						 - <a class="boxedpopup com_bookingforconnector_email" href="<?php 
Esempio n. 16
0
$config = $this->config;
$isportal = $config->get('isportal', 1);
$usessl = $config->get('usessl', 0);
$ssllogo = $config->get('ssllogo', '');
$formlabel = $config->get('formlabel', '');
$user = JFactory::getUser();
$merchant = $this->item;
if ($merchant->RatingsContext !== 1 && $merchant->RatingsContext !== 3) {
    //redirect almerchant senza possibilità di renensirla
    $language = $this->language;
    $db = JFactory::getDBO();
    $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());
    //$itemIdMerchant = intval($db->loadResult());
    $uriMerchant .= '&merchantId=' . $this->item->MerchantId . ':' . BFCHelper::getSlug($this->item->Name);
    if ($itemIdMerchant != 0) {
        $uriMerchant .= '&Itemid=' . $itemIdMerchant;
    }
    $route = JRoute::_($uriMerchant);
    header("Location: " . $route);
    $app = JFactory::getApplication();
    $app->close();
}
//if (!$user->guest) {
//  echo 'You are logged in as:<br />';
//  echo 'User name: ' . $user->username . '<br />';
//  echo 'Real name: ' . $user->name . '<br />';
//  echo 'User ID  : ' . $user->id . '<br />';
//}
//echo ("<pre>");
Esempio n. 17
0
    echo BFCHelper::getItem($contacts, 'telefono2');
}
?>
<br/>
		<strong><?php 
echo JTEXT::_('MOD_BOOKINGFORCONNECTOR_MERCHANT_FAX');
?>
:</strong> <?php 
echo BFCHelper::getItem($contacts, 'fax');
?>
<br/>
		<strong><?php 
echo JTEXT::_('MOD_BOOKINGFORCONNECTOR_MERCHANT_INFO');
?>
:</strong> <a class="com_bookingforconnector_resource-merchantLink" href="<?php 
echo JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&merchantId=' . $merchant->MerchantId . ':' . BFCHelper::getSlug($merchant->Name));
?>
"><?php 
echo JTEXT::_('MOD_BOOKINGFORCONNECTOR_MERCHANT_MERCHANTSHEET');
?>
</a>
	</p>
	<?php 
if ($XGooglePos != null && $XGooglePos != '' && ($YGooglePos != null && $YGooglePos != '')) {
    ?>
	<div class="mod_bookingforconnector_merchantdetails-map" id="map_canvas" style="width:100%; height:250px">
		<img src="http://maps.googleapis.com/maps/api/staticmap?center=<?php 
    echo $XGooglePos;
    ?>
,<?php 
    echo $YGooglePos;
	<div class="com_bookingforconnector-items-container">
	    <div class="com_bookingforconnector-offerlist com_bookingforconnector-items <?php 
    echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_ROW;
    ?>
 com_bookingforconnector-list">
		<?php 
    foreach ($this->items as $resource) {
        ?>
		<?php 
        // assign the current resource to a property so it will be available inside template 'resource'
        if ($counterResources < COM_BOOKINGFORCONNECTOR_MAXRESOURCESAJAXMERCHANT) {
            $counterResources += 1;
            $this->item->currentResource = $resource;
            echo $this->loadTemplate('resource');
        } else {
            echo '<div class="text-center">' . JHTML::link(JRoute::_('index.php?option=com_bookingforconnector&layout=resources&view=merchantdetails&merchantId=' . $merchant->MerchantId . ':' . BFCHelper::getSlug($merchant->Name) . "&limitstart=0"), JTEXT::_('COM_BOOKINGFORCONNECTOR_MERCHANTS_VIEW_MERCHANTDETAILS_RESOURCE_ALL')) . '</div>';
            break;
        }
        ?>
		<?php 
    }
    ?>
	</div>	
	</div>
	<?php 
}
?>
</div>
<script type="text/javascript">
<!--
	var shortenOption = {
</a>
			</div>
			<div class="clearboth"></div>
			<div class="com_bookingforconnector_search-merchant-resources">
				<div class="com_bookingforconnector_merchantdetails-resources">
				<?php 
    foreach ($condominium->Resources as $resource) {
        ?>
					<?php 
        $resourceName = BFCHelper::getLanguage($resource->Name, $this->language);
        //$resourceRoute = JRoute::_('index.php?option=com_bookingforconnector&view=resource&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName));
        $resourceRouteInfoRequest = JRoute::_('index.php?option=com_bookingforconnector&view=resource&layout=inforequest&tmpl=component&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName));
        if ($itemIdresource != 0) {
            $resourceRoute = JRoute::_($uriresource . '&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName) . '&Itemid=' . $itemIdresource);
        } else {
            $resourceRoute = JRoute::_($uriresource . '&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName));
        }
        $showStay = false;
        if (isset($resource->Stay)) {
            $stay = $resource->Stay;
            if ($stay->DiscountedPrice > 0) {
                $showStay = true;
            }
        }
        //$bookingType = $resource->RatePlanStay->SuggestedStay->BookingType;
        $bookingType = $stay->BookingType;
        ?>
					
					<div class="<?php 
        echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_ROW;
        ?>
Esempio n. 20
0
$merchant = $resource->Merchant;
$language = $this->language;
//$resource->ResourceId = $resource->UnitId;
//$resourceName = BFCHelper::getLanguage($resource->Name, $this->Language);
$resourceName = BFCHelper::getLanguage($resource->Name, $this->language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags'));
$this->document->setTitle($resourceName . ' - ' . $merchant->Name);
$this->document->setDescription(BFCHelper::getLanguage($resource->Description, $this->language));
$db = JFactory::getDBO();
$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());
//-------------------pagina per i l redirect di tutte le risorsein vendita
if ($itemId != 0) {
    $uri .= '&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName) . '&Itemid=' . $itemId;
} else {
    $uri .= '&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName);
}
$route = JRoute::_($uri);
$indirizzo = "";
$cap = "";
$comune = "";
$provincia = "";
if (empty($resource->AddressData)) {
    $indirizzo = $resource->Address;
    $cap = $resource->ZipCode;
    $comune = $resource->CityName;
    $provincia = $resource->RegionName;
} else {
    $addressData = $resource->AddressData;
    $indirizzo = BFCHelper::getItem($addressData, 'indirizzo');
    $cap = BFCHelper::getItem($addressData, 'cap');
 function onContentSearch($text, $phrase = '', $ordering = '', $areas = null)
 {
     //If the array is not correct, return it:
     if (is_array($areas)) {
         if (!array_intersect($areas, array_keys($this->onContentSearchAreas()))) {
             return array();
         }
     }
     $section = JText::_('PLG_SEARCH_BOOKINGFORCONNECTORRESOURCE');
     //Then load the parameters of the plugin.
     $pluginParams = $this->params;
     //Now define the parameters like this:
     $limit = $pluginParams->def('search_limit', 20);
     $direction = $pluginParams->def('direction', "asc");
     //Use the function trim to delete spaces in front of or at the back of the searching terms
     $text = trim($text);
     //Return Array when nothing was filled in.
     if ($text == '') {
         return array();
     }
     $wheres = array();
     switch ($phrase) {
         //search exact
         case 'exact':
             /*$text		= $db->Quote( '%'.$db->getEscaped( $text, true ).'%', false );
             		$where 		= '(' . implode( ') OR (', $wheres2 ) . ')';*/
             break;
             //search all or any
         //search all or any
         case 'all':
         case 'any':
             //set default
         //set default
         default:
             /*
             $words 	= explode( ' ', $text );
             $wheres = array();
             foreach ($words as $word)
             {
             $word		= $db->Quote( '%'.$db->getEscaped( $word, true ).'%', false );
             $wheres2 	= array();
             $wheres2[] 	= 'LOWER(a.name) LIKE '.$word;
             $wheres[] 	= implode( ' OR ', $wheres2 );
             }
             $where = '(' . implode( ($phrase == 'all' ? ') AND (' : ') OR ('), $wheres ) . ')';
             */
             break;
     }
     //ordering of the results
     switch ($ordering) {
         //alphabetic, ascending
         case 'alpha':
             $order = 'Name';
             break;
             //oldest first
         //oldest first
         case 'oldest':
             //popular first
         //popular first
         case 'popular':
             //newest first
         //newest first
         case 'newest':
             //default setting: alphabetic, ascending
         //default setting: alphabetic, ascending
         default:
             $order = 'Name';
     }
     //replace nameofplugin
     $rows = array();
     $resources = BFCHelper::getResourcesSearch($text, 0, $limit, $order, $direction);
     $document = JFactory::getDocument();
     $language = $document->getLanguage();
     /* we have to find the itemid for the target page */
     $db = JFactory::getDBO();
     $lang = JFactory::getLanguage()->getTag();
     $uri = 'index.php?option=com_bookingforconnector&view=resource';
     $db->setQuery('SELECT id FROM #__menu WHERE link LIKE ' . $db->Quote($uri . '%') . ' AND language=' . $db->Quote($lang) . ' LIMIT 1');
     $itemId = $db->getErrorNum() ? 0 : intval($db->loadResult());
     //The 'output' of the displayed link
     foreach ($resources as $resource) {
         //$rows[$key]->href = 'index.php?option=com_bookingforconnector&view=merchantdetails&merchantId=' . $merchant->MerchantId . ':' . BFCHelper::getSlug($merchant->Name);
         $resourceName = BFCHelper::getLanguage($resource->Name, $language);
         $rows[] = (object) array('href' => Jroute::_('index.php?Itemid=' . $itemId . '&option=com_bookingforconnector&view=resource&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName)), 'title' => $resourceName, 'created' => null, 'section' => $section, 'text' => BFCHelper::getLanguage($resource->Description, $language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags')), 'browsernav' => '0');
     }
     //Return the search results in an array
     return $rows;
 }
<?php

$merchant = $this->item->Merchant;
$offer = $this->item;
$offerName = BFCHelper::getLanguage($offer->Name, $this->language);
$offer->OfferId = $offer->PackageId;
$offer->Price = $offer->Value;
$uriMerchant = $this->uriMerchant . '&merchantId=' . $merchant->MerchantId . ':' . BFCHelper::getSlug($merchant->Name);
$itemIdMerchant = $this->itemIdMerchant;
if ($itemIdMerchant != 0) {
    $uriMerchant .= '&Itemid=' . $itemIdMerchant;
}
$routeMerchant = JRoute::_($uriMerchant);
$route = JRoute::_($uriMerchant . '&layout=offer&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 
<?php

/**
 * @package   Bookingforconnector
 * @copyright Copyright (c)2006-2016 Ipertrade
 * @license   GNU General Public License version 3, or later
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$resource = $this->item;
$merchant = $resource->Merchant;
$resource->Price = $resource->MinPrice;
$resourceName = BFCHelper::getLanguage($resource->Name, $this->language);
$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));
$config = $this->config;
$XGooglePosDef = $config->get('posx', 0);
$YGooglePosDef = $config->get('posy', 0);
$startzoom = $config->get('startzoom', 14);
$googlemapsapykey = $config->get('googlemapskey', '');
$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');
/*---------------IMPOSTAZIONI SEO----------------------*/
//<%=typeName %> <%=zone %> <%=location  %> - <%=typeName %> in <%=contractType %> <%=location  %>
$titleHead = sprintf(JTEXT::_('COM_BOOKINGFORCONNECTOR_VIEWS_ONSELLUNIT_HEAD_TITLE'), $typeName, $zone, $location, $typeName, $contractType, $location);
//<%=typeName %> <%=location  %>, <%=typeName %> <%=contractType %> <%=location  %>, <%=contractType %> <%=location %>
$keywordsHead = sprintf(JTEXT::_('COM_BOOKINGFORCONNECTOR_VIEWS_ONSELLUNIT_HEAD_KEYWORDS'), $typeName, $location, $typeName, $contractType, $location, $contractType, $location);
//CasaPadova propone <%=typeName %> in <%=contractType %> nel comune di <%=location  %>
$descriptionHead = sprintf(JTEXT::_('COM_BOOKINGFORCONNECTOR_VIEWS_ONSELLUNIT_HEAD_DESCRIPTION'), $typeName, $contractType, $location);
Esempio n. 24
0
	</div>
	<?php 
}
?>
	
	
	<br /><br />
	<div id="firstresources">Loading....</div>
	<br /><br />
</div>
<script type="text/javascript">
jQuery(function($) {
	$('.moduletable-insearch').show();
	//load first resourses
	var pagelist = "<?php 
echo JRoute::_('index.php?option=com_bookingforconnector&layout=resourcesajax&tmpl=component&format=raw&view=merchantdetails&merchantId=' . $merchant->MerchantId . ':' . BFCHelper::getSlug($merchant->Name));
?>
";
	$("#firstresources").load(pagelist, function() {
//			SqueezeBox.initialize({});
//			SqueezeBox.assign($$('#firstresources  a.boxed'), { //change the divid (#contentarea) as to the div that you use for refreshing the content
//				parse: 'rel'
//			});
		});


// sostituzione ricerca======================
	selTipo = jQuery('select[name=merchantCategoryId] > option:first-child');
    if (selTipo.length ) {
		selTipo.text('<?php 
echo addslashes($merchant->Name);
$merchant = $condominium->Merchant;
$condominiumName = BFCHelper::getLanguage($condominium->Name, $this->language);
?>
<div class="com_bookingforconnector_merchantdetails com_bookingforconnector_merchantdetails-t">
	<?php 
if ($this->items != null) {
    ?>
	<div class="com_bookingforconnector_merchantdetails-resources">
		<?php 
    foreach ($this->items as $resource) {
        ?>
		<?php 
        // assign the current resource to a property so it will be available inside template 'resource'
        if ($counterResources < COM_BOOKINGFORCONNECTOR_MAXRESOURCESAJAXMERCHANT) {
            $counterResources += 1;
            $this->item->currentResource = $resource;
            echo $this->loadTemplate('resource');
        } else {
            echo JHTML::link(JRoute::_('index.php?option=com_bookingforconnector&layout=resources&view=condominium&resourceId=' . $condominium->CondominiumId . ':' . BFCHelper::getSlug($condominiumName)), JTEXT::_('COM_BOOKINGFORCONNECTOR_MERCHANTS_VIEW_MERCHANTDETAILS_RESOURCE_ALL'));
            break;
        }
        ?>
		<?php 
    }
    ?>
	</div>	
	<?php 
}
?>
</div>
				width:	'90%'
			},
		overlayCSS:  { 
				opacity:	0.9 
			}, 
		message: jQuery('#resoursedisabled')
		});
<?php 
}
?>
	jQuery(function($) {
		$('.moduletable-insearch').show();
	});
	//load first resourses
	var pagelist = "<?php 
echo JRoute::_('index.php?option=com_bookingforconnector&layout=resourcesajax&tmpl=component&format=raw&view=condominium&resourceId=' . $resource->CondominiumId . ':' . BFCHelper::getSlug($resourceName));
?>
";
	jQuery("#firstresources").load(pagelist, function() {
//			SqueezeBox.initialize({});
//			SqueezeBox.assign($$('#firstresources  a.boxed'), { //change the divid (#contentarea) as to the div that you use for refreshing the content
//				parse: 'rel'
//			});
		});


</script>
<?php 
if ($showResourceMap) {
    ?>
Esempio n. 27
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>
*/
$merchant = $resource->Merchant;
//$resourceName = BFCHelper::getLanguage($resource->Name, $this->language);
$resourceName = BFCHelper::getLanguage($resource->Name, $this->language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags'));
$checkoutspan = '+1 day';
$startDate = DateTime::createFromFormat('d/m/Y', BFCHelper::getStartDateByMerchantId($resource->MerchantId));
$endDate = DateTime::createFromFormat('d/m/Y', BFCHelper::getEndDateByMerchantId($resource->MerchantId));
$startDate2 = clone $startDate;
$startDate2->modify($checkoutspan);
//$format = JRequest::getVar('format');
//$tmpl = JRequest::getVar('tmpl');
//$formRoute = JRoute::_('index.php?option=com_bookingforconnector&format='.$format.'&tmpl='.$tmpl.'&view=resource&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName));
$formRoute = JRoute::_('index.php?option=com_bookingforconnector&view=resource&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName));
$formRouteBook = JRoute::_('index.php?option=com_bookingforconnector&view=resource&layout=form&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName));
if ($usessl) {
    $formRouteBook = JRoute::_('index.php?option=com_bookingforconnector&view=resource&layout=form&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName), true, 1);
}
$gotCalculator = JRequest::getBool('calculate');
$checkin = $this->params['checkin'];
$checkout = $this->params['checkout'];
$paxages = $this->params['paxages'];
$selExtras = explode('|', $this->params['extras']);
$selPackages = explode('|', $this->params['packages']);
$selVariationId = $this->params['variationPlanId'];
$viewSummary = !empty($this->params['fromExtForm']) ?: false || $currentState == 'optionalPackages' || $currentState == 'booking';
$viewExtra = $currentState == 'optionalPackages';
$viewForm = !empty($this->params['fromExtForm']) ?: false || $currentState == 'booking';
$selPriceTypeObj = null;
if (count($priceTypes) > 0) {
    foreach ($priceTypes as $pt) {
        if ($pt->Type != $selPriceType) {
            echo $condominium->CondominiumId;
            ?>
" style="display:none;" class="<?php 
            echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL;
            ?>
12">
				<?php 
        }
        ?>
					<div class="com_bookingforconnector-search-resource-details com_bookingforconnector-item-secondary <?php 
        echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_ROW;
        ?>
" style="padding-top: 10px !important;padding-bottom: 10px !important;">
					<?php 
        $resourceName = BFCHelper::getLanguage($resource->ResName, $this->language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags'));
        $currUriresource = $uriresource . '&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName);
        if ($itemIdresource != 0) {
            $currUriresource .= '&Itemid=' . $itemIdresource;
        }
        $resourceRoute = JRoute::_($currUriresource);
        $bookingType = $resource->BookingType;
        $IsBookable = $resource->IsBookable;
        $btnText = JText::_('COM_BOOKINGFORCONNECTOR_MERCHANTS_VIEW_MERCHANTDETAILS_RESOURCE_BUTTON');
        $btnClass = "";
        if ($IsBookable) {
            $btnText = JText::_('COM_BOOKINGFORCONNECTOR_MERCHANTS_VIEW_MERCHANTDETAILS_RESOURCE_BUTTON_HTTPS');
            $btnClass = "com_bookingforconnector-bookable";
        }
        $classofferdisplay = "";
        if ($resource->Price < $resource->TotalPrice || $resource->IsOffer) {
            $classofferdisplay = "com_bookingforconnector_highlight";
Esempio n. 30
0
$culture = "";
$privacy = BFCHelper::GetPrivacy($this->language);
?>
<div class="com_bookingforconnector_merchantdetails com_bookingforconnector_merchantdetails-t<?php 
echo $this->item->MerchantTypeId;
?>
">
	<!-- <?php 
echo $this->loadTemplate('head');
?>
 -->
	<?php 
if ($this->items != null) {
    $offer = $this->items;
    $offer->OfferId = $offer->VariationPlanId;
    $formRoute = JRoute::_('index.php?option=com_bookingforconnector&format=search&tmpl=component&view=merchantdetails&merchantId=' . $merchant->MerchantId . ':' . BFCHelper::getSlug($merchant->Name)) . '&offerId=' . $offer->OfferId;
    ?>
	
	<h2 class="com_bookingforconnector_resource-name"><?php 
    echo $offer->Name;
    ?>
 </h2>
	<div class="clear"></div>
	
	<ul class="nav nav-pills nav-justified bfcmenu ">
		<li role="presentation" class="active"><a rel=".resourcecontainer-gallery" data-toggle="tab"><?php 
    echo JTEXT::_('COM_BOOKINGFORCONNECTOR_RESOURCE_ANCHORS_PHOTO');
    ?>
</a></li>
		<?php 
    if (!empty($offer->Description)) {