예제 #1
0
 public function getResourceFromService()
 {
     $params = $this->getState('params');
     $resourceId = $params['resourceId'];
     $resourceIdRef = $params['resourceId'];
     $options = array('path' => sprintf($this->urlResource, $resourceId), 'data' => array('$format' => 'json'));
     $url = $this->helper->getQuery($options);
     $resource = null;
     $r = $this->helper->executeQuery($url);
     if (isset($r)) {
         $res = json_decode($r);
         //$resource = $res->d->results ?: $res->d;
         if (!empty($res->d->results)) {
             $resource = $res->d->results;
         } elseif (!empty($res->d)) {
             $resource = $res->d;
         }
         $resource->Merchant = BFCHelper::getMerchantFromServicebyId($resource->MerchantId);
         //		$resource->Services = $resource->OnSellUnit->Services;
         if (!empty($resource->ServiceIdList)) {
             $services = BFCHelper::GetServicesByIds($resource->ServiceIdList);
             if (count($resource->Services) > 0) {
                 $tmpservices = array();
                 foreach ($resource->Services as $service) {
                     $tmpservices[] = BFCHelper::getLanguage($service->Name, $this->language);
                 }
                 $services = implode(', ', $tmpservices);
             }
             $resource->Services = $services;
         }
     }
     return $resource;
 }
 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)));
     }
 }
예제 #3
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)));
 }
예제 #4
0
 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)));
     }
 }
 /**
  * Method to get a list of options for a list input.
  *
  * @return	array		An array of JHtml options.
  */
 protected function getOptions()
 {
     $document = JFactory::getDocument();
     $language = $document->getLanguage();
     $masterTypologies = BFCHelper::getMasterTypologies();
     $options = array();
     if ($masterTypologies) {
         foreach ($masterTypologies as $masterTypology) {
             $options[] = JHtml::_('select.option', $masterTypology->MasterTypologyId, BFCHelper::getLanguage($masterTypology->Name, $language));
         }
     }
     $options = array_merge(parent::getOptions(), $options);
     return $options;
 }
 /**
  * Method to get a list of options for a list input.
  *
  * @return	array		An array of JHtml options.
  */
 protected function getOptions()
 {
     $document = JFactory::getDocument();
     $language = $document->getLanguage();
     $merchantCategories = BFCHelper::getMerchantCategories();
     $options = array();
     if ($merchantCategories) {
         foreach ($merchantCategories as $merchantCategory) {
             $currOpt = JHtml::_('select.option', $merchantCategory->MerchantCategoryId, BFCHelper::getLanguage($merchantCategory->Name, $language));
             $currOpt->checked = null;
             $options[] = $currOpt;
         }
     }
     $options = array_merge(parent::getOptions(), $options);
     return $options;
 }
 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)));
     }
 }
