Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Newsletter MOD
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 5

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 06 July 2008 :  23:46:15  Show Profile
Ok - the text version now works, the html version sends but looks like crap.

If you can live with the text version for a bit, I'll try and fix the html version.<
Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 07 July 2008 :  01:02:48  Show Profile
Here's a link to a txt version of the html format: txt

For some reason, it will not output to screen in this mode.


<!--#INCLUDE FILE="config.asp" -->
<%
If Session(strCookieURL & "Approval") = "15916941253" Then
%>
<!--#include file="inc_func_common.asp"-->
<!--#INCLUDE file="inc_header.asp" -->
<%
 Response.Write "<center>" & vbNewLine & _
  "<table border=""0"" width=""100%"" align=""center"">" & vbNewLine & _
  "  <tr>" & vbNewLine & _
  "    <td width=""33%"" align=""left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
  "    "&getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""")&" <a href=""default.asp"">All Forums</a><br>" & vbNewLine & _
  "    "&getCurrentIcon(strIconBar,"","align=""absmiddle""")&getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""")&" <a href=""admin_home.asp"">Admin Section</a><br>" & vbNewLine & _
  "    "&getCurrentIcon(strIconBlank,"","align=""absmiddle""")&getCurrentIcon(strIconBar,"","align=""absmiddle""")&getCurrentIcon(strIconFolderOpenTopic,"","align=""absmiddle""")&" <a href=""nladmin.asp"">NewsLetter Administration</a><br><br></font></td>" & vbNewLine & _
  "  </tr>" & vbNewLine & _
  "</table><br>" & vbNewLine
