Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/wbs24.deliverytypescvetdvor/ |
Upload File : |
<?php use Bitrix\Main\Loader; use Bitrix\Main\Web\Uri; use Bitrix\Main\Application; use Bitrix\Main\Localization\Loc; if (!$USER->IsAdmin()) return; $moduleId = basename(__DIR__); $suffix = strtoupper($moduleId); Loc::loadMessages(__FILE__); Loader::includeModule($moduleId); $request = Application::getInstance()->getContext()->getRequest(); $uriString = $request->getRequestUri(); $uri = new Uri($uriString); $redirect = $uri->getUri(); $aTabs = [ [ "DIV" => str_replace(".", "_", $moduleId), "TAB" => Loc::getMessage($suffix.".SETTINGS"), "ICON" => "settings", "TITLE" => Loc::getMessage($suffix.".TITLE"), ], ]; $arAllOptions = [ "main" => [ Loc::getMessage($suffix.".PROPERTY_LABEL"), ["site_id", Loc::getMessage($suffix.".SITE_ID"), "", ["text", 20]], ["delivery_service_id", Loc::getMessage($suffix.".DELIVERY_SERVICE_ID"), "", ["text", 20]], ["special_delivery_ids", Loc::getMessage($suffix.".SPECIAL_DELIVERY_IDS"), "", ["text", 20]], ["group_id_for_shipping_options" , Loc::getMessage($suffix.".GROUP_ID_FOR_SHIPPING_OPTIONS"), "", ["text", "20"]], ["regular_delivery_property_id", Loc::getMessage($suffix.".REGULAR_DELIVERY_PROPERY_ID"), "", ["text", 20]], ["fast_delivery_property_id", Loc::getMessage($suffix.".FAST_DELIVERY_PROPERY_ID"), "", ["text", 20]], ["delivery_on_time_property_id", Loc::getMessage($suffix.".DELIVERY_ON_TIME_PROPERY_ID"), "", ["text", 20]], ["delivery_date", Loc::getMessage($suffix.".DELIVERY_DATE"), "", ["text", 20]], ["delivery_interval", Loc::getMessage($suffix.".DELIVERY_INTERVAL"), "", ["text", 20]], ["delivery_time", Loc::getMessage($suffix.".DELIVERY_TIME"), "", ["text", 20]], ["delivery_address", Loc::getMessage($suffix.".DELIVERY_ADDRESS"), "", ["text", 20]], ["delivery_home_number", Loc::getMessage($suffix.".DELIVERY_HOME_NUMBER"), "", ["text", 20]], //["delivery_on_time_cost", Loc::getMessage($suffix.".DELIVERY_ON_TIME_COST"), "", ["text", 20]], Loc::getMessage($suffix.".LABEL"), ["fast_delivery", Loc::getMessage($suffix.".FAST_DELIVERY"), "", ["checkbox", ""]], ["delivery_on_time", Loc::getMessage($suffix.".DELIVERY_ON_TIME"), "", ["checkbox", ""]], ], "main2" => [ Loc::getMessage($suffix.".FAST_DELIVERY_LABEL"), ["fast_delivery_price", Loc::getMessage($suffix.".FAST_DELIVERY_PRICE"), "", ["text", 20]], ["fast_delivery_note", Loc::getMessage($suffix.".FAST_DELIVERY_NOTE"), "", ["text", 20]], Loc::getMessage($suffix.".DELIVERY_ON_TIME_LABEL"), ], "main3" => [ ["delivery_on_time_price", Loc::getMessage($suffix.".DELIVERY_ON_TIME_PRICE"), "", ["text", 20]], ["delivery_on_time_active_from", Loc::getMessage($suffix.".DELIVERY_ON_TIME_ACTIVE_FROM"), "1", ["text", 20]], ["delivery_on_time_active_to", Loc::getMessage($suffix.".DELIVERY_ON_TIME_ACTIVE_TO"), "1", ["text", 20]], ["delivery_on_time_plus_time", Loc::getMessage($suffix.".DELIVERY_ON_TIME_PLUS_TIME"), "1", ["text", 20]], ], ]; if ((isset($_REQUEST["save"]) || isset($_REQUEST["apply"])) && check_bitrix_sessid()) { __AdmSettingsSaveOptions($moduleId, $arAllOptions["main"]); __AdmSettingsSaveOptions($moduleId, $arAllOptions["main2"]); __AdmSettingsSaveOptions($moduleId, $arAllOptions["main3"]); LocalRedirect($redirect); } $tabControl = new CAdminTabControl("tabControl", $aTabs); ?> <form method="post" action="<?=$redirect?>" name="<?=str_replace(".", "_", $moduleId)?>"> <? echo bitrix_sessid_post(); $tabControl->Begin(); $tabControl->BeginNextTab(); __AdmSettingsDrawList($moduleId, $arAllOptions["main"]); __AdmSettingsDrawList($moduleId, $arAllOptions["main2"]); __AdmSettingsDrawList($moduleId, $arAllOptions["main3"]); $tabControl->Buttons([]); $tabControl->End(); ?> </form>