<% intMid = Request.QueryString("s") if not isnumeric(intMid) then call RaiseError(STR_ERROR_UNKNOWN_ID) if not Application(cLICENSE_ID & "cSEND_EMAILS") then call RaiseError(STR_ERROR_DISABLED) if not intCurrentUserID>0 then call RaisePermissionError() if not CheckSubscription(GetDBCon(), intCurrentUserID, intMid) then 'add subscription if not AddSubscription(GetDBCon(), intCurrentUserID, intMid) then call RaiseError(STR_ERROR_WITH_THREAD_SUBSCRIPTION) strText = STR_SUBSCRIBED_TO_THREAD else 'remove subscription intDelCount = DelSubscription(GetDBCon(), intCurrentUserID, intMid) if not intDelCount>0 then call RaiseError(STR_ERROR_WITH_THREAD_SUBSCRIPTION) strText = STR_UNSUBSCRIBED_FROM_THREAD end if %>