%>
<SCRIPT LANGUAGE=javascript>
<!--
function confirmAction() {
    return confirm("THIS ACTION WILL SEND YOUR MESSAGE TO\nALL SUBSCRIBERS IN THE LIST!\n\nClick OK to Send!\nClick Cancel to Abort!")
}
function OpenPreview()
{
 var curCookie = "strMessagePreview=" + escape(document.PostTopic.Message.value);
 document.cookie = curCookie;
 popupWin = window.open('pop_preview_html.asp', 'preview_page', 'scrollbars=yes,width=750,height=450')
}
//-->
</script>
<%
dim txtBody1,txtBody2,txtBody3,txtSubject,strSubject

 strEmailFrom = strSender
 strTo = "All Users In Mailing List"
 strHead = "" & strForumTitle & " NewsLetter"
 strCell = "This is not SPAM, you requested to join the Newsletter list"
 strDate = "" & strForumTitle & " Newsletter for " & Date() & ":"
 strBody1 = "This is the Main Body of the Newsletter!" & vbCrLf & vbCrLf & _
            "This is the only text box where the Post Buttons work. All other text boxes still support HTML"
 strBody2 = "You can use this area for a closing message," & vbCrLf & _
            "if not delete this before it is sent."
 strBody3 = "" & vbCrLf & vbCrLf & vbCrLf & vbCrLf & _
            "" & strCopyright & "<br>" & vbCrLf & _
            "All Rights Reserved"

 if Request.ServerVariables("REQUEST_METHOD") = "POST" then
  strSubject = strForumTitle & " Newsletter "
   strCell = Request.Form("txtCell")
  strMessage = strMessage & "<html><head></head><body>"
  strMessage = strMessage & "<table border=0 align=center width=100% cellspacing=0 cellpadding=0 bgcolor=" & strTableBorderColor & "><tr><td><table border=0 width=100% cellspacing=1 cellpadding=4><TR><TD height=26  width=100% align=center bgcolor=" & strHeadCellColor & "><font face=" & strDefaultFontFace & " size=" & strDefaultFontSize & " color=" & strHeadFontColor & "><b>" & strHead & "</b></font></td></tr><tr><td align=center bgcolor=" & strCategoryCellColor & ">"
  strMessage = strMessage & "<font face=" & strDefaultFontFace & " size=" & strDefaultFontSize & " color=" & strCategoryFontColor & ">" & strCell & "</font></td></tr>"
  strMessage = strMessage & "<tr><td bgcolor=" & strForumCellColor & "><font face=" & strDefaultFontFace & " size=" & strDefaultFontSize & " color=" & strDefaultFontColor & "> " & strDate & " <br><br>"
  strMessage = strMessage & Request.Form("txtBody1")
  strMessage = strMessage & Request.Form("txtBody2")
  strMessage = strMessage & Request.Form("txtBody3") & "<br><br>"
    'Select Records
    strSQL_SelectEmail = "SELECT ID, Email FROM " & strTablePrefix & "MailList WHERE Active=1"
    Set rsMail = my_Conn.Execute(strSQL_SelectEmail)
  if rsMail.BOF and rsMail.EOF then
   Response.Write "<br>The Database is Empty.<br>"
  else
   rsMail.MoveFirst
  Do While Not rsMail.EOF
   strRecipientsName = rsMail("Email")
   strRecipients = rsMail("Email")
   strFrom = strSender
   strFromName = strForumTitle
   strMessage = strMessage & "If you wish to unsubscribe <b>" & strRecipients & "</b> from the Mailing list, click on the link below. By clicking on the link you will automatically be removed from this Mailing List.<br><br>I wish to remove <a href=" & strForumURL & "nldeactivate.asp?email=" & strRecipients & "&userid=" & strUserID & ">" & strRecipients & "</a> from the " & strForumTitle & " Mailing List!" & vbCrLf & vbCrLf & "<br><br></font></td></tr></table></td></tr></table></body></html>"
   Response.Write "<br>Recipient = " & strRecipientsName
   Response.Write "<br>From = " & strFrom
   Response.Write "<br>Subject = " & strSubject
   Response.Write "<br>Message = " & strMessage
   Response.End
 %>
 <!--#INCLUDE FILE="inc_mail.asp" -->
 <%
  if strRecipients <> "" then
   if Err.Number = 0 then
    Response.Write  "  <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>Message sent to: " & strRecipients & "" & vbNewLine & _
     "  <hr width=""50%"" color=""" & strHeadCellColor & """>" & vbNewLine
    iSuccess = iSuccess + 1
   else
    Response.Write "  <table width=""95%"" border=""0"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
     "  <tr>" & vbNewLine & _
     "  <td bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
     "  <table width=""100%"" border=""0"" cellspacing=""1"" cellpadding=""1"">" & vbNewLine & _
     "  <tr>" & vbNewLine & _
     "  <td height=""27"" align=""center"" colspan=""2"" bgcolor=""" & strForumCellColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>Send Failure...Error was " & Err.Number & " - " & Err.Description & " User: " & strRecipients & "<BR>" & vbNewLine & _
     "  </td>" & vbNewLine & _
     "  </tr>" & vbNewLine & _
     "  </table>" & vbNewLine & _
     "  </td>" & vbNewLine & _
     "  </tr>" & vbNewLine & _
     "  </table>" & vbNewLine
    iFail = iFail + 1
   end if
  end if
  rsMail.MoveNext
  Loop
 end if
 rsMail.Close
 Set rsMail = Nothing

 Response.Write "<FORM>" & vbNewLine &_
  " <br><INPUT TYPE=""BUTTON"" VALUE=""Go Back"" class=""button"" onClick=""history.back()"">" & vbNewLine &_
  "</FORM>" & vbNewLine

 Else
