<% '################################################################################# '## Copyright (C) 2000 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 '################################################################################# '################################################################################# '## Variable declaration '################################################################################# dim strSelecSize dim intCols, intRows %> <% '################################################################################# '## Initialise variables '################################################################################# strSelectSize = Request.Form("SelectSize") strRqMethod = Request.QueryString("method") strRqForumID = Request.QueryString("FORUM_ID") strRqCatID = Request.QueryString("CAT_ID") strCkPassWord = Request.Cookies(strUniqueID & "User")("Pword") '################################################################################# '## Page-code start '################################################################################# if strSelectSize = "" or IsNull(strSelectSize) then strSelectSize = Request.Cookies(strCookieURL & "strSelectSize") end if if not(IsNull(strSelectSize)) then Response.Cookies(strCookieURL & "strSelectSize") = strSelectSize Response.Cookies(strCookieURL & "strSelectSize").expires = Now() + 365 end if %> <% select case strSelectSize case "1" intCols = 45 intRows = 6 case "2" intCols = 80 intRows = 12 case "3" intCols = 90 intRows = 12 case "4" intCols = 130 intRows = 15 case else intCols = 45 intRows = 6 end select %> <% if strRqMethod = "EditForum" then if (mLev = 4) or (chkForumModerator(strRqForumId, strDBNTUserName) = "1") then '## Do Nothing else Response.Write "

ERROR: Only moderators and administrators can edit forums

