use Bitrix\Main\Application;
use Bitrix\Main\Web\Cookie;
$context = Application::getInstance()->getContext();
$cookie = new Cookie("CARD_NUMBER", $card, time() + 60*60*24*30*12*2);
$cookie->setDomain($context->getServer()->getHttpHost());
$cookie->setHttpOnly(false);
$cookie->setSecure(false);
$context->getResponse()->addCookie($cookie);
$context->getResponse()->flush("");
"INSERT INTO `codes` SET `DATE` = ?, `CODE` = ?"
$file = Array
(
'name' => $_FILES["photo_ar"]['name'][$i],
'size' => $_FILES["photo_ar"]['size'][$i],
'tmp_name' => $_FILES["photo_ar"]['tmp_name'][$i],
'type' => $_FILES["photo_ar"]['type'][$i]
);
$arFiles[] = array('VALUE' => $file, 'DESCRIPTION' => '');