<% drawValidateJS = true dim tooManySubscribers, rsCheck if len(request("e")) > 0 and len(request("lid")) > 0 then sqlString = "SELECT Count(Join_Users_MailList.UserID) AS MassMailCount, User_Levels.MassMailMax, Users.ID, Users.FirstName AS Name, Users.EmailAddress " & _ "FROM (Users INNER JOIN User_Levels ON Users.UserLevel = User_Levels.ID) LEFT JOIN Join_Users_MailList ON Users.ID = Join_Users_MailList.UserID " & _ "GROUP BY User_Levels.MassMailMax, Users.ID, Users.FirstName, Users.EmailAddress " & _ "HAVING (((Users.ID)=" & request("lid") & "));" set rsCheck = server.createobject("ADODB.RecordSet") rsCheck.open sqlString, Application("RTW_DSN"), 3, 3 if (rsCheck("MassMailCount") + 10) > rsCheck("MassMailMax") then tooManySubscribers = true sendJMailEmail rsCheck("Name"), rsCheck("EmailAddress"), "Ryan Vettese", "ryanv@spaz.com", "ryanv@spaz.com", Application("MailUser"), Application("MailPass"), "spaz.com/rtw subscribe list message", "Message via spaz.com/rtw subscribe list: " & vbcrlf & vbcrlf & "The following person tried to subscribe to your list, but your account has reached its subscriber list maximum. Upgrade your account to raise the maximum." & vbcrlf & vbcrlf & "The users email address was: " & request("e") & vbcrlf & vbcrlf else subIntoList request("lid"), request("e"), request("fn"), request("ln") end if rsCheck.close set rsCheck = nothing end if if len(request.querystring("return")) > 0 and len(request("e")) > 0 and len(request("lid")) > 0 then response.redirect request.querystring("return") end if %>
Subscribe
<% if len(request("e")) > 0 and len(request("lid")) > 0 then if tooManySubscribers then response.write "This user has exceeded the maximum number of list subscribers that they are allowed to have.

Send them a message and encourage them to upgrade their account." else response.write "Your email address has been added to " & lookupID("Users", request("lid"), "FirstName") & "'s list." end if else if len(request("lid")) > 0 then %> Fill out your information below and <%= lookupID("Users", request("lid"), "FirstName") %> will let you know when updates have been posted. <% else %> Fill out your information below and select a list to subscribe to. You will be notified when updates are posted. <% end if %>
First Name:
">
Last Name:
">
* Email Address:
">
<%' if len(request("lid")) > 0 then %> <%' else %> Who's List?

<%' end if %>
<% end if %>
<%= drawSpacer(517,1) %> <%= drawSpacer(123,1) %>