" & vbcrlf %> <% Response.End end if end if Msg = "" select case strRqMethod case "Reply" if (strNoCookies = 1) or (strDBNTUserName = "") then Msg = Msg & "Note: You must be registered in order to post a reply.
" Msg = Msg & "To register, click here. Registration is FREE!
" end if case "ReplyQuote" if (strNoCookies = 1) or (strDBNTUserName = "") then Msg = Msg & "Note: You must be registered in order to post a reply.
" Msg = Msg & "To register, click here. Registration is FREE!
" end if case "Topic" if (strNoCookies = 1) or (strDBNTUserName = "") then Msg = Msg & "Note: You must be registered in order to post a Topic.
" Msg = Msg & "To register, click here. Registration is FREE!
" end if case "TopicQuote" if (strNoCookies = 1) or (strDBNTUserName = "") then Msg = Msg & "Note: You must be registered in order to post a reply.
" Msg = Msg & "To register, click here. Registration is FREE!
" end if case "Forum" Msg = Msg & "Note: You must be an administrator to create a new forum.
" case "URL" Msg = Msg & "Note: You must be an administrator to create a new web link.
" case "Edit" Msg = Msg & "Note: Only the poster of this message, and the Moderator can edit the message." case "EditTopic" Msg = Msg & "Note: Only the poster of this message, and the Moderator can edit the message." case "EditForum" Msg = Msg & "Note: Only the Moderator can edit the message." case "EditCategory" Msg = Msg & "Note: Only an administrator can edit the subject." end select if strRqMethod = "Edit" or _ strRqMethod = "ReplyQuote" then '## Forum_SQL strSql = "SELECT * " strSql = strSql & " FROM " & strTablePrefix & "REPLY " strSql = strSql & " WHERE " & strTablePrefix & "REPLY.REPLY_ID = " & Request.QueryString("REPLY_ID") set rs = my_Conn.Execute (strSql) strAuthor = rs("R_AUTHOR") if strRqMethod = "Edit" then TxtMsg = rs("R_MESSAGE") else if strRqMethod = "ReplyQuote" then TxtMsg = "[quote]" & vbCrLf TxtMsg = TxtMsg & rs("R_MESSAGE") & vbCrLf TxtMsg = TxtMsg & "[/quote]" end if end if if strDBNTUserName = getMemberName(strAuthor) then boolReply =rs("R_MAIL") end if end if if strRqMethod = "EditTopic" or _ strRqMethod = "TopicQuote" then '## Forum_SQL strSql = "SELECT " & strTablePrefix & "TOPICS.CAT_ID, " & strTablePrefix & "TOPICS.FORUM_ID, " & strTablePrefix & "TOPICS.TOPIC_ID, " & strTablePrefix & "TOPICS.T_SUBJECT, " & strTablePrefix & "TOPICS.T_AUTHOR, " & strTablePrefix & "TOPICS.T_MAIL, " & strTablePrefix & "TOPICS.T_MESSAGE " strSql = strSql & " FROM " & strTablePrefix & "TOPICS " strSql = strSql & " WHERE " & strTablePrefix & "TOPICS.TOPIC_ID = " & Request.QueryString("TOPIC_ID") set rs = my_Conn.Execute (strSql) TxtSub = rs("T_SUBJECT") strAuthor = rs("T_AUTHOR") if strRqMethod = "EditTopic" then TxtMsg = rs("T_MESSAGE") else if strRqMethod = "TopicQuote" then TxtMsg = "[quote]" & vbCrLf TxtMsg = TxtMsg & rs("T_MESSAGE") & vbCrLf TxtMsg = TxtMsg & "[/quote]" end if end if if strDBNTUserName = getMemberName(strAuthor) then boolTopic = rs("T_MAIL") end if if strRqMethod = "EditForum" or _ strRqMethod = "EditURL" then '## Forum_SQL strSql = "SELECT " & strTablePrefix & "FORUM.F_SUBJECT, " & strTablePrefix & "FORUM.F_URL, " & strTablePrefix & "FORUM.F_DESCRIPTION, " & strTablePrefix & "FORUM.F_PRIVATEFORUMS, " & strTablePrefix & "FORUM.F_PASSWORD_NEW " strSql = strSql & " FROM " & strTablePrefix & "FORUM " strSql = strSql & " WHERE " & strTablePrefix & "FORUM.FORUM_ID = " & strRqForumId set rs = my_Conn.Execute (strSql) if strRqMethod = "EditURL" then TxtUrl = rs("F_URL") end if if strRqMethod = "EditForum" or _ strRqMethod = "EditURL" then TxtSub = rs("F_SUBJECT") TxtMsg = rs("F_DESCRIPTION") end if end if if strRqMethod = "EditCategory" then '## Forum_SQL strSql = "SELECT " & strTablePrefix & "CATEGORY.CAT_NAME " strSql = strSql & " FROM " & strTablePrefix & "CATEGORY " strSql = strSql & " WHERE " & strTablePrefix & "CATEGORY.CAT_ID = " & strRqCatID set rs = my_Conn.Execute (strSql) if strRqMethod = "EditCategory" then TxtSub = rs("CAT_NAME") end if end if select case strRqMethod case "Category" btn = "Post New Category" case "Edit" btn = "Post Changes" case "EditCategory" btn = "Post Changes" case "EditForum" btn = "Post Changes" case "EditTopic" btn = "Post Changes" case "EditURL" btn = "Post Changes" case "Forum" btn = "Post New Forum" case "Reply" btn = "Post New Reply" case "ReplyQuote" btn = "Post New Reply" case "TopicQuote" btn = "Post New Reply" case "Topic" btn = "Post New Topic" case "URL" btn = "Post New URL" case else btn = "Post" end select %>
 All Forums
<% if strRqMethod = "EditCategory" then %>  <% =ChkString(Request.QueryString("Cat_Title"),"display") %>
<% else if strRqMethod = "Edit" or _ strRqMethod = "EditTopic" or _ strRqMethod = "Reply" or _ strRqMethod = "ReplyQuote" or _ strRqMethod = "Topic" or _ strRqMethod = "TopicQuote" then %>  "><% =ChkString(Request.QueryString("FORUM_Title"),"display") %>
<% end if end if if strRqMethod = "Edit" or _ strRqMethod = "EditTopic" or _ strRqMethod = "Reply" or _ strRqMethod = "ReplyQuote" or _ strRqMethod = "TopicQuote" then %>  &CAT_ID=<% =strRqCatID %>&FORUM_ID=<% =strRqForumId %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>&Topic_Title=<% =ChkString(left(Request.QueryString("Topic_title"), 50),"urlpath") %>"><% =ChkString(Request.QueryString("Topic_Title"),"display") %> <% end if %>

<% =Msg %>

