<%@ LANGUAGE="VBSCRIPT" %> <% PageStrings = "359, 397, 401, 402, 444, 445, 448, 568, 569" strThisBackPage = "config" %> <% '=============================================== ' CactuShop ASP Shopping Cart ' ©1999-2004 Cactusoft Ltd. www.cactusoft.com '=============================================== ' All rights reserved. ' Use of this code is covered by the terms and ' conditions in the license agreement. No ' unauthorized duplication or distribution is ' permitted. Cactusoft's copyright notices must ' remain in the ASP sections of the code. '=============================================== '----------------------------------------------- 'COLLECT VALUES FROM FORM '----------------------------------------------- ML_ID = request.form("ML_ID") ML_Email = request.form("ML_Email") ML_Date = request.form("ML_Date") ML_LastEmailed = request.form("ML_LastEmailed") ML_Authorized = request.form("ML_Authorized") ML_HTML = request.form("ML_HTML") ML_Language = request.Form("ML_Language") '----------------------------------------------- 'ERROR CHECKING '----------------------------------------------- If Not IsDate(ML_LastEmailed) And ML_LastEmailed <> "" then numErrorNo = numErrorNo + 1 strErrorText = strErrorText + "" + Cstr(numErrorNo) + ". " + GetString("ContentText_ErrorChkLastEmailed") & "
" end if if ML_Date<>"" then if NOT IsDate(ML_Date) then numErrorNo = numErrorNo + 1 strErrorText = strErrorText + "" + Cstr(numErrorNo) + ". " + GetString("ContentText_ErrorChkSignupDate") & "
" end if end if strErrorText = CheckNotBlank(strErrorText, numErrorNo, GetString("FormLabel_Email"), ML_Email) 'strErrorText = CheckNotBlank(strErrorText, numErrorNo, GetString("FormLabel_SignupDate"), ML_Date) strErrorText = CheckNotBlank(strErrorText, numErrorNo, GetString("ContentText_HTML"), ML_HTML) strErrorText = CheckNotBlank(strErrorText, numErrorNo, GetString("ContentText_Live"), ML_Authorized) strErrorText = ErrorcheckLength(strErrorText, numErrorNo, GetString("FormLabel_Email"), ML_Email, Application(LICENSENUMBER & "ML_Email_AL")) '----------------------------------------------- 'UPDATE DATABASE RECORDS '----------------------------------------------- If strErrorText ="" then If ML_LastEmailed = "" then ML_LastEmailed = "null" else ML_LastEmailed = strDateDelimiter & sqlsafe(ML_LastEmailed) & strDateDelimiter end if If ML_ID="" then strQuery = "INSERT INTO tblCactuShopMailingList (ML_Email, ML_Date, ML_LastEmailed, ML_HTML, ML_Authorized, ML_Language) VALUES ('" &_ sqlsafe(ML_Email) & "'," & strDateDelimiter &_ ReverseFormatYear(Now) & strDateDelimiter & "," &_ sqlsafe(ML_LastEmailed) & ",'" &_ ML_HTML & "','" &_ ML_Authorized & "'," &_ ML_Language & ")" else strQuery = "UPDATE tblCactuShopMailingList SET ML_Email='" & sqlsafe(ML_Email) & "'," &_ "ML_Date = " & strDateDelimiter & ReverseFormatYear(Now) & strDateDelimiter & "," &_ "ML_LastEmailed = " & ML_LastEmailed & "," &_ "ML_HTML = '" & ML_HTML & "'," &_ "ML_Authorized = '" & sqlsafe(ML_Authorized) & "'," &_ "ML_Language = " & ML_Language & " WHERE ML_ID=" & ML_ID end if Call ExecuteSQL(strQuery, numCursorType, objRecordSet) response.redirect("_mailinglist_list.asp") else %> <% =GetString("Config_headtitle") %>
<% WriteString("PageTitle_Problems") %>
<% WriteString("ContentText_PleaseGoBackAndCorrect") %>
<% =strErrorText %>
<< <% WriteString("ContentText_BackLink") %>
<% end if %>