<?foreach($arResult["~ITEMS"] as $key=>$arSection):?>
<div class="cont <?=$arSection["CODE"]?>">
<div class="flaty">
<p><?=$arSection["NAME"]?></p>
</div>
<img class="shadow" src="/i/shadow.png" alt="">
</div>
<?endforeach?>
foreach($arResult["ITEMS"] as &$arItem)
{
if(!array_key_exists($arItem["~IBLOCK_SECTION_ID"], $arResult["~SECTION"]) && $arItem["~IBLOCK_SECTION_ID"] > 0 && !is_array($arResult["SECTION"]))
continue;
$key = 0;
if(array_key_exists($arItem["~IBLOCK_SECTION_ID"], $arResult["~SECTION"]))
$key = $arResult["~SECTION"][$arItem["~IBLOCK_SECTION_ID"]]["TOP_PARENT"] > 0 ? $arResult["~SECTION"][$arItem["~IBLOCK_SECTION_ID"]]["TOP_PARENT"] : $arResult["~SECTION"][$arItem["~IBLOCK_SECTION_ID"]]["ID"];
$arResult["~ITEMS"][$key]["COUNT"]++;
if($arResult["~ITEMS"][$key]["COUNT"] > $arParams["LINE_ELEMENT_COUNT"] && !empty($arResult["~SECTION"])) continue;
$arItem["DISPLAY_ACTIVE_FROM"] = CIBlockFormatProperties::DateFormat("d F Y", MakeTimeStamp($arItem["ACTIVE_FROM"], CSite::GetDateFormat()));
//$arItem["~DISPLAY_ACTIVE_FROM"]["DD"] = CIBlockFormatProperties::DateFormat("d", MakeTimeStamp($arItem["ACTIVE_FROM"], CSite::GetDateFormat()));
//$arItem["~DISPLAY_ACTIVE_FROM"]["MM"] = CIBlockFormatProperties::DateFormat("M", MakeTimeStamp($arItem["ACTIVE_FROM"], CSite::GetDateFormat()));
$arResult["~ITEMS"][$key]["IBLOCK_ID"] = $arResult["~SECTION"][$key]["IBLOCK_ID"];
$arResult["~ITEMS"][$key]["IBLOCK_SECTION_ID"] = $arResult["~SECTION"][$key]["ID"];
$arResult["~ITEMS"][$key]["SORT"] = $arResult["~SECTION"][$key]["SORT"] > 0 ? $arResult["~SECTION"][$key]["SORT"] : 0;
$arResult["~ITEMS"][$key]["NAME"] = $arResult["~SECTION"][$key]["NAME"];
$arResult["~ITEMS"][$key]["DESCRIPTION"] = $arResult["~SECTION"][$key]["DESCRIPTION"];
$arResult["~ITEMS"][$key]["PATH"] = $arResult["~SECTION"][$key];
$arResult["~ITEMS"][$key]["CODE"] = $arResult["~SECTION"][$key]["CODE"];
$arResult["~ITEMS"][$key]["ITEMS"][] = $arItem;
}
CModule::IncludeModule('iblock');
$arSelect = Array("NAME", "ID", "PROPERTY_BLANK");
$arFilter = Array("IBLOCK_ID"=>8, "ACTIVE"=>"Y");
$res = CIBlockElement::GetList(Array(), $arFilter, false, Array(), $arSelect);
while($ob = $res->GetNextElement())
{
$arFields = $ob->GetFields();
CFile::GetPath($arFields['PROPERTY_BLANK_VALUE']);
}
$mailFields = array(
"BLANK" => $_FILES['BLANK']['name'],
);
print_r($mailFields);