Example #1
0
 include_once $GLOBALS["DOCUMENT_ROOT"] . "/bitrix/components/bitrix/crm.config.invoice.number/post_proc.php";
 if ($ex = $APPLICATION->GetException()) {
     $sError = $ex->GetString();
 }
 $APPLICATION->ResetException();
 include_once $GLOBALS["DOCUMENT_ROOT"] . "/bitrix/components/bitrix/crm.config.number/post_proc.php";
 if ($ex = $APPLICATION->GetException()) {
     $sError = $ex->GetString();
 }
 $APPLICATION->ResetException();
 if (strlen($sError) > 0) {
     ShowError($sError . '<br>');
 } else {
     CCrmActivityCalendarSettings::SetValue(CCrmActivityCalendarSettings::DisplayCompletedCalls, isset($_POST['CALENDAR_DISPLAY_COMPLETED_CALLS']) && strtoupper($_POST['CALENDAR_DISPLAY_COMPLETED_CALLS']) !== 'N');
     CCrmActivityCalendarSettings::SetValue(CCrmActivityCalendarSettings::DisplayCompletedMeetings, isset($_POST['CALENDAR_DISPLAY_COMPLETED_MEETINGS']) && strtoupper($_POST['CALENDAR_DISPLAY_COMPLETED_MEETINGS']) !== 'N');
     CCrmUserCounterSettings::SetValue(CCrmUserCounterSettings::ReckonActivitylessItems, isset($_POST['RECKON_ACTIVITYLESS_ITEMS_IN_COUNTERS']) && strtoupper($_POST['RECKON_ACTIVITYLESS_ITEMS_IN_COUNTERS']) !== 'N');
     CCrmEMailCodeAllocation::SetCurrent(isset($_POST['SERVICE_CODE_ALLOCATION']) ? intval($_POST['SERVICE_CODE_ALLOCATION']) : CCrmEMailCodeAllocation::Body);
     if (Bitrix\Crm\Integration\Bitrix24Email::isEnabled() && Bitrix\Crm\Integration\Bitrix24Email::allowDisableSignature()) {
         Bitrix\Crm\Integration\Bitrix24Email::enableSignature(isset($_POST['ENABLE_B24_EMAIL_SIGNATURE']) && strtoupper($_POST['ENABLE_B24_EMAIL_SIGNATURE']) !== 'N');
     }
     $isCallSettingsChanged = false;
     $oldCalltoFormat = CCrmCallToUrl::GetFormat(0);
     $newCalltoFormat = isset($_POST['CALLTO_FORMAT']) ? intval($_POST['CALLTO_FORMAT']) : CCrmCallToUrl::Slashless;
     if ($oldCalltoFormat != $newCalltoFormat) {
         CCrmCallToUrl::SetFormat($newCalltoFormat);
         $isCallSettingsChanged = true;
     }
     $oldCalltoSettings = $newCalltoSettings = CCrmCallToUrl::GetCustomSettings();
     if ($newCalltoFormat === CCrmCallToUrl::Custom) {
         $newCalltoSettings['URL_TEMPLATE'] = isset($_POST['CALLTO_URL_TEMPLATE']) ? $_POST['CALLTO_URL_TEMPLATE'] : '';
         $newCalltoSettings['CLICK_HANDLER'] = isset($_POST['CALLTO_CLICK_HANDLER']) ? $_POST['CALLTO_CLICK_HANDLER'] : '';