1С-Битрикс
5
Вклад в тег
CModule::IncludeModule('iblock');
$arSelect = Array("NAME", "ID", "PROPERTY_IMAGE");
$arFilter = Array("IBLOCK_ID"=>15, "ACTIVE"=>"Y");
$res = CIBlockElement::GetList(Array(), $arFilter, false, Array(), $arSelect);
while($ob = $res->GetNextElement())
{
$arFields = $ob->GetFields();
if (!empty($arFields['PROPERTY_IMAGE_VALUE'])){
$arEventField = array(
"EMAIL_TO" => $_POST['email'],// - здесь email - это <input type="email" name="email" placeholder="E-mail" value="" required>
"TEXT" => $_POST['textarea'],// - здесь textarea - это <input type="text" name="textarea" placeholder="Текст сообщения" value="">
);
$image=CFile::GetPath($arFields['PROPERTY_IMAGE_VALUE']);
CEvent::Send("IMAGE_FEEDBACK", 's1', $arEventField,'Y',8,array(CFile::GetPath($arFields['PROPERTY_IMAGE_VALUE'])));
}
}