예제 #8
0
    $merchantAddress = true;
}
$merchantname = BFCHelper::getLanguage($merchant->Name, $this->language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags'));
$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'));
$hashorder = JRequest::getVar('hash');
if (empty($hashorder)) {
    if ($merchant->RatingsContext !== 2 && $merchant->RatingsContext !== 3) {
        //redirect alla risorsa senza possibilità di renensirla
        header("Location: " . JRoute::_('index.php?option=com_bookingforconnector&view=resource&resourceId=' . $resource->UnitId . ':' . BFCHelper::getSlug($resourceName), true, -1));
        $app = JFactory::getApplication();
        $app->close();
    }
}
$this->document->setTitle($resourceName . ' - ' . $merchant->Name);
$this->document->setDescription(BFCHelper::getLanguage($resource->Description, $this->language));
$user = JFactory::getUser();
//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>");
//echo (print_r($user));
//echo ("</pre>");
?>
<div class="com_bookingforconnector_resource com_bookingforconnector_resource-mt<?php 
echo $merchant->MerchantTypeId;
?>
 com_bookingforconnector_resource-t<?php 
예제 #9
0
} else {
    $uriMerchant .= '&merchantId=' . $merchant->MerchantId . ':' . BFCHelper::getSlug($merchant->Name);
}
$routeMerchant = JRoute::_($uriMerchant);
//$route = JRoute::_('index.php?option=com_bookingforconnector&view=onsellunit&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName));
//$routeMerchant = JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&merchantId=' . $resource->MerchantId . ':' . BFCHelper::getSlug($merchant->Name));
$resourceImageUrl = Juri::base() . "/images/default.jpg";
$merchantLogoPath = Juri::base() . "/images/default.jpg";
//	if ($resource->ImageUrl != '') {
//		$resourceImageUrl = BFCHelper::getImageUrl('resources',$resource->ImageUrl, 'resource_list_default');
if ($merchant->LogoUrl != '') {
    $merchantLogoPath = BFCHelper::getImageUrl('merchant', $merchant->LogoUrl, 'merchant_logo_small_rapidview');
}
$isMerchantAnonymous = BFCHelper::isMerchantAnonymous($merchant->MerchantTypeId);
$contractType = $resource->ContractType ? JTEXT::_('COM_BOOKINGFORCONNECTOR_VIEWS_ONSELLUNIT_CONTRACTTYPE1') : JTEXT::_('COM_BOOKINGFORCONNECTOR_VIEWS_ONSELLUNIT_CONTRACTTYPE');
$typeName = BFCHelper::getLanguage($resource->CategoryName, $this->language);
//echo "<pre>";
//echo print_r($resource);
//echo "</pre>";
//$showResourceMap = false;
?>
<style>
.flexslider { 
	margin: 0; background: #fff; 
	border: 0px solid #fff; 
	border-right: 1px solid #fff; 
	position: relative; 
	-webkit-border-radius: 0px; 
	-moz-border-radius: 0px;
	-o-border-radius: 0px;
	border-radius: 0px; 
예제 #10
0
    ?>
</h4>
		<?php 
    $count = 0;
    ?>
		<?php 
    foreach ($services as $service) {
        ?>
			<?php 
        if ($count > 0) {
            echo ',';
        }
        ?>
			
			<span class="com_bookingforconnector_resource-services-service"><?php 
        echo BFCHelper::getLanguage($service->Name, $language);
        ?>
</span>
			<?php 
        $count += 1;
        ?>
		<?php 
    }
    ?>
	</div>
	<?php 
}
?>
	<?php 
if ($merchantRules != null && $merchantRules != '' || $resourceRules != null && $resourceRules != '') {
    ?>
예제 #11
0
<?php

// 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));
$merchantSiteUrl = '';
if ($this->item->AddressData->SiteUrl != '') {
    $merchantSiteUrl = $this->item->AddressData->SiteUrl;
    $parsed = parse_url($merchantSiteUrl);
    if (empty($parsed['scheme'])) {
        $merchantSiteUrl = 'http://' . ltrim($merchantSiteUrl, '/');
    }
    //	if (strpos('http://', $merchantSiteUrl) == false) {
    //		$merchantSiteUrl = 'http://' . $merchantSiteUrl;
    //	}
}
$metodForm = "";
if (strpos($merchantSiteUrl, '%3f') !== false || strpos($merchantSiteUrl, '?') !== false) {
    $metodForm = "post";
}
if (strpos($merchantSiteUrl, '?post') !== false) {
    $metodForm = "post";
    $merchantSiteUrl = str_replace("?post", "", $merchantSiteUrl);
}
?>
<style>
	body#bd{
		background-color: #ffffff;
		background-image:none;
	}
예제 #12
0
?>
" onerror="this.onerror=null;this.src='<?php 
echo $imgError;
?>
'" /></a>
				<h4 class="com_bookingforconnector_merchantdetails-resource-name"><a class="com_bookingforconnector_resource-resource-nameAnchor" href="<?php 
echo $route;
?>
"><?php 
echo $offerName;
?>
</a></h4>

				<p class="com_bookingforconnector_merchantdetails-resource-desc">
					<?php 
