Current Path : /home/bitrix/ext_www/klimatlend.ua/ajax/ |
Current File : /home/bitrix/ext_www/klimatlend.ua/ajax/feedback.php |
<? require_once($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php"); //pre($_GET); foreach ($_GET as $key => $field) { if (strpos($key, 'file')) { if (is_array($field)) { foreach ($field as $file) { $arfile = CFile::MakeFileArray($file); $form_fields[$key] = $arfile; } } else { $arfile = CFile::MakeFileArray($field); $form_fields[$key] = $arfile; } } elseif (strpos($key, '~')) { $check_one_val = explode('~', $key); $key = $check_one_val[0]; $form_fields[$key][] = $field; } elseif (!isset($form_fields[$key])) $form_fields[$key] = $field; elseif (strpos($key, 'file')) { $arImage = CFile::MakeFileArray($field); $form_fields[$key] = $arImage; } else { array_push($form_fields[$key], $field); } } if (CModule::IncludeModule("form")) { if ($RESULT_ID = CFormResult::Add($_REQUEST['form_id'], $form_fields)) { CFormCRM::onResultAdded($_REQUEST['form_id'], $RESULT_ID); CFormResult::SetEvent($RESULT_ID); CFormResult::Mail($RESULT_ID); //echo "Результат #".$RESULT_ID." успешно создан"; } else { global $strError; echo $strError; } } ?> <?/* $link = '/bitrix/admin/form_result_list.php?WEB_FORM_ID='.$_REQUEST['form_id']; $arEventFields = array( "link" => $link , ); CEvent::Send("FORM_FILLING_SIMPLE_FORM_1", SITE_ID, $arEventFields);*/ ?>