$content_type = $content_type ? $content_type : 'direction'; } $subdomains = $seo->getSubdomains(); $rpath = '../'; $countries = $seo->getCountries(); if (empty($_GET['subdomain']) && empty($_GET['direction']) || !empty($_GET['subdomain']) && empty($_GET['direction'])) { if (empty($_GET['subdomain'])) { $seo = new seo('all'); } else { $seo = new seo($_GET['subdomain']); } $tmp_directions = $seo->getDirections(); foreach ($tmp_directions as $direction) { $directions[$direction['id']] = $direction; } $sections = $seo->getSectionsForMain(); $content = 'content-main.php'; } else { $content = 'content.php'; } switch ($content_type) { case 'article': $page_title = $section_content['name_section']; break; case 'dir': $page_title = $cat_info['name_section']; break; case 'direction': $page_title = $section_direction['dir_name']; break; }