/** * Display the specified resource. * * @param int $id * @return Response */ public function show($alias) { $aliasLang = 'alias' . getLangAlias(Lang::locale()); $houseDetails = Houses::where($aliasLang, $alias)->first(); list($apartments, $rooms, $houses, $countpersons) = $houseDetails->countUnitsInHouse($houseDetails->id); if ($houseDetails->destination->parent == 0) { $destinationName = getTranslate($houseDetails->town_id, 'jos_estateagent_town', 'title', Lang::locale())->value; $parentDestinationName = ""; } else { $destinationName = getTranslate($houseDetails->town_id, 'jos_estateagent_town', 'title', Lang::locale())->value; $parentDestinationName = getTranslate($houseDetails->destination->parent, 'jos_estateagent_town', 'title', Lang::locale())->value; } $title = $houseDetails->name; $meta_title = $houseDetails->getHouseTitleName($houseDetails->jos_estateagent_house_title_id) . ' ' . $houseDetails->name; if ($parentDestinationName != '') { $meta_title .= ' | ' . $parentDestinationName; } $meta_title .= ' | ' . $destinationName . ' | ' . $houseDetails->getHouseTitleName($houseDetails->jos_estateagent_house_title_id) . ' ' . $houseDetails->name; $meta_description = Lang::get('lang.MetaDescriptionPrivateURL'); if (getTranslate($houseDetails->id, 'jos_estateagent_house', 'description', Lang::locale())->value != '') { $meta_description .= getTranslate($houseDetails->id, 'jos_estateagent_house', 'description', Lang::locale())->value; } else { if (getTranslate($houseDetails->id, 'jos_estateagent_house', 'description', Lang::locale())->value != '') { $meta_description .= getTranslate($houseDetails->id, 'jos_estateagent_house', 'description', Lang::locale())->value; } else { $meta_description .= getTranslate($houseDetails->town_id, 'jos_estateagent_town', 'description', Lang::locale())->value; } } $meta_description_all = strip_tags(shorttext($meta_description, 120)); $description = getTranslate($houseDetails->id, 'jos_estateagent_house', 'description', Lang::locale())->value; $houseImages = Houses::find($houseDetails->id)->HouseImages; if ($houseImages->isEmpty()) { $houseMainImage = "nophoto.jpg"; } else { $houseMainImage = Houses::find($houseDetails->id)->HouseImages()->first()->fname; } $ownerTours = $houseDetails->owner->getOwnerTours($houseDetails->jos_users_id); $getCategoryLinks = Destinations::find($houseDetails->town_id)->DestinationCategoryLinks; $categoryTitleLang = "jos_estateagent_town_category_links_" . Lang::locale(); $getLinks = Destinations::find($houseDetails->town_id)->DestinationLinks->where('jos_estateagent_town_links_publish', 1); $titleLang = "jos_estateagent_town_links_title_" . Lang::locale(); $linkLang = "jos_estateagent_town_links_url_" . Lang::locale(); $labelColor = array('label-warning', 'label-info', 'label-danger', 'label-success'); $allDestinationTours = $houseDetails->destination->allDestinationTours($houseDetails->town_id); $allUnits = Units::published()->where('jos_estateagent_object_id', $houseDetails->id)->with('unitPrice')->orderBy('redoslijed')->get(); return view('accommodation.show-house', compact('houseDetails', 'houseMainImage', 'houseImages', 'parentDestinationName', 'destinationName', 'description', 'meta_title', 'meta_description_all', 'apartments', 'rooms', 'houses', 'countpersons', 'allUnits', 'ownerTours', 'getCategoryLinks', 'getLinks', 'titleLang', 'linkLang', 'categoryTitleLang', 'labelColor', 'allDestinationTours')); }
public function show($slugParent, $slug) { $destinationDetails = Destinations::where('alias', $slug)->first(); $id = $destinationDetails->jos_estateagent_town_id; $title = getTranslate($id, 'jos_estateagent_town', 'title', Lang::locale())->value; if ($destinationDetails->subtitle != NULL) { $subtitle = getTranslate($id, 'jos_estateagent_town', 'subtitle', Lang::locale())->value; } $description = getTranslate($id, 'jos_estateagent_town', 'description', Lang::locale())->value; $meta_title = getTranslate($id, 'jos_estateagent_town', 'meta_title', Lang::locale())->value; $meta_description = getTranslate($id, 'jos_estateagent_town', 'meta_description', Lang::locale())->value; $meta_keywords = getTranslate($id, 'jos_estateagent_town', 'meta_keywords', Lang::locale())->value; $getCategoryLinks = Destinations::find($id)->DestinationCategoryLinks; $categoryTitleLang = "jos_estateagent_town_category_links_" . Lang::locale(); $getLinks = Destinations::find($id)->DestinationLinks->where('jos_estateagent_town_links_publish', 1); $titleLang = "jos_estateagent_town_links_title_" . Lang::locale(); $linkLang = "jos_estateagent_town_links_url_" . Lang::locale(); $labelColor = array('label-warning', 'label-info', 'label-danger', 'label-success'); $destinationMainImage = $destinationDetails->getMainDestinationImage($id); $destinationImages = Destinations::find($id)->DestinationImages; $countTours = $destinationDetails->countAllDestinationTours($id); $travelGuideCategories = TourSubCategories::where('TOUR_CATEGORY', Config::get('constants.TRAVEL_GUIDE_ID'))->where('tour_subcategory_published', 1)->orderBy('tour_subcategory_order')->get(); return view('destinations.show', compact('travelGuideCategories', 'destinationDetails', 'title', 'subtitle', 'description', 'meta_title', 'meta_description', 'meta_keywords', 'getLinks', 'titleLang', 'linkLang', 'getCategoryLinks', 'categoryTitleLang', 'destinationMainImage', 'destinationImages', 'countTours', 'labelColor')); }
public function getHouseTitleName($title) { $cat = DB::table('jos_estateagent_house_title')->where('jos_estateagent_house_title_id', $title)->first(); $catName = getTranslate($cat->jos_estateagent_house_title_id, 'jos_estateagent_house_title', 'title', Lang::locale())->value; return $catName; }
/** * Show the form for creating a new resource. * * @return Response */ public function show($houseSlug, $id) { $unitDetails = Units::where('id', $id)->first(); if ($unitDetails->house->destination->parent == 0) { $destinationName = getTranslate($unitDetails->house->town_id, 'jos_estateagent_town', 'title', Lang::locale())->value; $parentDestinationName = ""; } else { $destinationName = getTranslate($unitDetails->house->town_id, 'jos_estateagent_town', 'title', Lang::locale())->value; $parentDestinationName = getTranslate($unitDetails->house->destination->parent, 'jos_estateagent_town', 'title', Lang::locale())->value; } $title = $unitDetails->title; $meta_title = $unitDetails->house->getHouseTitleName($unitDetails->house->jos_estateagent_house_title_id) . ' ' . $unitDetails->house->name; if ($parentDestinationName != '') { $meta_title .= ' | ' . $parentDestinationName; } $meta_title .= ' | ' . $destinationName . ' | ' . $unitDetails->getUnitCategoryName($unitDetails->cat) . ' ' . $unitDetails->title; $meta_description = Lang::get('lang.MetaDescriptionPrivateURL'); if (getTranslate($unitDetails->id, 'jos_estateagent_unit', 'description', Lang::locale())->value != '') { $meta_description .= getTranslate($unitDetails->id, 'jos_estateagent_unit', 'description', Lang::locale())->value; } else { if (getTranslate($unitDetails->house->id, 'jos_estateagent_house', 'description', Lang::locale())->value != '') { $meta_description .= getTranslate($unitDetails->house->id, 'jos_estateagent_house', 'description', Lang::locale())->value; } else { $meta_description .= getTranslate($unitDetails->house->town_id, 'jos_estateagent_town', 'description', Lang::locale())->value; } } $meta_description_all = strip_tags(shorttext($meta_description, 120)); $description = getTranslate($unitDetails->id, 'jos_estateagent_unit', 'description', Lang::locale())->value; $isHotel = FALSE; if ($unitDetails->house->jos_estateagent_main_categories_id == Config::get('constants.MAIN_HOUSE_CATEGORIES.HOTEL')) { $isHotel = TRUE; } else { $isHotel = FALSE; } $add_services = array(); array_push($add_services, array(0 => "fullboard", 1 => "fullboard_payment", 2 => "Fullboard", 3 => "fullboard_price", 4 => "PerService")); array_push($add_services, array(0 => "halfboard", 1 => "halfoard_payment", 2 => "Halfboard", 3 => "halfboard_price", 4 => "PerService")); array_push($add_services, array(0 => "bed_breakfast", 1 => "bed_breakfast_payment", 2 => "BedBreakfast", 3 => "bed_breakfast_price", 4 => "PerService")); array_push($add_services, array(0 => "dslinclude", 1 => "dsl_payment", 2 => "DSLInternet", 3 => "dslprice", 4 => "PerDay")); array_push($add_services, array(0 => "petsinclude", 1 => "pets_payment", 2 => "Pets", 3 => "petsprice", 4 => "PerDay")); array_push($add_services, array(0 => "parkinginclude", 1 => "park_payment", 2 => "ParkingPlace", 3 => "parkingprice", 4 => "PerDay")); array_push($add_services, array(0 => "airinclude", 1 => "aircondition_payment", 2 => "IconAirCondition", 3 => "airprice", 4 => "PerDay")); $negotiableCounterUnit = 0; $negotiableStringsUnit = array(); $priceCounterUnit = 0; $priceStringsUnit = array(); $pricesUnit = array(); $pricesPerUnit = array(); foreach ($add_services as $idList) { if ($unitDetails->{$idList}[0] == 2 && $unitDetails->{$idList}[1] == 1) { $negotiableCounterUnit++; $negotiableStringsUnit[] = Lang::get('lang.' . $idList[2]); } elseif ($unitDetails->{$idList}[0] == 2 && $unitDetails->{$idList}[1] == 0) { $priceCounterUnit++; $priceStringsUnit[] = Lang::get('lang.' . $idList[2]); $pricesUnit[] = $unitDetails->{$idList}[3]; $pricesPerUnit[] = $idList[4]; } } $add_services_house = array(); array_push($add_services_house, array(0 => "cleaninginclude", 1 => "cleaning_negotiable", 2 => "FinalCleaning", 3 => "cleaningprice", 4 => "PerService")); array_push($add_services_house, array(0 => "towels", 1 => "towel_negotiable", 2 => "Towels", 3 => "towelsprice", 4 => "PerService")); array_push($add_services_house, array(0 => "berth", 1 => "berthprice_negotiable", 2 => "BerthUse", 3 => "berthprice", 4 => "PerDay")); array_push($add_services_house, array(0 => "boat", 1 => "boat_negotiable", 2 => "BoatUse", 3 => "boatprice", 4 => "PerDay")); $negotiableCounter = 0; $negotiableStrings = array(); $priceCounter = 0; $priceStrings = array(); $prices = array(); $pricesPer = array(); foreach ($add_services_house as $idList) { if ($unitDetails->house->{$idList}[0] == 2 && $unitDetails->house->{$idList}[1] == 1) { $negotiableCounter++; $negotiableStrings[] = Lang::get('lang.' . $idList[2]); } elseif ($unitDetails->house->{$idList}[0] == 2 && $unitDetails->house->{$idList}[1] == 0) { $priceCounter++; $priceStrings[] = Lang::get('lang.' . $idList[2]); $prices[] = $unitDetails->house->{$idList}[3]; $pricesPer[] = $idList[4]; } } $unitMainImage = $unitDetails->getMainUnitImage($unitDetails->id); $unitImages = Units::find($id)->UnitImages; return view('accommodation.show', compact('unitDetails', 'unitMainImage', 'unitImages', 'parentDestinationName', 'destinationName', 'description', 'meta_title', 'meta_description_all', 'isHotel', 'negotiableCounterUnit', 'negotiableStringsUnit', 'priceCounterUnit', 'priceStringsUnit', 'pricesUnit', 'pricesPerUnit', 'negotiableCounter', 'negotiableStrings', 'priceCounter', 'priceStrings', 'prices', 'pricesPer')); // }
public function getFullDestination($town_id) { $parentDestination = ""; $destination = ""; $findRow = Destinations::find($town_id); $findParent = $findRow->parent; if ($findParent == 0) { $parentDestination = ""; $destination = getTranslate($town_id, 'jos_estateagent_town', 'title', Lang::locale())->value; } else { $findParentRow = Destinations::find($findParent); $parentDestination = getTranslate($findParentRow, 'jos_estateagent_town', 'title', Lang::locale())->value; $destination = getTranslate($town_id, 'jos_estateagent_town', 'title', Lang::locale())->value; } return array($parentDestination, $destination); }
public function show($tourSlug, $tour_code) { $tourDetails = Tours::where('tour_code', $tour_code)->first(); $id = $tourDetails->TOUR_ID; list($category_ID, $tourCategory, $tourSubCategory) = $tourDetails->getTourCategory($tourDetails->TOUR_SUBCATEGORY); if ($tourDetails->town_id == $tourDetails->parent_town_id) { $destinationName = getTranslate($tourDetails->town_id, 'jos_estateagent_town', 'title', Lang::locale())->value; $parentDestinationName = ""; } else { $destinationName = getTranslate($tourDetails->town_id, 'jos_estateagent_town', 'title', Lang::locale())->value; $parentDestinationName = getTranslate($tourDetails->parent_town_id, 'jos_estateagent_town', 'title', Lang::locale())->value; } $title = getTranslate($tourDetails->TOUR_ID, 'jos_estateagent_tour', 'tour_title', Lang::locale())->value; $meta_title = getTranslate($tourDetails->TOUR_ID, 'jos_estateagent_tour', 'meta_title', Lang::locale())->value; $meta_description1 = getTranslate($tourDetails->parent_town_id, 'jos_estateagent_town', 'title', Lang::locale())->value; $meta_description1 .= ", " . getTranslate($tourDetails->town_id, 'jos_estateagent_town', 'title', Lang::locale())->value; $meta_description1 .= ", " . Lang::get('lang.MetaTitleForDestinations'); $meta_description1 .= ", " . getTranslate($category_ID, 'jos_estateagent_tour_category', 'tour_category_title', Lang::locale())->value; $meta_description1 .= ", " . getTranslate($tourDetails->TOUR_SUBCATEGORY, 'jos_estateagent_tour_subcategory', 'tour_subcategory_title', Lang::locale())->value; $meta_description1 .= ", " . getTranslate($tourDetails->TOUR_ID, 'jos_estateagent_tour', 'tour_description', Lang::locale())->value; $meta_description2 = ""; if (getTranslate($tourDetails->TOUR_ID, 'jos_estateagent_tour', 'tour_description', Lang::locale())->value != '') { $strings2 = getTranslate($tourDetails->TOUR_ID, 'jos_estateagent_tour', 'tour_description', Lang::locale())->value; $meta_description2 = strip_tags($strings2); } $meta_description = strip_tags(shorttext($meta_description1 . $meta_description2, 180)); $meta_keywords = Lang::get('lang.MetaKeywords'); $description = getTranslate($tourDetails->TOUR_ID, 'jos_estateagent_tour', 'tour_description', Lang::locale())->value; $profileDescription = getTranslate($tourDetails->TOUR_ID, 'jos_estateagent_tour', 'tour_profile_description', Lang::locale())->value; $prvi_datum = ""; $drugi_datum = ""; $event_time = ""; $time = ""; $event_time_end = ""; if ($tourDetails->is_event == 1) { if ($tourDetails->tour_date != '0000-00-00') { $timestampEventDate = strtotime($tourDetails->tour_date); $prvi_datum = " " . date("d.m.Y", $timestampEventDate) . " "; if ($tourDetails->tour_date_end == '0000-00-00') { $drugi_datum = " "; } elseif ($tourDetails->tour_date_end != '0000-00-00') { $timestampEventDate = strtotime($tourDetails->tour_date_end); $drugi_datum = "- " . date("d.m.Y", $timestampEventDate) . " "; } } if ($tourDetails->tour_time != '00:00:00') { $event_time = date('H:i', strtotime($tourDetails->tour_time)) . " " . Lang::get('lang.EventHours') . " "; $time = Lang::get('lang.EventTime'); if ($tourDetails->tour_time_end != '00:00:00') { $event_time_end = " - " . date('H:i', strtotime($tourDetails->tour_time_end)) . " " . Lang::get('lang.EventHours'); } else { $event_time_end = ' '; } } else { $event_time = ' '; $time = ""; $event_time_end = ' '; } } $duration_sintax = ''; if ($tourDetails->tour_duration != "0" && $tourDetails->tour_duration_unit != "0") { if ($tourDetails->tour_duration == 1) { $duration_sintax = Lang::get('lang.Tour' . substr_replace($tourDetails->tour_duration_unit, "", -1)); } elseif ($tourDetails->tour_duration > 1) { $duration_sintax = Lang::get('lang.Tour' . $tourDetails->tour_duration_unit); } else { $duration_sintax = ''; } } $languageString = ''; if ($tourDetails->croatian == '1') { $languageString .= Lang::get('lang.Croatian') . ', '; } if ($tourDetails->english == '1') { $languageString .= Lang::get('lang.English') . ', '; } if ($tourDetails->german == '1') { $languageString .= Lang::get('lang.German') . ', '; } if ($tourDetails->italian == '1') { $languageString .= Lang::get('lang.Italian') . ', '; } if ($tourDetails->french == '1') { $languageString .= Lang::get('lang.French') . ', '; } if ($tourDetails->slovenski == '1') { $languageString .= Lang::get('lang.Slovenian') . ', '; } if ($tourDetails->ruski == '1') { $languageString .= Lang::get('lang.Russian') . ', '; } if ($tourDetails->spanjolski == '1') { $languageString .= Lang::get('lang.Spanish') . ', '; } if ($tourDetails->portugalski == '1') { $languageString .= Lang::get('lang.Portuguese') . ', '; } if ($tourDetails->madjarski == '1') { $languageString .= Lang::get('lang.Hungarian') . ', '; } if ($tourDetails->ceski == '1') { $languageString .= Lang::get('lang.Czech') . ', '; } if ($tourDetails->poljski == '1') { $languageString .= Lang::get('lang.Polish') . ', '; } $languageString = substr($languageString, 0, -2); $getCategoryLinks = Tours::find($id)->TourCategoryLinks; $categoryTitleLang = "jos_estateagent_town_category_links_" . Lang::locale(); $getLinks = Tours::find($id)->TourLinks->where('jos_estateagent_town_links_publish', 1); $titleLang = "jos_estateagent_town_links_title_" . Lang::locale(); $linkLang = "jos_estateagent_town_links_url_" . Lang::locale(); $tourMainImage = $tourDetails->getMainTourImage($tourDetails->TOUR_ID); $tourIcon = $tourDetails->getTourIcon($tourDetails->ICON_ID); $profileImage = $tourDetails->getTourProfileImage($tourDetails->tour_profile_image); $visitsCount = $tourDetails->getTourVisits($tourDetails->TOUR_ID); $tourImages = Tours::find($id)->TourImages; $tourCategories = TourCategories::where('tour_category_published', '=', 1)->orderBy('tour_category_order')->get(); return view('tours.show', compact('tourDetails', 'title', 'meta_title', 'meta_description', 'meta_keywords', 'getLinks', 'titleLang', 'linkLang', 'getCategoryLinks', 'categoryTitleLang', 'destinationName', 'parentDestinationName', 'description', 'tourMainImage', 'tourCategory', 'tourSubCategory', 'tourIcon', 'profileImage', 'profileDescription', 'languageString', 'prvi_datum', 'drugi_datum', 'event_time', 'time', 'event_time_end', 'duration_sintax', 'visitsCount', 'tourImages', 'tourCategories')); }
public function getToursSearchMeta($category, $subcategory, $destination) { $search_meta_title = ''; $search_meta_description = ''; $destination_meta_title = ''; $type_meta_title = ''; $category_meta_title = ''; if (isset($category) && $category > 0 && self::checkCategoryExist($category) > 0) { $category_meta_title = getTranslate($category, 'jos_estateagent_tour_category', 'tour_category_title', Lang::locale())->value; } else { $category_meta_title = ''; } if (isset($subcategory) && $subcategory > 0 && self::checkSubCategoryExist($subcategory) > 0) { $type_meta_title = getTranslate($subcategory, 'jos_estateagent_tour_subcategory', 'tour_subcategory_title', Lang::locale())->value; } else { $type_meta_title = ''; } if (isset($destination) && $destination > 0 && self::checkDestinationExist($destination) > 0) { $parent_FeaturedDestinationName2 = getTranslate($destination, 'jos_estateagent_town', 'title', Lang::locale())->value; } elseif (!isset($destination) || $destination == 0) { $parent_FeaturedDestinationName2 = ''; $getdestination = ''; } if ((!isset($destination) || $destination == 0) && (!isset($subcategory) || $subcategory == 0) && (!isset($category) || $category == 0)) { $search_meta_title = Lang::get('lang.SearchMetaTitle'); $search_meta_description = Lang::get('lang.MetaDescriptionTours'); } if ((!isset($destination) || $destination == 0) && (!isset($subcategory) || $subcategory == 0) && (isset($category) && $category > 0)) { $search_meta_title = Lang::get('lang.MetaTitleForDestinations') . ' | ' . $category_meta_title; $search_meta_description = Lang::get('lang.TitleIslandHvarCroatia') . '. ' . $category_meta_title . '. ' . Lang::get('lang.ToursAndActivities') . '. ' . Lang::get('lang.MetaSmallToursEnjoy'); } if ((!isset($destination) || $destination == 0) && (isset($subcategory) && $subcategory > 0) && (isset($category) && $category > 0)) { $search_meta_title = Lang::get('lang.MetaTitleForDestinations') . ' | ' . $category_meta_title . ' | ' . $type_meta_title; $search_meta_description = Lang::get('lang.TitleIslandHvarCroatia') . '. ' . $category_meta_title . ', ' . $type_meta_title . '. ' . Lang::get('lang.ToursAndActivities') . '. ' . Lang::get('lang.MetaSmallToursEnjoy'); } if ((!isset($destination) || $destination == 0) && (isset($subcategory) && $subcategory > 0) && (!isset($category) || $category == 0)) { $search_meta_title = Lang::get('lang.MetaTitleForDestinations') . ' | ' . $category_meta_title . ' | ' . $type_meta_title; $search_meta_description = Lang::get('lang.TitleIslandHvarCroatia') . '. ' . $category_meta_title . ', ' . $type_meta_title . '. ' . Lang::get('lang.ToursAndActivities') . '. ' . Lang::get('lang.MetaSmallToursEnjoy'); } if (isset($destination) && $destination > 0 && (!isset($subcategory) || $subcategory == 0) && (!isset($category) || $category == 0)) { $search_meta_title = $parent_FeaturedDestinationName2 . ', ' . Lang::get('lang.MetaTitleForDestinations') . ' | ' . Lang::get('lang.MetaSmallTours'); $search_meta_description = $parent_FeaturedDestinationName2 . ', ' . Lang::get('lang.MetaTitleForDestinations') . '. ' . Lang::get('lang.WhereToGo') . ' ' . Lang::get('lang.WhatToDo') . ' ' . Lang::get('lang.WhatToSee') . ' ' . Lang::get('lang.MetaSmallToursEnjoy'); } if (isset($destination) && $destination > 0 && (!isset($subcategory) || $subcategory == 0) && (isset($category) && $category > 0)) { $search_meta_title = $parent_FeaturedDestinationName2 . ', ' . Lang::get('lang.MetaTitleForDestinations') . ' | ' . $category_meta_title; $search_meta_description = $parent_FeaturedDestinationName2 . ', ' . Lang::get('lang.TitleIslandHvarCroatia') . '. ' . $category_meta_title . '. ' . Lang::get('lang.ToursAndActivities') . '. ' . Lang::get('lang.MetaSmallToursEnjoy'); } if (isset($destination) && $destination > 0 && (isset($subcategory) && $subcategory > 0) && (isset($category) && $subcategory > 0)) { $search_meta_title = $parent_FeaturedDestinationName2 . ', ' . Lang::get('lang.MetaTitleForDestinations') . ' | ' . $category_meta_title . ' | ' . $type_meta_title; $search_meta_description = $parent_FeaturedDestinationName2 . ', ' . Lang::get('lang.TitleIslandHvarCroatia') . '. ' . $category_meta_title . ', ' . $type_meta_title . '. ' . Lang::get('lang.ToursAndActivities') . '. ' . Lang::get('lang.MetaSmallToursEnjoy'); } return array($search_meta_title, $search_meta_description); }
public function getUnitsSearchMeta($destination, $acc_type, $cat) { $search_meta_title = ''; $search_meta_description = ''; $getDestination = ""; $getType = ""; $getCat = ""; $getAllCombined = []; if ($destination != "") { switch ($destination) { case $destination > 0: $getDestination = getTranslate($destination, 'jos_estateagent_town', 'title', Lang::locale())->value; break; case $destination == 0: $getDestination = ""; break; default: $getDestination = ""; } } if ($acc_type != "") { switch ($acc_type) { case $acc_type > 0: $getType = getTranslate($acc_type, 'jos_estateagent_categories', 'plural', Lang::locale())->value; break; case $acc_type == 0: $getType = ""; break; default: $getType = ""; } } if ($cat != "") { switch ($cat) { case $cat > 0: $getCat = getTranslate($cat, 'jos_estateagent_house_category', 'title', Lang::locale())->value; break; case $cat == 0: $getCat = ""; break; default: $getCat = ""; } } $getAllCombined[] = array("Destination" => $getDestination, "AccType" => $getType); if ($getDestination != "" && $getType != "") { $search_meta_title = $getDestination . ' ' . $getType . ' | ' . Lang::get('lang.TitleAccommodation') . ' ' . Lang::get('lang.TitleIslandHvarCroatia'); $search_meta_description = $getDestination . ', ' . Lang::get('lang.DescriptionDestinations') . ' ' . $getType . ' - ' . Lang::get('lang.TitleIslandHvarCroatia'); } elseif ($getDestination != "" && $getType == "") { $search_meta_title = $getDestination . ' | ' . Lang::get('lang.TitleAccommodation') . ' ' . Lang::get('lang.TitleIslandHvarCroatia'); $search_meta_description = $getDestination . ', ' . Lang::get('lang.DescriptionDestinations') . ' - ' . Lang::get('lang.TitleIslandHvarCroatia'); } elseif ($getDestination == "" && $getType != "") { $search_meta_title = Lang::get('lang.TitleFindAccommodation') . ' | ' . $getType . ' ' . Lang::get('lang.TitleIslandHvarCroatia'); $search_meta_description = Lang::get('lang.DescriptionOnlyAccommodation') . ' ' . $getType . ' - ' . Lang::get('lang.TitleIslandHvarCroatia'); } elseif ($getDestination == "" && $getType == "") { $search_meta_title = Lang::get('lang.TitleFindAccommodation') . ' | ' . $getCat . ' ' . Lang::get('lang.TitleIslandHvarCroatia'); $search_meta_description = Lang::get('lang.DescriptionCategories') . ' ' . Lang::get('lang.TitleIslandHvarCroatia') . ' ' . $getCat; } else { $search_meta_title = Lang::get('lang.TitleIslandHvarCroatia') . ' | ' . Lang::get('lang.TitleFindAccommodation'); $search_meta_description = Lang::get('lang.DescriptionDestinations') . ' - ' . Lang::get('lang.TitleIslandHvarCroatia'); } return array($search_meta_title, $search_meta_description); }