Your IP : 3.139.93.150


Current Path : /home/bitrix/ext_www/dev.klimatlend.ua/ua/ajax/
Upload File :
Current File : /home/bitrix/ext_www/dev.klimatlend.ua/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)) {
        //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);
?>