<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
/** @var array $arParams */
/** @var array $arResult */
/** @global CMain $APPLICATION */
/** @global CUser $USER */
/** @global CDatabase $DB */
/** @var CBitrixComponentTemplate $this */
/** @var string $templateName */
/** @var string $templateFile */
/** @var string $templateFolder */
/** @var string $componentPath */
/** @var CBitrixComponent $component */
$this->setFrameMode(true);
$IBLOCK_ID = 13;
$arOrder = array("SORT" => "DESC");
$arSelect = Array("ID", "IBLOCK_SECTION_ID", "IBLOCK_ID", "*", "UF_SECTION_ID");
if (CModule::IncludeModule("iblock")) {
$arFilterSec = Array("IBLOCK_ID" => $IBLOCK_ID, 'UF_SECTION_ID' => $arParams['PARENT_SECTION']);
$resSection = CIBlockSection::GetList($arOrder, $arFilterSec, false, $arSelect);
while($arSections = $resSection->GetNext()){
$isSectionId[] = $arSections['UF_SECTION_ID'];
$isParamID = $arParams['PARENT_SECTION'];
$iblock_ID = $arSections['ID'];
$arFilter = Array("IBLOCK_ID" => $IBLOCK_ID);
$resItem = CIBlockElement::GetList($arOrder, $arFilter, false, false, $arSelect);
$b=0;
if($ob = $resItem->GetNextElement()){
$arFields = $ob->GetFields();
$arProps = $ob->GetProperties();
$tabs[$isSectionId[$b]] = $arFields;
$b++;
}
}
}
?>
<div class="lessons-list">
<?foreach($arResult["ITEMS"] as $arItem):?>
<?
$this->AddEditAction($arItem['ID'], $arItem['EDIT_LINK'], CIBlock::GetArrayByID($arItem["IBLOCK_ID"], "ELEMENT_EDIT"));
$this->AddDeleteAction($arItem['ID'], $arItem['DELETE_LINK'], CIBlock::GetArrayByID($arItem["IBLOCK_ID"], "ELEMENT_DELETE"), array("CONFIRM" => GetMessage('CT_BNL_ELEMENT_DELETE_CONFIRM')));
?>
<?if(in_array($arParams['PARENT_SECTION'], $isSectionId)):?>
<?
$i=0;
while($ob = $resItem->GetNextElement()){
?>
<pre>
<?print_r($tabs);?>
</pre>
<?
$i++;
}
?>
<?else:?>
<a href="/lessons/ls.php?LS=<?=$arItem["ID"]?>"><i class="far fa-file"></i> <?=$arItem["NAME"]?></a>
<?endif;?>
<?endforeach;?>
</div>
<?foreach ($arResult['SECTIONS'] as &$arSection):?>
<li>
<span class="link"><a href="<?=$arSection['SECTION_PAGE_URL']?>"><?=$arSection['NAME'];?></a></span>
<span class="count"><?=$arSection['ELEMENT_CNT']?></span>
</li>
<?endforeach;?>
Вот проблема в том что почему то $USER->GetID(); не выводится, надо вывести ID текущего пользователя, но не срабатывает... Почему не могу понять