IncludeModuleLangFile(__FILE__); class CClock { public static function Init(&$arParams) { if (!isset($arParams['inputId'])) $arParams['inputId'] = 'bxclock_'.rand(); if (!isset($arParams['inputName'])) $arParams['inputName'] = $arParams['inputId']; if (!isset($arParams['step'])) $arParams['step'] = 5; if (isset($arParams['view']) && $arParams['view'] == 'select' && $arParams['step'] < 30) { $arParams['step'] = 30; } if (!isset($arParams['view']) || $arParams['view'] != 'inline') { $arParams['view'] = 'input'; } } public static function Show($arParams) { global $APPLICATION; CClock::Init($arParams); $APPLICATION->AddHeadScript('/bitrix/js/main/utils.js'); $inputId = htmlspecialcharsbx($arParams['inputId'] ?? ''); $inputName = htmlspecialcharsbx($arParams['inputName'] ?? ''); $initTime = htmlspecialcharsbx($arParams['initTime'] ?? ''); $inputTitle = htmlspecialcharsbx($arParams['inputTitle'] ?? ''); $jsInputId = preg_replace("/[^a-z0-9_\\[\\]:]/i", "", $arParams['inputId']); // Show input switch ($arParams['view']) { case 'label': ?>