echo BFCHelper::getLanguage($offer->Description, $this->language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags'));
?>
				</p>
			</div>
			<div class="clearboth"></div>
			<div class="<?php 
echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_ROW;
?>
 com_bookingforconnector_search-merchant-resource nominheight noborder">
					<div class="<?php 
echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_ROW;
?>
 ">
				<?php 
if ($offer->Price != null && $offer->Price > 0) {
    ?>
예제 #13
0
        if (isset($filtersEnabledMasterTypologies) && is_array($filtersEnabledMasterTypologies) && array_key_exists($masterTypology->MasterTypologyId, $filtersEnabledMasterTypologies)) {
            ?>
						<?php 
            $checked = '';
            if (isset($filtersMasterTypologies) && is_array($filtersMasterTypologies) && in_array($masterTypology->MasterTypologyId, $filtersMasterTypologies)) {
                $checked = ' checked="checked"';
            }
            ?>
						<label class="checkbox"><input type="checkbox" name="filtersMasterTypologies"  class="checkboxmastertypologies" value="<?php 
            echo $masterTypology->MasterTypologyId;
            ?>
" <?php 
            echo $checked;
            ?>
 /><?php 
            echo BFCHelper::getLanguage($masterTypology->Name, $language);
            ?>
 <span class="countvalues" style="display:none;">(<?php 
            echo $filtersEnabledMasterTypologies[$masterTypology->MasterTypologyId];
            ?>
)</label>
					<?php 
        }
        ?>
				<?php 
    }
    ?>
			</div>
		<?php 
}
?>
 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;
 }
    unset($currstay->RatePlanStay->SuggestedStay);
    $currstay->CalculatedPricesDetails = $completestay->CalculatedPricesDetails;
    $currstay->AllVariations = $completestay->AllVariations;
    $currstay->DiscountVariation = $completestay->DiscountVariation;
    $currstay->SupplementVariation = $completestay->SupplementVariation;
    $staysuggested = htmlspecialchars(json_encode($currstay), ENT_COMPAT, 'UTF-8');
}
$bookingTypes = $this->MerchantBookingTypes;
$bookingTypedefault = "";
//$bookingTypesDesc ="";
$bookingTypesoptions = array();
$bookingTypesValues = array();
if (!empty($bookingTypes)) {
    $bookingTypesDescArray = array();
    foreach ($bookingTypes as $bt) {
        $currDesc = BFCHelper::getLanguage($bt->Name, $lang) . "<div class='ccdescr'>" . BFCHelper::getLanguage($bt->Description, $lang) . "</div>";
        if ($bt->AcquireCreditCardData && !empty($bt->Data)) {
            $ccimgages = explode("|", $bt->Data);
            $cCCTypeList = array();
            $currDesc .= "<div class='ccimages'>";
            foreach ($ccimgages as $ccimgage) {
                $currDesc .= '<i class="fa fa-cc-' . strtolower($ccimgage) . '" title="' . $ccimgage . '"></i>&nbsp;&nbsp;';
                $cCCTypeList[] = JHTML::_('select.option', $ccimgage, $ccimgage);
            }
            $currDesc .= "</div>";
        }
        //		if($bt->AcquireCreditCardData==1 && !BFCHelper::isUnderHTTPS() ){
        //			continue;
        //		}
        $bookingTypesoptions[] = JHTML::_('select.option', $bt->BookingTypeId . ":" . $bt->AcquireCreditCardData, $currDesc);
        $calculatedBookingType = $bt;
예제 #16
0
echo $indirizzo;
?>
</span>, <span class="postal-code "><?php 
echo $cap;
?>
</span> <span class="locality"><?php 
echo $comune;
?>
</span> <span class="region">(<?php 
echo $provincia;
?>
)</span></strong>
				</div>
				<p class="com_bookingforconnector_merchantdetails-resource-desc">
					<?php 
echo BFCHelper::getLanguage($resource->Description, 'en-gb', null, array('nomore1br' => 'nomore1br', 'ln2br' => 'ln2br', 'striptags' => 'striptags'));
?>
				</p>
			</div>
			<div class="clearboth"></div>
			<div class="row-fluid com_bookingforconnector_search-merchant-resource nominheight noborder">
					<div class="row-fluid ">
						<div class="span3 com_bookingforconnector_merchantdetails-resource-paxes minheight34 borderright">
							<?php 
if ($resource->MinCapacityPaxes == $resource->MaxCapacityPaxes) {
    ?>
								<?php 
    echo $resource->MaxCapacityPaxes;
    ?>
 <?php 
    echo 'Persons';
예제 #17
0
    ?>
</h4>
		<?php 
    $count = 0;
    ?>
		<?php 
    foreach ($services as $service) {
        ?>
			<?php 
        if ($count > 0) {
            echo ',';
        }
        ?>
			
			<span class="com_bookingforconnector_resource-services-service"><?php 
        echo BFCHelper::getLanguage($service->Name, 'en-gb');
        ?>
</span>
			<?php 
        $count += 1;
        ?>
		<?php 
    }
    ?>
	</div>
	<?php 
}
?>
	<?php 
if ($merchantRules != null && $merchantRules != '' || $resourceRules != null && $resourceRules != '') {
    ?>
																												<?php 
        if ($selVariationId != '') {
            ?>
																													<div class="com_bookingforconnector_merchantdetails-resource-stay-variations" style="<?php 
            echo $currentState == 'booking' ? 'display:block;' : 'display:none;';
            ?>
">
																														<?php 
            foreach ($this->stay->Variations as $variation) {
                ?>
																															<?php 
                if ($variation->VariationPlanId == $selVariationId) {
                    ?>
																																<div class="com_bookingforconnector_merchantdetails-resource-stay-price">
																																	<?php 
                    echo BFCHelper::getLanguage($variation->Name, $this->language);
                    ?>
 <br />
																																	&euro; <span class="com_bookingforconnector_merchantdetails-resource-stay-total"><?php 
                    echo BFCHelper::priceFormat($totalWithVariation);
                    ?>
</span>
																																</div>
																																<?php 
                    break;
                    ?>
																															<?php 
                }
                ?>
																														<?php 
            }
예제 #19
0
    echo $indirizzo;
    ?>
</span>, <span class="postal-code "><?php 
    echo $cap;
    ?>
</span> <span class="locality"><?php 
    echo $comune;
    ?>
</span> <span class="region">(<?php 
    echo $provincia;
    ?>
)</span></strong>
				</div>
				<p class="com_bookingforconnector_merchantdetails-resource-desc">
					<?php 
    echo BFCHelper::getLanguage($resource->Description, $GLOBALS['bfi_lang'], null, array('nomore1br' => 'nomore1br', 'ln2br' => 'ln2br', 'striptags' => 'striptags'));
    ?>
				</p>
			</div>
			<div class="clearboth"></div>
			<div class="<?php 
    echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_ROW;
    ?>
 com_bookingforconnector_search-merchant-resource nominheight noborder">
					<div class="<?php 
    echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_ROW;
    ?>
 ">
						<div class="<?php 
    echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL;
    ?>
예제 #20
0
			<div class="com_bookingforconnector_merchantdetails-resource com_bookingforconnector_merchantdetails-resource-open">
				<div class="com_bookingforconnector_merchantdetails-resource-features">
					<a class="com_bookingforconnector_resource-imgAnchor" ><img class="com_bookingforconnector_resource-img" src="<?php 
        echo $img;
        ?>
" onerror="this.onerror=null;this.src='<?php 
        echo $imgError;
        ?>
'" /></a>
					<h3 class="com_bookingforconnector_merchantdetails-resource-name"><?php 
        echo $onSellUnitName;
        ?>
</h3>
					<p class="com_bookingforconnector_merchantdetails-resource-desc">
						<?php 
        echo BFCHelper::getLanguage($onSellUnit->Description, $this->language, null, array('ln2br' => 'ln2br'));
        ?>
					</p>
				</div>
				<div class="clearboth"></div>
				<div class="<?php 
        echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_ROW;
        ?>
 com_bookingforconnector_search-merchant-resource nominheight noborder">
						<div class="<?php 
        echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_ROW;
        ?>
 ">
					<?php 
        if ($onSellUnit->Price != null && $onSellUnit->Price > 0) {
            ?>
<?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');
$counterResources = 1;
$condominium = $this->item;
$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;
예제 #22
0
$masterTypeId = $pars['masterTypeId']?: '';
$zoneId = $pars['zoneId']?: 0;
$resourceName = $pars['resourceName'] ?: '';
$refid = $pars['refid']?: '';
$onlystay = $pars['onlystay']?: 'true';
$pricerange = $pars['pricerange']?: '0';
*/
//if ($pars['checkout'] == null)
//	$checkout->modify($checkoutspan);
$document = JFactory::getDocument();
$language = $document->getLanguage();
$merchantCategories = BFCHelper::getMasterTypologies();
$types = array();
$types[] = JHTML::_('select.option', '', '---');
foreach ($merchantCategories as $mc) {
    $types[] = JHTML::_('select.option', $mc->MasterTypologyId, BFCHelper::getLanguage($mc->Name, $language));
}
$persons = array(JHTML::_('select.option', '1', JText::_('1')), JHTML::_('select.option', '2', JText::_('2')), JHTML::_('select.option', '3', JText::_('3')), JHTML::_('select.option', '4', JText::_('4')), JHTML::_('select.option', '5', JText::_('5')), JHTML::_('select.option', '6', JText::_('6')), JHTML::_('select.option', '7', JText::_('7')), JHTML::_('select.option', '8', JText::_('8')), JHTML::_('select.option', '9', JText::_('9')), JHTML::_('select.option', '10', JText::_('10')));
$prices = array(JHTML::_('select.option', '0', JTEXT::_('MOD_BOOKINGFORCONNECTOR_SEARCH_ALL')), JHTML::_('select.option', '1|199', '&lt; 200 &euro;'), JHTML::_('select.option', '200|399', '200 - 399 &euro;'), JHTML::_('select.option', '400|599', '400 - 599 &euro;'), JHTML::_('select.option', '600|799', '600 - 799 &euro;'), JHTML::_('select.option', '800|999', '800 - 999 &euro;'), JHTML::_('select.option', '1000|1499', '1000 - 1499 &euro;'), JHTML::_('select.option', '1500|0', '&gt; 1500 &euro;'));
//$zones =  array(
//	JHTML::_('select.option', '0', 'Bibione' ),
//	JHTML::_('select.option', '1', 'Bibione Spiaggia' ),
//	JHTML::_('select.option', '2', 'Bibione Pineda' ),
//	JHTML::_('select.option', '3', 'Bibione Lido del Sole' ),
//	JHTML::_('select.option', '4', 'Bibione Lido dei Pini' ),
//	JHTML::_('select.option', '5', 'Bevazzana' )
//	);
$locationZones = BFCHelper::getLocationZones();
$zones = array();
$zones[] = JHTML::_('select.option', 0, JTEXT::_('MOD_BOOKINGFORSEARCH_ALL'));
if (!empty($locationZones)) {
echo $merchant->Rating;
?>
</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';
				<?php 
    }
    ?>

			</div>
		<?php 
} else {
    ?>
					<?php 
    if (count($priceTypes) > 0) {
        ?>
					<div class="com_bookingforconnector_merchantdetails-resource-pricetypes">
						<?php 
        $pts = array();
        foreach ($priceTypes as $pt) {
            $pts[] = JHTML::_('select.option', $pt->Type, BFCHelper::getLanguage($pt->Name, $this->language));
        }
        ?>
						<?php 
        echo JHTML::_('select.genericlist', $pts, 'pricetype', array('onchange' => 'changePriceType(jQuery,this);'), 'value', 'text', $selPriceType);
        ?>
					</div>
					<?php 
    }
    ?>
			<strong><?php 
    echo JText::_('COM_BOOKINGFORCONNECTOR_RESOURCE_VIEW_CALCULATOR_NORESULT');
    ?>
</strong>
			<?php 
    if ($stayAvailability < 1) {
예제 #25
0
    }
    if (isset($merchant->DistanceFromCenter)) {
        $distanceFromCenter = $merchant->DistanceFromCenter;
    }
}
$maxCapacityPaxes = $resource->MaxCapacityPaxes;
$minCapacityPaxes = $resource->MinCapacityPaxes;
$this->document->setTitle($resourceName . ' - ' . $merchant->Name);
$this->document->setDescription(BFCHelper::getLanguage($resource->Description, $this->language));
$merchantRules = "";
if (isset($merchant->Rules)) {
    $merchantRules = BFCHelper::getLanguage($merchant->Rules, $this->language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags'));
}
$resourceRules = "";
if (isset($resource->Rules)) {
    $resourceRules = BFCHelper::getLanguage($resource->Rules, $this->language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags'));
}
?>
<div class="com_bookingforconnector_resource com_bookingforconnector_resource-mt<?php 
echo $merchant->MerchantTypeId;
?>
 ">
	<h2 class="com_bookingforconnector_resource-name"><?php 
echo $resourceName;
?>
 
		<span class="com_bookingforconnector_resource-rating com_bookingforconnector_resource-rating<?php 
echo $merchant->Rating;
?>
">
		</span>
예제 #26
0
        echo JText::_('COM_BOOKINGFORCONNECTOR_RESOURCE_VIEW_CALCULATOR_RESOURCES');
        ?>
:</div>
				<div class="bf-summary-body-resourcename">
					<?php 
        echo $resourceName;
        ?>
					<?php 
        if ($selPriceTypeObj != null && $isBase != "True") {
            ?>
						<br/>
						<?php 
            echo JText::_('COM_BOOKINGFORCONNECTOR_RESOURCE_VIEW_CALCULATOR_TREATMENT');
            ?>
: <?php 
            echo BFCHelper::getLanguage($selPriceTypeObj->Name, $this->language);
            ?>
					<?php 
        }
        ?>
				</div>
			<?php 
        if (!empty($calPricesResources)) {
            ?>
				<div class="bf-summary-body-resourceprice">
					<?php 
            $totalPriceResource = 0;
            //prezzo della risorsa + persone
            $totalPriceDiscountedResource = 0;
            //prezzo della risorsa + persone
            foreach ($calPricesResources as $calPrice) {
					<div id="showallresource<?php 
            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) {
예제 #28
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);
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
예제 #29
0
            print "</tr>\n<tr>";
        }
        $i++;
    }
    print "</tr>\n";
}
?>
	</table>

	<div class="com_bookingforconnector_resource-description">
		<h4 class="underlineborder"><?php 
echo 'Description';
?>
</h4>
		<?php 
echo BFCHelper::getLanguage($resource->Description, $language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags'));
?>
	</div>
	<?php 
if (isset($resource->CanCollaborate) && $resource->CanCollaborate) {
    ?>
		<div class="pull-right cancollaborate"><?php 
    _e('It is possible the cooperation between agencies', 'bfi');
    ?>
</div>
		<br />
	<?php 
}
?>
	<div class="clear"></div>
	<?php 
					<div class="<?php 
        echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_ROW;
        ?>
 com_bookingforconnector_search-merchant-resource com_bookingforconnector_search-merchant-resource<?php 
        echo $counter % 2;
        ?>
">
						<div class="<?php 
        echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL;
        ?>
7 borderright">
							<h4 class="com_bookingforconnector_search-merchant-resource-name"><a href="<?php 
        echo $resourceRoute;
        ?>
"><?php 
        echo BFCHelper::getLanguage($resource->Name, $language);
        ?>
</a></h4>
							<div class="<?php 
        echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_ROW;
        ?>
">
								<div class="<?php 
        echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL;
        ?>
4 com_bookingforconnector_merchantdetails-resource-paxes">
									<?php 
        if ($resource->MinCapacityPaxes == $resource->MaxCapacityPaxes) {
            ?>
										<?php 
            echo $resource->MaxCapacityPaxes;