;-------------------- PIW -------------------------

[Global]

#OLA_SYSTEM_ERROR   = 1
#OLA_INTERNET_ERROR = 2
#OLA_HTTP_ERROR     = 3
#OLA_SERVER_ERROR   = 4
#OLA_LOGICAL_ERROR  = 5

; OnlineActivation::LogicalError::ErrorCode
#OLA_ERR_LOGICAL_OFFLINE_MODE				= 8

; Internet::InternetException::ErrorCode
#OLA_ERR_INTERNET_DISCONNECTED               = 0
#OLA_ERR_INTERNET_SERVER_UNREACHABLE         = 1
#OLA_ERR_INTERNET_PROXY_SERVER_UNREACHABLE   = 2
#OLA_ERR_INTERNET_TIMEOUT                    = 3
#OLA_ERR_INTERNET_INVALID_URL                = 4
#OLA_ERR_INTERNET_UNRECOGNIZED_SCHEME        = 5
#OLA_ERR_INTERNET_NAME_NOT_RESOLVED          = 6
#OLA_ERR_INTERNET_OPERATION_ABORTED          = 7
#OLA_ERR_INTERNET_CANNOT_CONNECT             = 8
#OLA_ERR_INTERNET_CONNECTION_ABORTED         = 9
#OLA_ERR_INTERNET_CONNECTION_RESET           = 10
#OLA_ERR_HTTP_INVALID_SERVER_RESPONSE        = 11
#OLA_ERR_INTERNET_CERT_DATE_INVALID          = 12
#OLA_ERR_INTERNET_CERT_CN_INVALID            = 13
#OLA_ERR_INTERNET_CERT_REV_FAILED            = 14
#OLA_ERR_INTERNET_CERT_INVALID               = 15
#OLA_ERR_INTERNET_CERT_REVOKED               = 16
#OLA_ERR_INTERNET_INVALID_CA                 = 17

; ServerError::ErrorCode
#OLA_ERR_SRV_UNKNOWN_SERVER_ERROR           = 1
#OLA_ERR_SRV_INTERNAL_SERVER_ERROR          = 2
#OLA_ERR_SRV_KEY_NOT_FOUND                  = 3
#OLA_ERR_SRV_KEY_OR_ACTIVATION_CODE_BLOCKED = 4
#OLA_ERR_SRV_MANDATORY_PARAMETERS_MISSING   = 5
#OLA_ERR_SRV_WRONG_CUSTOMER_ID_OR_PASSWORD  = 6
#OLA_ERR_SRV_WRONG_ACTIVATION_CODE          = 7
#OLA_ERR_SRV_WRONG_APPLICATION_ID           = 8
#OLA_ERR_SRV_ACTIVATION_CODE_REQUIRED       = 9  
#OLA_ERR_SRV_USE_MOBILE_ACTIVATION          = 10
#OLA_ERR_SRV_ACTIVATION_PERIOD_EXPIRED      = 11
#OLA_ERR_SRV_ACTIVATION_ATTEMPTS_EXHAUSTED  = 12
#OLA_ERR_SRV_BAD_REQUEST_ID_FORMAT          = 13
#OLA_ERR_SRV_ACTIVATION_CODE_ALREADY_INUSE  = 14
#OLA_ERR_SRV_RENEWAL_KEY_UNAVAILABLE        = 15
#OLA_ERR_SRV_REGION_MISMATCH                = 16
#OLA_ERR_SRV_LOCALIZATION_MISMATCH          = 17
#OLA_ERR_SRV_SERVER_ERROR_642               = 18
#OLA_ERR_SRV_SERVER_ERROR_643               = 19
#OLA_ERR_SRV_SERVER_ERROR_644               = 20
#OLA_ERR_SRV_SERVER_ERROR_645               = 21
#OLA_ERR_SRV_SERVER_ERROR_646               = 22

[f_IsPossibleAddKey]
ret = if($IsActiveKeyCommercial && global.LicInfo.InvalidReason == #ekirValid && LicInfo.DaysTillExpiration > 14, msg("ActivateOnExistingCommercKeyWarning", env("Disable2WeekKeyInst") == "1" ? #m_error : #m_okcancel|#m_warning), 1)

[f_CheckPwdForAct]
ret = (global.settings.Ins_InitMode & #eInitMode_Init) || checkPassword(#pwdc_Activate)
