<% Dim OEM_ID Dim CCOM_COOKIE_DOMAIN Const CCOM_IE_COOKIE_DOMAIN = "mcafee.com" Const CCOM_NSCP_COOKIE_DOMAIN = ".mcafee.com" If Instr(Request.ServerVariables("HTTP_USER_AGENT"), "MSIE") > 0 Then CCOM_COOKIE_DOMAIN = CCOM_IE_COOKIE_DOMAIN Else CCOM_COOKIE_DOMAIN = CCOM_NSCP_COOKIE_DOMAIN End If Const CCOM_MASTER_COOKIE = "DMC" ' persistent Const CCOM_LOGINID_KEY = "LoginID" Const CCOM_DOWNLOAD_KEY = "Dld" Const CCOM_VIEW_KEY = "View" Const CCOM_CRC_STRING = "3XUR" Const CCOM_AUTHENTICATION_COOKIE = "MCVal" ' session cookie (not persistent) Const CCOM_PASSWORD_COOKIE = "DMCsp" Const CCOM_USERINFO_COOKIE = "sesUI" ' session cookie ( for user information ) Const CCOM_FIRSTNAME_KEY = "fn" Const CCOM_LASTNAME_KEY = "ln" Const CCOM_ORIGINCODE_KEY = "origin" Const CCOM_CCARD_STATUS = "ccstatus" Const CCOM_CCARD_DAYSTOEXPIRATION = "ccdaysexp" Const CCOM_URL_BOUNCE_COOKIE = "burl" Const CCOM_REG_URL_COOKIE = "Regurl" Const PROFILE_SVC_TYPE = "0" ' NoLogon Const LOGON_SVC_TYPE = "1" ' Logon required Const PAYMENT_SVC_TYPE = "2" ' NoLogon Const DEFAULT_SVC_TYPE = "1" ' Same as LOGON_SVC_TYPE Const CCOM_CHECKREQ_COOKIE = "MCREQCHECK" Const REQ_CHECK_STATUS_TRUE = "1" Const REQ_CHECK_STATUS_FALSE = "0" Const CCOM_GIFT_CODE_COOKIE = "MCGCODE" Const CCOM_AREA_COOKIE = "AREA" 'Grabs the area where the user tried to go before logging in Const CCOM_OEM_COOKIE = "MCOEMID" Const CCOM_ORDER_COOKIE = "orderID" Const CCOM_SERVICE_COOKIE = "service" Const MBL_HITCOUNT_COOKIE = "MBL" Const CCOM_SUBINFO_COOKIE = "MUS" 'Stores the user services data Const CCOM_PartnerID_COOKIE = "PartnerID" 'see SetPartnerIDInCookie() Const CCOM_PARTNER_OFFER = "poffer" 'Look SetPartnerOfferNameInCookie():Session Const CCOM_PARTNER_OFFER_NAME = "po_name" 'Look SetPartnerOfferNameInCookie():Session Const CCOM_PARTNER_OFFER_TYPE = "po_type" 'Look SetPartnerOfferNameInCookie():Session Const CCOM_PARTNER_OFFER_SERVICE = "p_service" ' const CCOM_REBATE_COOKIE ="rebate" const CCOM_REBATE_NAME ="rebatename" const CCOM_REBATE_START ="startdate" const CCOM_REBATE_END ="enddate" const CCOM_REBATE_AMT ="amount" const CCOM_SMARTPAGE_COOKIE ="smartpage" const CCOM_REDIRECT_TO_EBIZSOL ="redirect" %> <% '=========================================================================================== ' rountines to write and retrieve mcafee.com cookies '=========================================================================================== Function SetMasterCookie( strEmail ) '{ '-- Add email to the master cookie Response.Cookies(CCOM_MASTER_COOKIE)(CCOM_LOGINID_KEY) = strEmail '-- set the master cookie attributes Call SetMasterCookieAttributes() '} End Function Function SetMasterCookieAttributes() '{ ' expiration date ' if we don't set the path, the default would be at application (virtual root) level Response.Cookies(CCOM_MASTER_COOKIE).Path = "/" Response.Cookies(CCOM_MASTER_COOKIE).Expires = "Dec 31, 2010" Response.Cookies(CCOM_MASTER_COOKIE).Domain = CCOM_COOKIE_DOMAIN '} End Function Function GetLoginIDFromCookie() '{ GetLoginIDFromCookie = Request.Cookies(CCOM_MASTER_COOKIE)(CCOM_LOGINID_KEY) '} End Function Function SetViewPreferenceInCookie( bView ) '{ '-- Add view preference to the master cookie Response.Cookies(CCOM_MASTER_COOKIE)(CCOM_VIEW_KEY) = bView Response.Cookies("session")("view") = bView Response.Cookies("session").Domain = CCOM_COOKIE_DOMAIN '-- set the master cookie attributes Call SetMasterCookieAttributes() '} End Function Function GetViewPreferenceFromCookie() '{ GetViewPreferenceFromCookie = Request.Cookies(CCOM_MASTER_COOKIE)(CCOM_VIEW_KEY) '} End Function Function GetSessionViewPreferenceFromCookie() '{ GetSessionViewPreferenceFromCookie = Request.Cookies("session")("view") '} End Function Function SetAuthenticatedCookie( lCustID, strEmail ) '{ Dim CurrentDateTime '-- set the email to the master cookie Call SetMasterCookie( strEmail ) '-- get the current date and time CurrentDateTime = Date() & Time '-- create the auth cookie Response.Cookies(CCOM_AUTHENTICATION_COOKIE) = CurrentDateTime & "," & CCOM_CRC_STRING & "," & lCustID Response.Cookies(CCOM_AUTHENTICATION_COOKIE).Path = "/" Response.Cookies(CCOM_AUTHENTICATION_COOKIE).Domain = CCOM_COOKIE_DOMAIN '} End Function Function GetAuthenticationCookie() '{ GetAuthenticationCookie = Request.Cookies(CCOM_AUTHENTICATION_COOKIE) '} End Function Function RemoveAuthenticatedCookie() '{ Response.Cookies(CCOM_AUTHENTICATION_COOKIE) = "removed" Response.Cookies(CCOM_AUTHENTICATION_COOKIE).Path = "/" Response.Cookies(CCOM_AUTHENTICATION_COOKIE).Domain = CCOM_COOKIE_DOMAIN '} End Function Function SetDownloadKeyCookie( strDldValue ) '{ Response.Cookies(CCOM_MASTER_COOKIE)(CCOM_DOWNLOAD_KEY) = strDldValue Call SetMasterCookieAttributes() '} End Function Function GetDownloadKeyFromCookie() '{ GetDownloadKeyFromCookie = Request.Cookies(CCOM_MASTER_COOKIE)(CCOM_DOWNLOAD_KEY) '} End Function Function SetUserNameInCookie( strFirstName, strLastName, strOriginCode ) '{ Call SetUserInfoCookieAttributes() Response.Cookies(CCOM_USERINFO_COOKIE)(CCOM_FIRSTNAME_KEY) = strFirstName Response.Cookies(CCOM_USERINFO_COOKIE)(CCOM_LASTNAME_KEY) = strLastName If IsNull(strOriginCode) Then strOriginCode = "" End If Response.Cookies(CCOM_USERINFO_COOKIE)(CCOM_ORIGINCODE_KEY)= strOriginCode '} End Function Function GetUserNameFromCookie( strFirstName, strLastName ) '{ strFirstName = Request.Cookies(CCOM_USERINFO_COOKIE)(CCOM_FIRSTNAME_KEY) strLastName = Request.Cookies(CCOM_USERINFO_COOKIE)(CCOM_LASTNAME_KEY) '} End Function Function GetFirstNameFromCookie() '{ Dim strFirstName strFirstName = Request.Cookies(CCOM_USERINFO_COOKIE)(CCOM_FIRSTNAME_KEY) GetFirstNameFromCookie = UCase(Mid(strFirstName,1,1)) & LCase(Mid(strFirstName,2)) '} End Function Function GetLastNameFromCookie() '{ GetLastNameFromCookie = Request.Cookies(CCOM_USERINFO_COOKIE)(CCOM_LASTNAME_KEY) '} End Function Function GetOriginCodeFromCookie() '{ GetOriginCodeFromCookie = Request.Cookies(CCOM_USERINFO_COOKIE)(CCOM_ORIGINCODE_KEY) '} End Function Function SetUserInfoCookieAttributes() '{ Response.Cookies(CCOM_USERINFO_COOKIE).Path = "/" Response.Cookies(CCOM_USERINFO_COOKIE).Domain = CCOM_COOKIE_DOMAIN '} End Function '=================================================================== ' Giftcode related functions '=================================================================== Function SetGiftCodeInCookie( strGiftCode ) '{ Response.Cookies(CCOM_GIFT_CODE_COOKIE) = strGiftCode Response.Cookies(CCOM_GIFT_CODE_COOKIE).Path = "/" Response.Cookies(CCOM_GIFT_CODE_COOKIE).Domain = CCOM_COOKIE_DOMAIN '} End Function Function GetGiftCodeFromCookie() '{ GetGiftCodeFromCookie = Request.Cookies(CCOM_GIFT_CODE_COOKIE) '} End Function Function RemoveGiftCodeFromCookie() '{ Response.Cookies(CCOM_GIFT_CODE_COOKIE) = "" Response.Cookies(CCOM_GIFT_CODE_COOKIE).Path = "/" Response.Cookies(CCOM_GIFT_CODE_COOKIE).Domain = CCOM_COOKIE_DOMAIN '} End Function '=================================================================== ' Password related functions '=================================================================== Function SetPasswordInCookie( strPassword ) '{ Response.Cookies(CCOM_PASSWORD_COOKIE).Path = "/" Response.Cookies(CCOM_PASSWORD_COOKIE).Domain = CCOM_COOKIE_DOMAIN Response.Cookies(CCOM_PASSWORD_COOKIE).expires = DateAdd( "m", 6, date() ) Response.Cookies(CCOM_PASSWORD_COOKIE) = EncodePassword( strPassword ) '} End Function Function GetPasswordFromCookie() '{ Dim strPassword '-- get the password from the cookie strPassword = Request.Cookies(CCOM_PASSWORD_COOKIE) If Len(strPassword) > 0 Then GetPasswordFromCookie = DecodePassword( strPassword ) Else GetPasswordFromCookie = "" End If '} End Function Function Crypt(texti, salasana) 'simple, obscure encryption function (good enough) '{ Dim T, X1, G, sana, TT, Crypted For T = 1 To Len(salasana) sana = Asc(Mid(salasana, T, 1)) X1 = X1 + sana Next X1 = Int((X1 * 0.1) / 6) salasana = X1 G = 0 For TT = 1 To Len(texti) sana = Asc(Mid(texti, TT, 1)) G = G + 1 If G = 6 Then G = 0 X1 = 0 If G = 0 Then X1 = sana - (salasana - 2) If G = 1 Then X1 = sana + (salasana - 5) If G = 2 Then X1 = sana - (salasana - 4) If G = 3 Then X1 = sana + (salasana - 2) If G = 4 Then X1 = sana - (salasana - 3) If G = 5 Then X1 = sana + (salasana - 5) X1 = X1 + G Crypted = Crypted & Chr(X1) Next Crypt = Crypted '} End Function 'encodes the password and add extra characters Function EncodePassword( strPassword ) '{ Dim intCharCount, intRandom , i ' in format ##******** Randomize() intCharCount = Len( strPassword ) if intCharCount < 10 then strPassword = "0" & intCharCount & strPassword intRandom = Int((126 - 32 + 1) * Rnd + 32) for i=0 to 10-intCharCount 'add extra characters if pwd is puny strPassword = strPassword& Chr(intRandom) next else strPassword = intCharCount & strPassword end if EncodePassword = Crypt( strPassword, 4 ) '} End Function 'decrypt the password and strip off extra chars Function DecodePassword( strPassword ) '{ Dim strDecrypted, strPassLen, intCharCount '-- decrypt the password strDecrypted = DeCrypt( strPassword, 4 ) '-- get the length of the password for the decrypted string strPassLen = Left( strDecrypted, 2 ) If Len(strPassLen) = 0 Then intCharCount = 0 Else intCharCount = Cint(strPassLen) End If DecodePassword = Mid( strDecrypted, 3, intCharCount ) '} End Function 'simple, obscure decryption function (good enough) Function DeCrypt( texti, salasana ) '{ Dim T, X1, sana, TT, G, DeCrypted For T = 1 To Len(salasana) sana = Asc(Mid(salasana, T, 1)) X1 = X1 + sana Next X1 = Int((X1 * 0.1) / 6) salasana = X1 G = 0 For TT = 1 To Len(texti) sana = Asc(Mid(texti, TT, 1)) G = G + 1 If G = 6 Then G = 0 X1 = 0 If G = 0 Then X1 = sana + (salasana - 2) If G = 1 Then X1 = sana - (salasana - 5) If G = 2 Then X1 = sana + (salasana - 4) If G = 3 Then X1 = sana - (salasana - 2) If G = 4 Then X1 = sana + (salasana - 3) If G = 5 Then X1 = sana - (salasana - 5) X1 = X1 - G DeCrypted = DeCrypted & Chr(X1) Next DeCrypt = DeCrypted '} End Function '=================================================================== ' OrderId Storing Cookies (Multiple Billing Realted Cookies) '=================================================================== Function SetOrderIdCookie( szOrderID ) '{ Response.Cookies(CCOM_ORDER_COOKIE).Path = "/" Response.Cookies(CCOM_ORDER_COOKIE).Domain = CCOM_COOKIE_DOMAIN Response.Cookies(CCOM_ORDER_COOKIE) = szOrderID '} End Function Function GetOrderIdFromCookie() '{ GetOrderIdFromCookie = Request.Cookies(CCOM_ORDER_COOKIE) '} End Function Function SetMBLHintCountCookie( intHint ) '{ Response.Cookies(MBL_HITCOUNT_COOKIE) = "" Response.Cookies(MBL_HITCOUNT_COOKIE).Path = "/" Response.Cookies(MBL_HITCOUNT_COOKIE).Domain = CCOM_COOKIE_DOMAIN Response.Cookies(MBL_HITCOUNT_COOKIE) = intHint '} End Function Function GetMBLHintCountFromCookie() '{ GetMBLHintCountFromCookie = Request.Cookies(MBL_HITCOUNT_COOKIE) '} End Function '=================================================================== ' Service related functions '=================================================================== Function SetServiceCookie( szService ) '{ Response.Cookies(CCOM_SERVICE_COOKIE) = "" Response.Cookies(CCOM_SERVICE_COOKIE).Path = "/" Response.Cookies(CCOM_SERVICE_COOKIE).Domain = CCOM_COOKIE_DOMAIN Response.Cookies(CCOM_SERVICE_COOKIE) = szService '} End Function Function GetServiceFromCookie() '{ GetServiceFromCookie = Request.Cookies(CCOM_SERVICE_COOKIE) '} End Function '=================================================================== ' BounceCookie related functions '=================================================================== Function SetBounceCookie( szBounceUrl, szServiceType, szAppUrl ) '{ Response.Cookies(CCOM_URL_BOUNCE_COOKIE) = "" Response.Cookies(CCOM_URL_BOUNCE_COOKIE).Path = "/" Response.Cookies(CCOM_URL_BOUNCE_COOKIE).Domain = CCOM_COOKIE_DOMAIN Response.Cookies(CCOM_URL_BOUNCE_COOKIE) = szBounceUrl & "$$$" & szServiceType & "$$$" & CStr(szAppUrl) '} End Function Function GetBounceURLFromCookie() '{ GetBounceURLFromCookie = Request.Cookies(CCOM_URL_BOUNCE_COOKIE) '} End Function Function iGetTheBounceUrl() '{ Dim szBounceUrl, lPos '-- get the bounce URL from the cookie szBounceUrl = GetBounceURLFromCookie() If szBounceUrl <> "" Then '{ lPos = InStr( szBounceUrl, "$$$" ) If lPos > 0 Then szBounceUrl = Left( szBounceUrl, lPos-1 ) Else szBounceUrl = "" End If '} End If If "" = Trim( szBounceUrl ) Then szBounceUrl = "" End If If PROFILE_SVC_TYPE = GetServiceType() Then '{ If InStr( szBounceUrl, "?" ) > 0 Then szBounceUrl = szBounceUrl & "&AppUrl=" & GetBounceAppUrl() Else szBounceUrl = szBounceUrl & "?AppUrl=" & GetBounceAppUrl() End If '} End If iGetTheBounceUrl = szBounceUrl '} End Function Function GetServiceType() '{ Dim szSvcType, lPos '-- get the bounce cookie szSvcType = GetBounceURLFromCookie() If szSvcType <> "" Then '{ lPos = InStr( szSvcType, "$$$" ) If lPos > 0 Then szSvcType = Mid( szSvcType, lPos+3, 1 ) End If GetServiceType = szSvcType '} Else GetServiceType = DEFAULT_SVC_TYPE End If '} End Function Function GetBounceAppUrl() '{ Dim szSvcType, lPos '-- get the bounce cookie szSvcType = GetBounceURLFromCookie() If szSvcType <> "" Then '{ lPos = InStrRev( szSvcType, "$$$" ) If lPos > 0 Then szSvcType = Mid( szSvcType, lPos+3 ) End If GetBounceAppUrl = szSvcType '} End If '} End Function Function SetReqCheckStatus( szStatus ) '{ '-- set the cookie attributes Response.Cookies(CCOM_CHECKREQ_COOKIE) = "" Response.Cookies(CCOM_CHECKREQ_COOKIE).Path = "/" Response.Cookies(CCOM_CHECKREQ_COOKIE).Domain = CCOM_COOKIE_DOMAIN '-- set the cookie Response.Cookies(CCOM_CHECKREQ_COOKIE) = szStatus '} End Function Function GetReqCheckStatus() '{ Dim strStatus '-- get the req status from the cookie strStatus = Request.Cookies(CCOM_CHECKREQ_COOKIE) 'set default ret value to False GetReqCheckStatus = False If strStatus = REQ_CHECK_STATUS_TRUE Then GetReqCheckStatus = True End If '} End Function 'Added by Emanuele: stores the value found in the variable "area" in the QueryString 'Used to serve contextual content for the login_page.asp Function SetAreaCookie(strArea) '{ Response.Cookies(CCOM_AREA_COOKIE) = strArea Response.Cookies(CCOM_AREA_COOKIE).Path = "/" Response.Cookies(CCOM_AREA_COOKIE).Domain = CCOM_COOKIE_DOMAIN '} End Function 'Added by Emanuele: retrieves the value previously stored in the variable "area" 'Used to serve contextual content for the login_page.asp Function GetAreaCookie() '{ GetAreaCookie = Request.Cookies(CCOM_AREA_COOKIE) '} End Function Function SetOEMCookie( szOEMID ) '{ Response.Cookies(CCOM_OEM_COOKIE) = "" Response.Cookies(CCOM_OEM_COOKIE).Path = "/" Response.Cookies(CCOM_OEM_COOKIE).Domain = CCOM_COOKIE_DOMAIN Response.Cookies(CCOM_OEM_COOKIE) = szOEMID Response.Cookies(CCOM_OEM_COOKIE).Path = "/" '} End Function Function GetOEMIDFromCookie() '{ OEM_ID = Request.Cookies(CCOM_OEM_COOKIE) GetOEMIDFromCookie = OEM_ID '} End Function Function StoreOEMID( paramstrOEMID ) '{ Dim strOEMID strOEMID = Trim(paramstrOEMID) If strOEMID = "" Then strOEMID = Request( "oemid" ) End If ' set the OEMID in the session cookie If strOEMID <> "" Then '{ Call SetOEMCookie( strOEMID ) '} Else strOEMID = GetOEMIDFromCookie() End If StoreOEMID = strOEMID '} End Function '------------------------------------------------------------------------------------------------------------ '--- Set cookie to indicate the customer is refered by this particular partner so that the partner can receive '--- credit when the people come directly to our site to purchase Clinic. Cookie will be deleted after people '--- become Clinic subscriber. '--- Cookies have been set in 3bSoftware, Ubid and Ascentive's landing pages Function SetPartnerIDInCookie( strPartnerID ) '{ Response.Cookies(CCOM_PartnerID_COOKIE).Path = "/" Response.Cookies(CCOM_PartnerID_COOKIE).Domain = CCOM_COOKIE_DOMAIN Response.Cookies(CCOM_PartnerID_COOKIE).expires = DateAdd( "m", 6, date() ) Response.Cookies(CCOM_PartnerID_COOKIE) = strPartnerID '} End Function '------------------------------------------------------------------------------------------------------------ '--- Remove the cookie after people become Clinic subscribers '--- be removed in /membership/Receipt.asp Function RemovePartnerIDFromCookie( ) '{ Response.Cookies(CCOM_PartnerID_COOKIE).Path = "/" Response.Cookies(CCOM_PartnerID_COOKIE).Domain = CCOM_COOKIE_DOMAIN Response.Cookies(CCOM_PartnerID_COOKIE).expires = now() '} End Function '---------------------------------------------------------------------------------------------------------- '--- retrieve the cookie in pr_activate.asp Function GetPartnerIDFromCookies() Dim strPartnerID strPartnerID = Request.Cookies(CCOM_PartnerID_COOKIE) strPartnerID = Trim(strPartnerID) GetPartnerIDFromCookies = strPartnerID End Function '=================================================================== ' User Subscription information related functions '=================================================================== 'Setting User Service Details ---Service, Expiration Date of the servcie, Status of the Service Function SetUserSubInfoCookie(strUserID) Dim x,gArrservices,gArrExpExpDt,gArrstatus,gArrAutoRenewal,gArrSubID Call GetUserSubInfo(strUserID,gArrservices,gArrExpExpDt,gArrstatus,gArrAutoRenewal,gArrSubID) Response.Cookies(CCOM_SUBINFO_COOKIE).Path = "/" Response.Cookies(CCOM_SUBINFO_COOKIE).Domain = CCOM_COOKIE_DOMAIN If IsArray(gArrservices) then For x=0 to Ubound(gArrservices) Response.Cookies (CCOM_SUBINFO_COOKIE)(gArrservices(x)) = gArrExpExpDt(x)&","&gArrstatus(x)&","&gArrAutoRenewal(x)&","&gArrSubID(x) '(gArrservices(x))=gArrExpExpDt(x)&","&gArrstatus(x) Next Else Response.Cookies (CCOM_SUBINFO_COOKIE) ="" End If End Function '---------------------------------------------------------------------------------------------------------------- 'To Read complete Info from User info Cookie Function GetUserSubInfoFromCookie() Dim x,ObjItemKey Dim ArrServiceInfoFromCookie Redim ArrServiceInfoFromCookie(Request.Cookies(CCOM_SUBINFO_COOKIE).Count) x = 1 For Each ObjItemKey in Request.Cookies(CCOM_SUBINFO_COOKIE) ArrServiceInfoFromCookie(x) = ObjItemKey & "," & Request.Cookies (CCOM_SUBINFO_COOKIE)(ObjItemKey) x= x +1 Next GetUserSubInfoFromCookie = ArrServiceInfoFromCookie End Function '---------------------------------------------------------------------------------------------------------------- 'Updating User Service Details ---Service, Expiration Date of the servcie, Status of the Service Function UpdateUserSubInfoCookie() Call GetUserSubInfo() End Function '---------------------------------------------------------------------------------------------------------------- 'Empty User info Cookie on logout... Function DeleteUserSubInfoCookie() Response.Cookies(CCOM_SUBINFO_COOKIE).Path = "/" Response.Cookies(CCOM_SUBINFO_COOKIE).Domain = CCOM_COOKIE_DOMAIN Response.Cookies (CCOM_SUBINFO_COOKIE)="removed" End Function '-------------------------------------------------------------------------------------------------- 'Getting User Service information from the DB Function GetUserSubInfo(strUserID,ArrServices,ArrExpDt,ArrStatus,ArrAutoRenewal,ArrsubID) '{ Dim objSub,arrServicesInfo Dim x 'strEmail = GetLoginIDfromCookie() Set objSub = Server.CreateObject("mcafSubscription.wsc") Call objSub.GetCustSubInfo(strUserID, arrServicesInfo) Set objSub = Nothing If IsArray(arrServicesInfo) Then '{ Redim ArrStatus(UBound(arrServicesInfo,2)) Redim ArrExpDt(UBound(arrServicesInfo,2)) Redim ArrServices(UBound(arrServicesInfo,2)) Redim ArrAutoRenewal(UBound(arrServicesInfo,2)) Redim ArrsubID(UBound(arrServicesInfo,2)) For x = 0 to UBound(arrServicesInfo,2) ArrStatus(x) = arrServicesInfo(3,x) ArrExpDt(x) = arrServicesInfo(4,x) ArrServices(x) = arrServicesInfo(5,x) ArrAutoRenewal(x) = arrServicesInfo(6,x) if isnull(ArrAutoRenewal(x)) then ArrAutoRenewal(x) = False elseif ArrAutoRenewal(x) = 1 then ArrAutoRenewal(x) = True ElseIf ArrAutoRenewal(x) = True Then ArrAutoRenewal(x) = True else ArrAutoRenewal(x) = False end if 'ArrAutoRenewal(x) = cBool(ArrAutoRenewal(x)) ArrsubID(x) = arrServicesInfo(0,x) Next '} End If '} End Function '=================================================================== ' Registration related functions - Creates a cookie for the Register now hyper link on Login Page '=================================================================== Function SetRegistrationCookie( szUrl ) '{ Response.Cookies(CCOM_REG_URL_COOKIE) = "" Response.Cookies(CCOM_REG_URL_COOKIE).Path = "/" Response.Cookies(CCOM_REG_URL_COOKIE).Domain = CCOM_COOKIE_DOMAIN Response.Cookies(CCOM_REG_URL_COOKIE) = szUrl '} End Function Function GetRegistrationURLFromCookie() '{ GetRegistrationURLFromCookie = Request.Cookies(CCOM_REG_URL_COOKIE) '} End Function '====================================================================================================== '=================================================================== ' Smart Landing Page Partner Cookie related functions ' Creates a cookie for the Partner Offer '=================================================================== Function SetPartnerOfferNameInCookie( POName, POType, PService ) '{ Response.Cookies(CCOM_PARTNER_OFFER).Path = "/" Response.Cookies(CCOM_PARTNER_OFFER).Domain = CCOM_COOKIE_DOMAIN Response.Cookies(CCOM_PARTNER_OFFER)(CCOM_PARTNER_OFFER_NAME) = POName Response.Cookies(CCOM_PARTNER_OFFER)(CCOM_PARTNER_OFFER_TYPE) = POType Response.Cookies(CCOM_PARTNER_OFFER)(CCOM_PARTNER_OFFER_SERVICE) = PService '} End Function Function RemovePartnerOfferNameFromCookie( ) '{ Response.Cookies(CCOM_PARTNER_OFFER).Path = "/" Response.Cookies(CCOM_PARTNER_OFFER).Domain = CCOM_COOKIE_DOMAIN Response.Cookies(CCOM_PARTNER_OFFER).expires = now() '} End Function Function GetPartnerOfferNameFromCookie() '{ GetPartnerOfferNameFromCookie = Request.Cookies(CCOM_PARTNER_OFFER)(CCOM_PARTNER_OFFER_NAME) '} End Function Function GetPartnerOfferTypeFromCookie() '{ GetPartnerOfferTypeFromCookie = Request.Cookies(CCOM_PARTNER_OFFER)(CCOM_PARTNER_OFFER_TYPE) '} End Function Function GetPartnerOfferServiceFromCookie() '{ GetPartnerOfferServiceFromCookie = Request.Cookies(CCOM_PARTNER_OFFER)(CCOM_PARTNER_OFFER_SERVICE) '} End Function '=================================================================== ' Smart Landing Page Rebate Cookie related functions ' Creates a cookie for the Rebate '=================================================================== Function SetRebateInfoInCookie( byval strName, byval strStart, byval strEnd, byval strAmt ) '{ Response.Cookies(CCOM_REBATE_COOKIE).Path = "/" Response.Cookies(CCOM_REBATE_COOKIE).Domain = CCOM_COOKIE_DOMAIN Response.Cookies(CCOM_REBATE_COOKIE)(CCOM_REBATE_NAME) = strName Response.Cookies(CCOM_REBATE_COOKIE)(CCOM_REBATE_START) = strStart Response.Cookies(CCOM_REBATE_COOKIE)(CCOM_REBATE_END) = strEnd Response.Cookies(CCOM_REBATE_COOKIE)(CCOM_REBATE_AMT) = strAmt '} End Function function GetRebateNameFromCookie() GetRebateNameFromCookie = Request.Cookies(CCOM_REBATE_COOKIE)(CCOM_REBATE_NAME) end function function GetRebateAmtFromCookie() GetRebateAmtFromCookie = Request.Cookies(CCOM_REBATE_COOKIE)(CCOM_REBATE_AMT) end function Function GetRebateInfoInCookie(byRef strName, byRef strStart, byRef strEnd, byRef strAmt) strName = Request.Cookies(CCOM_REBATE_COOKIE)(CCOM_REBATE_NAME) strStart = Request.Cookies(CCOM_REBATE_COOKIE)(CCOM_REBATE_START) strEnd = Request.Cookies(CCOM_REBATE_COOKIE)(CCOM_REBATE_END) strAmt = Request.Cookies(CCOM_REBATE_COOKIE)(CCOM_REBATE_AMT) End function Function RemoveRebateInfoFromCookie( ) '{ Response.Cookies(CCOM_REBATE_COOKIE).Path = "/" Response.Cookies(CCOM_REBATE_COOKIE).Domain = CCOM_COOKIE_DOMAIN Response.Cookies(CCOM_REBATE_COOKIE).expires = now() '} End Function Function RemoveSmartpageIdFromCookie( ) '{ Response.Cookies(CCOM_SMARTPAGE_COOKIE).Path = "/" Response.Cookies(CCOM_SMARTPAGE_COOKIE).Domain = CCOM_COOKIE_DOMAIN Response.Cookies(CCOM_SMARTPAGE_COOKIE).expires = now() '} End Function '============================================================================================= ' Credit Card Status related functions - Adds details in User's cookie about CreditCard status '============================================================================================= Function SetUserCreditCardInfoInCookie( bitCardStatus ) '{ Response.Cookies(CCOM_USERINFO_COOKIE).Path = "/" Response.Cookies(CCOM_USERINFO_COOKIE).Domain = CCOM_COOKIE_DOMAIN Response.Cookies(CCOM_USERINFO_COOKIE)(CCOM_CCARD_STATUS) = bitCardStatus '} End Function Function GetUserCreditCardDaysToExpirationFromCookie() '{ GetUserCreditCardDaysToExpirationFromCookie = Request.Cookies(CCOM_USERINFO_COOKIE)(CCOM_CCARD_DAYSTOEXPIRATION) '} End Function Function SetUserCreditCardDaysToExpirationInCookie( intDaysToExp ) '{ Response.Cookies(CCOM_USERINFO_COOKIE).Path = "/" Response.Cookies(CCOM_USERINFO_COOKIE).Domain = CCOM_COOKIE_DOMAIN Response.Cookies(CCOM_USERINFO_COOKIE)(CCOM_CCARD_DAYSTOEXPIRATION) = intDaysToExp '} End Function Function GetUserCreditCardStatusFromCookie() '{ GetUserCreditCardStatusFromCookie = Request.Cookies(CCOM_USERINFO_COOKIE)(CCOM_CCARD_STATUS) '} End Function 'This Redirection URL is for customers who accidentally come to www.mcafee.com/default.asp after registering in ebizSol Function PutRedirectUrlInCookieforEbizSol(strCookieName, strValue) Response.Cookies(strCookieName).Path = "/" Response.Cookies(strCookieName).domain = CCOM_COOKIE_DOMAIN Response.Cookies(strCookieName).expires = DateAdd( "m", 6, date() ) Response.Cookies(strCookieName)(strCookieName) = strValue End Function Function GetRedirectUrlInCookieforEbizSol() GetRedirectUrlInCookieforEbizSol = Request.Cookies(CCOM_REDIRECT_TO_EBIZSOL)(CCOM_REDIRECT_TO_EBIZSOL) End Function '============================================================================================= %>