Blame view
mail.php
1.2 KB
80576aee7 Интеграция верстк... |
1 2 3 4 5 6 7 8 9 |
<?php require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php"); CModule::IncludeModule("iblock"); header('Content-type: application/json'); if($_REQUEST['send_form'] == 'Y') { $el = new CIBlockElement; $PROP = []; |
addf9d0f8 1. Настраиваемя ф... |
10 11 12 |
$PROP[16] = strip_tags($_REQUEST['form_text_2']); $PROP[17] = strip_tags($_REQUEST['form_text_3']); $PROP[18] = strip_tags($_REQUEST['form_text_4']); |
80576aee7 Интеграция верстк... |
13 |
|
addf9d0f8 1. Настраиваемя ф... |
14 |
$name = 'Сообщение от ' . strip_tags($_REQUEST['form_text_1']) . ' за ' . date('d.m.Y H:i:s'); |
80576aee7 Интеграция верстк... |
15 16 17 18 19 |
$arLoadProductArray = [ 'IBLOCK_ID' => IBID_FEEDBACK, 'PROPERTY_VALUES' => $PROP, 'NAME' => $name, |
addf9d0f8 1. Настраиваемя ф... |
20 |
'PREVIEW_TEXT' => strip_tags($_REQUEST['form_textarea_5']), |
80576aee7 Интеграция верстк... |
21 22 23 24 25 |
'ACTIVE' => 'Y', ]; if ($PRODUCT_ID = $el->Add($arLoadProductArray)) { $to_send = []; |
addf9d0f8 1. Настраиваемя ф... |
26 27 28 29 30 |
$to_send['AUTHOR_EMAIL'] = strip_tags($_REQUEST['form_text_3']); $to_send['AUTHOR'] = strip_tags($_REQUEST['form_text_1']); $to_send['PHONE'] = strip_tags($_REQUEST['form_text_2']); $to_send['COMPANY'] = strip_tags($_REQUEST['form_text_4']); $to_send['TEXT'] = strip_tags($_REQUEST['form_textarea_5']); |
80576aee7 Интеграция верстк... |
31 32 33 34 35 36 |
CEvent::SendImmediate ('FEEDBACK_FORM', SITE_ID, $to_send); } else { echo 'Error: ' . $el->LAST_ERROR; } } |