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
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 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
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
CEventLog::Add(array( | |
"SEVERITY" => "DEBUG", | |
"AUDIT_TYPE_ID" => 'Запись в лог', | |
"MODULE_ID" => "iblock", | |
"ITEM_ID" => 0, | |
"DESCRIPTION" => json_encode($row, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT), | |
)); |
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
<? | |
error_reporting(E_ALL & ~E_NOTICE); | |
if(version_compare(phpversion(), '5.0.0') == -1) | |
die('PHP 5.0.0 or higher is required!'); | |
require($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/prolog_before.php'); | |
header("Content-type: text/html; charset=cp1251"); | |
echo '<html><head><title>Конвертация сайта в UTF8</title></head><body>'; |
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
<script> | |
var purl = "http://<?= SITE_SERVER_NAME . $arResult['DETAIL_PAGE_URL'] ?>"; | |
var ptitle = "<?= $arResult['NAME'] ?>"; | |
var pimg = "<?= SITE_SERVER_NAME . $file['src'] ?>"; | |
var text = "<?=$arResult['NAME']?>"; | |
Share = { | |
vkontakte: function (purl, ptitle, pimg, text) { | |
url = 'http://vk.com/share.php?'; | |
url += 'url=' + encodeURIComponent(purl); | |
url += '&title=' + encodeURIComponent(ptitle); |