$IBElement = new CIBlockElement;
$Property = array();
$Property['FILE'] = $fileID;
$arLoadElementArray = Array(
"MODIFIED_BY" => 1,
"IBLOCK_ID" => 3,
"IBLOCK_SECTION_ID" => 20,
"IBLOCK_CODE" => 'VIDEO',
"PROPERTY_VALUES" => $Property,
"NAME" => $fileArr[0],
"ACTIVE" => "Y",
"DETAIL_PICTURE" => $this->_TEMP_PATH."/" . $fileArr[0] . ".jpg"
);
if($PRODUCT_ID = $IBElement->Add($arLoadProductArray))
echo "New ID: ".$PRODUCT_ID;
else
echo "Error: ".$IBElement->LAST_ERROR;
|