$arIMAGE = $_FILES["IMAGE_ID"];
$arIMAGE["MODULE_ID"] = "iblock";
$fid = CFile::SaveFile($arIMAGE, "iblock");
$PROP = array();
$PROP[115] = $USER->GetLogin();
$PROP[117] = 0;
$PROP[118] = 0;
$PROP[127] = 0;
$PROP[113] = 'N';
$PROP[114] = 'N';
$PROP[148] = 'Y';
$PROP[116] = date("d.m.Y");
$el = new CIBlockElement;
$arLoadImageArray = Array(
"MODIFIED_BY" => $USER->GetID(),
"IBLOCK_SECTION_ID" => 294,
"IBLOCK_ID" => 29,
"PROPERTY_VALUES"=> $PROP,
"NAME" => $_POST['picture_name'],
"ACTIVE" => "N",
"PREVIEW_TEXT" => "",
"DETAIL_TEXT" => "",
"DETAIL_PICTURE" => CFile::MakeFileArray($fid)
);
$el->Add($arLoadImageArray);
|