<% '################################################################################# '## Copyright (C) 2000-01 Michael Anderson and Pierre Gorissen '## '## 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 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 support forums at: '## http://forum.snitz.com '## '## Correspondence and Marketing Questions can be sent to: '## reinhold@bigfoot.com '## '## or '## '## Snitz Communications '## C/O: Michael Anderson '## PO Box 200 '## Harpswell, ME 04079 '################################################################################# %> <% '## Forum_SQL - Get Origional Posting strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.M_NAME, " & strMemberTablePrefix & "MEMBERS.MEMBER_ID, " & strTablePrefix & "TOPICS.T_DATE, " & strTablePrefix & "TOPICS.T_SUBJECT, " & strTablePrefix & "TOPICS.T_AUTHOR, " & strTablePrefix & "TOPICS.TOPIC_ID, " & strTablePrefix & "TOPICS.T_MESSAGE " strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS, " & strTablePrefix & "TOPICS " strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "TOPICS.T_AUTHOR " strSql = strSql & " AND " & strTablePrefix & "TOPICS.TOPIC_ID = " & Request.QueryString("TOPIC_ID") set rs4 = my_Conn.Execute (strSql) if rs4.EOF then rs4.close set rs4 = nothing my_Conn.close set my_Conn = nothing Response.Redirect("default.asp") end if '## Forum_SQL - Get all topics from DB strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.M_NAME, " & strTablePrefix & "REPLY.REPLY_ID, " & strTablePrefix & "REPLY.R_AUTHOR, " & strTablePrefix & "REPLY.TOPIC_ID, " & strTablePrefix & "REPLY.R_DATE, " & strTablePrefix & "REPLY.R_MESSAGE " strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS, " & strTablePrefix & "REPLY " strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "REPLY.R_AUTHOR " strSql = strSql & " AND TOPIC_ID = " & Request.QueryString("TOPIC_ID") & " " strSql = strSql & " ORDER BY " & strTablePrefix & "REPLY.R_DATE" set rs3 = Server.CreateObject("ADODB.Recordset") rs3.open strSql, my_Conn Response.Write "Print Page | Close Window
" & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline &_ "

" & rs4("T_Subject") & "

" & vbNewline & _ "

Printed from: " & strForumTitle & "
" & vbNewline & _ "Topic URL: " & strForumURL & "link.asp?TOPIC_ID=" & Request.QueryString("TOPIC_ID") & "
" & vbNewline & _ "Printed on: " & ChkDate(DateToStr(Now())) & "

" & vbNewline & _ "

Topic:
" & vbNewline & _ "


" & vbNewline & _ "

Topic author: " & rs4("M_NAME") & "
" & vbNewline & _ "Subject: " & rs4("T_Subject") & "
" & vbNewline & _ "Posted on: " & ChkDate(rs4("T_DATE")) & " " & ChkTime(rs4("T_DATE")) & "
" & vbNewline & _ "Message:

" & formatStr(rs4("T_MESSAGE")) & "

" & vbNewline if rs3.EOF or rs3.BOF then '## Do Nothing else rs3.movefirst Response.Write "

" & vbNewline & _ "Replies:
" & vbNewline do until rs3.EOF Response.Write "


" & vbNewline & _ "

" & vbNewline & _ "Topic author: " & rs3("M_NAME") & "
" & vbNewline & _ "Replied on: " & ChkDate(rs3("R_DATE")) & " " & ChkTime(rs3("R_DATE")) & "
" & vbNewline & _ "Message:

" & formatStr(rs3("R_MESSAGE")) & "

" & vbNewline rs3.MoveNext loop end if rs3.close set rs3 = Nothing rs4.close set rs4 = Nothing Response.Write "


" & vbNewline & _ "

" & strForumTitle & " : " & strForumURL & "

" & vbNewline & _ "

" & strCopyright & "

" & vbNewline &_ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ "
" & vbNewline & _ " " & vbNewline %>