%
'#################################################################################
'## Copyright (C) 2000-02 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
'#################################################################################
%>
<%
Topic_ID = cLng(Request.QueryString("TOPIC_ID"))
if Topic_ID = 0 then
Go_Result "Topic not found",1
Response.End
end if
if Request.QueryString("ARCHIVE") = "true" then
strActivePrefix = strTablePrefix & "A_"
else
strActivePrefix = strTablePrefix
end if
'## Forum_SQL - Get Origional Posting
strSql = "SELECT M.M_NAME, M.MEMBER_ID, T.T_DATE, T.T_SUBJECT, T.T_AUTHOR, T.TOPIC_ID, T.FORUM_ID, T.T_MESSAGE "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS M," & strActivePrefix & "TOPICS T"
strSql = strSql & " WHERE M.MEMBER_ID = T.T_AUTHOR "
strSql = strSql & " AND T.T_STATUS < " & 2
strSql = strSql & " AND T.TOPIC_ID = " & Topic_ID
set rs4 = my_Conn.Execute (strSql)
if rs4.EOF then
rs4.close
set rs4 = nothing
Go_Result "Either the Topic was not found or you are not authorized to view it",1
Response.End
end if
Forum_ID = rs4("FORUM_ID")
if strPrivateForums = "1" then
if (mLev <> 4) then
result = chkForumAccess(Forum_ID,MemberID)
if result = "False" or result = "FALSE" then
Go_Result "You do not have access to the forum where this Topic resides",1
Response.End
end if
end if
end if
'## Forum_SQL - Get all replies to this topic from DB
strSql = "SELECT M.M_NAME, R.REPLY_ID, R.R_AUTHOR, R.TOPIC_ID, R.R_DATE, R.R_MESSAGE "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS M, " & strActivePrefix & "REPLY R"
strSql = strSql & " WHERE M.MEMBER_ID = R.R_AUTHOR "
strSql = strSql & " AND R.R_STATUS < " & 2
strSql = strSql & " AND R.TOPIC_ID = " & Topic_ID
strSql = strSql & " ORDER BY R.R_DATE"
set rs3 = Server.CreateObject("ADODB.Recordset")
rs3.open strSql, my_Conn
Response.Write "" & fLang(strLangPop_Printer_Friendly00010) & " | " & fLang(strLangPop_Printer_Friendly00020) & "
" & vbNewline & _
" " & vbNewline & _
" " & vbNewline & _
" " & vbNewline & _
"
" & chkString(rs4("T_SUBJECT"),"display") & "
" & vbNewline & _ "" & fLang(strLangPop_Printer_Friendly00030) & " " & strForumTitle & "
" & vbNewline & _
"" & fLang(strLangPop_Printer_Friendly00040) & " " & strForumURL & "topic.asp?TOPIC_ID=" & Topic_ID & "
" & vbNewline & _
"" & fLang(strLangPop_Printer_Friendly00050) & " " & ChkDate(DateToStr(Now())) & "
" & fLang(strLangPop_Printer_Friendly00060) & "
" & vbNewline & _
"
" & fLang(strLangPop_Printer_Friendly00070) & " " & chkString(rs4("M_NAME"),"display") & "" & vbNewline & _
"" & fLang(strLangPop_Printer_Friendly00080) & " " & chkString(rs4("T_SUBJECT"),"display") & " " & formatStr(rs4("T_MESSAGE")) & " " & vbNewline & _
"" & fLang(strLangPop_Printer_Friendly00110) & "
" & vbNewline & _
"" & fLang(strLangPop_Printer_Friendly00090) & " " & ChkDate(rs4("T_DATE")) & " " & ChkTime(rs4("T_DATE")) & "
" & vbNewline & _
"" & fLang(strLangPop_Printer_Friendly00100) & "
" & vbNewline
do until rs3.EOF
Response.Write "
" & vbNewline & _
"" & fLang(strLangPop_Printer_Friendly00070) & " " & chkString(rs3("M_NAME"),"display") & "
" & vbNewline & _
"" & fLang(strLangPop_Printer_Friendly00120) & " " & ChkDate(rs3("R_DATE")) & " " & ChkTime(rs3("R_DATE")) & "
" & vbNewline & _
"" & fLang(strLangPop_Printer_Friendly00100) & "
" & formatStr(rs3("R_MESSAGE")) & "
" & vbNewline rs3.MoveNext loop end if rs3.close set rs3 = Nothing rs4.close set rs4 = Nothing Response.Write "" & strForumTitle & " : " & strForumURL & "
" & vbNewline & _ "" & strCopyright & "
" & vbNewline &_ " " & vbNewline & _ "There has been a problem!
" & vbNewLine & _ "" & message & "
" & vbNewLine end if %> <% end function %>