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
<?php | |
namespace Isaev; | |
use \Bitrix\Main\Loader; | |
use \Bitrix\Sale; | |
use \Bitrix\Main\SystemException; | |
Loader::includeModule('sale'); | |
Loader::includeModule('catalog'); |
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 isDeviceIos = navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/iPhone/i); | |
var historyScrollBack = (historyTab) => { | |
if (history.state && historyTab.hasOwnProperty('lastScroll')) { | |
window.scrollTo(0, historyTab.lastScroll); | |
} | |
}; | |
// Возрват к позиции при нажатии кнопки назад (Запись) | |
window.addEventListener((isDeviceIos ? "pagehide" : "beforeunload"), function (e) { |
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 |
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
<? | |
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
<? | |
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)); |
NewerOlder