if (!is_array($arDiscount['APPICATIONS'])) { if (CheckSerializedData($arDiscount['APPICATIONS'])) { $arDiscount['APPICATIONS'] = unserialize($arDiscount['APPICATIONS']); } else { $arDiscount['APPICATIONS'] = ''; } } $arCondParams = array('FORM_NAME' => 'sale_discount_form', 'CONT_ID' => 'tree_actions', 'JS_NAME' => 'JSSaleAct', 'PREFIX' => 'actrl', 'INIT_CONTROLS' => array('SITE_ID' => $arDiscount['LID'], 'CURRENCY' => CSaleLang::GetLangCurrency($arDiscount['LID'])), 'SYSTEM_MESSAGES' => array('SELECT_CONTROL' => GetMessage('BT_SALE_DISCOUNT_ACTIONS_SELECT_CONTROL'), 'ADD_CONTROL' => GetMessage('BT_SALE_DISCOUNT_ACTIONS_ADD_CONTROL'), 'DELETE_CONTROL' => GetMessage('BT_SALE_DISCOUNT_ACTIONS_DELETE_CONTROL'))); $obAct = new CSaleActionTree(); $boolAct = $obAct->Init(BT_COND_MODE_DEFAULT, BT_COND_BUILD_SALE_ACTIONS, $arCondParams); if (!$boolAct) { if ($ex = $APPLICATION->GetException()) { echo $ex->GetString() . "<br>"; } } else { $obAct->Show($arDiscount['ACTIONS']); } ?> </td> </tr><?php $strHidden = ''; $strApp = base64_encode(serialize($arDiscount['ACTIONS'])); $tabControl->EndCustomField('ACTIONS', '<input type="hidden" name="ACTIONS" value="' . htmlspecialcharsbx($strApp) . '">' . '<input type="hidden" name="ACTIONS_CHECK" value="' . htmlspecialcharsbx(md5($strApp)) . '">'); $tabControl->AddSection("BT_SALE_DISCOUNT_SECT_COND", GetMessage("BT_SALE_DISCOUNT_SECTIONS_COND_ADD")); $tabControl->BeginCustomField("CONDITIONS", GetMessage('BT_SALE_DISCOUNT_EDIT_FIELDS_COND_ADD') . ":", false); ?> <tr id="tr_CONDITIONS"> <td valign="top" colspan="2"><div id="tree" style="position: relative; z-index: 1;"></div><?php if (!is_array($arDiscount['CONDITIONS'])) { if (CheckSerializedData($arDiscount['CONDITIONS'])) { $arDiscount['CONDITIONS'] = unserialize($arDiscount['CONDITIONS']);