} $sections = $seo->getSections(true, $direct_id); $subdomains = $seo->getSubdomains(false); $directions = $seo->getDirections(); $activeItems = json_decode(stripslashes($_COOKIE['seocatalogmenu'])); if (!$activeItems) { $activeItems = array(); } $action = $_POST['action']; switch ($action) { case "main": $update['meta_description'] = __paramInit("String", null, 'meta_description', null); $update['meta_keywords'] = __paramInit("String", null, 'meta_keywords', null); $update['content'] = __paramInit("String", null, 'content', null); $id = __paramInit('int', null, 'subdomain'); $seo->updateContentSubdomain($update, $id); $subdomain_id = $id; break; default: break; } $rpath = "../../"; $content = "content.php"; $header = $rpath . "header.php"; $footer = $rpath . "footer.html"; $css_file = array('hljs.css'); //, 'wysiwyg.css' ); $css_file[] = "seo.css"; $js_file = array('highlight.min.js', 'highlight.init.js', 'seo.js', 'kwords.js', '/kword_js.php'); $js_file_utf8[] = '/scripts/ckedit/ckeditor.js'; $additional_header = "<BASE href='{$host}'>";
/** * Редактированеи содержания поддомена (региона) * * @param array $info Данные поддомена (региона) * @return object xajaxResponse */ function updateContentSubdomain($info) { session_start(); if (!hasPermissions('seo')) { return false; } $objResponse = new xajaxResponse(); $update = array("meta_description" => $info['meta_description'], "meta_keywords" => $info['meta_keywords'], "content" => $info['content']); $seo = new seo((int) $info['subdomain']); $seo->updateContentSubdomain($update, $info['subdomain']); /* @todo Зарефакторить надо */ $seo->subdomain['meta_description'] = $info['meta_description']; $seo->subdomain['meta_keywords'] = $info['meta_keywords']; $seo->subdomain['content'] = $info['content']; $seo->getLoadMainFormTemplate($objResponse, true); return $objResponse; }