Template: tasman_init.php
( ! ) Fatal error: Call to a member function selectCollection() on a non-object in /usr/local/WWW/W11/modules/Doctrine/MongoDB/Collection.php on line 118
Call Stack
#TimeMemoryFunctionLocation
10.0001245384{main}( )../index.php:0
20.03459297400include( '/usr/local/WWW/W11/homepages.webkracht.nl/htdocs/homepage.php' )../index.php:33
30.089210813832include( '/usr/local/WWW/W11/homepages.webkracht.nl/htdocs/homepage_main.inc.php' )../homepage.php:561
40.277315571728FormReplace->replaceMarkers( )../homepage_main.inc.php:725
50.359218544920FormHandler->searchByParamString( )../class.formreplace.inc.php:880
60.364919214696Template::safe_eval( )../class.formhandler.inc.php:1265
70.381519348376Template::_buffered_eval( )../class.template.inc.php:236
80.382419687864eval( '?>request->getGet('chat')){ $exolog->coreModule->chat->show(); } */ $strCountry = ''; $strCategory = ''; $strContinent = ''; $arrCurrentEdition = $exolog->editions[$exolog->defaults['edition']]; $arrFdsearch = $exolog->request->getGet('fdsearch'); if (($arrFdsearch!=false)&&isset($arrFdsearch['country'])&&($arrFdsearch['country']=='empty')){ unset($arrFdsearch['country']); } if (($arrFdsearch!=false)&&isset($arrFdsearch['continent'])&&($arrFdsearch['continent']=='empty')){ unset($arrFdsearch['continent']); } if (($arrFdsearch!=false)&&isset($arrFdsearch['month'])&&($arrFdsearch['month']=='empty')){ unset($arrFdsearch['month']); } if (($arrFdsearch!=false)&&isset($arrFdsearch['minPrice'])&&($arrFdsearch['minPrice']=='empty')){ unset($arrFdsearch['minPrice']); } if (($arrFdsearch!=false)&&isset($arrFdsearch['maxPrice'])&&($arrFdsearch['maxPrice']=='empty')){ unset($arrFdsearch['maxPrice']); } $intPage = (is_array($arrFdsearch)&&isset($arrFdsearch['page'])&&is_numeric($arrFdsearch['page'])&&($arrFdsearch['page']>0))?$arrFdsearch['page']:1; if (isset($arrCurrentEdition['e_var_continent'])&&($arrCurrentEdition['e_var_continent']!=null)){ $strContinent = $arrCurrentEdition['e_var_continent']; $fdshared['edition_continents'] = explode('|',$strContinent); } if (isset($arrCurrentEdition['e_var_country'])&&($arrCurrentEdition['e_var_country']!=null)){ $strCountry = $arrCurrentEdition['e_var_country']; } if (isset($arrCurrentEdition['e_var_category'])&&($arrCurrentEdition['e_var_category']!=null)){ $strCategory = $arrCurrentEdition['e_var_category']; } if (isset($exolog->defaults['readpage']['p_var_continent'])&&($exolog->defaults['readpage']['p_var_continent']!=null)){ $strContinent = $exolog->defaults['readpage']['p_var_continent']; } if (isset($exolog->defaults['readpage']['p_var_country'])&&($exolog->defaults['readpage']['p_var_country']!=null)){ $strCountry = $exolog->defaults['readpage']['p_var_country']; } if (isset($exolog->defaults['readpage']['p_var_droomeiland'])&&($exolog->defaults['readpage']['p_var_droomeiland']!=null)){ $strCategory = $exolog->defaults['readpage']['p_alias']; } if (isset($exolog->defaults['readpage']['p_var_category'])&&($exolog->defaults['readpage']['p_var_category']!=null)){ $strCategory = $exolog->defaults['readpage']['p_var_category']; } if ($arrFdsearch!==null){ if (isset($arrFdsearch['continent'])&&($arrFdsearch['continent']!=null)){ $strContinent = $arrFdsearch['continent']; } if (isset($arrFdsearch['country'])&&($arrFdsearch['country']!=null)){ $strCountry = $arrFdsearch['country']; } if (isset($arrFdsearch['category'])&&($arrFdsearch['category']!=null)){ $strCategory = $arrFdsearch['category']; } } /* * Output continent and country inside hidden div for furute use from js. */ printf("
%s
%s
%s
",$strCategory,$strContinent,$strCountry); if (strpos($strContinent,'|')!==false){ $strContinent = explode('|',$strContinent); } if (strpos($strCountry,'|')!==false){ $strCountry = explode('|',$strCountry); } /* * Init site controllers */ if (!empty($strContinent)) $exolog->controler->setContinent($strContinent); if (!empty($strCountry)) $exolog->controler->setCountry($strCountry); if (!empty($strCategory)&&($strCategory!='all')) $exolog->controler->setCategory($strCategory); /* * Initialising $fd_var */ $fd_var['trips_count'] = $exolog->controler->getTripsCount(array( //'minEndDate' => date("Y-m-d") )); $fdshared['is_countrypage'] = false; $arrSubPagesOptions = array('parent_id'=>$exolog->defaults['readpage']['p_id']); $fdshared['global_pagegroups'] = $exolog->pageHandler->getPagegroups(array('pages'=>array($exolog->defaults['readpage']['p_id']))); $fdshared['global_pagegroup_aliases'] = array(); $fdshared['global_pagegroup_ids'] = array(); foreach ($fdshared['global_pagegroups'] as $arrPg){ $fdshared['global_pagegroup_aliases'][]=$arrPg['pagegroup_alias']; $fdshared['global_pagegroup_ids'][]=$arrPg['pagegroup_id']; if ($arrPg['pagegroup_alias']=='menu_countries'){ $arrSubPagesOptions['subpages_level'] = 1; $fdshared['is_countrypage'] = true; } } reset($fdshared['global_pagegroups']); $arrSubPagesOptions['p_hidden'] = 0; $arrSubpages = $exolog->pageHandler->getPages($arrSubPagesOptions); /* $arrSubpagesAttrs = array(); foreach ($arrSubpages['data'] as $intKey => $arrSubpage){ $arrSubpagesAttrs[$intKey] = array( 'p_var_trip_ids'=>$arrSubpage['p_var_trip_ids'], 'p_var_hotel_ids'=>$arrSubpage['p_var_hotel_ids'], 'p_var_car_model_image_ids'=>$arrSubpage['p_var_car_model_image_ids'] ); }*/ $fdshared['subpages'] = $arrSubpages['data']; $fdshared['continent'] = $strContinent; $fdshared['destination'] = $fdshared['country'] = $strCountry; if (isset($exolog->defaults['readpage']['p_var_droomeiland'])&&($exolog->defaults['readpage']['p_var_droomeiland']!=null)){ $fdshared['destination'] = $exolog->defaults['readpage']['p_alias']; } $fdsearch['category'] = $strCategory; $fdshared['fdsearch'] = $arrFdsearch; $fdshared['limit'] = $exolog->request->getGet('limit'); $fdshared['page'] = $exolog->request->getGet('page'); $arrVarTrips = explode("|",$exolog->defaults['readpage']['global_p_var_trip_ids']); if(in_array('menu_themas',$fdshared['global_pagegroup_aliases'])){ if (!empty($arrVarTrips)){ foreach ($arrVarTrips as $k=>$v){ $arrVarTrips[$k] = $v*1; } } if (!empty($arrVarTrips)){ $fdshared['themas_continents'] = $exolog->controler->getContinentsByTripIDS(array('tourID'=>$arrVarTrips)); $fdshared['themas_default_continent'] = current($fdshared['themas_continents']); $strVarDefaultContinent = $exolog->defaults['readpage']['global_p_var_continent']; if (($strVarDefaultContinent!=null)&&is_string($strVarDefaultContinent)&&(strlen(trim($strVarDefaultContinent))>0)){ $fdshared['themas_default_continent'] = $strVarDefaultContinent; } } else { $fdshared['themas_continents'] = array(); } if ($arrFdsearch['continent']!=null){ $fdshared['themas_default_continent'] = $arrFdsearch['continent']; } } if (in_array('menu_countries',$fdshared['global_pagegroup_aliases'])){ if (!empty($arrVarTrips)){ //fetch offer trips for country pages if (!empty($arrVarTrips)){ foreach ($arrVarTrips as $k=>$v){ $arrVarTrips[$k] = $v*1; } $arrOfferTrips = array(); foreach ($arrVarTrips as $arrTripID){ //echo $arrTripID; if (!empty($arrTripID)){ $arrTripRec = $exolog->controler->getTrip($arrTripID); $strToday = date('Y-m-d'); $intMinPrice = -1; if (!empty($arrTripRec['prices'])&&is_array($arrTripRec['prices'])) { foreach ($arrTripRec['prices'] as $arrPrice){ if (($arrPrice['endDate']>$strToday)&&is_numeric($arrPrice['priceValue'])){ $arrPrice['priceValue']*=1; if (($intMinPrice<0)||(($intMinPrice>0)&&($intMinPrice>$arrPrice['priceValue']))){ $intMinPrice = $arrPrice['priceValue']; } } } } $arrOfferTrips[]=array( 'land'=>$arrTripRec['land'], 'tourID'=>$arrTripRec['tourID'], 'tournaam'=>$arrTripRec['tournaam'], 'headline'=>$arrTripRec['headline'], 'subline'=>$arrTripRec['subline'], 'minPrice'=>$intMinPrice, 'continent'=>$arrTripRec['continent'] ); } } $fdshared['offerTrips']=$arrOfferTrips; } } //fetching trips for country $intCountryTripsLimit = 5; $fdshared['countryTrips'] = $exolog->controler->getInitCountryTrips(array( 'limit'=>$intCountryTripsLimit, )); $fdshared['countryTripsCount'] = $exolog->controler->getTripsCount(array( //'minEndDate'=>date("Y-m-d") 'debug_params'=>true )); $fdshared['countryTripsLimit'] = $intCountryTripsLimit; //fetching hotels for country $intCountryHotelsLimit = 7; $arrCountryHotelsCriteria = array( 'limit'=>$intCountryHotelsLimit, 'fields'=>array('hotelID','name','subname','classification','hotel','minPrice','continent','land'), //'minEndDate'=>date("Y-m-d") ); if (isset($arrFdsearch['name'])){ $arrCountryHotelsCriteria['name'] = new \MongoRegex('/'.preg_quote($arrFdsearch['name']).'/i'); $fdshared['filter_name'] = $arrFdsearch['name']; } if (isset($arrFdsearch['subname'])){ $arrCountryHotelsCriteria['subname'] = new \MongoRegex('/'.preg_quote($arrFdsearch['subname']).'/i'); $fdshared['filter_subname'] = $arrFdsearch['subname']; } $arrCountryHotels = $exolog->controler->getHotelsRecords($arrCountryHotelsCriteria); $fdshared['countryHotels'] = array(); foreach ($arrCountryHotels as $arrHotelRec){ $arrHotel = array( 'hotelID'=>$arrHotelRec->getHotelID(), 'name'=>$arrHotelRec->getName(), 'subname'=>$arrHotelRec->getSubname(), 'classification'=>$arrHotelRec->getClassification(), 'hotel'=>$arrHotelRec->getHotel(), 'minPrice'=>$arrHotelRec->getMinPrice(), 'continent'=>$arrHotelRec->getContinent(), 'land'=>$arrHotelRec->getLand(), ); $arrFilenames = $exolog->controler->getHotelImagesFiles(array( 'hotelID'=>$arrHotelRec->getHotelID(), 'exologFiles'=>true, )); $arrFilenames = array_unique($arrFilenames); $arrHotel['imgUrl'] = sprintf("%s%s",'/file/',$arrFilenames[rand(0,count($arrFilenames)-1)]); $floatClass = $arrHotel['classification']; $floatClass = preg_replace('/\,/i','.',$floatClass); $floatClass = preg_replace('/[^0-9\.]/i','',$floatClass); $floatClass = preg_replace('/\.$/i','',$floatClass); $floatClass = preg_replace('/^\./i','',$floatClass); $floatClass = $floatClass*1; $intStars = floor($floatClass); if ($floatClass-$intStars>0) { $booleanHasHalfstar = true; } else { $booleanHasHalfstar = false; } $arrHotel['fullStars'] = $intStars; $arrHotel['halfStar'] = $booleanHasHalfstar; $fdshared['countryHotels'][]=$arrHotel; } $fdshared['countryHotelsLimit'] = $intCountryHotelsLimit; unset($arrCountryHotelsCriteria['limit']); unset($arrCountryHotelsCriteria['fields']); $fdshared['countryHotelsTotal'] = $exolog->controler->getHotelsCount($arrCountryHotelsCriteria); } if (!empty($arrFdsearch)&&isset($arrFdsearch['path_country'])){ $fd_var['path_country_alias'] = $arrFdsearch['path_country']; $fd_var['path_country'] = $exolog->controler->translateName($arrFdsearch['path_country']); $fdshared['path_country_alias'] = $fd_var['path_country_alias']; } if (!empty($arrFdsearch)&&isset($arrFdsearch['path_continent'])){ $fd_var['path_continent_alias'] = $arrFdsearch['path_continent']; $fd_var['path_continent'] = $exolog->controler->translateName($arrFdsearch['path_continent']); $fdshared['path_continent_alias'] = $fd_var['path_continent_alias']; } if(in_array('filter',$fdshared['global_pagegroup_aliases'])){ //getting data for filter $strFilterType = $exolog->defaults['readpage']['p_var_filter_type']; $fdshared['filter_avaliable_countries'] = $exolog->controler->getTripsAvaliableCountries(); $arrFilterCriteria = array(); $strFilterPriceRange = $exolog->defaults['readpage']['p_var_filter_pricerange']; $strFilterPriceRange = explode(',',$strFilterPriceRange); $arrFilterPriceRange = array(); foreach ($strFilterPriceRange as $strRangePart){ $strRangePart = trim($strRangePart); list($k,$v) = explode('=',$strRangePart); $arrFilterPriceRange[$k]=$v*1; } $intFilterPriceRangeSteps = floor(($arrFilterPriceRange['max']-$arrFilterPriceRange['min'])/$arrFilterPriceRange['step']); $intFilterPriceRangePrice = $arrFilterPriceRange['min']; $arrFilterPriceRangeCriterias = array(); for ($intI=0;$intI<$intFilterPriceRangeSteps;$intI++){ $intNextPrice = $intFilterPriceRangePrice+$arrFilterPriceRange['step']; if ($intNextPrice<$arrFilterPriceRange['max']){ $strKey = sprintf("%d - %d",$intFilterPriceRangePrice,$intNextPrice); } else { $strKey = sprintf("%d+",$intFilterPriceRangePrice); } $arrFilterPriceRangeCriterias[$strKey] = array( 'minPrice'=>$intFilterPriceRangePrice, 'maxPrice'=>($intNextPrice<$arrFilterPriceRange['max'])?$intNextPrice:null ); $intFilterPriceRangePrice+=$arrFilterPriceRange['step']; } if (($arrFdsearch!=false)&&isset($arrFdsearch['minPrice'])&&is_numeric($arrFdsearch['minPrice'])&&($arrFdsearch['minPrice']>0)){ $arrFilterCriteria['minPrice'] = $arrFdsearch['minPrice']*1; $fdshared['filter_min_price'] = $arrFdsearch['minPrice']*1; if (isset($arrFdsearch['maxPrice'])&&is_numeric($arrFdsearch['maxPrice'])&&($arrFdsearch['maxPrice']>0)){ $arrFilterCriteria['maxPrice'] = $arrFdsearch['maxPrice']*1; $fdshared['filter_max_price'] = $arrFdsearch['maxPrice']*1; } } if (($arrFdsearch!=false)&&isset($arrFdsearch['country'])){ $fdshared['filter_country'] = $arrFdsearch['country']; $fdshared['filter_continent'] = $exolog->controler->getCountinentByCountry($arrFdsearch['country']); } if (($arrFdsearch!=false)&&isset($arrFdsearch['continent'])){ $fdshared['filter_continent'] = $arrFdsearch['continent']; } if (($arrFdsearch!=false)&&isset($arrFdsearch['month'])&&is_numeric($arrFdsearch['month'])&&($arrFdsearch['month']>0)&&($arrFdsearch['month']<12)){ $intMonth=$arrFdsearch['month']*1; $intYear = date('Y')*1;; $intCurrentMonth = date('m')*1; if ($intMonth<$intCurrentMonth) $intYear++; if ($intMonth<10){ $strDateMin = $intYear."-0".$intMonth.'-01'; } else { $strDateMin = $intYear."-".$intMonth.'-01'; } if ($intMonth==$intCurrentMonth) $strDateMin = date('Y-m-d'); //$arrFilterCriteria['minEndDate'] = $strDateMin; //$arrFilterCriteria['maxStartDate'] = date('Y-m-t',strtotime($strDateMin)); $fdshared['filter_month'] = $intMonth; } else { //$arrFilterCriteria['minEndDate'] = date('Y-m-d'); } $arrFilterMonthes = array( date('n')=>array( 'first'=>date('Y-m-d'), 'last'=>date('Y-m-t'), ) ); $intMonth = date('m')*1; $intYear = date('Y')*1; for($intI=1;$intI<12;$intI++){ $intMonth++; if ($intMonth>12) { $intMonth = 1; $intYear++; } if ($intMonth<10){ $strDateMin = $intYear."-0".$intMonth.'-01'; } else { $strDateMin = $intYear."-".$intMonth.'-01'; } $arrFilterMonthes[date('n',strtotime($strDateMin))] = array( 'first'=>$strDateMin, 'last'=>date('Y-m-t',strtotime($strDateMin)), ); } $intFilterLimit = 10; $fdshared['filter_limit'] = $intFilterLimit; $fdshared['filter_page'] = $intPage; if ($strFilterType=='trips') { $fdshared['filter_total'] = $exolog->controler->getTripsCount($arrFilterCriteria); $arrRecordsCriteria = $arrFilterCriteria; $arrRecordsCriteria['limit']=$intFilterLimit; $arrRecordsCriteria['skip']=($intPage-1)*$intFilterLimit; $arrRecordsCriteria['fields']=array('tourID','tournaam','headline','subline','minPrice','inleiding','continent','land','hidden'); $arrTripRecords = $exolog->controler->getTripsRecords($arrRecordsCriteria); $fdshared['filter_trips_records'] = array(); foreach ($arrTripRecords as $arrTripRec){ $arrTrip = array( 'tourID'=>$arrTripRec->getTourID(), 'tournaam'=>$arrTripRec->getTournaam(), 'headline'=>$arrTripRec->getHeadline(), 'subline'=>$arrTripRec->getSubline(), 'minPrice'=>$arrTripRec->getMinPrice(), 'inleiding'=>$arrTripRec->getInleiding(), 'continent'=>$arrTripRec->getContinent(), 'land'=>$arrTripRec->getLand(), 'hidden'=>$arrTripRec->getHidden(), ); $fdshared['filter_trips_records'][]=$arrTrip; } foreach($fdshared['filter_trips_records'] as $k=>$v){ $arrFilenames = $exolog->controler->getTripImagesFiles(array( 'tourID'=>$v['tourID'], 'exologFiles'=>true, )); $arrFilenames = array_unique($arrFilenames); $arrFilenames = array_slice($arrFilenames,0,5); $fdshared['filter_trips_records'][$k]['imgUrl'] = sprintf("%s%s",'/file/',$arrFilenames[rand(0,count($arrFilenames)-1)]); } reset($fdshared['filter_trips_records']); if (!isset($fdshared['filter_continent'])&&(count($fdshared['edition_continents'])>1)){ $fdshared['filter_continent_counters'] = array(); foreach($fdshared['edition_continents'] as $strFilterContinent) { $arrCounterCriteria = $arrFilterCriteria; $arrCounterCriteria['continent'] = $strFilterContinent; $fdshared['filter_continent_counters'][$strFilterContinent] = $exolog->controler->getTripsCount($arrCounterCriteria); } } if (!isset($fdshared['filter_country'])){ $fdshared['filter_countries_counters'] = array(); foreach($fdshared['filter_avaliable_countries'] as $strFilterCountry) { $arrCounterCriteria = $arrFilterCriteria; $arrCounterCriteria['land'] = $strFilterCountry; $fdshared['filter_countries_counters'][$strFilterCountry] = $exolog->controler->getTripsCount($arrCounterCriteria); } } if (!isset($fdshared['filter_month'])){ $fdshared['filter_monthes_counters'] = array(); foreach ($arrFilterMonthes as $intMonth=>$arrMonthAttrs){ $arrCounterCriteria = $arrFilterCriteria; //$arrCounterCriteria['minEndDate'] = $arrMonthAttrs['first']; //$arrCounterCriteria['maxStartDate'] = $arrMonthAttrs['last']; $fdshared['filter_monthes_counters'][$intMonth] = $exolog->controler->getTripsCount($arrCounterCriteria); } } if (!isset($fdshared['filter_min_price'])||!isset($fdshared['filter_max_price'])){ $fdshared['filter_prices_counters'] = array(); foreach ($arrFilterPriceRangeCriterias as $strRange=>$arrRangeAttrs){ $arrCounterCriteria = $arrFilterCriteria; $arrCounterCriteria['minPrice'] = $arrRangeAttrs['minPrice']; if ($arrRangeAttrs['maxPrice']!=null){ $arrCounterCriteria['maxPrice'] = $arrRangeAttrs['maxPrice']; } $arrRangeAttrs['count'] = $exolog->controler->getTripsCount($arrCounterCriteria); $fdshared['filter_prices_counters'][$strRange]=$arrRangeAttrs; } } } elseif ($strFilterType=='hotels') { if (isset($arrFdsearch['name'])){ $arrFilterCriteria['name'] = new \MongoRegex('/'.preg_quote($arrFdsearch['name']).'/i'); $fdshared['filter_name'] = $arrFdsearch['name']; } if (isset($arrFdsearch['address'])){ $arrFilterCriteria['address'] = new \MongoRegex('/'.preg_quote($arrFdsearch['address']).'/i'); $fdshared['filter_address'] = $arrFdsearch['address']; } if (isset($arrFdsearch['subname'])){ $arrFilterCriteria['subname'] = new \MongoRegex('/'.preg_quote($arrFdsearch['subname']).'/i'); $fdshared['filter_subname'] = $arrFdsearch['subname']; } $fdshared['filter_total'] = $exolog->controler->getHotelsCount($arrFilterCriteria); $arrRecordsCriteria = $arrFilterCriteria; $arrRecordsCriteria['limit']=$intFilterLimit; $arrRecordsCriteria['skip']=($intPage-1)*$intFilterLimit; $arrRecordsCriteria['fields']=array('hotelID','name','subname','classification','hotel','minPrice','continent','land'); $arrHotelRecords = $exolog->controler->getHotelsRecords($arrRecordsCriteria); $fdshared['arrRecordsCriteria'] = $arrRecordsCriteria; $fdshared['filter_hotels_records'] = array(); foreach ($arrHotelRecords as $arrHotelRec){ $arrHotel = array( 'hotelID'=>$arrHotelRec->getHotelID(), 'name'=>$arrHotelRec->getName(), 'subname'=>$arrHotelRec->getSubname(), 'classification'=>$arrHotelRec->getClassification(), 'hotel'=>$arrHotelRec->getHotel(), 'minPrice'=>$arrHotelRec->getMinPrice(), 'continent'=>$arrHotelRec->getContinent(), 'land'=>$arrHotelRec->getLand(), ); $arrFilenames = $exolog->controler->getHotelImagesFiles(array( 'hotelID'=>$arrHotel['hotelID'], 'exologFiles'=>true, )); $arrFilenames = array_unique($arrFilenames); $arrHotel['imgUrl'] = sprintf("%s%s",'/file/',$arrFilenames[rand(0,count($arrFilenames)-1)]); $floatClass = $arrHotel['classification']; $floatClass = preg_replace('/\,/i','.',$floatClass); $floatClass = preg_replace('/[^0-9\.]/i','',$floatClass); $floatClass = preg_replace('/\.$/i','',$floatClass); $floatClass = preg_replace('/^\./i','',$floatClass); $floatClass = $floatClass*1; $intStars = floor($floatClass); if ($floatClass-$intStars>0) { $booleanHasHalfstar = true; } else { $booleanHasHalfstar = false; } $arrHotel['fullStars'] = $intStars; $arrHotel['halfStar'] = $booleanHasHalfstar; $fdshared['filter_hotels_records'][]=$arrHotel; } if (!isset($fdshared['filter_continent'])&&(count($fdshared['edition_continents'])>1)){ $fdshared['filter_continent_counters'] = array(); foreach($fdshared['edition_continents'] as $strFilterContinent) { $arrCounterCriteria = $arrFilterCriteria; $arrCounterCriteria['continent'] = $strFilterContinent; $fdshared['filter_continent_counters'][$strFilterContinent] = $exolog->controler->getHotelsCount($arrCounterCriteria); } } if (!isset($fdshared['filter_country'])){ $fdshared['filter_countries_counters'] = array(); foreach($fdshared['filter_avaliable_countries'] as $strFilterCountry) { $arrCounterCriteria = $arrFilterCriteria; $arrCounterCriteria['land'] = $strFilterCountry; $fdshared['filter_countries_counters'][$strFilterCountry] = $exolog->controler->getHotelsCount($arrCounterCriteria); } } if (!isset($fdshared['filter_month'])){ $fdshared['filter_monthes_counters'] = array(); foreach ($arrFilterMonthes as $intMonth=>$arrMonthAttrs){ $arrCounterCriteria = $arrFilterCriteria; //$arrCounterCriteria['minEndDate'] = $arrMonthAttrs['first']; //$arrCounterCriteria['maxStartDate'] = $arrMonthAttrs['last']; $fdshared['filter_monthes_counters'][$intMonth] = $exolog->controler->getHotelsCount($arrCounterCriteria); } } if (!isset($fdshared['filter_min_price'])||!isset($fdshared['filter_max_price'])){ $fdshared['filter_prices_counters'] = array(); foreach ($arrFilterPriceRangeCriterias as $strRange=>$arrRangeAttrs){ $arrCounterCriteria = $arrFilterCriteria; $arrCounterCriteria['minPrice'] = $arrRangeAttrs['minPrice']; if ($arrRangeAttrs['maxPrice']!=null){ $arrCounterCriteria['maxPrice'] = $arrRangeAttrs['maxPrice']; } $arrRangeAttrs['count'] = $exolog->controler->getHotelsCount($arrCounterCriteria); $fdshared['filter_prices_counters'][$strRange]=$arrRangeAttrs; } } } elseif ($strFilterType=='campers') { $fdshared['filter_total'] = $exolog->controler->getCampersCount($arrFilterCriteria); $arrRecordsCriteria = $arrFilterCriteria; $arrRecordsCriteria['limit']=$intFilterLimit; $arrRecordsCriteria['skip']=($intPage-1)*$intFilterLimit; $arrRecordsCriteria['fields']=array('carID','headline','subline','inleiding','minPrice','continent','land'); $arrCampersRecords = $exolog->controler->getCampersRecords($arrRecordsCriteria); $fdshared['filter_campers_records'] = array(); foreach ($arrCampersRecords as $arrCamperRec){ $arrCamper = array( 'carID'=>$arrCamperRec->getCarID(), 'headline'=>$arrCamperRec->getHeadline(), 'minPrice'=>$arrCamperRec->getMinPrice(), 'continent'=>$arrCamperRec->getContinent(), 'land'=>$arrCamperRec->getLand(), 'inleiding'=>$arrCamperRec->getInleiding(), 'subline'=>$arrCamperRec->getSubline() ); $arrFilenames = $exolog->controler->getCarDealersImagesFiles(array( 'carID'=>$arrCamperRec->getCarID(), 'exologFiles'=>true, )); $arrFilenames = array_unique($arrFilenames); $arrCamper['imgUrl'] = sprintf("%s%s",'/file/',$arrFilenames[rand(0,count($arrFilenames)-1)]); $fdshared['filter_campers_records'][]=$arrCamper; } if (!isset($fdshared['filter_continent'])&&(count($fdshared['edition_continents'])>1)){ $fdshared['filter_continent_counters'] = array(); foreach($fdshared['edition_continents'] as $strFilterContinent) { $arrCounterCriteria = $arrFilterCriteria; $arrCounterCriteria['continent'] = $strFilterContinent; $fdshared['filter_continent_counters'][$strFilterContinent] = $exolog->controler->getCampersCount($arrCounterCriteria); } } if (!isset($fdshared['filter_country'])){ $fdshared['filter_countries_counters'] = array(); foreach($fdshared['filter_avaliable_countries'] as $strFilterCountry) { $arrCounterCriteria = $arrFilterCriteria; $arrCounterCriteria['country'] = $strFilterCountry; $fdshared['filter_countries_counters'][$strFilterCountry] = $exolog->controler->getCampersCount($arrCounterCriteria); } } if (!isset($fdshared['filter_month'])){ $fdshared['filter_monthes_counters'] = array(); foreach ($arrFilterMonthes as $intMonth=>$arrMonthAttrs){ $arrCounterCriteria = $arrFilterCriteria; //$arrCounterCriteria['minEndDate'] = $arrMonthAttrs['first']; //$arrCounterCriteria['maxStartDate'] = $arrMonthAttrs['last']; $fdshared['filter_monthes_counters'][$intMonth] = $exolog->controler->getCampersCount($arrCounterCriteria); } } if (!isset($fdshared['filter_min_price'])||!isset($fdshared['filter_max_price'])){ $fdshared['filter_prices_counters'] = array(); foreach ($arrFilterPriceRangeCriterias as $strRange=>$arrRangeAttrs){ $arrCounterCriteria = $arrFilterCriteria; $arrCounterCriteria['minPrice'] = $arrRangeAttrs['minPrice']; if ($arrRangeAttrs['maxPrice']!=null){ $arrCounterCriteria['maxPrice'] = $arrRangeAttrs['maxPrice']; } $arrRangeAttrs['count'] = $exolog->controler->getCampersCount($arrCounterCriteria); $fdshared['filter_prices_counters'][$strRange]=$arrRangeAttrs; } } } elseif ($strFilterType=='cars') { $fdshared['filter_total'] = $exolog->controler->getCarsCount($arrFilterCriteria); $arrRecordsCriteria = $arrFilterCriteria; $arrRecordsCriteria['limit']=$intFilterLimit; $arrRecordsCriteria['skip']=($intPage-1)*$intFilterLimit; $arrRecordsCriteria['fields']=array('carID','headline','subline','inleiding','minPrice','continent','land'); $arrCarsRecords = $exolog->controler->getCarsRecords($arrRecordsCriteria); $fdshared['filter_cars_records'] = array(); foreach ($arrCarsRecords as $arrCarRec){ $arrCar = array( 'carID'=>$arrCarRec->getCarID(), 'headline'=>$arrCarRec->getHeadline(), 'minPrice'=>$arrCarRec->getMinPrice(), 'continent'=>$arrCarRec->getContinent(), 'land'=>$arrCarRec->getLand(), 'inleiding'=>$arrCarRec->getInleiding(), 'subline'=>$arrCarRec->getSubline() ); $arrFilenames = $exolog->controler->getCarDealersImagesFiles(array( 'carID'=>$arrCarRec->getCarID(), 'exologFiles'=>true )); $arrFilenames = array_unique($arrFilenames); $arrCar['imgUrl'] = sprintf("%s%s",'/file/',$arrFilenames[rand(0,count($arrFilenames)-1)]); $fdshared['filter_cars_records'][]=$arrCar; } if (!isset($fdshared['filter_continent'])&&(count($fdshared['edition_continents'])>1)){ $fdshared['filter_continent_counters'] = array(); foreach($fdshared['edition_continents'] as $strFilterContinent) { $arrCounterCriteria = $arrFilterCriteria; $arrCounterCriteria['continent'] = $strFilterContinent; $fdshared['filter_continent_counters'][$strFilterContinent] = $exolog->controler->getCarsCount($arrCounterCriteria); } } if (!isset($fdshared['filter_country'])){ $fdshared['filter_countries_counters'] = array(); foreach($fdshared['filter_avaliable_countries'] as $strFilterCountry) { $arrCounterCriteria = $arrFilterCriteria; $arrCounterCriteria['country'] = $strFilterCountry; $fdshared['filter_countries_counters'][$strFilterCountry] = $exolog->controler->getCarsCount($arrCounterCriteria); } } if (!isset($fdshared['filter_month'])){ $fdshared['filter_monthes_counters'] = array(); foreach ($arrFilterMonthes as $intMonth=>$arrMonthAttrs){ $arrCounterCriteria = $arrFilterCriteria; //$arrCounterCriteria['minEndDate'] = $arrMonthAttrs['first']; //$arrCounterCriteria['maxStartDate'] = $arrMonthAttrs['last']; $fdshared['filter_monthes_counters'][$intMonth] = $exolog->controler->getCarsCount($arrCounterCriteria); } } if (!isset($fdshared['filter_min_price'])||!isset($fdshared['filter_max_price'])){ $fdshared['filter_prices_counters'] = array(); foreach ($arrFilterPriceRangeCriterias as $strRange=>$arrRangeAttrs){ $arrCounterCriteria = $arrFilterCriteria; $arrCounterCriteria['minPrice'] = $arrRangeAttrs['minPrice']; if ($arrRangeAttrs['maxPrice']!=null){ $arrCounterCriteria['maxPrice'] = $arrRangeAttrs['maxPrice']; } $arrRangeAttrs['count'] = $exolog->controler->getCarsCount($arrCounterCriteria); $fdshared['filter_prices_counters'][$strRange]=$arrRangeAttrs; } } } elseif ($strFilterType=='tours') { $fdshared['filter_total'] = $exolog->controler->getToursCount($arrFilterCriteria); $arrRecordsCriteria = $arrFilterCriteria; $arrRecordsCriteria['limit']=$intFilterLimit; $arrRecordsCriteria['skip']=($intPage-1)*$intFilterLimit; $arrRecordsCriteria['fields']=array('tourID','headline','subline','inleiding','tournaam','minPrice','continent','land'); $arrToursRecords = $exolog->controler->getToursRecords($arrRecordsCriteria); //$arrToursRecords = array(); $fdshared['filter_tour_records'] = array(); foreach ($arrToursRecords as $arrTourRec){ $arrTour = array( 'tourID'=>$arrTourRec->getTourID(), 'headline'=>$arrTourRec->getHeadline(), 'minPrice'=>$arrTourRec->getMinPrice(), 'continent'=>$arrTourRec->getContinent(), 'land'=>$arrTourRec->getLand(), 'inleiding'=>$arrTourRec->getInleiding(), 'subline'=>$arrTourRec->getSubline(), 'tournaam'=>$arrTourRec->getTournaam(), ); $fdshared['filter_tour_records'][]=$arrTour; } if(!empty($fdshared['filter_tour_records'])){ foreach($fdshared['filter_tour_records'] as $k=>$arrTour){ $arrFilenames = $exolog->controler->getTripImagesFiles(array( 'tourID'=>$arrTour['tourID'], 'exologFiles'=>true )); $arrFilenames = array_unique($arrFilenames); $arrFilenames = $arrFilenames[rand(0,count($arrFilenames)-1)]; $fdshared['filter_tour_records'][$k]['imgUrl'] = '/file/'.$arrFilenames; } reset($fdshared['filter_tour_records']); } if (!isset($fdshared['filter_continent'])&&(count($fdshared['edition_continents'])>1)){ $fdshared['filter_continent_counters'] = array(); foreach($fdshared['edition_continents'] as $strFilterContinent) { $arrCounterCriteria = $arrFilterCriteria; $arrCounterCriteria['continent'] = $strFilterContinent; $fdshared['filter_continent_counters'][$strFilterContinent] = $exolog->controler->getToursCount($arrCounterCriteria); } } if (!isset($fdshared['filter_country'])){ $fdshared['filter_countries_counters'] = array(); foreach($fdshared['filter_avaliable_countries'] as $strFilterCountry) { $arrCounterCriteria = $arrFilterCriteria; $arrCounterCriteria['country'] = $strFilterCountry; $fdshared['filter_countries_counters'][$strFilterCountry] = $exolog->controler->getToursCount($arrCounterCriteria); } } if (!isset($fdshared['filter_month'])){ $fdshared['filter_monthes_counters'] = array(); foreach ($arrFilterMonthes as $intMonth=>$arrMonthAttrs){ $arrCounterCriteria = $arrFilterCriteria; //$arrCounterCriteria['minEndDate'] = $arrMonthAttrs['first']; //$arrCounterCriteria['maxStartDate'] = $arrMonthAttrs['last']; $fdshared['filter_monthes_counters'][$intMonth] = $exolog->controler->getToursCount($arrCounterCriteria); } } if (!isset($fdshared['filter_min_price'])||!isset($fdshared['filter_max_price'])){ $fdshared['filter_prices_counters'] = array(); foreach ($arrFilterPriceRangeCriterias as $strRange=>$arrRangeAttrs){ $arrCounterCriteria = $arrFilterCriteria; $arrCounterCriteria['minPrice'] = $arrRangeAttrs['minPrice']; if ($arrRangeAttrs['maxPrice']!=null){ $arrCounterCriteria['maxPrice'] = $arrRangeAttrs['maxPrice']; } $arrRangeAttrs['count'] = $exolog->controler->getToursCount($arrCounterCriteria); $fdshared['filter_prices_counters'][$strRange]=$arrRangeAttrs; } } } if (empty($fdshared['filter_monthes_counters'])){ $fdshared['other_monthes'] = array(); foreach ($arrFilterMonthes as $intMonth => $arrMonthAttrs){ if ($arrFdsearch['month']!==$intMonth) { $fdshared['other_monthes'][$intMonth] = $arrMonthAttrs; } } } if (empty($fdshared['filter_continent_counters'])){ $fdshared['other_continents'] = array(); foreach($fdshared['edition_continents'] as $strFilterContinent) { if ($arrFdsearch['continent']!==$strFilterContinent) { $fdshared['other_continents'][] = $strFilterContinent; } } } if (empty($fdshared['filter_countries_counters'])){ $fdshared['other_countries'] = array(); $allCountries = $exolog->controler->getAvaliableCountriesByContinent(); foreach($allCountries as $strFilterCountry) { if ($arrFdsearch['country']!==$strFilterCountry) { $fdshared['other_countries'][] = $strFilterCountry; } } } if (!empty($arrFdsearch['minPrice'])||!empty($arrFdsearch['maxPrice'])){ $fdshared['other_prices'] = array(); foreach ($arrFilterPriceRangeCriterias as $price=>$priceCriteria){ if (($arrFdsearch['minPrice']!==$priceCriteria['minPrice'])&&($arrFdsearch['maxPrice']!==$priceCriteria['maxPrice'])){ $fdshared['other_prices'][$price] = $priceCriteria; } } } } if (!function_exists('generateFdsearch')){ function generateFdsearch($url,$params){ global $exolog; $baseurl = false; $url = explode('?',$url); $url = $url[0]; $fdsearch = $exolog->request->getGet('fdsearch'); if (!empty($fdsearch)&&!empty($fdsearch['baseurl'])){ $baseurl = '/'.$fdsearch['baseurl']; unset($fdsearch['baseurl']); unset($fdsearch['category']); } if (is_array($fdsearch)&&!empty($fdsearch)&&isset($params['removeParams'])&&!empty($params['removeParams'])){ foreach((array)$params['removeParams'] as $p){ if (isset($fdsearch[$p])) unset($fdsearch[$p]); } } if (isset($params['addParams'])&&!empty($params['addParams'])){ if (empty($fdsearch)||!is_array($fdsearch)) $fdsearch = array(); foreach((array)$params['addParams'] as $k=>$v){ if ($v!=null){ $fdsearch[$k]=$v; } else { unset($fdsearch[$k]); } } } $query = array(); foreach($fdsearch as $k=>$v){ $query[]='fdsearch['.$k.']='.$v; } if ($url==null) $url = ''; if (!empty($baseurl)){ $url = $baseurl; } $query = join('&',$query); if (strlen($query)>0) $query = '?'.$query; return $url.$query; } } ?> )
../class.template.inc.php:183
90.416822323688siteControlerDefault->getTrip( )../class.template.inc.php(183) : eval()'d code:171
100.444122580672siteControlerDefault->getTourDays( )../default.php:2389
110.444122580784siteControlerDefault->prepareQuery( )../default.php:2374
120.444322623312Doctrine\ODM\MongoDB\DocumentManager->createQueryBuilder( )../default.php:4117
130.444322623520Doctrine\ODM\MongoDB\Query\Builder->__construct( )../DocumentManager.php:372
140.444322623680Doctrine\ODM\MongoDB\Query\Builder->setDocumentName( )../Builder.php:83
150.444322623680Doctrine\ODM\MongoDB\DocumentManager->getDocumentCollection( )../Builder.php:288
160.447522665928Doctrine\MongoDB\Collection->setSlaveOkay( )../DocumentManager.php:349
170.447522665928Doctrine\MongoDB\Collection->getSlaveOkay( )../Collection.php:676
180.447522665928Doctrine\MongoDB\Collection->getMongoCollection( )../Collection.php:703