本文整理汇总了PHP中seo::getSubdomains方法的典型用法代码示例。如果您正苦于以下问题:PHP seo::getSubdomains方法的具体用法?PHP seo::getSubdomains怎么用?PHP seo::getSubdomains使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类seo
的用法示例。
在下文中一共展示了seo::getSubdomains方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadFormEdit
/**
* Загрузка формы для редактирования раздела (подраздела)
*
* @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;
}
示例2: array
$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();
$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 {
示例3: array
break;
case 4:
$is_save = true;
$msgtext = 'Ќаправление успешно изменено';
break;
case 5:
$is_save = true;
$msgtext = 'ѕодраздел успешно добавлен';
break;
case 6:
$is_save = true;
$msgtext = 'ѕодраздел успешно изменен';
break;
}
$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;
示例4: seo
<?php
chdir(dirname(__FILE__));
require_once '../classes/stdf.php';
require_once '../classes/seo.php';
$seo = new seo();
$directions = $seo->getDirections($direct_id);
$res = $seo->getSections(true, $direct_id);
$sections = array();
if ($res) {
foreach ($res as $row) {
$sections[$row['direct_id']][] = $row;
}
}
$subdomains = $seo->getSubdomains(true);
foreach ($subdomains as $subdomain) {
$f = fopen("./seo-data-{$subdomain['subdomain']}.csv", "w");
foreach ($directions as $direction) {
if ($direction['id'] != 2 && $direction['id'] != 19 && $direction['id'] != 18 && $direction['id'] != 20 && $direction['id'] != 21 && $direction['id'] != 11 && $direction['id'] != 1) {
fwrite($f, '"-' . $direction['dir_name'] . "\"\n");
if ($sections[$direction['id']]) {
foreach ($sections[$direction['id']] as $key => $section) {
fwrite($f, '"--' . $section['name_section'] . "\"\n");
if ($section['subsection']) {
foreach ($section['subsection'] as $i => $subsection) {
if ($subsection['subdomain_id'] == $subdomain['id']) {
fwrite($f, '"---' . $subsection['name_section'] . "\"\n");
}
}
}
}