<% if strRqMethod = "Edit" or _ strRqMethod = "EditTopic" or _ strRqMethod = "EditForum" or _ strRqMethod = "Reply" or _ strRqMethod = "ReplyQuote" or _ strRqMethod = "Topic" or _ strRqMethod = "TopicQuote" then %> &TOPIC_ID=<% =ChkString(Request.QueryString("TOPIC_ID"),"urlpath")%>&REPLY_ID=<% =ChkString(Request.QueryString("REPLY_ID"),"urlpath")%>&Topic_Title=<% =ChkString(Request.QueryString("Topic_Title"),"urlpath")%>"> "> "> "> "> "> "> "> "> "> <% end if %> "> "> "> "> "> "> "> "> "> <% if mlev = 4 or _ mlev = 3 or _ mlev = 2 or _ mlev = 1 then %> <% else if (lcase(strNoCookies) = "1") or _ (strDBNTUserName = "" or _ strCkPassWord = "") then %> <% end if end if if strRqMethod = "Edit" or _ strRqMethod = "EditTopic" or _ strRqMethod = "Reply" or _ strRqMethod = "ReplyQuote" or _ strRqMethod = "Topic" or _ strRqMethod = "TopicQuote" then %> <% end if if strRqMethod = "Forum" or _ strRqMethod = "URL" or _ strRqMethod = "EditURL" or _ strRqMethod = "EditForum" then %> <% end if if (strRqMethod = "EditTopic") then %> <% end if if strRqMethod = "URL" or _ strRqMethod = "EditURL" then %> <% end if if strRqMethod = "Edit" or _ strRqMethod = "URL" or _ strRqMethod = "EditURL" or _ strRqMethod = "Forum" or _ strRqMethod = "EditForum" or _ strRqMethod = "EditTopic" or _ strRqMethod = "Reply" or _ strRqMethod = "ReplyQuote" or _ strRqMethod = "Topic" or _ strRqMethod = "TopicQuote" then %> <% end if if strRqMethod = "Edit" or _ strRqMethod = "URL" or _ strRqMethod = "EditURL" or _ strRqMethod = "EditTopic" or _ strRqMethod = "Forum" or _ strRqMethod = "Reply" or _ strRqMethod = "ReplyQuote" or _ strRqMethod = "Topic" or _ strRqMethod = "TopicQuote" then %> <% if strPrivateForums <> "0" then if strRqMethod = "Forum" or _ strRqMethod = "URL" or _ strRqMethod = "EditURL" or _ strRqMethod = "EditForum" then if strRqMethod = "EditForum" or _ strRqMethod = "EditURL" then ForumAuthType = rs("F_PRIVATEFORUMS") else ForumAuthType = 0 end if %> <% '################################################################################# '## Allowed User - listbox Code '################################################################################# strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.MEMBER_ID, " & strMemberTablePrefix & "MEMBERS.M_NAME " strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS " strSql = strSql & " ORDER BY " & strMemberTablePrefix & "MEMBERS.M_NAME ASC;" on error resume next set rsMember = my_Conn.execute (strSql) strSql = "SELECT " & strMemberTablePrefix & "ALLOWED_MEMBERS.MEMBER_ID " strSql = strSql & " FROM " & strMemberTablePrefix & "ALLOWED_MEMBERS " strSql = strSql & " WHERE " & strMemberTablePrefix & "ALLOWED_MEMBERS.FORUM_ID = " & strRqForumID set rsAllowedMember = my_Conn.execute (strSql) tmpStrUserList = "" if strRqMethod = "EditForum" or strRqMethod = "EditURL" then do while not (rsAllowedMember.EOF or rsAllowedMember.BOF) if tmpStrUserList = "" then tmpStrUserList = rsAllowedMember("MEMBER_ID") else tmpStrUserList = tmpStrUserList & "," & rsAllowedMember("MEMBER_ID") end if rsAllowedMember.movenext loop end if SelectSize = 10 %> <% '################################################################################# '## Allowed User - End of listbox code '################################################################################# end if end if %>
Screensize:
UserName: ">
Password: ">
Category:
Forum: <% if mlev = 3 or _ mlev = 4 then %> " end if set rsForum = nothing if mlev = 3 or _ mlev = 4 then Response.Write "" & vbcrlf end if end if if strRqMethod = "Category" or _ strRqMethod = "EditCategory" or _ strRqMethod = "URL" or _ strRqMethod = "EditURL" or _ strRqMethod = "Forum" or _ strRqMethod = "EditForum" or _ strRqMethod = "EditTopic" or _ strRqMethod = "Topic" then %>
Subject: " size="40">
Address: " size="40">
Message:

