Your IP : 3.136.18.121


Current Path : /var/www/u0635749/data/www/hobbyclick.ru/public/
Upload File :
Current File : /var/www/u0635749/data/www/hobbyclick.ru/public/form_in_admin.php

<?include($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");?>
<table border="0" cellspacing="0" cellpadding="0" width="100%" class="edit-table" id="skidki">
	<tbody>
		<tr>
			<td><input type="hidden" name="tovarId" id="tovarId" value="<?=$_REQUEST['ID']?>"></td>
		</td>
		</tr>
		<tr>
			<td style="padding: 10px;" width="40%" class="field-name"><label for="price_useextform">Скидка,%:</label></td>
			<td width="60%"><input type="number" class="adm-input" max="100" min="0" id="skidka" name="skidka" value="" size="30"></label></td>
		</tr>
		<tr>
			<td style="padding: 10px; width="40%" class="field-name"><label for="price_useextform">Сайт:</label></td>
			<td width="60%">
				<select id="siteSkidka">
					<option value="s1">(s1) Москва</option>
					<option value="s2">(s2) Санкт-Петербург</option>
				<select>
			</td>
		</tr>
		<tr>
			<td width="40%" class="field-name"></td>
			<td width="60%" class="field-name" style="text-align: left"><input type="button" class="adm-btn-save" onclick="submitSkidka()" id="saveSkidka" value="Сохранить скидку"></td>
		</tr>
	</tbody>
</table>
<h2>Список скидок</h2>
<?CModule::IncludeModule("sale");
	$arDiscounts = CCatalogDiscount::GetDiscountByProduct(
		$_REQUEST['ID'],
		array(),
		"N",
		array(),
		"s1"
		
	);?>
	
<table border="0" cellspacing="0" cellpadding="0" class="internal" align="center" width="100%" style="opacity: 1;">
	<tbody><tr class="heading">
		<td>ID</td>
		<td>Город</td>
		<td>Название</td>
		<td>Величина</td>
		<td>Действия</td>		</tr>
		<?foreach($arDiscounts as $arItem){?>
		<tr>
			<td style="text-align: center;"><?=$arItem['ID']?></td>
			<td style="text-align: center;">Москва</td>
			<td style="text-align: center;"><?=$arItem['NAME']?></td>
			<td style="text-align: center;">
			<?=$arItem['VALUE']?>%		</td>
				<td style="text-align: center;">
					<a href="#" class="deliteSkidka" onclick="deliteSkidka(this); return false;" data-id="<?=$arItem['ID']?>">Удалить</a>
				</td>
		</tr>
		<?}?>
		<?	$arDiscounts = CCatalogDiscount::GetDiscountByProduct(
		$_REQUEST['ID'],
		array(),
		"N",
		array(),
		"s2"
		
	);?>
		<?foreach($arDiscounts as $arItem){?>
		<tr>
			<td style="text-align: center;"><?=$arItem['ID']?></td>
			<td style="text-align: center;">Санкт-Петербург</td>
			<td style="text-align: center;"><?=$arItem['NAME']?></td>
			<td style="text-align: center;">
			<?=$arItem['VALUE']?>%		</td>
				<td style="text-align: center;">
					<a href="#" class="deliteSkidka" onclick="deliteSkidka(this); return false;" data-id="<?=$arItem['ID']?>">Удалить</a>
				</td>
		</tr>
		<?}?>
		</tbody>
</table>