Пример #1
0
if ($res) {
    foreach ($res as $row) {
        $sections[$row['direct_id']][] = $row;
    }
}
$cat_info = $seo->getSectionByName($_GET['cat'], false, $direct_id);
if ($cat_info) {
    $catid = $cat_info['id'];
    $content_type = $content_type ? $content_type : 'dir';
} else {
    $catid = 0;
    $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';
}