<% if strAllowHTML = "1" then %> * HTML is ON
<% else %> * HTML is OFF
<% end if %> <% if strAllowForumCode = "1" then %> * Forum Code is ON
<% else %> * Forum Code is OFF
<% end if %>

  <% if strRqMethod = "Edit" or _ strRqMethod = "EditTopic" or _ strRqMethod = "Reply" or _ strRqMethod = "ReplyQuote" or _ strRqMethod = "Topic" or _ strRqMethod = "TopicQuote" then %>
Mode:
<% end if if strRqMethod = "Edit" or _ strRqMethod = "EditTopic" or _ strRqMethod = "Reply" or _ strRqMethod = "ReplyQuote" or _ strRqMethod = "Topic" or _ strRqMethod = "TopicQuote" then if strRqMethod = "Reply" or _ strRqMethod = "ReplyQuote" or _ strRqMethod = "Topic" or _ strRqMethod = "TopicQuote" then %> Check here to include your profile signature.
<% end if if lcase(strEmail) = "1" then if strRqMethod = "Topic" or _ strRqMethod = "EditTopic" then %> >Check here to be notified by email whenever someone replies to your topic.
<% else if strRqMethod = "Reply" or _ strRqMethod = "Edit" or _ strRqMethod = "ReplyQuote" or _ strRqMethod = "TopicQuote" then %> >Check here to be notified by email whenever anyone replies to this topic.
<% end if end if end if if ((mLev = 4) or (chkForumModerator(strRqForumId, strDBNTUserName) = "1")) _ and (strRqMethod = "Topic" or strRqMethod = "Reply" or _ strRqMethod = "ReplyQuote" or strRqMethod = "TopicQuote") then %> Check here to lock the topic after this post.
<% end if end if end if %>
  <% if strRqMethod = "Reply" or _ strRqMethod = "Edit" or _ strRqMethod = "ReplyQuote" or _ strRqMethod = "Topic" or _ strRqMethod = "TopicQuote" then %>   <% end if %>  
Auth Type: <% if strRqMethod = "Forum" or _ strRqMethod = "EditForum" then if strRqMethod = "EditForum" then If rs("F_PASSWORD_NEW") <> " " Then strPassword = ChkString(rs("F_PASSWORD_NEW"),"password") else strPassword = " " end if else strPassword = " " end if %>
Password <% if strNTGroups = "1" then Response.Write("or Global Groups") %>:
<% end if %>
Member List:
Forum Members:
Select Members:
   
<% if strRqMethod = "Reply" or _ strRqMethod = "TopicQuote" or _ strRqMethod = "ReplyQuote" then %> " & vbCrLf & _ " " & vbCrLf & _ "
<% '## Forum_SQL strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.M_NAME, " & strTablePrefix & "TOPICS.T_MESSAGE " strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS, " & strTablePrefix & "TOPICS " strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "TOPICS.T_AUTHOR AND " strSql = strSql & " " & strTablePrefix & "TOPICS.TOPIC_ID = " & Request.QueryString("TOPIC_ID") set rs = my_Conn.Execute (strSql) Response.Write " " & vbCrLf Response.Write " " & vbCrLf Response.Write " " & vbCrLf Response.Write " " & vbCrLf '## Forum_SQL - Get all replies to Topic from the DB strSql ="SELECT " & strMemberTablePrefix & "MEMBERS.M_NAME, " & 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 rs = Server.CreateObject("ADODB.Recordset") ' rs.cachesize=15 rs.open strSql, my_Conn, 3 strI = 0 if rs.EOF or rs.BOF then Response.Write "" else rs.movefirst do until rs.EOF if strI = 0 then CColor = strAltForumCellColor else CColor = strForumCellColor end if Response.Write " " & vbCrLf & _ " " & vbCrLf & _ " " & vbCrLf & _ " " & vbCrLf rs.MoveNext strI = strI + 1 if strI = 2 then strI = 0 end if loop end if Response.Write "
size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">T O P I C     R E V I E W
" & ChkString(rs("M_NAME"),"display") & "" & formatStr(rs("T_MESSAGE")) & "
" & ChkString(rs("M_NAME"),"display") & "" & formatStr(rs("R_MESSAGE")) & "
" & vbCrLf & _ "
" & vbCrLf & _ "" & vbCrLf end if %>