This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php"); | |
$APPLICATION->SetPageProperty("NOT_SHOW_NAV_CHAIN", "Y"); | |
$APPLICATION->SetTitle("Импорт секций инфоблока"); | |
if(CModule::IncludeModule("iblock")) { | |
$arIBlocks = []; | |
$rsIBlocks = CIBlock::GetList(["sort" => "asc"], ["ACTIVE" => "Y"]); | |
while($arIBlock = $rsIBlocks->Fetch()) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$ABS_FILE_NAME = $_SERVER["DOCUMENT_ROOT"]."/xml/demo.xml"; | |
$WORK_DIR_NAME = substr($ABS_FILE_NAME, 0, strrpos($ABS_FILE_NAME, "/")+1); | |
$obXMLFile = new CIBlockXMLFile; | |
// Удаляем результат предыдущей загрузки | |
$obXMLFile->DropTemporaryTables(); | |
// Подготавливаем БД | |
if($obXMLFile->CreateTemporaryTables()) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* ПОЛУЧАЕМ ВСЕ ПОДКАТЕГОРИИ OASIS | |
*/ | |
// ID корневой секции | |
$root_id = 82663; | |
$rsParentSection = CIBlockSection::GetByID($root_id); | |
if ($arParentSection = $rsParentSection->GetNext()) |
NewerOlder