Esempio n. 1
0
    //if(is_numeric($_GET['dir'])) {
    //    $section_id = intval($_GET['dir']);
    //    $section_content = seo::getSectionById($section_id);
    //} else {
    $section_name = $_GET['dir'];
    $section_content = $seo->getSectionByName($section_name, true, $direct_id, $_GET['cat']);
    //}
    if (!$section_content['id'] || $section_content['direct_id'] != $direct_id || $seo->subdomain['id'] != $section_content['subdomain_id']) {
        header('Location: /404.php');
        exit;
    }
    //$seo = new seo((int)$section_content['subdomain_id']);
    $page_keyw = $section_content['meta_keywords'];
    $page_descr = $section_content['meta_description'];
    $content_type = 'article';
    $dinamic_content = $seo->getDinamicContent($page_keyw, $seo->subdomain['name_subdomain']);
    $dinamic_content_articles = $seo->getDinamicContentArticles($page_keyw);
} elseif (!$subdomain && $direct_link) {
    $section_direction = $direct;
} else {
    $section_direction = $direct;
    $seo = new seo($subdomain);
}
$directions = $seo->getDirections($direct_id);
$res = $seo->getSections(true, $direct_id);
$sections = array();
if ($res) {
    foreach ($res as $row) {
        $sections[$row['direct_id']][] = $row;
    }
}