AddEventHandler("iblock", "OnBeforeIBlockElementUpdate", array("ActiveUpdate", "OnBeforeIBlockElementUpdate"));
class ActiveUpdate
{
function OnBeforeIBlockElementUpdate (&$arFields)
{
if ($arFields['PROPERTY_VALUES'][135] == 95)
$arFields["ACTIVE"]="N";
else
$arFields["ACTIVE"]="Y";
}
} |