Esempio n. 1
0
        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;
    }
}
$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();
Esempio n. 2
0
/**
 * Загрузка формы для редактирования раздела (подраздела)
 *  
 * @param integer $section_id      ИД Раздела
 * @param integer $parent_section  ИД родителя если есть (для подразделов)
 * @return object xajaxResponse
 */
function loadFormEdit($section_id, $parent_section = false, $direct_id = null)
{
    session_start();
    if (!hasPermissions('seo')) {
        return false;
    }
    $objResponse = new xajaxResponse();
    $is_edit = true;
    $seo = new seo($_SESSION['subdomain']);
    $subdomains = $seo->getSubdomains(false);
    if ($parent_section) {
        $sections = $seo->getSections(false, $direct_id);
    }
    $positions = $seo->getPositions($parent_section, $direct_id);
    $form_section = $seo->getSectionById($section_id);
    if ($direct_id) {
        $form_section['direct_id'] = $direct_id;
    }
    $subdomain_id = $form_section['subdomain_id'];
    $directions = $seo->getDirections();
    $is_subcategory = $parent_section ? true : false;
    ob_start();
    include $_SERVER['DOCUMENT_ROOT'] . '/catalog/admin/tpl.form-section.php';
    $html = ob_get_clean();
    $objResponse->assign("form_content", "innerHTML", $html);
    $objResponse->script("window.addEvent('domready', function() { var KeyWord = __key(1); KeyWord.bind(document.getElementById('kword_se'), kword, {bodybox:'body_1', maxlen:120}); CKEDITOR.replaceAll('ckeditor');});");
    return $objResponse;
}