if (!empty($arItem['PREVIEW_PICTURE']))
$img=CFile::ShowImage($arItem['PREVIEW_PICTURE']);
elseif ( !empty($arItem['IBLOCK_SECTION_ID']) ){
$sec = GetIBlockSection($arItem['IBLOCK_SECTION_ID']);
if ( !empty( $sec['PICTURE'] )) $img=CFile::ShowImage($sec['PICTURE']);
}
|