</script><?php die; } } if ($ID > 0) { $APPLICATION->SetTitle(str_replace("#ID#", $ID, GetMessage("DSC_TITLE_UPDATE"))); } else { if (!$boolMulti) { $APPLICATION->SetTitle(GetMessage("DSC_TITLE_ADD")); } else { $APPLICATION->SetTitle(GetMessage("DSC_TITLE_ADD_MULTI")); } } require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php"; $tabControl = new CAdminSubForm("subcoupons_edit", $aTabs, false, true, $arListUrl, false); $tabControl->SetShowSettings(false); if (!$boolMulti) { $arDefaultValues = array('DISCOUNT_ID' => $intDiscountID, 'ACTIVE' => 'Y', 'ONE_TIME' => 'Y', 'COUPON' => '', 'DATE_APPLY' => '', 'DESCRIPTION' => ''); $arSelect = array_merge(array('ID'), array_keys($arDefaultValues)); $arCoupon = array(); $rsCoupons = CCatalogDiscountCoupon::GetList(array(), array("ID" => $ID), false, false, $arSelect); if (!($arCoupon = $rsCoupons->Fetch())) { $ID = 0; $arCoupon = $arDefaultValues; } if ($bVarsFromForm) { $arCoupon = $arFields; } CAdminMessage::ShowMessage($errorMessage); $tabControl->BeginPrologContent(); $tabControl->EndPrologContent();