Your IP : 18.188.247.133
<?php
require_once($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_before.php");
require_once($_SERVER["DOCUMENT_ROOT"] . "/bitrix/admin/offersgroup_ext.php");
IncludeModuleLangFile(__FILE__);
Bitrix\Main\Loader::includeModule('webprofy.offersgroup');
//Подключение библиотеки
use Webprofy\Offersgroup\PropertiesMain;
if($_POST['action'] && ($_POST['action'] == 'getTable')){
if(file_exists($_SERVER['DOCUMENT_ROOT'] . '/bitrix/admin/offersgroup_getTable.php')){
require_once($_SERVER['DOCUMENT_ROOT'] . '/bitrix/admin/offersgroup_getTable.php');
}
return;
}
//Выбор товаров для селекта
$arProducts = PropertiesMain::getProducts();
require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php"); ?>
<div id="dialog" style="display: none;">Что делать с торговыми предложениями?</div>
<div class="offers-group">
<div class="offers-group__block">
<?//Список товаров, начало
if (!empty($arProducts)):?>
<form action="/bitrix/admin/offersgroup.php?lang=<?= LANG; ?>" method="post" id="products_form">
<label for="">Товар</label>
<select name="selected_product" id="selected_product" class="offers-group__select-product js-select">
<option value="">Не выбрано</option>
<? foreach ($arProducts as $key => $product): ?>
<option
value="<?= $key ?>" <? if ($_POST['selected'] && (intval($_POST['selected']) === $key)): ?> selected<? endif; ?>>
<?= $product ?>
</option>
<? endforeach; ?>
</select>
</form>
<? else:
echo getMessage('WP_PRODUCTS_LIST_EMPTY');
return false;
endif;
//Список товаров, конец?>
</div>
<div id="message-block"></div>
<?//Контейнер для Таблицы с группами?>
<div class="offers-group__table offers-group__block" id="offers-group__container">
</div>
<?//Контейнер для Формы выбранной группы?>
<div class="offers-group__form offers-group__block" id="offers-group__form">
</div>
</div>
<?
require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin.php");