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/modules/main/include/prolog_before.php';?> | |
| <? | |
| \Bitrix\Main\Loader::includeModule('iblock'); | |
| $ar = array(); | |
| $arFilter = array( | |
| 'IBLOCK_ID' => IBLOCK_CAT_ID, | |
| 'ACTIVE' => 'Y' |
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/modules/main/include/prolog_before.php';?> | |
| <? | |
| \Bitrix\Main\Loader::includeModule('iblock'); | |
| $ar = array(); | |
| $arSelect = array( | |
| 'ID', | |
| '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
| <?require $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/prolog_before.php';?> | |
| <? | |
| \Bitrix\Main\Loader::includeModule('iblock'); | |
| $ar = array(); | |
| $arFilter = array( | |
| 'IBLOCK_ID' => IBLOCK_REVIEWS_ID, | |
| 'ACTIVE' => 'Y', |
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
| class OneTimePasswordGenerator | |
| def initialize(pass_code_length = 6) | |
| @pin_modulo = 10 ** pass_code_length | |
| end | |
| def get_code(base64_secret, time = nil) | |
| time = (Time.current.to_i / 30).floor unless time | |
| secret = Base64.decode64 base64_secret |
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
| <? | |
| class OneTimePasswordGenerator { | |
| static $PASS_CODE_LENGTH = 6; | |
| static $PIN_MODULO; | |
| public function __construct() { | |
| self::$PIN_MODULO = pow(10, self::$PASS_CODE_LENGTH); | |
| } | |
| public function getCode($base64Secret, $time = null) { | |
| if (!$time) { |
NewerOlder