BYT_Theme_Utils::breadcrumbs(); get_sidebar('under-header'); $enable_reviews = $byt_theme_globals->enable_reviews(); $enable_accommodations = $byt_theme_globals->enable_accommodations(); $current_user = wp_get_current_user(); $user_info = get_userdata($current_user->ID); $price_decimal_places = $byt_theme_globals->get_price_decimal_places(); $default_currency_symbol = $byt_theme_globals->get_default_currency_symbol(); $show_currency_symbol_after = $byt_theme_globals->show_currency_symbol_after(); $default_results_view = $byt_theme_globals->get_search_results_default_view(); $custom_search_results_page = $byt_theme_globals->get_custom_search_results_page_url(); $request_car_types = BYT_Theme_Utils::retrieve_array_of_values_from_query_string('car_types', true); $request_car_rental_tags = BYT_Theme_Utils::retrieve_array_of_values_from_query_string('car_rental_tags', true); $request_tour_types = BYT_Theme_Utils::retrieve_array_of_values_from_query_string('tour_types', true); $request_tour_tags = BYT_Theme_Utils::retrieve_array_of_values_from_query_string('tour_tags', true); $request_cruise_types = BYT_Theme_Utils::retrieve_array_of_values_from_query_string('cruise_types', true); $request_cruise_tags = BYT_Theme_Utils::retrieve_array_of_values_from_query_string('cruise_tags', true); $request_accommodation_types = BYT_Theme_Utils::retrieve_array_of_values_from_query_string('accommodation_types', true); $request_accommodation_tags = BYT_Theme_Utils::retrieve_array_of_values_from_query_string('accommodation_tags', true); $request_cabin_types = BYT_Theme_Utils::retrieve_array_of_values_from_query_string('cabin_types', true); $request_prices = BYT_Theme_Utils::retrieve_array_of_values_from_query_string('price', true); $search_term = isset($_GET['term']) ? wp_kses($_GET['term'], '') : ''; $location_id = isset($_GET['l']) ? intval(wp_kses($_GET['l'], '')) : 0; $age = isset($_GET['age']) ? intval(wp_kses($_GET['age'], '')) : 0; $stars = isset($_GET['stars']) ? intval(wp_kses($_GET['stars'], '')) : 0; $rating = isset($_GET['rating']) ? intval(wp_kses($_GET['rating'], '')) : 0; $guests = isset($_GET['guests']) ? intval(wp_kses($_GET['guests'], '')) : 0; $cabins = isset($_GET['cabins']) ? intval(wp_kses($_GET['cabins'], '')) : 0; $rooms = isset($_GET['rooms']) ? intval(wp_kses($_GET['rooms'], '')) : 0; $what = isset($_GET['what']) ? intval(wp_kses($_GET['what'], '')) : 1; $is_self_catered = $what == 2;
function render_price_range_section($what, $price_per_person_label_text, $price_per_night_label_text, $price_per_day_label_text) { global $byt_theme_globals; $price_decimal_places = $byt_theme_globals->get_price_decimal_places(); $default_currency_symbol = $byt_theme_globals->get_default_currency_symbol(); $show_currency_symbol_after = $byt_theme_globals->show_currency_symbol_after(); $request_type_ids = array(); if (isset($_GET['price'])) { $request_type_ids = BYT_Theme_Utils::retrieve_array_of_values_from_query_string('price', true); } $price_range_bottom = $byt_theme_globals->get_price_range_bottom(); $price_range_increment = $byt_theme_globals->get_price_range_increment(); $price_range_count = $byt_theme_globals->get_price_range_count(); if ($price_range_count > 0) { ?> <div class="column"> <div class="price_per dt"> <?php if ($what == 1 || $what == 2) { echo $price_per_night_label_text; } elseif ($what == 3) { echo $price_per_day_label_text; } elseif ($what == 4 || $what == 5) { echo $price_per_person_label_text; } ?> </div> <div class="dd"> <?php $bottom = 0; $top = 0; $out = ''; for ($i = 0; $i < $price_range_count; $i++) { $price_index = $i + 1; $checked = ''; if (in_array($price_index, $request_type_ids)) { $checked = " checked='checked' "; } ?> <div class="checkbox"> <input <?php echo $checked; ?> type="checkbox" id="price<?php echo esc_attr($price_index); ?> " name="price[]" value="<?php echo esc_attr($price_index); ?> " /> <label for="price<?php echo $price_index; ?> "> <?php $bottom = $i * $price_range_increment + $price_range_bottom; $top = $price_index * $price_range_increment + $price_range_bottom - 1; echo $bottom; if ($i == $price_range_count - 1) { echo ' <span class="curr">' . $default_currency_symbol . '</span> +'; } else { echo " - " . $top . ' <span class="curr">' . $default_currency_symbol . '</span>'; } ?> </label> </div> <?php } ?> </div> </div> <?php } }