%>
<!--#include file="inc_code_html.asp" -->
<%
 Response.Write "<FORM action=""nlEmail_List_html.asp"" name=""PostTopic"" method=POST onSubmit=""return confirmAction()"">" & vbNewLine &_
  "<table align=""center"" border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"">" & vbNewLine &_
  " <tr>" & vbNewLine &_
  "  <td bgcolor="""& strTableBorderColor &""">" & vbNewLine &_
  "   <table border=""0"" width=""100%"" cellspacing=""1"" cellpadding=""3"">" & vbNewLine &_
  "      <TR>" & vbNewLine &_
  "    <TD colspan=""2"" align=""center"" bgColor="""& strHeadCellColor &""" nowrap width=""100%"">" & vbNewLine &_
  "    <font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""" color="""& strHeadFontColor &"""><B>"& strForumTitle &" NEWSLETTER FORM MAILER</B></font>" & vbNewLine &_
  "    </TD>" & vbNewLine &_
  "   </TR>" & vbNewLine &_
  "   <TR>" & vbNewLine &_
  "    <TD width=""30%"" bgColor="""& strForumCellColor &""" align=""right""><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""" color="""& strDefaultFontColor &"""><b>From:</b></font></TD>" & vbNewLine &_
  "    <TD bgColor="""& strForumCellColor &""" valign=""top""><INPUT type=""text"" name=txtFrom size=58 value="""& strEmailFrom &"""></TD>" & vbNewLine &_
  "   </TR>" & vbNewLine &_
  "   <TR>" & vbNewLine &_
  "    <TD bgColor="""& strForumCellColor &""" align=""right""><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""" color="""& strDefaultFontColor &"""><b>To:</b></font></TD>" & vbNewLine &_
  "    <TD bgColor="""& strForumCellColor &""" valign=""top""><font face=""Arial"" size=""2"">"& strTo &"</font></TD>" & vbNewLine &_
  "   </TR>" & vbNewLine &_
  "   <TR>" & vbNewLine &_
  "    <TD bgColor="""& strForumCellColor &""" align=""right""><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""" color="""& strDefaultFontColor &"""><b>Subject:</b></font></TD>" & vbNewLine &_
  "    <TD bgColor="""& strForumCellColor &""" valign=""top""><INPUT type=""text"" name=""txtSubject"" size=""58""></TD>" & vbNewLine &_
  "   </TR>" & vbNewLine &_
  "   <TR>" & vbNewLine &_
  "    <TD colspan=""2"" bgColor="""& strForumCellColor &""" align=""center""><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""" color="""& strDefaultFontColor &""">" & vbNewLine &_
  "<br>This is the start of the NewLetter and a basic layout of what it will look like once emailed.<br><br>" & vbNewLine &_
  "The Header: and Cell: areas below are shown in the same colors as what will show up in an email.<br><br>" & vbNewLine &_
  "The Main Body of Newsletter: is the only text area which is supported by the Post Buttons" & vbNewLine &_
  "<br><br>" & vbNewLine &_
  "    </font>" & vbNewLine &_
  "    </TD>" & vbNewLine &_
  "   </TR>" & vbNewLine &_
  "   <TR>" & vbNewLine &_
  "    <TD bgColor="""& strHeadCellColor &""" align=""right"" valign=""top""><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""" color="""& strHeadFontColor &"""><b>Header:</b></font></TD>" & vbNewLine &_
  "    <TD bgColor="""& strHeadCellColor &""" valign=""top"">" & vbNewLine &_
  "    <INPUT type=""text"" size=""58"" name=""txtHead"" value="""& strHead &""">" & vbNewLine &_
  "    </TD>" & vbNewLine &_
  "   </TR>" & vbNewLine &_
  "   <TR>" & vbNewLine &_
  "    <TD bgColor="""& strCategoryCellColor &""" align=""right"" valign=""top""><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""" color="""& strCategoryFontColor &"""><b>Cell:</b></font></TD>" & vbNewLine &_
  "    <TD bgColor="""& strCategoryCellColor &""" valign=""top"">" & vbNewLine &_
  "    <TEXTAREA rows=""2"" cols=""50"" name=""txtCell"" wrap=""on"">"& strCell &"</TEXTAREA>" & vbNewLine &_
  "    </TD>" & vbNewLine &_
  "   </TR>" & vbNewLine &_
  "   <TR>" & vbNewLine &_
  "    <TD bgColor="""& strForumCellColor &""" align=""right"" valign=""top""><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""" color="""& strDefaultFontColor &"""><b>Newsletter Date:</b></font></TD>" & vbNewLine &_
  "    <TD bgColor="""& strForumCellColor &""" valign=""top"">" & vbNewLine &_
  "    <TEXTAREA rows=""2"" cols=""50"" name=""txtDate"" wrap=""on"">"& strDate &"</TEXTAREA>" & vbNewLine &_
  "    </TD>" & vbNewLine &_
  "   </TR>" & vbNewLine
 %><!--#INCLUDE file="inc_post_buttons_html.asp" --><%
 Response.Write "   <TR>" & vbNewLine &_
  "    <TD bgColor="""& strForumCellColor &""" align=""right"" valign=""top""><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""" color="""& strDefaultFontColor &"""><b>Main Body of Newsletter:</b><br><br>" & vbNewLine &_
  "    <b>Mode:</b>" & vbNewLine &_
  "    <select name=""font"" onChange=""thelp(this.options[this.selectedIndex].value)"">" & vbNewLine &_
  "    <option value=""1"">Help </option>" & vbNewLine &_
  "    <option value=""2"">Prompt </option>" & vbNewLine &_
  "    <option selected value=""0"">Basic </option>" & vbNewLine &_
  "    </select><br><br>" & vbNewLine &_
  "    <input name=""Preview"" type=""button"" value="" Preview "" onclick=""OpenPreview()"">" & vbNewLine &_
  "    </font></TD>" & vbNewLine &_
  "    <TD bgColor="""& strForumCellColor &""" valign=""top"">" & vbNewLine &_
  "    <textarea rows=""15"" cols=""50"" name=""txtBody1"" wrap=""VIRTUAL"">"& strBody1 &"</textarea>" & vbNewLine &_
  "    </TD>" & vbNewLine &_
  "   </TR>" & vbNewLine &_
  "   <TR>" & vbNewLine &_
  "    <TD bgColor="""& strForumCellColor &""" align=""right"" valign=""top""><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""" color="""& strDefaultFontColor &"""><b>Closing Message:</b></font></TD>" & vbNewLine &_
  "    <TD bgColor="""& strForumCellColor &""" valign=""top"">" & vbNewLine &_
  "    <TEXTAREA rows=""4"" cols=""50"" name=""txtBody2"" wrap=""on"">"& strBody2 &"</TEXTAREA>" & vbNewLine &_
  "    </TD>" & vbNewLine &_
  "   </TR>" & vbNewLine &_
  "   <TR>" & vbNewLine &_
  "    <TD bgColor="""& strForumCellColor &""" align=""right"" valign=""top""><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""" color="""& strDefaultFontColor &"""><b>Copyright/Footer:</b></font></TD>" & vbNewLine &_
  "    <TD bgColor="""& strForumCellColor &""" valign=""top"">" & vbNewLine &_
  "    <TEXTAREA rows=""5"" cols=""50"" name=""txtBody3"" wrap=""on"">"& strBody3 &"</TEXTAREA>" & vbNewLine &_
  "    </TD>" & vbNewLine &_
  "   </TR>" & vbNewLine &_
  "   <TR>" & vbNewLine &_
  "    <TD bgColor="""& strForumCellColor &""" align=""center"" valign=""top"" colspan=""2"">" & vbNewLine &_
  "    <INPUT type=""submit"" value=""Send Newsletter!"" name=""submit""><br><br>" & vbNewLine &_
  "    <font face="""& strDefaultFontFace &""" size="""& strFooterFontSize &""" color="""& strDefaultFontColor &""">" & vbNewLine &_
  "If you have a really long mailing list<BR>" & vbNewLine &_
  "it may take a few minutes for the system <BR>" & vbNewLine &_
  "to send a message to everyone.<BR>" & vbNewLine &_
  "    <font color="""& strHoverFontColor &""">CLICK ""Send Newsletter!"" <b><U>ONLY ONCE</U></b> AND PLEASE BE PATIENT!</font>" & vbNewLine &_
  "    </font></P>" & vbNewLine &_
  "    </TD>" & vbNewLine &_
  "   </TR>" & vbNewLine &_
  "  </TABLE>" & vbNewLine &_
  " </TD>" & vbNewLine &_
  " </TR>" & vbNewLine &_
  "</TABLE>" & vbNewLine &_
  "</FORM>" & vbNewLine
 end if
 call WriteFooter
Else
 scriptname = split(request.servervariables("SCRIPT_NAME"),"/")
 Response.Redirect "admin_login.asp?target=" & scriptname(ubound(scriptname))
End IF
%>


Without the issue of how it looks, the file isn't reading values for the last three text fields.

Lines 54-56:


  strMessage = strMessage & Request.Form("txtBody1")
  strMessage = strMessage & Request.Form("txtBody2")
  strMessage = strMessage & Request.Form("txtBody3") & "<br><br>"


Response.Write output of txtbody1 - 3 is blank.

Edited by - Carefree on 07 July 2008 01:58:57
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 07 July 2008 :  08:09:29  Show Profile  Visit leatherlips's Homepage
Thanks for the double opt in. I'll add that later today hopefully.

Without doing any changes to mine yet, my html does send but it doesn't use my forum colors like it says it will. It uses some ugly green color. It also centers everything.

I've also noticed on mine that when someone subscribes they get two messages, one saying it was successful and the other saying to go back and fix the information. (This isn't due to your double opt in. This is how the mod did it from a clean install.)

I'll try fixing those issues myself if I can. If not, I'll post here. <

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 07 July 2008 :  10:12:06  Show Profile
Good luck with the messages - I had to rewrite a routine to get rid of that, but I don't remember which it was (there were so many problems).<
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 11 July 2008 :  09:12:40  Show Profile  Visit leatherlips's Homepage
Carefree, I'm going to try to get this newsetter mod to work for me.

Concerning the double opt-in. I'd like to add your opt-in to the same database that the newsletter mod uses. It's dbs file looks like this:
Newsletter 2.0 Mod
[CREATE]
MAILLIST
ID
EMAIL#VARCHAR(50)##
ACTIVE#int#NULL#
ACTIVE_TEMP#int#NULL#1
DATE_CREATED#VARCHAR(20)#NULL#
[END]

You said to do this:
OPT-IN MOD
[CREATE]
OPTIN

EMAIL#varchar(64)##
ENCRYPTEDEM#varchar(64)##
WHATEVER#varchar(64)##
[END]

Would this be the proper way to add yours to the existing dbs file?
Newsletter 2.0 Mod
[CREATE]
MAILLIST
ID
EMAIL#VARCHAR(50)##
ACTIVE#int#NULL#
ACTIVE_TEMP#int#NULL#1
DATE_CREATED#VARCHAR(20)#NULL#

OPTIN

EMAIL#varchar(64)##
ENCRYPTEDEM#varchar(64)##
WHATEVER#varchar(64)##
[END]
<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD

Edited by - leatherlips on 11 July 2008 09:13:07
Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 11 July 2008 :  09:35:52  Show Profile
If you have already run their dbs file, you cannot append my file to it and run it again, you'll have some double entries and other errors.
Instead, you should use this as a separate DBS file and run it:


Newsletter 2 Opt-In
[ALTER]
MAILLIST

ADD#ENCRYPTEDEM#varchar(64)##
ADD#WHATEVER#varchar(64)##
[END]
<

Edited by - Carefree on 11 July 2008 09:37:48
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 11 July 2008 :  09:49:50  Show Profile  Visit leatherlips's Homepage
I tried adding that and it gave me this error:

Dropping Column...
ALTER TABLE FORUM_MAILLIST
ALTER TABLE FORUM_MAILLIST
-2147217900 | Syntax error in ALTER TABLE statement.<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 11 July 2008 :  10:01:36  Show Profile
quote:
Originally posted by leatherlips

I tried adding that and it gave me this error:

Dropping Column...
ALTER TABLE FORUM_MAILLIST
ALTER TABLE FORUM_MAILLIST
-2147217900 | Syntax error in ALTER TABLE statement.



I'm confused. There's nothing in my dbs file which would have caused a column to drop, and there isn't any syntax error that I can see.

Ahhh - I know the problem. Your file wasn't made for Snitz and therefore doesn't have the forum_ prefix to the table name.<
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 11 July 2008 :  11:46:05  Show Profile  Visit leatherlips's Homepage
If I deleted the newsletter table from the database and started from scratch, would my original question about the dbs file work?<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 11 July 2008 :  12:35:51  Show Profile
Not the way you have it, no. It would go like this:

[CREATE]
MAILLIST
ID
EMAIL#VARCHAR(50)##
ACTIVE#int#NULL#
ACTIVE_TEMP#int#NULL#1
DATE_CREATED#VARCHAR(20)#NULL#
ENCRYPTEDEM#varchar(64)##
WHATEVER#varchar(64)##
[END]

Then you'd have to change the table that the opt-in asp file is looking at to "maillist" instead of "optin".<
Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 11 July 2008 :  12:42:44  Show Profile
Make sure your software knows the correct path & name of the table after you create it.<
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 12 July 2008 :  08:34:53  Show Profile  Visit leatherlips's Homepage
To keep it simple I just added your original opt in table code. It worked great!

I have one more request though. After the user subscribes it does not give them a message to confirm by checking their email. It looks like instead it goes to a blank page and then quickly redirects to default.asp.

Is there a way to add the message for them to check their email to confirm their subscription? I also would like to add the forum header and footer to the page.<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD

Edited by - leatherlips on 12 July 2008 08:36:31
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 12 July 2008 :  08:53:56  Show Profile  Visit leatherlips's Homepage
I've tried adding the inc_header.asp at the top and the call Writefooter at the bottom but they do not appear.

I've also tried making the return to default.asp wait longer by changing all three instances of:

<meta http-equiv=""Refresh"" content=""2; URL=default.asp"">

to

<meta http-equiv=""Refresh"" content=""30; URL=default.asp"">

But none of this seems to have any effect. The header and footer do not show and it still refreshes in 2 seconds.<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 12 July 2008 :  14:54:28  Show Profile
quote:
Originally posted by leatherlips

I have one more request though. After the user subscribes it does not give them a message to confirm by checking their email. It looks like instead it goes to a blank page and then quickly redirects to default.asp.

Is there a way to add the message for them to check their email to confirm their subscription? I also would like to add the forum header and footer to the page.



I'll write it for you today.<
Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 12 July 2008 :  15:22:50  Show Profile
Here you go:


<%
'################################################################################
'## Snitz Forums 2000 v3.4.06
'################################################################################
'## Copyright (C) 2000-06 Michael Anderson, Pierre Gorissen,
'##                       Huw Reddick and Richard Kinser
'##
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000
'## must remain intact in the scripts and in the outputted HTML
'## The "powered by" text/logo with a link back to
'## http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful,
'## but WITHOUT ANY WARRANTY; without even the implied warranty of
'## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'## GNU General Public License for more details.
'##
'## You should have received a copy of the GNU General Public License
'## along with this program; if not, write to the Free Software
'## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
'##
'## Support can be obtained from our support forums at:
'## http://forum.snitz.com
'##
'## Correspondence and Marketing Questions can be sent to:
'## manderson@snitz.com
'##
'################################################################################
%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_func_common.asp" -->
<!--#INCLUDE FILE="inc_func_member.asp" -->
<!--#INCLUDE FILE="inc_func_posting.asp"-->
<%

if Session("Generate") = "1" then
 ' NewsLetter Opt-In Routine

 EM = Request.ServerVariables("QUERY_STRING")
 EncEM = sha256("" & EM)
 Randomize
 DateNumber = Int(Rnd * PRange) + 1
 WHATEVER = sha256("" & DateNumber)

 set my_Conn=Server.CreateObject("ADODB.Connection")
 my_Conn.Open strConnString
 strSql="INSERT INTO " & strTablePrefix & "OPTIN " &_
  "(EMAIL, ENCRYPTEDEM, WHATEVER) VALUES ('" & EM & "', '" & EncEM & "', '" & WHATEVER & "')"
' Response.Write strSql
' Response.End
 Appnd = EncEM & WHATEVER
 set rsOpt=my_Conn.Execute(strSql)
 strRecipientsName = strForumURL & "Newsletter Recipient"
 strRecipients = Request.ServerVariables("QUERY_STRING")
 strFrom = strSender
 strFromName = strForumTitle
 strsubject = strForumTitle & " Newsletter "
 strMessage = "Hello " & Request.Form("name") & vbNewline & vbNewline
 strMessage = strMessage & "You received this message from " & strForumTitle & " because someone using your email address has elected to receive our newsletter at " & strForumURL & "." & vbNewline & vbNewline
 strMessage = strMessage & "Please click on the link below to start receiving the newsletter." & vbNewline & vbNewLine
 strMessage = strMessage & strForumURL & "target.asp?"& Appnd & vbNewline & vbNewline
 strMessage = strMessage & "If the link is split or broken, you will need to copy and paste the entire link into your web browser." & vbNewline & vbNewLine
 strMessage = strMessage & "If you do not want to receive our newsletter, simply delete this message, do not reply, it isn't monitored."
%>
<!--#INCLUDE FILE="inc_mail.asp" -->
<%
session("Generate") = ""
 strSql="SELECT M_NAME FROM " & strMemberTablePrefix & "MEMBERS WHERE MEMBER_ID = " & intAdminMemberID
 set rsAdm=my_Conn.Execute(strSql)
 strAdminName = ChkString(rsAdm("M_NAME"),"display")
 rsAdm.Close
 set rsAdm = Nothing
%>
<!--#INCLUDE FILE="inc_header.asp" -->
<%
Response.Write "<table border=""0"" width=""100%"">" & vbNewLine & _
 " <tr>" & vbNewLine & _
 "  <td width=""33%"" align=""left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
 "  " & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " <a href=""default.asp"">Return to Forums</a><br />" & vbNewLine & _
 " </tr>" & vbNewLine & _
 "</table>" & vbNewLine & _
 "<table border=""0"" width=""50%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
 " <tr>" & vbNewLine & _
 "  <td bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
 "   <table border=""0"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewLine & _
 "    <tr>" & vbNewLine & _
 "     <td align=""center"" bgcolor=""" & strCategoryCellColor & """ colspan=""2""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><b>Reminder Message</b></font></td>" & vbNewLine & _
 "    </tr>" & vbNewLine & _
 "    <tr>" & vbNewLine & _
 "     <td bgcolor=""" & strForumCellColor & """ valign=""top""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & vbNewLine & _
 "     Please check the E-Mail address that you provided.  You must click on the confirmation link to activate your subscription.  We hope you enjoy the """ & strForumTitle & """ newsletter.<br><br>" & vbNewLine & _
 "     " & strAdminName & "</td></tr></table></td></tr></table>" & vbNewLine
WriteFooter

else
 EncEM = LEFT(Request.ServerVariables("QUERY_STRING"),64)
 XEM = RIGHT(Request.ServerVariables("QUERY_STRING"),64)
 set my_Conn=Server.CreateObject("ADODB.Connection")
 my_Conn.Open strConnString
 strSql = "SELECT EMAIL, ENCRYPTEDEM, WHATEVER FROM " & strTablePrefix & "OPTIN WHERE ENCRYPTEDEM='" & EncEM & "'"
 set rsOpt=my_Conn.Execute(strSql)
 if not rsOpt.BOF and not rsOpt.EOF then 'Record exists
  if rsOpt("WHATEVER")=XEM then 'Record matches
   strEmail=rsOpt("EMAIL")
   rsOpt.close
   set rsOpt = Nothing
   ' Do opt in routine
    ' Advise of success
     Response.Write "Congratulations, you have successfully joined " & strForumTitle & "'s newsletter." & vbNewLine & _
      "<br>You will begin receiving it with the next issue."
    ' Add to recipient list
    set my_Conn=Server.CreateObject("ADODB.Connection")
    my_Conn.Open strConnString
    strDate = Date()
        strSQL = "INSERT INTO " & strTablePrefix & "maillist (email, date_created, active)" & _
         " VALUES ('" & strEmail & "', '" & strDate & "',1)"
    set rsOpt=my_Conn.Execute(strSql)
    ' Now delete from optin table
     strSql = "DELETE EMAIL, ENCRYPTEDEM, WHATEVER FROM " & strTablePrefix & "OPTIN WHERE ENCRYPTEDEM='" & ENCEM & "'"
     set rsOpt=my_Conn.Execute(strSql)
    ' Finally, redirect to default.asp
     Response.Write "<meta http-equiv=""Refresh"" content=""2; URL=default.asp"">" & vbNewLine
  else 'Delete record, doesn't match
   rsOpt.close
   set rsOpt = Nothing
   set my_Conn=Server.CreateObject("ADODB.Connection")
   my_Conn.Open strConnString
   strSql = "DELETE EMAIL, ENCRYPTEDEM, WHATEVER FROM " & strTablePrefix & "OPTIN WHERE ENCRYPTEDEM='" & ENCEM & "'"
   set rsOpt=my_Conn.Execute(strSql)
  end if
 else ' Record doesn't exist, redirect to default.asp
  Response.Write "<meta http-equiv=""Refresh"" content=""2; URL=default.asp"">" & vbNewLine
 end if
end if
%>
Go to Top of Page
Page: of 5 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.84 seconds. Powered By: Snitz Forums 2000 Version 3.4.07