%
'#################################################################################
'## Copyright (C) 2000 Michael Anderson
'##
'## 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.
'##
'## 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.
'##
'## Correspondence and Questions can be sent to:
'## reinhold@bigfoot.com
'##
'## or
'##
'## Snitz Communications
'## C/O: Michael Anderson
'## PO Box 200
'## Harpswell, ME 04079
'#################################################################################
%>
<%
if Request.QueryString("method") = "EditForum" then
if (chkForumModerator(Request.QueryString("FORUM_ID"), Request.Cookies("User")("Name")) = "1") _
or (mLev = 4) _
or (chkForumModerator(Request.QueryString("FORUM_ID"), session("userid")) = "1") then
'## Do Nothing
else
%>
ERREUR: Seuls les modérateurs et Administrateurs peuvent éditer les Forums
<%
Response.End
end if
end if
Msg = ""
select case Request.QueryString("method")
case "Reply"
if strAuthType="db" then
if (strNoCookies = 1) or _
(Request.Cookies("User")("Name") = "" or _
Request.Cookies("User")("Pword") = "") then
Msg = Msg & "Note: Vous devez vous enregistrer pour répondre aux messages.
"
Msg = Msg & "Pour vous enregistrer, clic ICI. L'enregistrement est GRATUIT!
"
end if
else
if strAuthType="nt" and session("username") = "" then
Msg = Msg & "Note: Vous devez vous enregistrer pour répondre aux messages.
"
Msg = Msg & "Pour vous enregistrer, clic ICI. L'enregistrement est GRATUIT!
"
end if
end if
case "ReplyQuote"
if strAuthType="db" then
if (strNoCookies = 1) or _
(Request.Cookies("User")("Name") = "" or _
Request.Cookies("User")("Pword") = "") then
Msg = Msg & "Note: Vous devez vous enregistrer pour répondre aux messages.
"
Msg = Msg & "To register, click here. Registration is FREE!
"
end if
else
if strAuthType="nt" and session("username") = "" then
Msg = Msg & "Note: Vous devez vous enregistrer pour répondre aux messages.
"
Msg = Msg & "Pour vous enregistrer, clic ICI. L'enregistrement est GRATUIT!
"
end if
end if
case "Topic"
if strAuthType="db" then
if (strNoCookies = 1) or _
(Request.Cookies("User")("Name") = "" or _
Request.Cookies("User")("Pword") = "") then
Msg = Msg & "Note: Vous devez vous enregistrer pour créer un sujet.
"
Msg = Msg & "Pour vous enregistrer, clic ICI. L'enregistrement est GRATUIT!
"
end if
else
if strAuthType="nt" and session("username") = "" then
Msg = Msg & "Note: Vous devez vous enregistrer pour créer un sujet.
"
Msg = Msg & "Pour vous enregistrer, clic ICI. L'enregistrement est GRATUIT!
"
end if
end if
case "TopicQuote"
if strAuthType="db" then
if (strNoCookies = 1) or _
(Request.Cookies("User")("Name") = "" or _
Request.Cookies("User")("Pword") = "") then
Msg = Msg & "Note: Vous devez vous enregistrer pour répondre aux messages.
"
Msg = Msg & "Pour vous enregistrer, clic ICI. L'enregistrement est GRATUIT!
"
end if
else
if strAuthType="nt" and session("username") = "" then
Msg = Msg & "Note: Vous devez vous enregistrer pour répondre aux messages.
"
Msg = Msg & "Pour vous enregistrer, clic ICI. L'enregistrement est GRATUIT!
"
end if
end if
case "Forum"
Msg = Msg & "Note: La création d'un nouveau Forum est réservé aux Administrateurs.
"
case "URL"
Msg = Msg & "Note: La création d'un nouveau Lien est réservé aux Administrateurs.
"
case "Edit"
Msg = Msg & "Note: Seul le créateur du message, et le Modérateur peuvent éditer le message."
case "EditTopic"
Msg = Msg & "Note: Seul le créateur du message, et le Modérateur peuvent éditer le message."
case "EditForum"
Msg = Msg & "Note: Seul le Modérateur peut éditer le message."
case "EditCategory"
Msg = Msg & "Note: Seul les Administrateurs peuvent créer un nouveau Sujet."
end select
if Request.QueryString("method") = "Edit" or _
Request.Querystring("method") = "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 Request.QueryString("method") = "Edit" then
TxtMsg = rs("R_MESSAGE")
else
if Request.Querystring("method") = "ReplyQuote" then
TxtMsg = "[quote]" & vbCrLf
TxtMsg = TxtMsg & rs("R_MESSAGE") & vbCrLf
TxtMsg = TxtMsg & "[/quote]"
end if
end if
boolReply = rs("R_MAIL")
end if
if Request.QueryString("method") = "EditTopic" or _
Request.Querystring("method") = "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_MESSAGE, " & strTablePrefix & "TOPICS.T_AUTHOR, " & strTablePrefix & "TOPICS.T_MAIL " '**
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 Request.QueryString("method") = "EditTopic" then
TxtMsg = rs("T_MESSAGE")
else
if Request.Querystring("method") = "TopicQuote" then
TxtMsg = "[quote]" & vbCrLf
TxtMsg = TxtMsg & rs("T_MESSAGE") & vbCrLf
TxtMsg = TxtMsg & "[/quote]"
end if
end if
boolTopic = rs("T_MAIL") '**
end if
if Request.QueryString("method") = "EditForum" or _
Request.QueryString("method") = "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, " & strTablePrefix & "FORUM.F_USERLIST "
strSql = strSql & " FROM " & strTablePrefix & "FORUM "
strSql = strSql & " WHERE " & strTablePrefix & "FORUM.FORUM_ID = " & Request.QueryString("FORUM_ID")
set rs = my_Conn.Execute (strSql)
if Request.QueryString("method") = "EditURL" then
TxtUrl = rs("F_URL")
end if
if Request.QueryString("method") = "EditForum" or _
Request.QueryString("method") = "EditURL" then
TxtSub = rs("F_SUBJECT")
TxtMsg = rs("F_DESCRIPTION")
end if
end if
if Request.QueryString("method") = "EditCategory" then
'## Forum_SQL
strSql = "SELECT " & strTablePrefix & "CATEGORY.CAT_NAME "
strSql = strSql & " FROM " & strTablePrefix & "CATEGORY "
strSql = strSql & " WHERE " & strTablePrefix & "CATEGORY.CAT_ID = " & Request.QueryString("CAT_ID")
set rs = my_Conn.Execute (strSql)
if Request.QueryString("method") = "EditCategory" then
TxtSub = rs("CAT_NAME")
end if
end if
select case Request.QueryString("method")
case "Category"
btn = "Créer une nouvelle Categorie"
case "Edit"
btn = "Modifier"
case "EditCategory"
btn = "Modifier"
case "EditForum"
btn = "Modifier"
case "EditTopic"
btn = "Modifier"
case "EditURL"
btn = "Modifier"
case "Forum"
btn = "Créer un nouveau Forum"
case "Reply"
btn = "Répondre"
case "ReplyQuote"
btn = "Répondre"
case "TopicQuote"
btn = "Répondre"
case "Topic"
btn = "Créer un nouveau Sujet"
case "URL"
btn = "Proposez une nouvelle URL"
case else
btn = "Ecrire"
end select
%>
<% =Msg %>
<%
If Request.QueryString("Method") = "Reply" or _
Request.QueryString("Method") = "TopicQuote" or _
Request.QueryString("Method") = "ReplyQuote" then
%>
size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">T O P I C R E V I E W |
<%
'## 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 " " & ChkString(rs("M_NAME"),"display") & " | " & vbCrLf
Response.Write " " & formatStr(rs("T_MESSAGE")) & " | " & 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
Response.Write " " & ChkString(rs("M_NAME"),"display") & " | " & vbCrLf
Response.Write " " & formatStr(rs("R_MESSAGE")) & " | " & vbCrLf
Response.Write " " & vbCrLf
rs.MoveNext
strI = strI + 1
if strI = 2 then
strI = 0
end if
loop
end if
Response.Write " " & vbCrLf
Response.Write " | " & vbCrLf
Response.Write "
" & vbCrLf
Response.Write "
" & vbCrLf
Response.Write "" & vbCrLf
end if
%>