<%@ LANGUAGE="VBSCRIPT" %> <% PageStrings = "453, 454, 455, 456, 892, 893, 894, 895" 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. '=============================================== '----------------------------------------------- 'MAILING LIST CLIPBOARD 'Lists email addresses in a text area so they 'can be copied '----------------------------------------------- numLanguage = request.Form("language") strHTMLText = request.Form("htmltext") if numLanguage = "" then numLanguage = "0" if strHTMLText = "" then strHTMLText = "both" %> <% =GetString("Config_headtitle") %>
<% strEmailAddress = "" numTotalEmails = 0 if numLanguage = 0 then if strHTMLText = "both" then strQuery = "SELECT ML_Email FROM tblCactuShopMailingList WHERE ML_Authorized = 'y'" else strQuery = "SELECT ML_Email FROM tblCactuShopMailingList WHERE ML_Authorized = 'y' AND ML_HTML = '" & sqlsafe(strHTMLText) & "'" end if else if strHTMLText = "both" then strQuery = "SELECT ML_Email FROM tblCactuShopMailingList WHERE ML_Authorized = 'y' AND ML_Language = " & numLanguage else strQuery = "SELECT ML_Email FROM tblCactuShopMailingList WHERE ML_Authorized = 'y' AND ML_Language = " & numLanguage & " AND ML_HTML = '" & sqlsafe(strHTMLText) & "'" end if end if Call executeSQL(strQuery,numCursorType,objRecordSet) 'Loop through each email address and concatenate it onto the output string do while not objRecordSet.eof numTotalEmails = numTotalEmails + 1 strEmailAddress = strEmailAddress & objRecordSet("ML_Email") & ", " objRecordSet.movenext loop 'Tidy up the extra ", " at the end... If Not strEmailAddress = "" Then strEmailAddress = Left(strEmailAddress, Len(strEmailAddress) - 2) %>
<% WriteString("PageTitle_MailingListClipboard") %>
<% WriteString("ContentText_MailingListClipboardPagetext") %>
   
<% WriteString("ContentText_TotalAuthorizedEmails") %> <% =" " & numTotalEmails %>
<% objDataConn.Close set objDataConn = nothing %>