%PDF- %PDF-
Server IP : 37.220.80.31 / Your IP : 18.188.174.218 Web Server : Apache/2.4.52 (Ubuntu) System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64 User : www-root ( 1010) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/modules/form/admin/ |
Upload File : |
<? require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_before.php"); require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/form/prolog.php"); $FORM_RIGHT = $APPLICATION->GetGroupRight("form"); if($FORM_RIGHT<="D") $APPLICATION->AuthForm(GetMessage("ACCESS_DENIED")); CModule::IncludeModule('form'); $action = $_REQUEST['action']; $result = '{"result":"error"}'; if (check_bitrix_sessid()) { switch($action) { case 'get_fields': case 'check': $CRM_ID = intval($_REQUEST['ID']); if ($CRM_ID > 0) { $arAuth = null; if ($_REQUEST['LOGIN'] <> '' && $_REQUEST['PASSWORD'] <> '') { $arAuth = array('LOGIN' => $_REQUEST['LOGIN'], 'PASSWORD' => $_REQUEST['PASSWORD']); } $link = new CFormCrmSender($CRM_ID, $arAuth); $arFields = $link->GetFields($_REQUEST['reload']=='Y'); if (is_array($arAuth)) { $authHash = $link->GetAuthHash(); } if (is_array($arFields) && count($arFields) > 0) { $result = '{"result":"ok","fields":'.CUtil::PhpToJsObject($arFields).(is_array($arAuth)?',"auth_hash":"'.$authHash.'"':'').'}'; } else { $res = $link->GetLastResult(); if ($res) { $result = '{"result":"error","error":"'.CUtil::JSEscape($res->field('error_message')).'"}'; } } } break; case 'add_lead': $FORM_ID = intval($_REQUEST['FORM_ID']); $RESULT_ID = intval($_REQUEST['RESULT_ID']); if ($FORM_ID > 0 && $RESULT_ID > 0) { $leadId = CFormCrm::AddLead($FORM_ID, $RESULT_ID); if ($leadId > 0) { $result = '{"result":"ok",ID:'.intval($leadId).'}'; } else { if ($ex = $APPLICATION->GetException()) { $result = '{"result":"error","error":"'.CUtil::JSEscape($ex->GetString()).'"}'; } } } break; } } else { $result = '{"result":"error","error":"session_expired"}'; } if ($result) { $APPLICATION->RestartBuffer(); echo $result; } require_once ($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/epilog_admin_after.php"); ?>