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
| <? | |
| $res = CIBlockSection::GetList( | |
| Array('name' => 'asc'), | |
| Array('IBLOCK_ID' =>'5' , 'ACTIVE' => 'Y') | |
| ); | |
| while ($row = $res->GetNext()) | |
| { | |
| echo $row['NAME'].'<br>'; | |
| $rsParentSection = CIBlockSection::GetByID($row['ID']); | |
| if ($arParentSection = $rsParentSection->GetNext()) |
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 src="http://api-maps.yandex.ru/2.1/?lang=ru-RU" type="text/javascript"></script> | |
| <script> | |
| ymaps.ready(init); | |
| function init () { | |
| var myMap = new ymaps.Map('map', { | |
| center: [55.83, 37.41], | |
| zoom: 10 | |
| }, { | |
| searchControlProvider: 'yandex#search' |
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
| //удаление товара из корзины в попапе | |
| $(document).on("click", '.t-basket__close', function(e) { | |
| e.preventDefault(); | |
| var id = $(this).attr('itemId'); | |
| $.ajax({ | |
| url: '/local/ajax/delforbasket.php', | |
| data: { | |
| id: id, | |
| }, | |
| 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
| $(document).on("click", '#subscribe_submit', function(e) { | |
| e.preventDefault(); | |
| var parent = $(this).parent(); | |
| $.ajax({ | |
| url: '/local/ajax/subscribe.php', | |
| data: { | |
| mail: parent.find('input[name="mail"]').val(), | |
| }, | |
| dataType: 'json', | |
| success: function(result){ |
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
| <? | |
| include($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php"); | |
| global $USER; | |
| $arResult = $USER->Register($_REQUEST['mail'], $_REQUEST['name'], $_REQUEST['last_name'], $_REQUEST['pass'], $_REQUEST['pass'], $_REQUEST['mail']); | |
| exit(json_encode($arResult)); |
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
| <? | |
| include($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php"); | |
| global $USER; | |
| if (!is_object($USER)) $USER = new CUser; | |
| $arAuthResult = $USER->Login($_REQUEST['login'], $_REQUEST['pass'], "Y"); | |
| $APPLICATION->arAuthResult = $arAuthResult; | |
| exit(json_encode($arAuthResult)); |
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 | |
| ( | |
| [ROOT] => Array | |
| ( | |
| [CHILD] => Array | |
| ( | |
| [12] => Array | |
| ( |
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
| <? | |
| \Bitrix\Main\EventManager::getInstance()->addEventHandler("main", "OnEndBufferContent", "OnEndBufferWebFormAntiSpam"); | |
| function OnEndBufferWebFormAntiSpam(&$content) | |
| { | |
| // Добавляем стили перед head | |
| $xStyle = '<style>.xname{display:block;height:.1px;margin:0!important;overflow:hidden;padding:0!important;width:.1px;border:0;opacity:.01;}</style>'; // Стили для поля | |
| $content = str_ireplace('</head>', $xStyle.'</head>', $content); | |
| // Добавляем поля | |
| $findField = '<input type="hidden" name="WEB_FORM_ID"'; // У всех веб-форм есть это поле (Должно быть) | |
| $xField = '<input class="xname name" tabindex="-1" autocomplete="off" type="text" name="last_name" value="">'; // Максимально завлекающее ботов поля с утыканными name |

