Created
December 8, 2018 08:09
-
-
Save Ginnw2/d52f93ec0214671321c234cfd31c962e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CModule::IncludeModule("iblock"); | |
$PROP[ID_Свойства] = $_REQUEST[el_id]; | |
$el = new CIBlockElement; | |
$arFields = Array( | |
"DATE_CREATE" => date("d.m.Y H:i:s"), //Передаем дата создания | |
"CREATED_BY" => 1, //Передаем ID пользователя кто добавляет | |
"IBLOCK_SECTION_ID" => false, //ID раздела ели есть | |
"IBLOCK_ID" => 9, //ID информационного блока | |
"NAME" => $_REQUEST[el_id].$_REQUEST[user_name], | |
"ACTIVE" => "N", //поумолчанию делаем активным или ставим N для отключении поумолчанию | |
"PREVIEW_TEXT" => $_REQUEST[user_review], | |
"PROPERTY_VALUES" => $PROP, | |
); | |
if ($ID = $el->Add($arFields)) { | |
$result['status'] = 'success'; | |
echo "Элемент добавлен"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment