403Webshell
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/ilovecveti.ru/bitrix/modules/wbs24.hitproducts/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/ilovecveti.ru/bitrix/modules/wbs24.hitproducts/options.php
<?
use Bitrix\Main\Loader;
use Bitrix\Main\Web\Uri;
use Bitrix\Main\Application;
use Bitrix\Main\Localization\Loc;
use Wbs24\Hitproducts\Helper;

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();

$helper = new Helper();

$aTabs = [
	[
		"DIV" => str_replace(".", "_", $moduleId),
		"TAB" => Loc::getMessage($suffix.".SETTINGS"),
		"ICON" => "settings",
		"TITLE" => Loc::getMessage($suffix.".TITLE"),
	],
];
$arAllOptions = [
	"main" => [
		//["IBLOCK_ID", Loc::getMessage($suffix.".IBLOCK_ID"), "", ["text", ""]],
		["PRICE_ID", Loc::getMessage($suffix.".PRICE_ID"), "1", ["text", ""]],
		//["SITE_ID", Loc::getMessage($suffix.".SITE_ID"), "s1", ["text", ""]],
		["PROPERTY", Loc::getMessage($suffix.".PROPERTY"), "HIT", ["text", ""]],
		["MAX_DURING", Loc::getMessage($suffix.".MAX_DURING"), "15", ["text", ""]],

        Loc::getMessage($suffix.".NEW_LABEL"),
        ["NEW_ON", Loc::getMessage($suffix.".IS_ON"), "Y", ["checkbox", ""]],
        ["NEW_PROPERTY_VALUE", Loc::getMessage($suffix.".NEW_PROPERTY_VALUE"), "New", ["text", ""]],
        ["NEW_LIFETIME", Loc::getMessage($suffix.".NEW_LIFETIME"), "30", ["text", ""]],

        Loc::getMessage($suffix.".SALE_LABEL"),
        ["SALE_ON", Loc::getMessage($suffix.".IS_ON"), "Y", ["checkbox", ""]],
        ["SALE_PROPERTY_VALUE", Loc::getMessage($suffix.".SALE_PROPERTY_VALUE"), "Sale", ["text", ""]],
	],
];

$sites = $helper->getSites();
foreach ($sites as $siteId) {
    $arAllOptions["main"][] = [
        "SITE_MIN_SALE_PERCENT_".$siteId, Loc::getMessage($suffix.".SITE_MIN_SALE_PERCENT")." ".$siteId, "1", ["text", ""]
    ];
}

if ((isset($_REQUEST["save"]) || isset($_REQUEST["apply"])) && check_bitrix_sessid()) {
	__AdmSettingsSaveOptions($moduleId, $arAllOptions["main"]);
	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"]);

	$tabControl->Buttons([]);
	$tabControl->End();
	?>
</form>

Youez - 2016 - github.com/yon3zu
LinuXploit