strtolower($our_array[$t]['subcat_name']), $our_array[$t]['subcat_list_name']); $our_array[$t]['subcat_list_name'] = str_replace("{{keyword_verb}}", set_value_of_extended($our_array[$t]['keyword_verb'], $keyword_verb), $our_array[$t]['subcat_list_name']); $our_array[$t]['subcat_list_name'] = str_replace("{{state_full}}", ucwords($state_full), $our_array[$t]['subcat_list_name']); $our_array[$t]['subcat_list_name'] = str_replace("{{geo_nice}}", $geo_nice, $our_array[$t]['subcat_list_name']); $our_array[$t]['subcat_list_name'] = str_replace("{{combined}}", $__tvar['replace_combined'], $our_array[$t]['subcat_list_name']); $our_array[$t]['subcat_list_name'] = str_replace("{{phone}}", $__site_phone, $our_array[$t]['subcat_list_name']); $our_array[$t]['subcat_list_name'] = str_replace("{{phone_link}}", $__site_phone_link, $our_array[$t]['subcat_list_name']); //dump($__variableSelected, $cat_name); // Other Variable Replacements $h2 = str_replace("{{cat_name}}", $cat_name, $h2); $h2 = str_replace("{{cat_name_lower}}", strtolower($cat_name), $h2); $h2 = str_replace("{{keyword_verb}}", $keyword_verb, $h2); $_replace_var_geo = ""; switch ($page_type) { case "index": default: $_replace_var_geo = $_replace_var_geo_uc = trim($__variableSelected['geo']); if (empty($_replace_var_geo)) { $_replace_var_geo = "your area"; $_replace_var_geo_uc = "Your Area"; } break; case "s": if (!empty($state_full)) { $_replace_var_geo = $_replace_var_geo_uc = $state_full; } break; case "g": if (!empty($state_full) && !empty($city)) { $_replace_var_geo = $_replace_var_geo_uc = $city . ", " . $state_full; } break; } //dump($_replace_var_geo,$page_type); if (!empty($_replace_var_geo)) { $meta = str_replace("{{geo}}", $_replace_var_geo_uc, $meta); $title = str_replace("{{geo}}", $_replace_var_geo_uc, $title); $x_index_title = str_replace("{{geo}}", $_replace_var_geo_uc, $x_index_title); $x_index_meta = str_replace("{{geo}}", $_replace_var_geo_uc, $x_index_meta); $x_h1_index = str_replace("{{geo}}", $_replace_var_geo_uc, $x_h1_index); $h1_tag = str_replace("{{geo}}", $_replace_var_geo_uc, $h1_tag); $article_heading = str_replace("{{geo}}", $_replace_var_geo_uc, $article_heading); $x_article = str_replace("{{geo}}", $_replace_var_geo, $x_article); $x_article_index = str_replace("{{geo}}", $_replace_var_geo, $x_article_index); $x_article_state = str_replace("{{geo}}", $_replace_var_geo, $x_article_state); $x_h1_index_cat = str_replace("{{geo}}", $_replace_var_geo_uc, $x_h1_index_cat); $x_h1_state = str_replace("{{geo}}", $_replace_var_geo_uc, $x_h1_state); $x_h1_city = str_replace("{{geo}}", $_replace_var_geo_uc, $x_h1_city); $x_h2 = str_replace("{{geo}}", $_replace_var_geo_uc, $x_h2); $x_h2_article = str_replace("{{geo}}", $_replace_var_geo_uc, $x_h2_article); $h2 = str_replace("{{geo}}", $_replace_var_geo_uc, $h2); $our_array[$t]['subcat_list_name'] = str_replace("{{geo}}", $_replace_var_geo, $our_array[$t]['subcat_list_name']); } $x_article = \App\Support\StringRenderer::render($x_article); $x_article_index = \App\Support\StringRenderer::render($x_article_index); $x_article_state = \App\Support\StringRenderer::render($x_article_state); // Lets get content based on page types. if ($page_type == GeneralEnum::PAGE_TYPE_GALLERY || $page_type == GeneralEnum::PAGE_TYPE_SERVICE) { $image_src = $bubble4_link; //$h1_tag = $x_h1_index; } // Page type index if ($page_type == GeneralEnum::PAGE_TYPE_INDEX) { //i or no category if ($article_heading == "") { $section_categories_header = "Our Services"; } else { $section_categories_header = $article_heading; } if ($__single_category_mode === TRUE) { $__skip_section[] = "categories"; } foreach ($our_array as $iour) { if ($iour['subcat_name'] != "Other") { /* if(empty($iour['subcat_name'])){ continue; } */ if (!$__categoryonly_mode) { $options_url_category = array("text" => link_decode($iour['subcat_name']), "subcat_slug" => $iour['subcat_slug']); $section_categories_links[] = url_category_generate($options_url_category); } else { $options_url_category = array("type" => "categoryonly", "text" => link_decode($iour['subcat_name']), "subcat_slug" => $iour['subcat_slug']); $section_categories_links[] = url_category_generate($options_url_category); } //$section_categories_links[] = "" . link_decode($iour['subcat_name']) . ""; } } // Page type index without category if ($category_arr[0] == "") { $__tvar['current_category_id'] = ""; $__tvar['current_category_rowid'] = ""; $__tvar['current_category_slug'] = ""; $__tvar['current_category_slug_for_form_type_mapping'] = $__tvar['current_category_slug']; $__tvar['retargeting_content_id'] = ""; $image_alt = trim($image_alt); if (empty($image_alt)) { $image_alt = ucwords($our_array[$t]['subcat_name']); } $image_src = $bubble4_link; $h1_tag = $x_h1_index; $text = "$x_article_index"; if ($text == "") { $text = $x_article; } $text = str_replace("{{custom_sentence}}", "", $text); $text = str_replace("{{in_location}}", "", $text); $text = str_replace("{{cat_name}}", set_value_of_multi([$x_cat_name, $x_main_keyword], "services"), $text); $text = str_replace("{{cat_name_lower}}", strtolower(set_value_of_multi([$x_cat_name, $x_main_keyword], "services")), $text); $text = str_replace("{{keyword_verb}}", set_value_of($keyword_verb, $x_main_keyword), $text); $text = str_replace(" , ", ", ", $text); if (!empty($x_h2_custom)) { $section_h2_header = $x_h2_custom; } if (!empty($x_h2_article_custom)) { $section_h2_article = $x_h2_article_custom; } if (!empty($x_h2_img_src_custom)) { $section_h2_img_src = $x_h2_img_src_custom; } $__custompages_list_options = \App\ViewCustomizer\CustomPagesListOptions::get(); $optionsActionCustomPages = []; if (array_is_valid($__custompages_list_options)) { if (!empty($__custompages_list_options['list_homepage_type'])) { $optionsActionCustomPages['list_homepage_type'] = $__custompages_list_options['list_homepage_type']; } } $section_custompages_links = CustomPages::get_list_on_homepage($optionsActionCustomPages); $optionsActionContentGroups = []; $section_contentgroups_links = \App\ContentGroups\ContentGroups::getForHomepage($optionsActionContentGroups); $section_contentgroups_links = \App\Support\StringRenderer::render($section_contentgroups_links); /** * Quick fix for removing empty category. Enabled Fix Ref 20240409-1 and remove this. */ if (array_is_valid($section_contentgroups_links)) { if (trim($section_categories_links[0]) == "") { unset($section_categories_links[0]); } } if (isShowcaseEnabled("home", ["build_type" => $domain_arr['build_type']])) { $showcase = \App\Support\Showcase::make($domain_arr); $section_showcase_data = \App\Support\Showcase::getDataRender(); } if (isReviewsEnabled("home")) { $reviews = \App\Support\Reviews::make($domain_arr); $section_reviews_data = \App\Support\Reviews::getDataRender(); } if (isFaqEnabled("home")) { $faq = \App\Support\Faq::make($domain_arr); $section_faq_data = \App\Support\Faq::getDataRender(); } if (isProductsEnabled("home")) { $products = \App\Support\Products::make($domain_arr); $section_products_data = \App\Support\Products::getDataRender(); } \App\Support\OtherViewData::make($domain_arr); $__homepage_type = C_Domain_Instance::getData("homepage_type"); if (!Homepage::isHomepageCustomizationAllowed()) { $__homepage_type = null; } //$__homepage_type = Homepage::HOMEPAGE_TYPE_CONTENT_01; if (!empty($__homepage_type)) { try { $homepageTypeManager = Homepage::make(["type" => $__homepage_type]); $homepageTypeInstance = $homepageTypeManager->type(); if (!$homepageTypeInstance) { \App\Exceptions\DataException::throwException("Page type not found", "page_type_not_found"); } $page_type_include_file = $homepageTypeInstance->getpageTypeIncludeFile(); if (empty($page_type_include_file)) { \App\Exceptions\DataException::throwException("Page type file not found", "page_type_include_file_not_found"); } $page_data = $homepageTypeInstance->renderPageData(["page_data" => $page_data]); $page_type_include_file = "homepage-type/" . $page_type_include_file; $page_type = GeneralEnum::PAGE_TYPE_INDEX_TYPE; } catch (\App\Exceptions\DataException $e) { //dump($e->getMessage()); } } } //dump($category_arr[0], $__single_category_mode, $isAdwordsLandedURL, $__isHomeViewCustomized); // Page type index with category (i) // Page type index with category (p) if (($category_arr[0] != "" || $__single_category_mode) && !$isAdwordsLandedURL) { /** * If site is on "single category mode" and i page is requested since this will be duplicated content we are 301'in the page to the root */ if ($category_arr[0] != "" && $__single_category_mode) { redirect_301("http://" . $domain); } $__tvar['current_category_id'] = (!empty($our_array[$t]['subcat_name'])) ? link_encode($our_array[$t]['subcat_name']) : ""; $__tvar['current_category_rowid'] = (!empty($our_array[$t]['id'])) ? $our_array[$t]['id'] : ""; $__tvar['current_category_slug'] = (!empty($our_array[$t]['subcat_slug'])) ? link_encode($our_array[$t]['subcat_slug']) : ""; $__tvar['current_category_slug_for_form_type_mapping'] = $__tvar['current_category_slug']; $__tvar['current_category'] = (!empty($our_array[$t]['subcat_name'])) ? $our_array[$t]['subcat_name'] : ""; $__tvar['retargeting_content_id'] = set_value_of_multi_for_empty([$our_array[$t]['surl_a_api_id_default'], $our_array[$t]['surl_a_api_id_phone']], ""); //$__tvar['retargeting_content_id'] = (!empty($our_array[$t]['subcat_name'])) ? strtolower(trim($our_array[$t]['subcat_name'])) : ""; $image_alt = ucwords($our_array[$t]['subcat_name']); // Override if category image is not empty. If empty use the domain's image_src if (!empty($our_array[$t]['image_url'])) { $image_src = $our_array[$t]['image_url']; } $h1_tag = $x_h1_index_cat; $text = $x_article_index; if ($text == "") { $text = $x_article; } $text = str_replace("{{custom_sentence}}", "", $text); $text = str_replace("{{in_location}}", "", $text); $text = str_replace("{{cat_name}}", set_value_of(strtolower($cat_name), "our services"), $text); $text = str_replace("{{cat_name_lower}}", strtolower(set_value_of(strtolower($cat_name), "our services")), $text); $text = str_replace("{{keyword_verb}}", set_value_of(strtolower($keyword_verb), $x_main_keyword), $text); $text = str_replace(" , ", ", ", $text); if ($h2 == "") { $h2 = ucwords($our_array[$t]['subcat_name']); } if (isGeoContentDisabled() !== TRUE) { if (country_settings_property("state") === TRUE) { if (!$__geotarget_mode) { if (!$__categoryonly_mode) { //$section_state_header = $h2 . " - Select your State."; $section_state_header = $cDomainInstance::getSectionStateHeader(["h2" => $h2]); $state_arr = dataprovider_state_list(); foreach ($state_arr as $istate) { $section_state_links[] = url_state_generate(array("text" => $istate['statefullname'], "state" => $istate['state'], "subcat_slug" => $our_array[$t]['subcat_slug'])); } } } else { if (!$__categoryonly_mode) { $__data_slug = querytorowarray("select slug from `$x_table` where subcat_name = '" . Security::sanitizeSqlInput($cat_name) . "'"); $slug = $__data_slug['slug']; //$section_cities_header = $h2 . " - Select City."; $section_cities_header = $cDomainInstance::getSectionCitiesHeader(["h2" => $h2]); $__temp['lat'] = $domain_arr['geotarget_latitude']; $__temp['lon'] = $domain_arr['geotarget_longitude']; $__temp['radius'] = $domain_arr['geotarget_radius']; $options_url_city_other = []; if (config_site_get("", "geotable_simulated_content")) { $city_arr = dataprovider_state_list(["geo_type" => "1", "list_city" => TRUE]); $options_url_city_other['text_format'] = "none"; } else { //$city_arr = querytoarray("select geo,state,(((acos(sin(({$__temp['lat']}*pi()/180)) * sin((latitude * pi()/180))+cos(({$__temp['lat']}*pi()/180)) * cos(( latitude * pi()/180)) * cos((({$__temp['lon']} - longitude)*pi()/180))))*180/pi())*60*1.1515*1.609344) as distance from `$geo_database` where ( 3959 * acos( cos( radians({$__temp['lat']}) ) * cos( radians( latitude ) ) * cos( radians( longitude ) - radians({$__temp['lon']}) ) + sin( radians({$__temp['lat']}) ) * sin( radians( latitude ) ) ) ) < " . $__temp['radius'] . " and geo_type='1' and active='1'"); $city_arr = \App\Support\Geo::getDataFromGeoDatabase(["type" => "geotarget_city", "geo_database" => $geo_database, "lat" => $__temp['lat'], "lon" => $__temp['lon'], "radius" => $__temp['radius']]); } foreach ($city_arr as $icity) { $options_url_city = array("text" => $icity['geo'], "slug" => $slug, "state" => $icity['state'], "geo" => $icity['geo'], "subcat_slug" => $our_array[$t]['subcat_slug']); $options_url_city['type'] = (!empty($__url_options['city']['type'])) ? $__url_options['city']['type'] : $options_url_city['type']; $options_url_city = array_merge_certainly($options_url_city, $options_url_city_other); $section_cities_links[] = url_city_generate($options_url_city); //$section_cities_links[] = "" . ucwords(strtolower($icity['geo'])) . ""; } //$section_counties_header = $h2 . " - Select County."; $section_counties_header = $cDomainInstance::getSectionCountyHeader(["h2" => $h2]); if (config_site_get("", "geotable_simulated_content")) { } else { //$county_arr = querytoarray("select geo,state,(((acos(sin(({$__temp['lat']}*pi()/180)) * sin((latitude * pi()/180))+cos(({$__temp['lat']}*pi()/180)) * cos(( latitude * pi()/180)) * cos((({$__temp['lon']} - longitude)*pi()/180))))*180/pi())*60*1.1515*1.609344) as distance from `$geo_database` where ( 3959 * acos( cos( radians({$__temp['lat']}) ) * cos( radians( latitude ) ) * cos( radians( longitude ) - radians({$__temp['lon']}) ) + sin( radians({$__temp['lat']}) ) * sin( radians( latitude ) ) ) ) < " . $__temp['radius'] . " and geo_type='3' and active='1'"); $county_arr = \App\Support\Geo::getDataFromGeoDatabase(["type" => "geotarget_county", "geo_database" => $geo_database, "lat" => $__temp['lat'], "lon" => $__temp['lon'], "radius" => $__temp['radius']]); } foreach ($county_arr as $icounty) { $options_url_county = array("text" => $icounty['geo'], "slug" => $slug, "state" => $icounty['state'], "geo" => $icounty['geo'], "subcat_slug" => $our_array[$t]['subcat_slug']); $options_url_county['type'] = (!empty($__url_options['county']['type'])) ? $__url_options['county']['type'] : $options_url_county['type']; $section_counties_links[] = url_county_generate($options_url_county); //$section_counties_links[] = "" . ucwords(strtolower($icounty['geo'])) . ""; } } } } else { $__data_slug = querytorowarray("select slug from `$x_table` where subcat_name = '" . Security::sanitizeSqlInput($cat_name) . "'"); $slug = $__data_slug['slug']; if (!$__geotarget_mode) { $location_other_arr = querytoarray("select * from zip_world where country = '" . country_settings_property("country_id") . "' and `population` >300"); } else { $__temp['lat'] = $domain_arr['geotarget_latitude']; $__temp['lon'] = $domain_arr['geotarget_longitude']; $__temp['country'] = country_settings_property("country_id"); $__temp['radius'] = $domain_arr['geotarget_radius']; $location_other_arr = querytoarray("select *, (((acos(sin(({$__temp['lat']}*pi()/180)) * sin((latitude * pi()/180))+cos(({$__temp['lat']}*pi()/180)) * cos(( latitude * pi()/180)) * cos((({$__temp['lon']} - longitude)*pi()/180))))*180/pi())*60*1.1515*1.609344) as distance from zip_world where ( 3959 * acos( cos( radians({$__temp['lat']}) ) * cos( radians( latitude ) ) * cos( radians( longitude ) - radians({$__temp['lon']}) ) + sin( radians({$__temp['lat']}) ) * sin( radians( latitude ) ) ) ) < " . $__temp['radius'] . " and country='{$__temp['country']}' and `population` >300"); } if (!$__categoryonly_mode) { $section_locationother_header = $h2 . " - Select Location"; if (array_is_valid($location_other_arr)) { foreach ($location_other_arr as $k => $v) { $section_locationother_links[] = url_location_generate(array("text" => $v['geo_accent'], "slug" => $slug, "geo" => $v['geo'], "subcat_slug" => $our_array[$t]['subcat_slug'])); //$__link_href = "/" . link_encode($slug) . "/location/" . link_encode($v['geo']) . "/" . link_encode($our_array[$t]['subcat_slug']); //$__link_text = ucwords(strtolower($v['geo_accent'])); //$section_locationother_links[] = "" . $__link_text . ""; } } } } } $__showcaseReviewsSwitch = "category"; if ($__single_category_mode && empty($category[0])) { $__showcaseReviewsSwitch = "category_domain"; } switch ($__showcaseReviewsSwitch) { default: case "category": if (isShowcaseEnabled("i")) { $showcase = \App\Support\Showcase::make($our_array[$t]); $section_showcase_data = \App\Support\Showcase::getDataRender(); } if (isReviewsEnabled("i")) { $reviews = \App\Support\Reviews::make($our_array[$t]); $section_reviews_data = \App\Support\Reviews::getDataRender(); } if (isFaqEnabled("i")) { $faq = \App\Support\Faq::make($our_array[$t]); $section_faq_data = \App\Support\Faq::getDataRender(); } if (isProductsEnabled("i")) { $products = \App\Support\Products::make($our_array[$t]); $section_products_data = \App\Support\Products::getDataRender(); } \App\Support\OtherViewData::make($our_array[$t]); break; case "domain": if (isShowcaseEnabled("home", ["build_type" => $domain_arr['build_type']])) { $showcase = \App\Support\Showcase::make($domain_arr); $section_showcase_data = \App\Support\Showcase::getDataRender(); } if (isReviewsEnabled("home")) { $reviews = \App\Support\Reviews::make($domain_arr); $section_reviews_data = \App\Support\Reviews::getDataRender(); } if (isFaqEnabled("home")) { $faq = \App\Support\Faq::make($domain_arr); $section_faq_data = \App\Support\Faq::getDataRender(); } if (isProductsEnabled("home")) { $products = \App\Support\Products::make($domain_arr); $section_products_data = \App\Support\Products::getDataRender(); } \App\Support\OtherViewData::make($domain_arr); break; case "category_domain": if (isShowcaseEnabled("home", ["build_type" => $domain_arr['build_type']])) { $showcase = \App\Support\Showcase::make($our_array[$t]); $section_showcase_data = \App\Support\Showcase::getDataRender(); if (!array_is_valid($section_showcase_data)) { $showcase = \App\Support\Showcase::make($domain_arr); $section_showcase_data = \App\Support\Showcase::getDataRender(); } } if (isReviewsEnabled("home")) { $reviews = \App\Support\Reviews::make($our_array[$t]); $section_reviews_data = \App\Support\Reviews::getDataRender(); if (!array_is_valid($section_reviews_data)) { $reviews = \App\Support\Reviews::make($domain_arr); $section_reviews_data = \App\Support\Reviews::getDataRender(); } } if (isFaqEnabled("home")) { $faq = \App\Support\Faq::make($our_array[$t]); $section_faq_data = \App\Support\Faq::getDataRender(); if (!array_is_valid($section_faq_data)) { $faq = \App\Support\Faq::make($domain_arr); $section_faq_data = \App\Support\Faq::getDataRender(); } } if (isProductsEnabled("home")) { $products = \App\Support\Products::make($our_array[$t]); $section_products_data = \App\Support\Products::getDataRender(); if (!array_is_valid($section_products_data)) { $products = \App\Support\Products::make($domain_arr); $section_products_data = \App\Support\Products::getDataRender(); } } \App\Support\OtherViewData::make($our_array[$t]); \App\Support\OtherViewData::extendData($domain_arr); break; } } // End with category (i) }// End page type index // Page type State if ($page_type == GeneralEnum::PAGE_TYPE_S) { $__tvar['current_category_id'] = (!empty($our_array[$t]['subcat_name'])) ? link_encode($our_array[$t]['subcat_name']) : ""; $__tvar['current_category_rowid'] = (!empty($our_array[$t]['id'])) ? $our_array[$t]['id'] : ""; $__tvar['current_category_slug'] = (!empty($our_array[$t]['subcat_slug'])) ? link_encode($our_array[$t]['subcat_slug']) : ""; $__tvar['current_category_slug_for_form_type_mapping'] = $__tvar['current_category_slug']; $__tvar['current_category'] = (!empty($our_array[$t]['subcat_name'])) ? $our_array[$t]['subcat_name'] : ""; $__tvar['retargeting_content_id'] = set_value_of_multi_for_empty([$our_array[$t]['surl_a_api_id_default'], $our_array[$t]['surl_a_api_id_phone']], ""); //$__tvar['retargeting_content_id'] = (!empty($our_array[$t]['subcat_name'])) ? strtolower(trim($our_array[$t]['subcat_name'])) : ""; //Image $image_alt = ucwords($our_array[$t]['subcat_name']) . ", " . ucwords($our_array[$t]['slug']) . ", " . $state_full; if (empty($image_src)) { $image_src = $bubble4_link; // Override if category image is not empty. If empty use the domain's image_src if (!empty($our_array[$t]['image_url'])) { $image_src = $our_array[$t]['image_url']; } } //H1 section $h1_tag = $x_h1_state; // Article section for state $text = $x_article_state; if ($text == "") { $text = $x_article; } if ($our_array[$t]['subcat_sentence'] != "") { $text = str_replace("{{custom_sentence}}", $our_array[$t]['subcat_sentence'] . " ", $text); } else { $text = str_replace("{{custom_sentence}}", $our_array[$t]['subcat_sentence'], $text); } $text = str_replace("{{domain_keyword}}", "$domain_keyword", $text); $text = str_replace("{{in_location}}", "in $state_full ", $text); $text = str_replace("{{cat_name}}", $our_array[$t]['subcat_name'], $text); $text = str_replace("{{cat_name_lower}}", strtolower($our_array[$t]['subcat_name']), $text); $text = str_replace("{{keyword_verb}}", set_value_of_extended($our_array[$t]['keyword_verb'], $keyword_verb), $text); $text = str_replace("{{main_keyword}}", "$x_main_keyword", $text); $text = str_replace("{{main_keyword_lower}}", strtolower($x_main_keyword), $text); $text = str_replace(" , ", ", ", $text); //State H2 tag if ($h2 == "") { $h2 = ucwords($our_array[$t]['subcat_name']); } // Section 1 for state Cities //$section_cities_header = $h2 . " - Select City."; $section_cities_header = $cDomainInstance::getSectionCitiesHeader(["h2" => $h2]); //$state_arr = querytoarray("select * from `$geo_database` where state='" . link_decode($category_arr[1]) . "' and geo_type='1' and active='1'"); $state_arr = \App\Support\Geo::getDataFromGeoDatabase(["type" => "state_city", "geo_database" => $geo_database, "state" => link_decode($category_arr[1])]); $__data_slug = querytorowarray("select slug from `$x_table` where subcat_name='" . Security::sanitizeSqlInput($cat_name) . "'"); //dump($cat_name,$__data_slug,$our_array[$t]['subcat_slug'],$our_array[$t]); $slug = $__data_slug['slug']; if (country_settings_property("state") !== TRUE) { $url = url_category_generate(array("type" => "301", "return_type" => "href", "subcat_slug" => $our_array[$t]['subcat_slug'])); //$url = "/i/" . link_encode($our_array[$t]['subcat_slug']) . "/"; redirect_301($url); exit(); } if (isGeoContentDisabled()) { $url = url_category_generate(array("type" => "301", "return_type" => "href", "subcat_slug" => link_encode($our_array[$t]['subcat_slug']))); redirect_301($url); exit(); } $options_url_city_other = []; if (config_site_get("", "geotable_simulated_content")) { $options_url_city_other['text_format'] = "none"; } foreach ($state_arr as $istate) { //$section_cities_links[] = "" . ucwords(strtolower($istate['geo'])) . ""; $options_url_city = array("text" => $istate['geo'], "slug" => $slug, "state" => $istate['state'], "geo" => $istate['geo'], "subcat_slug" => $our_array[$t]['subcat_slug']); $options_url_city = array_merge_certainly($options_url_city, $options_url_city_other); $section_cities_links[] = url_city_generate($options_url_city); } // Section 1 for state Counties //$section_counties_header = $h2 . " - Select County."; $section_counties_header = $cDomainInstance::getSectionCountyHeader(["h2" => $h2]); //$state_arr = querytoarray("select * from `$geo_database` where state='" . link_decode($category_arr[1]) . "' and geo_type='3' and active='1'"); $state_arr = \App\Support\Geo::getDataFromGeoDatabase(["type" => "state_county", "geo_database" => $geo_database, "state" => link_decode($category_arr[1])]); $__data_slug = querytorowarray("select slug from `$x_table` where subcat_name = '" . Security::sanitizeSqlInput($cat_name) . "'"); $slug = $__data_slug['slug']; foreach ($state_arr as $istate) { $section_counties_links[] = url_county_generate(array("text" => $istate['geo'], "slug" => $slug, "state" => $istate['state'], "geo" => $istate['geo'], "subcat_slug" => $our_array[$t]['subcat_slug'])); //$section_counties_links[] = "" . ucwords(strtolower($istate['geo'])) . ""; } if (isShowcaseEnabled("s")) { $showcase = \App\Support\Showcase::make($our_array[$t]); $section_showcase_data = \App\Support\Showcase::getDataRender(); } if (isReviewsEnabled("s")) { $reviews = \App\Support\Reviews::make($our_array[$t]); $section_reviews_data = \App\Support\Reviews::getDataRender(); } if (isFaqEnabled("s")) { $faq = \App\Support\Faq::make($our_array[$t]); $section_faq_data = \App\Support\Faq::getDataRender(); } if (isProductsEnabled("s")) { $products = \App\Support\Products::make($our_array[$t]); $sec