This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 => array( | |
'CONDITION' => '#^/services/([a-zA-Z0-9-]{1,})/$#', | |
'RULE' => 'SECTION_CODE=$1', | |
'ID' => '', | |
'PATH' => '/services/index.php', | |
'SORT' => 30,), | |
2 => array( | |
'CONDITION' => '#^/services/([a-zA-Z0-9-]{1,})/([a-zA-Z0-9-]{1,})/$#', | |
'RULE' => 'ELEMENT_CODE=$2', | |
'ID' => '', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function slog($message, $mark = 'DEBUG') | |
{ | |
CEventLog::Add(array( | |
"SEVERITY" => "DEBUG", | |
"AUDIT_TYPE_ID" => $mark, | |
"MODULE_ID" => "iblock", | |
"ITEM_ID" => 0, | |
"DESCRIPTION" => json_encode($message),)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BX.ready(function (){ | |
BX.bind(BX('bowling_reserve'), 'click', function (e){ | |
e.preventDefault(); | |
var form = this.closest('form'); | |
var formData = BX.ajax.prepareData(BX.ajax.prepareForm(form).data); | |
BX.ajax({ | |
url: '/ajax/bowling_reservation.php', | |
data: formData, | |
method: 'POST', | |
dataType: 'json', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getPropertyEnumIdByXmlId($iBlockID, $xmlId) | |
{ | |
$property_enums = CIBlockPropertyEnum::GetList(Array(), Array("IBLOCK_ID" => $iBlockID, "XML_ID" => $xmlId)); | |
if ($enum_fields = $property_enums->GetNext()) { | |
return $enum_fields["ID"]; | |
} | |
return false; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function GetIBlockIDByCode($code, $type = '') | |
{ | |
CModule::IncludeModule("iblock"); | |
$arrFilter = array( | |
'ACTIVE' => 'Y', | |
'CODE' => $code, | |
'SITE_ID' => "s1", | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var originalBxOnCustomEvent = BX.onCustomEvent; | |
BX.onCustomEvent = function (eventObject, eventName, eventParams, secureParams) { | |
var logData = { | |
eventObject: eventObject, | |
eventName: eventName, | |
eventParams: eventParams, | |
secureParams: secureParams | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// получить текущий бизнес-процесс | |
$rootActivity = $this->GetRootActivity(); | |
// получить значение переменной бизнес-процесса {=Variable:kurs_usd} | |
$kursUSD = $rootActivity->GetVariable("kurs_usd"); | |
$rootActivity->GetConstant($fieldName); | |
// установка значения параметра бизнес-процесса {=Template:integrator_USD} | |
$rootActivity->integrator_USD = $integrator; | |
$rootActivity->SetVariable("LOG", $arLog); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/header.php"); | |
global $USER; | |
\Bitrix\Main\Loader::includeModule('crm'); | |
require_once($_SERVER['DOCUMENT_ROOT'].BX_ROOT.'/modules/main/classes/general/csv_data.php'); | |
$csvFile = new CCSVData(); | |
$csvFile->LoadFile("deals CSV.csv"); | |
$csvFile->SetFieldsType('R'); | |
$csvFile->SetFirstHeader(true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$request = \Bitrix\Main\Context::getCurrent()->getRequest(); | |
if ($request->isAjaxRequest()) { | |
d('ajax'); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array | |
( | |
[TITLE] => 80000000000 - Исходящий звонок | |
[OPENED] => Y | |
[SOURCE_ID] => CALL | |
[SOURCE_DESCRIPTION] => Звонок поступил на номер: Приложение: Телфин.Офис. | |
[FM] => Array | |
( | |
[PHONE] => Array | |
( |