Author |
Topic |
|
Maxime
Average Member
France
521 Posts |
Posted - 10 June 2014 : 05:29:26
|
Hello Carefree,
Missing a file in the zip topic-spam-question. file admin_antispam.asp |
Cordially, Maxime
Taxation consists in so plucking the goose to get the most out of feathers with the least possible cries.(Jean-Baptiste Colbert)
|
Edited by - Maxime on 10 June 2014 08:45:43 |
|
Maxime
Average Member
France
521 Posts |
Posted - 12 June 2014 : 04:07:06
|
Do you have a solution for this missing file on the mod |
Cordially, Maxime
Taxation consists in so plucking the goose to get the most out of feathers with the least possible cries.(Jean-Baptiste Colbert)
|
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 12 June 2014 : 04:45:23
|
That has been a few years. I will just recreate the missing file. |
Edited by - Carefree on 12 June 2014 04:49:01 |
|
|
Maxime
Average Member
France
521 Posts |
Posted - 12 June 2014 : 05:57:20
|
Carefree yes, thank you, sometimes I also forget to put a file in my zip |
Cordially, Maxime
Taxation consists in so plucking the goose to get the most out of feathers with the least possible cries.(Jean-Baptiste Colbert)
|
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 12 June 2014 : 10:47:36
|
OK - I redid the mod; there were 3 files missing, not 1. You will have to change "post.asp" again (if you already modified it). |
|
|
Maxime
Average Member
France
521 Posts |
Posted - 12 June 2014 : 11:28:40
|
Hello Carefree,
You do not have to download the changes to the mod snitzbitz Topic anti-Spam Questions. It's always the same file 2011 |
Cordially, Maxime
Taxation consists in so plucking the goose to get the most out of feathers with the least possible cries.(Jean-Baptiste Colbert)
|
Edited by - Maxime on 12 June 2014 11:29:13 |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 12 June 2014 : 12:32:36
|
It's not the same file, I replaced it. |
|
|
Maxime
Average Member
France
521 Posts |
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 12 June 2014 : 21:24:26
|
OK - I uploaded it again and it now is available (at least, to me). |
|
|
Maxime
Average Member
France
521 Posts |
Posted - 14 June 2014 : 04:00:24
|
Carefree Hello and good weekend
Would like to see these two pages if I put the code in the right place. There is one thing that not work, if I do not write answer and I clqique items on the message and post anyway. As I can not put all the code on the same page, there is a mistake here, here two messages.
post.asp
<%
'#################################################################################
'## Snitz Forums 2000 v3.4.07
'#################################################################################
'## Copyright (C) 2000-09 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"-->
<%
'#################################################################################
'## Variable declaration
'#################################################################################
dim strSelectSize
dim intCols, intRows
'#################################################################################
'## Initialise variables
'#################################################################################
if Request.QueryString("method") <> "" then
strRqMethod = chkString(Request.QueryString("method"), "SQLString")
elseif Request.Form("Method_Type") = "logout" then
'Do Nothing
else
Response.Redirect("default.asp")
end if
if Request.QueryString("TOPIC_ID") <> "" then
if IsNumeric(Request.QueryString("TOPIC_ID")) = True then
strRqTopicID = cLng(Request.QueryString("TOPIC_ID"))
else
Response.Redirect("default.asp")
end if
end if
if Request.QueryString("FORUM_ID") <> "" then
if IsNumeric(Request.QueryString("FORUM_ID")) = True then
strRqForumID = cLng(Request.QueryString("FORUM_ID"))
else
Response.Redirect("default.asp")
end if
end if
if Request.QueryString("CAT_ID") <> "" then
if IsNumeric(Request.QueryString("CAT_ID")) = True then
strRqCatID = cLng(Request.QueryString("CAT_ID"))
else
Response.Redirect("default.asp")
end if
end if
if Request.QueryString("REPLY_ID") <> "" then
if IsNumeric(Request.QueryString("REPLY_ID")) = True then
strRqReplyID = cLng(Request.QueryString("REPLY_ID"))
else
Response.Redirect("default.asp")
end if
end if
strCkPassWord = Request.Cookies(strUniqueID & "User")("Pword")
if strSelectSize = "" or IsNull(strSelectSize) then
strSelectSize = Request.Cookies(strUniqueID & "strSelectSize")
end if
if not(IsNull(strSelectSize)) and strSelectSize <> "" then
if strSetCookieToForum = 1 then
Response.Cookies(strUniqueID & "strSelectSize").Path = strCookieURL
else
Response.Cookies(strUniqueID & "strSelectSize").Path = "/"
end if
Response.Cookies(strUniqueID & "strSelectSize") = strSelectSize
Response.Cookies(strUniqueID & "strSelectSize").expires = dateAdd("yyyy", 1, strForumTimeAdjust)
end if
%>
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="inc_subscription.asp"-->
<!--#INCLUDE FILE="inc_func_secure.asp" -->
<!--#INCLUDE FILE="inc_func_member.asp" -->
<!--#INCLUDE FILE="inc_func_posting.asp"-->
<%
'#################################################################################
'## Page-code start
'#################################################################################
if request("ARCHIVE") = "true" then
strActivePrefix = strTablePrefix & "A_"
ArchiveView = "true"
else
strActivePrefix = strTablePrefix
ArchiveView = ""
end if
if strRqMethod = "Edit" or _
strRqMethod = "EditTopic" or _
strRqMethod = "Reply" or _
strRqMethod = "ReplyQuote" or _
strRqMethod = "TopicQuote" then
'## check if topic exists in TOPICS table
set rsTCheck = my_Conn.Execute ("SELECT TOPIC_ID FROM " & strActivePrefix & "TOPICS WHERE TOPIC_ID = " & strRqTopicID)
if rsTCheck.EOF or rsTCheck.BOF then
rsTCheck.Close
set rsTCheck = nothing
Go_Result "Désolé, ce sujet n'existe plus dans la base de données"
end if
set rsTCheck = nothing
end if
if ArchiveView <> "" then
if MethodType = "Reply" or _
MethodType = "ReplyQuote" or _
MethodType = "TopicQuote" then
Go_Result "Cela n'est pas autorisé dans les archives."
end if
end if
if strRqMethod = "Edit" or _
strRqMethod = "EditTopic" or _
strRqMethod = "Reply" or _
strRqMethod = "ReplyQuote" or _
strRqMethod = "Topic" or _
strRqMethod = "TopicQuote" then
if strRqMethod <> "Topic" then
'## Forum_SQL - Find out if the Category, Forum or Topic is Locked or Un-Locked and if it Exists
strSql = "SELECT C.CAT_ID, C.CAT_NAME, C.CAT_STATUS, C.CAT_SUBSCRIPTION, " &_
"F.FORUM_ID, F.F_STATUS, F.F_TYPE, F.F_SUBJECT, F.F_SUBSCRIPTION, "&_
"T.T_STATUS, T.T_SUBJECT " &_
" FROM " & strTablePrefix & "CATEGORY C, " &_
strTablePrefix & "FORUM F, " &_
strActivePrefix & "TOPICS T" &_
" WHERE C.CAT_ID = T.CAT_ID " &_
" AND F.FORUM_ID = T.FORUM_ID " &_
" AND T.TOPIC_ID = " & strRqTopicID & ""
else
'## Forum_SQL - Find out if the Category or Forum is Locked or Un-Locked and if it Exists
strSql = "SELECT C.CAT_ID, C.CAT_NAME, C.CAT_STATUS, C.CAT_SUBSCRIPTION, " &_
"F.FORUM_ID, F.F_STATUS, F.F_TYPE, F.F_SUBJECT, F.F_SUBSCRIPTION "&_
" FROM " & strTablePrefix & "CATEGORY C, " &_
strTablePrefix & "FORUM F" &_
" WHERE C.CAT_ID = F.CAT_ID " &_
" AND F.FORUM_ID = " & strRqForumID & ""
end if
set rsStatus = my_Conn.Execute(strSql)
if rsStatus.EOF or rsStatus.BOF then
rsStatus.close
set rsStatus = nothing
Go_Result "S'il vous plaît ne pas essayer de modifier l'URL<br />pour accéder aux Forums verrouillés/Catégories."
else
'## Subscribe checkbox start ##
PostCat_subscription = rsStatus("CAT_SUBSCRIPTION")
PostForum_subscription = rsStatus("F_SUBSCRIPTION")
'## Subscribe checkbox end ##
blnCStatus = rsStatus("CAT_STATUS")
blnFStatus = rsStatus("F_STATUS")
strRqForumID = rsStatus("FORUM_ID")
strRqCatID = rsStatus("CAT_ID")
Cat_Name = rsStatus("CAT_NAME")
Forum_Type = rsStatus("F_TYPE")
Forum_Subject = rsStatus("F_SUBJECT")
if strRqMethod <> "Topic" then
blnTStatus = rsStatus("T_STATUS")
Topic_Title = rsStatus("T_SUBJECT")
else
blnTStatus = 1
end if
rsStatus.close
set rsStatus = nothing
end if
if mLev = 4 then
AdminAllowed = 1
ForumChkSkipAllowed = 1
elseif mLev = 3 then
if chkForumModerator(strRqForumID, ChkString(strDBNTUserName, "decode")) = "1" then
AdminAllowed = 1
ForumChkSkipAllowed = 1
else
if lcase(strNoCookies) = "1" then
AdminAllowed = 1
ForumChkSkipAllowed = 0
else
AdminAllowed = 0
ForumChkSkipAllowed = 0
end if
end if
elseif lcase(strNoCookies) = "1" then
AdminAllowed = 1
ForumChkSkipAllowed = 0
else
AdminAllowed = 0
ForumChkSkipAllowed = 0
end if
select case strRqMethod
case "Topic"
if (Forum_Type = 1) then
Go_Result "Vous avez essayé de poster un nouveau sujet sur un forum désigné comme un lien Internet"
end if
if (blnCStatus = 0) and (AdminAllowed = 0) then
Go_Result "Vous avez essayé de poster un nouveau sujet à une catégorie Verrouillé"
end if
if (blnFStatus = 0) and (AdminAllowed = 0) then
Go_Result "Vous avez essayé de poster un nouveau sujet sur ??un forum fermé"
end if
case "EditTopic"
if ((blnCStatus = 0) or (blnFStatus = 0) or (blnTStatus = 0)) and (AdminAllowed = 0) then
Go_Result "Vous avez tenté de modifier un Sujet Fermé"
end if
case "Reply", "ReplyQuote", "TopicQuote"
if ((blnCStatus = 0) or (blnFStatus = 0) or (blnTStatus = 0)) and (AdminAllowed = 0) then
Go_Result "Vous avez tenté de répondre à un Sujet Fermé"
end if
if (blnTStatus = 2) then
Go_Result "Vous avez tenté de répondre à un sujet de modération"
end if
case "Edit"
if ((blnCStatus = 0) or (blnFStatus = 0) or (blnTStatus = 0)) and (AdminAllowed = 0) then
Go_Result "Vous avez tenté de modifier une réponse à un sujet fermé"
end if
end select
if strPrivateForums = "1" and ForumChkSkipAllowed = 0 then
if not(chkForumAccess(strRqForumID,MemberID,false)) then
Go_Result "Vous n'avez pas accès à ce forum"
end if
end if
end if
select case strSelectSize
case "1"
intCols = 45
intRows = 11
case "2"
intCols = 70
intRows = 12
case "3"
intCols = 90
intRows = 12
case "4"
intCols = 130
intRows = 15
case else
intCols = 70
intRows = 12
end select
Response.Write " <script language=""JavaScript"" type=""text/javascript"" src=""inc_code.js""></script>" & vbNewLine & _
" <script language=""JavaScript"" type=""text/javascript"" src=""selectbox.js""></script>" & vbNewLine
if strRqMethod = "EditForum" then
if (mLev = 4) or (chkForumModerator(strRqForumId, strDBNTUserName) = "1") then
'## Do Nothing
else
Go_Result "Seuls les modérateurs et administrateurs pourront éditer dans forums"
end if
end if
Msg = ""
select case strRqMethod
case "Reply", "ReplyQuote", "TopicQuote"
if (strNoCookies = 1) or (strDBNTUserName = "") then
Msg = Msg & "<b>Note:</b> Vous devez être enregistré pour poster une réponse.<br />"
if strProhibitNewMembers <> "1" then
Msg = Msg & "Pour vous enregistrez, <a href=""register.asp"">cliquez ici</a>. Enregistrement est LIBRE!<br />"
end if
end if
case "Topic"
if (strNoCookies = 1) or (strDBNTUserName = "") then
Msg = Msg & "<b>Note:</b> Vous devez être enregistré pour poster un sujet.<br />"
if strProhibitNewMembers <> "1" then
Msg = Msg & "Pour vous enregistrez , <a href=""register.asp"">cliquez ici</a>. Enregistrement est LIBRE!<br />"
end if
end if
case "Category"
Msg = Msg & "<b>Note:</b> Vous devez être un Administrateur de créer une nouvelle Catégorie.<br />"
case "Forum"
Msg = Msg & "<b>Note:</b> Vous devez être un Administrateur de créer un nouveau Forum.<br />"
case "URL"
Msg = Msg & "<b>Note:</b> Vous devez être un Administrateur de créer un nouveau Lien Web.<br />"
case "Edit", "EditTopic"
Msg = Msg & "<b>Note:</b> Seul le créateur de ce message, et le modérateur peut modifier le message."
case "EditForum"
Msg = Msg & "<b>Note:</b> Seul le Modérateur ou un Administrateur peut modifier un Forum."
case "EditURL"
Msg = Msg & "<b>Note:</b> Seul le Modérateur ou un Administrateur peut modifier un Lien Web."
case "EditCategory"
Msg = Msg & "<b>Note:</b> Seul un administrateur peut modifier une Catégorie."
case else
Response.Redirect "default.asp"
end select
if strRqMethod = "Edit" or _
strRqMethod = "ReplyQuote" then
'## Forum_SQL
strSql = "SELECT M.M_NAME, R.R_AUTHOR, R.R_SIG, R.R_MESSAGE "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS M, " & strActivePrefix & "REPLY R "
strSql = strSql & " WHERE M.MEMBER_ID = R.R_AUTHOR AND R.REPLY_ID = " & strRqReplyID
set rs = my_Conn.Execute (strSql)
strAuthor = rs("R_AUTHOR")
strReplySig = rs("R_SIG")
if strRqMethod = "Edit" then
TxtMsg = rs("R_MESSAGE")
else
if strRqMethod = "ReplyQuote" then
TxtMsg = "quote: Message original par " & chkString(rs("M_NAME"),"display") & "" & vbNewline
TxtMsg = TxtMsg & "
" & rs("R_MESSAGE") & vbNewline
TxtMsg = TxtMsg & "
"
end if
end if
set rs = nothing
end if
if strRqMethod = "EditTopic" or strRqMethod = "TopicQuote" then
'## Forum_SQL
strSql = "SELECT M.M_NAME, T.T_SUBJECT, T.T_AUTHOR, T.T_STICKY, T.T_SIG, T.T_MESSAGE "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS M, " & strActivePrefix & "TOPICS T "
strSql = strSql & " WHERE M.MEMBER_ID = T.T_AUTHOR AND T.TOPIC_ID = " & strRqTopicID
set rs = my_Conn.Execute (strSql)
TxtSub = rs("T_SUBJECT")
strAuthor = rs("T_AUTHOR")
strTopicSig = rs("T_SIG")
if strStickyTopic = "1" then
strTopicSticky = rs("T_STICKY")
end if
if strRqMethod = "EditTopic" then
TxtMsg = rs("T_MESSAGE")
else
if strRqMethod = "TopicQuote" then
TxtMsg = "quote: Message original par " & chkString(rs("M_NAME"),"display") & "" & vbNewline
TxtMsg = TxtMsg & "
" & rs("T_MESSAGE") & vbNewline
TxtMsg = TxtMsg & "
"
end if
end if
set rs = nothing
end if
if strRqMethod = "EditForum" or _
strRqMethod = "EditURL" then
'## Forum_SQL
' DEM --> Added F_SUBSCRIPTION, F_MODERATION to the end of this select
strSql = "SELECT F_SUBJECT, F_URL, F_PRIVATEFORUMS, F_PASSWORD_NEW, " & _
"F_DEFAULTDAYS, F_COUNT_M_POSTS, F_SUBSCRIPTION, F_MODERATION, F_DESCRIPTION " & _
" FROM " & strTablePrefix & "FORUM " & _
" WHERE FORUM_ID = " & strRqForumId
set rs = my_Conn.Execute (strSql)
if strRqMethod = "EditURL" then
TxtUrl = rs("F_URL")
end if
if strRqMethod = "EditForum" then
fDefaultDays = rs("F_DEFAULTDAYS")
fForumCntMPosts = rs("F_COUNT_M_POSTS")
fPasswordNew = rs("F_PASSWORD_NEW")
end if
if strRqMethod = "EditForum" or _
strRqMethod = "EditURL" then
TxtSub = rs("F_SUBJECT")
' DEM --> Added fields to get them into local variables which is a faster run
fPrivateForums = rs("F_PRIVATEFORUMS")
ForumSubscription = rs("F_SUBSCRIPTION")
ForumModeration = rs("F_MODERATION")
TxtMsg = rs("F_DESCRIPTION")
end if
set rs = nothing
end if
' DEM --> Added editforum and forum to get the cat_subscription and cat_moderation for later use.
if strRqMethod = "EditCategory" or strRqMethod = "EditForum" or strRqMethod = "EditURL" or strRqMethod = "Forum" then
'## Forum_SQL
' DEM --> Added CAT_SUBSCRIPTION for subscription services
' DEM --> Added CAT_MODERATION for moderation processing
strSql = "SELECT CAT_NAME, CAT_SUBSCRIPTION, CAT_MODERATION "
strSql = strSql & " FROM " & strTablePrefix & "CATEGORY "
strSql = strSql & " WHERE CAT_ID = " & strRqCatID
' DEM --> Added if statement to use a different connection and to move the database fields to local variables
if strRqMethod = "EditForum" or strRqMethod = "EditURL" or strRqMethod = "Forum" then
set rs1 = my_Conn.Execute (strSql)
CatSubscription = rs1("CAT_SUBSCRIPTION")
CatModeration = rs1("CAT_MODERATION")
strCatName = rs1("CAT_NAME")
set rs1 = nothing
else
set rs = my_Conn.Execute (strSql)
CatSubscription = rs("CAT_SUBSCRIPTION")
CatModeration = rs("CAT_MODERATION")
TxtSub = rs("CAT_NAME")
set rs = nothing
end if
'if strRqMethod = "EditCategory" then
' TxtSub = rs("CAT_NAME")
'end if
end if
select case strRqMethod
case "Category"
btn = "Envoyer Nouvelle Catégorie"
case "Edit", "EditCategory", "EditForum", "EditTopic", "EditURL"
btn = "Envoyer Changements"
case "Forum"
btn = "Envoyer Nouveau Forum"
case "Reply", "ReplyQuote", "TopicQuote"
btn = "Envoyer Nouvelle Réponse"
case "Topic"
btn = "Envoyer Nouveau Sujet"
case "URL"
btn = "Envoyer Nouveau URL"
case else
btn = "Envoyer"
end select
Response.Write " <table border=""0"" width=""100%"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td width=""33%"" align=""left""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" " & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " <a href=""default.asp"" tabindex=""-1"">Tous Les Forums</a><br />" & vbNewLine
if strRqMethod = "EditCategory" then
Response.Write " " & getCurrentIcon(strIconBar,"","align=""absmiddle""") & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " " & ChkString(TxtSub,"display") & "<br />" & vbNewLine
elseif strRqMethod = "EditForum" or strRqMethod = "EditURL" then
Response.Write " " & getCurrentIcon(strIconBar,"","align=""absmiddle""") & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " <a href=""default.asp?CAT_ID=" & strRqCatID & """ tabindex=""-1"">" & ChkString(strCatName,"display") & "</a><br />" & vbNewLine
Response.Write " " & getCurrentIcon(strIconBlank,"","align=""absmiddle""") & getCurrentIcon(strIconBar,"","align=""absmiddle""") & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " " & ChkString(TxtSub,"display") & "<br />" & vbNewLine
else
if strRqMethod = "Edit" or strRqMethod = "EditTopic" or _
strRqMethod = "Reply" or strRqMethod = "ReplyQuote" or _
strRqMethod = "Topic" or strRqMethod = "TopicQuote" then
Response.Write " " & getCurrentIcon(strIconBar,"","align=""absmiddle""")
if blnCStatus <> 0 then
Response.Write getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""")
else
Response.Write getCurrentIcon(strIconFolderClosed,"","align=""absmiddle""")
end if
Response.Write " <a href=""default.asp?CAT_ID=" & strRqCatId & """ tabindex=""-1"">" & ChkString(Cat_Name,"display") & "</a><br />" & vbNewLine
Response.Write " " & getCurrentIcon(strIconBlank,"","align=""absmiddle""") & getCurrentIcon(strIconBar,"","align=""absmiddle""")
if blnFStatus <> 0 and blnCStatus <> 0 then
Response.Write getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""")
else
if strRqMethod <> "Topic" then
Response.Write getCurrentIcon(strIconFolderClosed,"","align=""absmiddle""")
else
Response.Write getCurrentIcon(strIconFolderClosedTopic,"","align=""absmiddle""")
end if
end if
Response.Write " <a href=""forum.asp?FORUM_ID=" & strRqForumId & """ tabindex=""-1"">" & ChkString(Forum_Subject,"display") & "</a><br />" & vbNewLine
end if
end if
if strRqMethod = "Edit" or strRqMethod = "EditTopic" or _
strRqMethod = "Reply" or strRqMethod = "ReplyQuote" or _
strRqMethod = "TopicQuote" then
Response.Write " " & getCurrentIcon(strIconBlank,"","align=""absmiddle""") & getCurrentIcon(strIconBlank,"","align=""absmiddle""") & getCurrentIcon(strIconBar,"","align=""absmiddle""")
if blnTStatus <> 0 and blnFStatus <> 0 and blnCStatus <> 0 then
Response.Write getCurrentIcon(strIconFolderOpenTopic,"","align=""absmiddle""")
else
Response.Write getCurrentIcon(strIconFolderClosedTopic,"","align=""absmiddle""")
end if
Response.Write " <a href=""topic.asp?TOPIC_ID=" & strRqTopicID & """ tabindex=""-1"">" & ChkString(Topic_Title,"title") & "</a>" & vbNewLine
end if
Response.Write " </font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & Msg & "</font></p>" & vbNewLine & _
" <table border=""0"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpBorderColor & """>" & vbNewLine & _
" <table border=""0"" cellspacing=""1"" cellpadding=""1"">" & vbNewLine & _
" <form name=""PostTopic"" method=""post"" action=""post_info.asp"""
select case strRqMethod
case "Topic", "EditTopic", "Reply", "ReplyQuote", "TopicQuote", "Edit"
Response.Write(" onSubmit=""return validate();""")
case else
Response.Write ""
end select
'strRefer = Request.ServerVariables("HTTP_REFERER")
if strReferer = "" then strReferer = chkString(Request.Form("Refer"),"refer")
if strReferer = "" then strReferer = "default.asp"
Response.Write ">" & vbNewLine & _
" <input name=""ARCHIVE"" type=""hidden"" value=""" & ArchiveView & """>" & vbNewLine & _
" <input name=""Method_Type"" type=""hidden"" value=""" & strRqMethod & """>" & vbNewLine & _
" <input name=""REPLY_ID"" type=""hidden"" value=""" & strRqReplyID & """>" & vbNewLine & _
" <input name=""TOPIC_ID"" type=""hidden"" value=""" & strRqTopicID & """>" & vbNewLine & _
" <input name=""FORUM_ID"" type=""hidden"" value=""" & strRqForumId & """> " & vbNewLine & _
" <input name=""CAT_ID"" type=""hidden"" value=""" & strRqCatID & """>" & vbNewLine
if strRqMethod = "Edit" or strRqMethod = "EditTopic" then Response.Write(" <input name=""Author"" type=""hidden"" value=""" & strAuthor & """>" & vbNewLine)
Response.Write " <input name=""Refer"" type=""hidden"" value=""" & strReferer & """>" & vbNewLine & _
" <input name=""cookies"" type=""hidden"" value=""yes"">" & vbNewLine
if strRqMethod = "Edit" or strRqMethod = "EditTopic" or strRqMethod = "Forum" or strRqMethod = "EditForum" or _
strRqMethod = "Reply" or strRqMethod = "ReplyQuote" or _
strRqMethod = "Topic" or strRqMethod = "TopicQuote" then
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Taille Ecran:</b></font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" <select name=""SelectSize"" size=""1"" tabindex=""-1"" onchange=""resizeTextarea('" & strUniqueID & "')"">" & vbNewLine & _
" <option value=""1"""
if strSelectSize = "1" then Response.Write(" selected")
Response.Write ">640 x 480</option>" & vbNewLine & _
" <option value=""2"""
if strSelectSize = "2" or strSelectSize = "" then Response.Write(" selected")
Response.Write ">800 x 600</option>" & vbNewLine & _
" <option value=""3"""
if strSelectSize = "3" then Response.Write(" selected")
Response.Write ">1024 x 768</option>" & vbNewLine & _
" <option value=""4"""
if strSelectSize = "4" then Response.Write(" selected")
Response.Write ">1280 x 1024</option>" & vbNewLine & _
" </select>" & vbNewLine & _
" </font></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if
if mlev = 4 or _
mlev = 3 or _
mlev = 2 or _
mlev = 1 then
Response.Write " <input name=""UserName"" type=""hidden"" value=""" & strDBNTUserName & """>" & vbNewLine & _
" <input name=""Password"" type=""hidden"" value=""" & strCkPassWord & """>" & vbNewLine
else
if (lcase(strNoCookies) = "1") or _
(strDBNTUserName = "" or _
strCkPassWord = "") then
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Nom D'Utilisateur:</b></font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><input name=""UserName"" maxLength=""25"" size=""25"" type=""text"" value=""" & Request.Form("UserName") & """></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Mot De Passe:</b></font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ valign=""top""><input name=""Password"" maxLength=""25"" size=""25"" type=""password"" value=""" & Request.Form("password") & """></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if
end if
' ## Topic Anti-Spam Below
if strRqMethod = "Topic" or strRqMethod = "TopicQuote" or strRqMethod = "Reply" or strRqMethod = "ReplyQuote" then
strText=""
intText=0
strSql = "SELECT COUNT(AS_ID) AS CNT FROM " & strTablePrefix & "ANTI_SPAM"
Set rsQ=my_Conn.Execute(strSql)
If not rsQ.EOF Then
intQCount=rsQ("CNT")
rsQ.Close
Else
intQCount=1
End If
Set rsQ = Nothing
Randomize
intText=int(rnd*intQCount)+1
strSql="SELECT AS_ID, AS_Q FROM " & strTablePrefix & "ANTI_SPAM WHERE AS_ID=" & intText
set rsQ=my_Conn.Execute(strSql)
if not rsQ.EOF then
strText=rsQ("AS_Q")
rsQ.close
end if
set rsQ=Nothing
intSLen=0
For il = 1 to len(strText)
If mid(strText,il,1)=" " Then intSLen=intSLen+1
Next
If intSLen > 9 Then intSLen = 9
Randomize
intWord=int((rnd*intsLen*10+intsLen)/10)
strPix="1st2nd3rd4th5th6th7th8th9th"
strImage=strImageURL & mid(strPix,((intWord-1)*3)+1,3) & ".png"
j=1
for h=j to intWord-1
for i=j to len(strText)
j=j+1
if mid(strText,i,1) = " " then exit for
next
next
strGKA=""
for i=j to len(strText)
' English
strTextLtr="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
' German
' strTextLtr="abcdefghijklmnopqrstuvwxyzäëöüßÄËÖÜABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
' Spanish
' strTextLtr="abcdefghijklmnopqrstuvwxyzñABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
If inStr(strTextLtr,mid(strText,i,1))=0 Then
exit for
else
strGKA=strGKA+mid(strText,i,1)
end if
next
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Antispam Question:</b></font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ valign=""top"">" & strText &"<br>Quel est le <img src=""" & strImage & """ width=""30"" height=""20""> mot (ignorer la ponctuation) dans la phrase ci-dessus?</td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Réponse:</b></font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ valign=""top""><input name=""GateKeeperAnswer"" size=""25"" type=""text"">" & vbNewLine & _
" <input type=""hidden"" name=""GKA"" value="""& strGKA & """ />" & vbNewLine & _
" <input type=""hidden"" name=""intWord"" value=""" & intWord & """ />" & vbNewLine & _
" <input type=""hidden"" name=""intQ"" value=""" & intText & """ /></td>" & vbNewLine & _
" </tr>" & vbNewLine
End If
' ## Topic Anti-Spam Above
if strAllowForumCode = "1" and strShowFormatButtons = "1" then
if strRqMethod = "Edit" or strRqMethod = "EditTopic" or _
strRqMethod = "Reply" or strRqMethod = "ReplyQuote" or _
strRqMethod = "Topic" or strRqMethod = "TopicQuote" then
%>
<!--#INCLUDE FILE="inc_post_buttons.asp" -->
<%
end if
end if
if strRqMethod = "Forum" or _
strRqMethod = "URL" or _
strRqMethod = "EditURL" or _
strRqMethod = "EditForum" then
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Catégorie:</b></font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """>" & vbNewLine & _
" <select name=""Category"" size=""1"">" & vbNewLine
'## Forum_SQL
strSql = "SELECT CAT_ID, CAT_NAME "
strSql = strSql & " FROM " & strTablePrefix & "CATEGORY "
if mlev = 3 then
strSql = strSql & " WHERE CAT_ID = " & strRqCatID
end if
strSql = strSql & " ORDER BY CAT_ORDER, CAT_NAME ASC;"
set rsCat = Server.CreateObject("ADODB.Recordset")
rsCat.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
if rsCat.EOF then
recCatCount = ""
else
allCatData = rsCat.GetRows(adGetRowsRest)
recCatCount = UBound(allCatData,2)
end if
rsCat.close
set rsCat = nothing
if recCatCount <> "" then
cCAT_ID = 0
cCAT_NAME = 1
for iCat = 0 to recCatCount
CatID = allCatData(cCAT_ID,iCat)
CatName = allCatData(cCAT_NAME,iCat)
Response.Write " <option value=""" & CatID & """"
if cLng(strRqCatID) = CatID then
Response.Write " selected"
end if
Response.Write ">" & ChkString(CatName,"display") & "</option>" & vbNewline
next
end if
Response.Write " </select>" & vbNewLine & _
" <a href=""Javascript:openWindow3('pop_help.asp?mode=options#category')"" tabindex=""-1"">" & getCurrentIcon(strIconSmileQuestion,"Cliquez ici pour obtenir plus d'aide sur cette option","") & "</a></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if
if (strRqMethod = "EditTopic") then
Dim MoveTopicAllowed
if (mLev = 4) or (mLev = 3 and strMoveTopicMode = "0") or ((mLev = 3) and (strMoveTopicMode = "1") and (strAuthor = MemberID)) then
MoveTopicAllowed = "1"
else
MoveTopicAllowed = "0"
end if
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Forum:</b></font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """>" & vbNewLine
if (mlev = 3 or mlev = 4) and ArchiveView <> "true" then
Response.Write " <select name=""Forum"" size=""1"">" & vbNewLine
end if
'## Forum_SQL
strSql = "SELECT C.CAT_NAME, F.CAT_ID, F.FORUM_ID, F.F_SUBJECT, F_PRIVATEFORUMS, F_PASSWORD_NEW " &_
" FROM " & strTablePrefix & "CATEGORY C, " & strTablePrefix & "FORUM F" &_
" WHERE F.F_TYPE = 0 " & _
" AND C.CAT_ID = F.CAT_ID "
if mLev = 4 and ArchiveView = "true" then
strSql = strSql & " AND F.FORUM_ID = " & strRqForumID
else
if MoveTopicAllowed = "1" then
else
strSql = strSql & " AND F.FORUM_ID = " & strRqForumID
end if
end if
strSql = strSql & " ORDER BY C.CAT_ORDER, C.CAT_NAME, F.F_ORDER, F.F_SUBJECT ASC;"
set rsForum = Server.CreateObject("ADODB.Recordset")
rsForum.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
if rsForum.EOF then
recForumCount = ""
else
allForumData = rsForum.GetRows(adGetRowsRest)
recForumCount = UBound(allForumData,2)
end if
rsForum.close
set rsForum = nothing
if (mlev = 3 or mlev = 4) and ArchiveView <> "true" then
if recForumCount <> "" then
cCAT_NAME = 0
fCAT_ID = 1
fFORUM_ID = 2
fF_SUBJECT = 3
fF_PRIVATEFORUMS = 4
fF_PASSWORD_NEW = 5
for iForum = 0 to recForumCount
ForumCat_Name = allForumData(cCAT_NAME, iForum)
ForumCatID = allForumData(fCAT_ID, iForum)
ForumID = allForumData(fFORUM_ID, iForum)
ForumSubject = allForumData(fF_SUBJECT, iForum)
ForumPrivateForums = allForumData(fF_PRIVATEFORUMS,iForum)
ForumFPasswordNew = allForumData(fF_PASSWORD_NEW,iForum)
if ChkDisplayForum(ForumPrivateForums,ForumFPasswordNew,ForumID,MemberID) then
Response.Write " <option value=""" & ForumCatID & "|" & ForumID & """"
if cLng(strRqForumId) = ForumID then
Response.Write " selected"
end if
Response.Write ">" & ChkString(ForumSubject,"display") & "</option>" & vbNewline
end if
next
end if
else
fCAT_ID = 1
fFORUM_ID = 2
fF_SUBJECT = 3
ForumCatID = allForumData(fCAT_ID, 0)
ForumID = allForumData(fFORUM_ID, 0)
ForumSubject = allForumData(fF_SUBJECT, 0)
Response.Write " <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & ChkString(ForumSubject,"display") & "</font>" & vbNewLine & _
" <input type=""hidden"" name=""Forum"" value=""" & ForumCatID & "|" & ForumID & """>" & vbNewLine
end if
'set rsForum = nothing
if (mlev = 3 or mlev = 4) and ArchiveView <> "true" then
Response.Write " </select>" & vbNewline
end if
Response.Write " </td>" & vbNewline & _
" </tr>" & vbNewLine
end if
if strRqMethod = "Forum" or _
strRqMethod = "EditForum" then
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Jours Par Défaut:</b></font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><select name=""DefaultDays"" size=""1"">" & vbNewLine & _
" <option value=""0"""
if fDefaultDays = "0" then Response.Write(" SELECTED")
Response.Write ">Voir tous les sujets</option>" & vbNewLine & _
" <option value=""-1"""
if fDefaultDays = "-1" then Response.Write(" SELECTED")
Response.Write ">Voir tous les sujets ouverts</option>" & vbNewLine & _
" <option value=""1"""
if fDefaultDays = "1" then Response.Write(" SELECTED")
Response.Write ">Voir les sujets depuis hier</option>" & vbNewLine & _
" <option value=""2"""
if fDefaultDays = "2" then Response.Write(" SELECTED")
Response.Write ">Voir les sujets depuis 2 jours</option>" & vbNewLine & _
" <option value=""5"""
if fDefaultDays = "5" then Response.Write(" SELECTED")
Response.Write ">Voir les sujets depuis 5 jours</option>" & vbNewLine & _
" <option value=""7"""
if fDefaultDays = "7" then Response.Write(" SELECTED")
Response.Write ">Voir les sujets depuis 1 semaine</option>" & vbNewLine & _
" <option value=""14"""
if fDefaultDays = "14" then Response.Write(" SELECTED")
Response.Write ">Voir les sujets depuis 2 semaines</option>" & vbNewLine & _
" <option value=""30"""
if fDefaultDays = "30" then Response.Write(" SELECTED")
Response.Write ">Voir les sujets depuis 1 mois</option>" & vbNewLine & _
" <option value=""60"""
if fDefaultDays = "60" then Response.Write(" SELECTED")
Response.Write ">Voir les sujets depuis 2 mois</option>" & vbNewLine & _
" <option value=""120"""
if fDefaultDays = "120" then Response.Write(" SELECTED")
Response.Write ">Voir les sujets depuis 4 mois</option>" & vbNewLine & _
" <option value=""365"""
if fDefaultDays = "365" then Response.Write(" SELECTED")
Response.Write ">Voir les sujets depuis 1 an</option>" & vbNewLine & _
" </select>" & vbNewLine & _
" <a href=""Javascript:openWindow3('pop_help.asp?mode=options#defaultdays')"" tabindex=""-1"">" & getCurrentIcon(strIconSmileQuestion,"Cliquez ici pour obtenir plus d'aide sur cette option","") & "</a></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if
if strRqMethod = "Forum" or _
strRqMethod = "EditForum" then
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Inscrémenter Compteur Message:</b></font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><select name=""ForumCntMPosts"" size=""1"">" & vbNewLine & _
" <option value=""0"""
if fForumCntMPosts = "0" then Response.Write(" selected")
Response.Write ">Non</option>" & vbNewLine & _
" <option value=""1"""
if fForumCntMPosts = "1" or fForumCntMPosts = "" then Response.Write(" selected")
Response.Write ">Oui</option>" & vbNewLine & _
" </select>" & vbNewLine & _
" <a href=""Javascript:openWindow3('pop_help.asp?mode=options#forumcntmposts')"" tabindex=""-1"">" & getCurrentIcon(strIconSmileQuestion,"Cliquez ici pour obtenir plus d'aide sur cette option","") & "</a></td>" & vbNewLine & _
" </tr>" & vbNewLine
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
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Objet:</b></font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><input maxLength=""50"" name=""Subject"" value=""" & Trim(ChkString(TxtSub,"edit")) & """ size=""40""></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <script language=""JavaScript"" type=""text/javascript"">document.PostTopic.Subject.focus();</script>" & vbNewLine
end if
if strRqMethod = "URL" or _
strRqMethod = "EditURL" then
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Adresse:</b></font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><input maxLength=""150"" name=""Address"" value="""
if (TxtURL <> "") then Response.Write(TxtURL) else Response.Write("http://")
Response.Write """ size=""40""><a href=""Javascript:openWindow3('pop_help.asp?mode=options#address')"">" & getCurrentIcon(strIconSmileQuestion,"Cliquez ici pour obtenir plus d'aide sur cette option","") & "</a></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if
if strRqMethod = "Edit" or strRqMethod = "URL" or strRqMethod = "EditURL" or _
strRqMethod = "Forum" or strRqMethod = "EditForum" or _
strRqMethod = "Reply" or strRqMethod = "ReplyQuote" or _
strRqMethod = "EditTopic" or strRqMethod = "Topic" or strRqMethod = "TopicQuote" then
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Message:</b><br />" & vbNewLine & _
" <br />" & vbNewLine & _
" <table border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine
if strAllowHTML = "1" then
Response.Write " * HTML OUVERT<br />" & vbNewLine
else
Response.Write " * HTML FERMER<br />" & vbNewLine
end if
if strAllowForumCode = "1" then
Response.Write " * <a href=""JavaScript:openWindow6('pop_forum_code.asp')"" tabindex=""-1"">Forum Code</a> OUVERT<br />" & vbNewLine
else
Response.Write " * Forum Code FERMER<br />" & vbNewLine
end if
if strIcons = "1" and strShowSmiliesTable = "1" then
if strRqMethod = "Edit" or strRqMethod = "EditTopic" or _
strRqMethod = "Reply" or strRqMethod = "ReplyQuote" or _
strRqMethod = "Topic" or strRqMethod = "TopicQuote" then
%>
<!--#INCLUDE FILE="inc_smilies.asp" -->
<%
end if
end if
Response.Write " </font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><textarea cols=""" & intCols & """ name=""Message"" rows=""" & intRows & """ wrap=""VIRTUAL"" onselect=""storeCaret(this);"" onclick=""storeCaret(this);"" onkeyup=""storeCaret(this);"" onchange=""storeCaret(this);"">" & Trim(CleanCode(TxtMsg)) & "</textarea><br /></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if
select case strRqMethod
case "Reply", "ReplyQuote", "TopicQuote"
Response.Write " <script language=""JavaScript"" type=""text/javascript"">document.PostTopic.Message.focus();</script>" & vbNewLine
end select
'#################################################################################
'## Forum Moderators - listbox Code
'#################################################################################
if (strRqMethod = "Forum" or _
strRqMethod = "URL" or _
strRqMethod = "EditURL" or _
strRqMethod = "EditForum") and (mLev > 3 or lcase(strNoCookies) = "1") then
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Modérateurs:</b></font></td>" & vbNewLine
strSql = "SELECT MEMBER_ID, M_NAME "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE M_LEVEL > 1 "
strSql = strSql & " AND M_STATUS = " & 1
strSql = strSql & " ORDER BY M_NAME ASC "
set rsModerators = Server.CreateObject("ADODB.Recordset")
rsModerators.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
if rsModerators.EOF then
recModeratorsCount = ""
else
allModeratorsData = rsModerators.GetRows(adGetRowsRest)
recModeratorsCount = UBound(allModeratorsData,2)
meMEMBER_ID = 0
meM_NAME = 1
end if
rsModerators.close
set rsModerators = nothing
tmpStrUserList = ""
if strRqMethod = "EditForum" or strRqMethod = "EditURL" then
strSql = "SELECT MO.MEMBER_ID, M.M_NAME "
strSql = strSql & " FROM " & strTablePrefix & "MODERATOR MO, " & strMemberTablePrefix & "MEMBERS M"
strSql = strSql & " WHERE MO.FORUM_ID = " & strRqForumID & " AND M.MEMBER_ID = MO.MEMBER_ID"
set rsForumModerator = Server.CreateObject("ADODB.Recordset")
rsForumModerator.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
if rsForumModerator.EOF then
recForumModeratorCount = ""
else
allForumModeratorData = rsForumModerator.GetRows(adGetRowsRest)
recForumModeratorCount = UBound(allForumModeratorData,2)
moMEMBER_ID = 0
moM_NAME = 1
end if
rsForumModerator.close
set rsForumModerator = nothing
if recForumModeratorCount <> "" then
for iForumModerator = 0 to recForumModeratorCount
ForumModeratorMemberID = allForumModeratorData(moMEMBER_ID, iForumModerator)
if tmpStrUserList = "" then
tmpStrUserList = ForumModeratorMemberID
else
tmpStrUserList = tmpStrUserList & "," & ForumModeratorMemberID
end if
next
end if
end if
SelectSize = 6
Response.Write " <td bgColor=""" & strPopUpTableColor & """>" & vbNewLine & _
" <table>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Disponible</b></font><br />" & vbNewLine & _
" <select name=""ForumModCombo"" size=""" & SelectSize & """ multiple onDblClick=""moveSelectedOptions(document.PostTopic.ForumModCombo, document.PostTopic.ForumMod, true, '')"">" & vbNewLine
'## Pick from list
if recModeratorsCount <> "" then
for iModerators = 0 to recModeratorsCount
MembersMemberID = allModeratorsData(meMEMBER_ID, iModerators)
MembersMemberName = allModeratorsData(meM_NAME, iModerators)
if not(Instr("," & tmpStrUserList & "," , "," & MembersMemberID & ",") > 0) then
Response.Write " <option value=""" & MembersMemberID & """>" & ChkString(MembersMemberName,"display") & "</option>" & vbNewline
end if
next
end if
Response.Write " </select>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td width=""15"" align=""center"" valign=""middle""><br />" & vbNewLine & _
" <a href=""javascript:moveAllOptions(document.PostTopic.ForumMod, document.PostTopic.ForumModCombo, true, '')"" tabindex=""-1"">" & getCurrentIcon(strIconPrivateRemAll,"","") & "</a>" & vbNewLine & _
" <a href=""javascript:moveSelectedOptions(document.PostTopic.ForumMod, document.PostTopic.ForumModCombo, true, '')"" tabindex=""-1"">" & getCurrentIcon(strIconPrivateRemove,"","") & "</a>" & vbNewLine & _
" <a href=""javascript:moveSelectedOptions(document.PostTopic.ForumModCombo, document.PostTopic.ForumMod, true, '')"" tabindex=""-1"">" & getCurrentIcon(strIconPrivateAdd,"","") & "</a>" & vbNewLine & _
" <a href=""javascript:moveAllOptions(document.PostTopic.ForumModCombo, document.PostTopic.ForumMod, true, '')"" tabindex=""-1"">" & getCurrentIcon(strIconPrivateAddAll,"","") & "</a>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Choisis</b></font><br />" & vbNewLine & _
" <select name=""ForumMod"" size=""" & SelectSize & """ tabindex=""-1"" multiple onDblClick=""moveSelectedOptions(document.PostTopic.ForumMod, document.PostTopic.ForumModCombo, true, '')"">" & vbNewLine
'## Selected List
if strRqMethod = "EditForum" or strRqMethod = "EditURL" then
if recForumModeratorCount <> "" then
for iForumModerator = 0 to recForumModeratorCount
ForumModeratorMemberID = allForumModeratorData(moMEMBER_ID, iForumModerator)
ForumModeratorMemberName = chkString(allForumModeratorData(moM_NAME, iForumModerator), "display")
if ForumModeratorMemberID <> "" then
Response.Write " <option value=""" & ForumModeratorMemberID & """>" & ForumModeratorMemberName & "</option>" & vbNewline
end if
next
end if
end if
Response.Write " </select>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td valign=""top""> <a href=""Javascript:openWindow3('pop_help.asp?mode=options#moderators')"" tabindex=""-1"">" & getCurrentIcon(strIconSmileQuestion,"Cliquez ici pour obtenir plus d'aide sur cette option","") & "</a></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine
end if
'#################################################################################
'## Forum Moderators - End of listbox code
'#################################################################################
' DEM --> Start of Code added for full moderation and subscription services
if strRqMethod = "Forum" or strRqMethod = "EditForum" or _
strRqMethod = "Category" or strRqMethod = "EditCategory" then
if strSubscription > 0 and strEmail = "1" and _
((strRqMethod = "Category" or strRqMethod = "EditCategory") or _
((strRqMethod = "Forum" or strRqMethod = "EditForum") and (CatSubscription > 0))) then
' Subscription service first.....
Response.Write " <tr>" & vbNewline
Response.Write " <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Abonnements:</b></font></td>" & vbNewLine
Response.Write " <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine
Response.Write " <select name=""Subscription"">" & vbNewLine
if strRqMethod = "Category" or strRqMethod = "EditCategory" then
Response.Write " <option"
if CatSubscription = 0 then
Response.Write " selected "
end if
Response.Write " value=""0"">Aucuns Abonnements Admis</option>" & vbNewLine
' If Whole Board or Category Level Subscriptions Allowed, show option
if strSubscription < 3 then
Response.Write " <option"
if CatSubscription = 1 then
Response.Write " selected "
end if
Response.Write " value=""1"">Abonnements Catégories</option>" & vbNewLine
end if
' If Whole Board, Category Level or Forum Level Subscriptions Allowed, show option
if strSubscription < 4 then
Response.Write " <option"
if CatSubscription = 2 then
Response.Write " selected "
end if
Response.Write " value=""2"">Abonnements Permis Forums</option>" & vbNewLine
end if
Response.Write " <option"
if CatSubscription = 3 then
Response.Write " selected "
end if
Response.Write " value=""3"">Abonnements Sujets Autorisés</option>" & vbNewLine
else
Response.Write " <option"
if ForumSubscription = 0 then
Response.Write " selected "
end if
Response.Write " value=""0"">Aucuns Abonnements Admis</option>" & vbNewLine
' If Whole Board, Category Level or Forum Level Subscriptions Allowed, show option
if strSubscription < 4 and CatSubscription < 3 then
Response.Write " <option"
if ForumSubscription = 1 then
Response.Write " selected "
end if
Response.Write " value=""1"">Abonnements Permis Forums</option>" & vbNewLine
end if
Response.Write " <option"
if ForumSubscription = 2 then
Response.Write " selected "
end if
Response.Write " value=""2"">Abonnements Sujets Autorisés</option>" & vbNewLine
end if
Response.Write " </select>" & vbNewline
Response.Write " <a href=""Javascript:openWindow3('pop_help.asp?mode=options#subscription')"" tabindex=""-1"">" & getCurrentIcon(strIconSmileQuestion,"Cliquez ici pour obtenir plus d'aide sur cette option","") & "</a></font></td>" & vbNewline
Response.Write " </tr>" & vbNewLine
end if
' Topic Moderation Code - Check if Moderation is allowed over the entire board, then
' check if Moderation is allowed for the next level up.
if strModeration > 0 and _
((strRqMethod = "Category" or strRqMethod = "EditCategory") or _
((strRqMethod = "Forum" or strRqMethod = "EditForum") and CatModeration > 0)) then
Response.Write " <tr>" & vbNewline
Response.Write " <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Moderation:</b></font></td>" & vbNewLine
Response.Write " <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine
Response.Write " <select name=""Moderation"">" & vbNewLine
if strRqMethod = "Category" or strRqMethod = "EditCategory" then
Response.Write " <option"
if CatModeration = 0 then
Response.Write " selected "
end if
Response.Write " value=""0"">Modération pas permis dans cette catégorie</option>" & vbNewLine
Response.Write " <option"
if CatModeration = 1 then
Response.Write " selected "
end if
Response.Write " value=""1"">Modération admise dans cette catégorie</option>" & vbNewLine
else
Response.Write " <option"
if ForumModeration = 0 then
Response.Write " selected "
end if
Response.Write " value=""0"">Pas de modération dans ce forum</option>" & vbNewLine
Response.Write " <option"
if ForumModeration = 1 then
Response.Write " selected "
end if
Response.Write " value=""1"">Tous les messages en modération</option>" & vbNewLine
Response.Write " <option"
if ForumModeration = 2 then
Response.Write " selected "
end if
Response.Write " value=""2"">Messages d'origine seulement en modération</option>" & vbNewLine
Response.Write " <option"
if ForumModeration = 3 then
Response.Write " selected "
end if
Response.Write " value=""3"">Réponses Seulement en modération</option>" & vbNewLine
end if
Response.Write " </select>" & vbNewline
Response.Write " <a href=""Javascript:openWindow3('pop_help.asp?mode=options#moderation')"" tabindex=""-1"">" & getCurrentIcon(strIconSmileQuestion,"Click here to get more help on this option","") & "</a> </font></td>" & vbNewline
Response.Write " </tr>" & vbNewline
end if
end if
' DEM --> End of Code Added for Moderation and Subscription
if strRqMethod = "Edit" or _
strRqMethod = "URL" or strRqMethod = "EditURL" or _
strRqMethod = "Reply" or strRqMethod = "ReplyQuote" or _
strRqMethod = "EditTopic" or strRqMethod = "Topic" or strRqMethod = "TopicQuote" then
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """> </td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """>" & vbNewLine
if strRqMethod = "Edit" or strRqMethod = "Reply" or strRqMethod = "ReplyQuote" or _
strRqMethod = "Topic" or strRqMethod = "EditTopic" or strRqMethod = "TopicQuote" then
if (strRqMethod = "Reply" or strRqMethod = "ReplyQuote" or _
strRqMethod = "Topic" or strRqMethod = "TopicQuote") and strSignatures = "1" and strDSignatures <> "1" then
Response.Write " <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine
intSigDefault = getSigDefault(MemberID)
Response.Write " <input name=""Sig"" id=""Sig"" type=""checkbox"" value=""yes""" & chkCheckbox(intSigDefault,1,true) & "><label for=""Sig"">Cochez ici pour insérer votre signature de profil.</label><br /></font>" & vbNewLine
end if
if strSignatures = "1" and strDSignatures = "1" then
Response.Write " <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>"
if strRqMethod = "Edit" then
Response.Write "<input name=""Sig"" id=""Sig"" type=""checkbox"" value=""yes""" & chkCheckbox(strReplySig,1,true) & "><label for=""Sig"">Cochez ici pour insérer votre signature de profil.</label><br /></font>" & vbNewLine
elseif strRqMethod = "EditTopic" then
Response.Write "<input name=""Sig"" id=""Sig"" type=""checkbox"" value=""yes""" & chkCheckbox(strTopicSig,1,true) & "><label for=""Sig"">Cochez ici pour insérer votre signature de profil.</label><br /></font>" & vbNewLine
else
intSigDefault = getSigDefault(MemberID)
Response.Write "<input name=""Sig"" id=""Sig"" type=""checkbox"" value=""yes""" & chkCheckbox(intSigDefault,1,true) & "><label for=""Sig"">Cochez ici pour insérer votre signature de profil.</label><br /></font>" & vbNewLine
end if
end if
'## Subscribe checkbox start ##
if strSubscription > 0 and postCat_Subscription > 0 and postForum_Subscription > 0 and strEmail = 1 then
' -- Check for a topic subscription held by the user
Dim strSubString, strSubArray, strBoardSubs, strCatSubs, strForumSubs, strTopicSubs
if MySubCount > 0 then
strSubString = PullSubscriptions(0, 0, 0)
strSubArray = Split(strSubString,";")
if uBound(strSubArray) < 0 then
strBoardSubs = ""
strCatSubs = ""
strForumSubs = ""
strTopicSubs = ""
else
strBoardSubs = strSubArray(0)
strCatSubs = strSubArray(1)
strForumSubs = strSubArray(2)
strTopicSubs = strSubArray(3)
end If
end if
SubLinkFontStart = " <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>"
SubLinkFontEnd = "<br /></font>" & vbNewLine
if InArray(strTopicSubs, strRqTopicID) and strRqMethod <> "Topic" then
Response.Write SubLinkFontStart & ShowSubLink ("U", strRqCatID, strRqForumID, strRqTopicID, "Y") & SubLinkFontEnd
elseif strBoardSubs <> "Y" and not(InArray(strForumSubs,strRqForumID) or InArray(strCatSubs,strRqCatID)) then
Response.Write SubLinkFontStart & ShowSubLink ("S", strRqCatID, strRqForumID, strRqTopicID, "Y") & SubLinkFontEnd
end if
end if
'# Subscribe checkbox end ##
if ((mLev = 4) or (chkForumModerator(strRqForumId, strDBNTUserName) = "1")) _
and (strRqMethod = "Topic" or strRqMethod = "EditTopic" or strRqMethod = "Reply" or _
strRqMethod = "ReplyQuote" or strRqMethod = "TopicQuote") then
if strStickyTopic = "1" then
if strRqMethod = "Topic" then
Response.Write " <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><input name=""sticky"" id=""sticky"" type=""checkbox"" value=""1""><label for=""sticky"">Cochez ici pour faire de ce sujet un Post-it.</label><br /></font>" & vbNewLine
elseif strRqMethod = "EditTopic" then
Response.Write " <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><input name=""sticky"" id=""sticky"" type=""checkbox"" value=""1""" & chkCheckbox(strTopicSticky,1,true) & "><label for=""sticky"">Cochez ici pour faire de ce sujet un Post-it.</label><br /></font>" & vbNewLine
end if
end if
if blnTStatus = 1 then
if strRqMethod <> "EditTopic" then
Response.Write " <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><input name=""lock"" id=""lock"" type=""checkbox"" value=""1""><label for=""lock"">Cochez ici pour verrouiller le sujet après ce message.</label><br /></font>" & vbNewLine
end if
end if
end if
if (strDBNTUserName = "" and strSignatures <> "1") or (strRqMethod = "EditTopic" and strDSignatures <> "1") then
Response.Write " " & vbNewLine
end if
end if
Response.Write " </td>" & vbNewline
Response.Write " </tr>" & vbNewline
end if
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 = fPrivateForums
else
ForumAuthType = 0
end if
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Autorisation Type:</b></font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """>" & vbNewLine & _
" <select readonly name=""AuthType"">" & vbNewLine & _
" <option value=""0"""
if ForumAuthType = 0 then Response.Write(" selected")
Response.Write ">Tous Visiteurs</option>" & vbNewLine
if strRqMethod = "Forum" or strRqMethod = "EditForum" then
Response.Write " <option value=""4"""
if ForumAuthType = 4 then Response.Write(" selected")
Response.Write ">Membres Seulement</option>" & vbNewLine
end if
Response.Write " <option value=""5"""
if ForumAuthType = 5 then Response.Write(" selected")
Response.Write ">Membres seulement (Caché)</option>" & vbNewLine
if strRqMethod = "Forum" or _
strRqMethod = "EditForum" then
Response.Write " <option value=""2"""
if ForumAuthType = 2 then Response.Write(" selected")
Response.Write ">Protection Par Mot De Passe</option>" & vbNewLine & _
" <option value=""7"""
if ForumAuthType = 7 then Response.Write(" selected")
Response.Write ">Membres Seulement & Protection Par Mot De Passe</option>" & vbNewLine & _
" <option value=""3"""
if ForumAuthType = 3 then Response.Write(" selected")
Response.Write ">La liste Des Membres Admis & Protection Par Mot De Passe</option>" & vbNewLine & _
" <option value=""1"""
if ForumAuthType = 1 then Response.Write(" selected")
Response.Write ">La liste Des Membres Admis</option>" & vbNewLine
end if
Response.Write " <option value=""6"""
if ForumAuthType = 6 then Response.Write(" selected")
Response.Write ">La liste Des Membres Admis (Caché)</option>" & vbNewLine
if strNTGroups = "1" then
Response.Write " <option value=""9"""
if ForumAuthType = 9 then Response.Write(" selected")
Response.Write ">NT Global Groupe</option>" & vbNewLine & _
" <option value=""8"""
if ForumAuthType = 8 then Response.Write(" selected")
Response.Write ">NT Global Groupe (Caché)</option>" & vbNewLine
end if
Response.Write " </select> <a href=""Javascript:openWindow3('pop_help.asp?mode=options#authtype')"" tabindex=""-1"">" & getCurrentIcon(strIconSmileQuestion,"Cliquez ici pour obtenir plus d'aide sur cette option","") & "</a>" & vbNewLine
if strRqMethod = "Forum" or _
strRqMethod = "EditForum" then
if strRqMethod = "EditForum" then
If fPasswordNew <> " " Then
strPassword = fPasswordNew
else
strPassword = " "
end if
else
strPassword = " "
end if
Response.Write " <br /><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Mot De Passe"
if strNTGroups = "1" then Response.Write(" ou des groupes globaux")
Response.Write ":</b><br /></font>" & vbNewLine & _
" <input maxLength=""255"" type=""text"" name=""AuthPassword"" size=""50"" value=""" & strPassword & """>"
end if
Response.Write "</td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>La Liste Des Membres Admis:</b></font></td>" & vbNewLine
'#################################################################################
'## Allowed User - listbox Code
'#################################################################################
strSql = "SELECT MEMBER_ID, M_NAME "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE M_STATUS = " & 1
strSql = strSql & " ORDER BY M_NAME ASC "
set rsMember = Server.CreateObject("ADODB.Recordset")
rsMember.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
if rsMember.EOF then
recMemberCount = ""
else
allMemberData = rsMember.GetRows(adGetRowsRest)
recMemberCount = UBound(allMemberData,2)
meMEMBER_ID = 0
meM_NAME = 1
end if
rsMember.close
set rsMember = nothing
tmpStrUserList = ""
if strRqMethod = "EditForum" or strRqMethod = "EditURL" then
strSql = "SELECT AM.MEMBER_ID, M.M_NAME"
strSql = strSql & " FROM " & strTablePrefix & "ALLOWED_MEMBERS AM, " & strMemberTablePrefix & "MEMBERS M"
strSql = strSql & " WHERE AM.FORUM_ID = " & strRqForumID & " AND M.MEMBER_ID = AM.MEMBER_ID"
set rsAllowedMember = Server.CreateObject("ADODB.Recordset")
rsAllowedMember.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
if rsAllowedMember.EOF then
recAllowedMemberCount = ""
else
allAllowedMemberData = rsAllowedMember.GetRows(adGetRowsRest)
recAllowedMemberCount = UBound(allAllowedMemberData,2)
amMEMBER_ID = 0
amM_NAME = 1
end if
rsAllowedMember.close
set rsAllowedMember = nothing
if recAllowedMemberCount <> "" then
for iAllowedMember = 0 to recAllowedMemberCount
AllowedMembersMemberID = allAllowedMemberData(amMEMBER_ID, iAllowedMember)
if tmpStrUserList = "" then
tmpStrUserList = AllowedMembersMemberID
else
tmpStrUserList = tmpStrUserList & "," & AllowedMembersMemberID
end if
next
end if
end if
SelectSize = 6
Response.Write " <td bgColor=""" & strPopUpTableColor & """>" & vbNewLine & _
" <table>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Disponible</b></font><br />" & vbNewLine & _
" <select name=""AuthUsersCombo"" size=""" & SelectSize & """ multiple onDblClick=""moveSelectedOptions(document.PostTopic.AuthUsersCombo, document.PostTopic.AuthUsers, false, '')"">" & vbNewLine
'## Pick from list
if recMemberCount <> "" then
for iMembers = 0 to recMemberCount
MembersMemberID = allMemberData(meMEMBER_ID, iMembers)
MembersMemberName = allMemberData(meM_NAME, iMembers)
if not(Instr("," & tmpStrUserList & "," , "," & MembersMemberID & ",") > 0) then
Response.Write " <option value=""" & MembersMemberID & """>" & ChkString(MembersMemberName,"display") & "</option>" & vbNewline
end if
next
end if
Response.Write " </select>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td width=""15"" align=""center"" valign=""middle""><br />" & vbNewLine & _
" <a href=""javascript:moveAllOptions(document.PostTopic.AuthUsers, document.PostTopic.AuthUsersCombo, false, '')"" tabindex=""-1"">" & getCurrentIcon(strIconPrivateRemAll,"","") & "</a>" & vbNewLine & _
" <a href=""javascript:moveSelectedOptions(document.PostTopic.AuthUsers, document.PostTopic.AuthUsersCombo, false, '')"" tabindex=""-1"">" & getCurrentIcon(strIconPrivateRemove,"","") & "</a>" & vbNewLine & _
" <a href=""javascript:moveSelectedOptions(document.PostTopic.AuthUsersCombo, document.PostTopic.AuthUsers, false, '')"" tabindex=""-1"">" & getCurrentIcon(strIconPrivateAdd,"","") & "</a>" & vbNewLine & _
" <a href=""javascript:moveAllOptions(document.PostTopic.AuthUsersCombo, document.PostTopic.AuthUsers, false, '')"" tabindex=""-1"">" & getCurrentIcon(strIconPrivateAddAll,"","") & "</a>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Choisis</b></font><br />" & vbNewLine & _
" <select name=""AuthUsers"" size=""" & SelectSize & """ tabindex=""-1"" multiple onDblClick=""moveSelectedOptions(document.PostTopic.AuthUsers, document.PostTopic.AuthUsersCombo, false, '')"">" & vbNewLine
'## Selected List
if strRqMethod = "EditForum" or strRqMethod = "EditURL" then
if recAllowedMemberCount <> "" then
for iAllowedMember = 0 to recAllowedMemberCount
AllowedMembersMemberID = allAllowedMemberData(amMEMBER_ID, iAllowedMember)
AllowedMembersMemberName = chkString(allAllowedMemberData(amM_NAME, iAllowedMember), "display")
if AllowedMembersMemberID <> "" then
Response.Write " <option value=""" & AllowedMembersMemberID & """>" & AllowedMembersMemberName & "</option>" & vbNewline
end if
next
end if
end if
Response.Write " </select>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td valign=""top""> <a href=""Javascript:openWindow3('pop_help.asp?mode=options#memberlist')"" tabindex=""-1"">" & getCurrentIcon(strIconSmileQuestion,"Cliquez ici pour obtenir plus d'aide sur cette option","") & "</a></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine
'#################################################################################
'## Allowed User - End of listbox code
'#################################################################################
end if
end if
Response.Write " <tr>" & vbNewline & _
" <td bgColor=""" & strPopUpTableColor & """> </td>" & vbNewline & _
" <td bgColor=""" & strPopUpTableColor & """><input name=""Submit"" type=""submit"" value=""" & btn & """"
if strRqMethod = "Forum" or _
strRqMethod = "URL" or _
strRqMethod = "EditURL" or _
strRqMethod = "EditForum" then
if strPrivateForums <> "0" then
if mLev = 3 then
Response.Write " onclick=""selectAllOptions(document.PostTopic.AuthUsers);"""
else
Response.Write " onclick=""selectAllOptions(document.PostTopic.AuthUsers);selectAllOptions(document.PostTopic.ForumMod);"""
end if
else
if mLev > 3 then Response.Write " onclick=""selectAllOptions(document.PostTopic.ForumMod);"""
end if
end if
Response.Write ">"
if strAllowForumCode = "1" or strAllowHTML = "1" then
if strRqMethod = "Reply" or _
strRqMethod = "ReplyQuote" or _
strRqMethod = "Edit" or _
strRqMethod = "EditTopic" or _
strRqMethod = "Topic" or _
strRqMethod = "TopicQuote" then
Response.Write " <input name=""Preview"" type=""button"" value="" Aperçu Message "" onclick=""OpenPreview()"">"
end if
end if
'Response.Write " <input name=""Reset"" type=""reset"" value=""Réinitialiser Les Champs"" tabindex=""-1""></td>" & vbNewline & _
Response.Write "</td>" & vbNewline & _
" </tr>" & vbNewline & _
" </form>" & vbNewLine & _
" </table>" & vbNewline & _
" </td>" & vbNewline & _
" </tr>" & vbNewline & _
" </table>" & vbNewline & _
" <br />" & vbNewline
if strRqMethod = "Reply" or _
strRqMethod = "TopicQuote" or _
strRqMethod = "ReplyQuote" then
Response.Write " </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine & _
"<table align=""center"" border=""0"" cellPadding=""0"" cellSpacing=""0"" width=""95%"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td>" & vbNewLine & _
" <table border=""0"" width=""100%"" 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 bgcolor=""" & strHeadCellColor & """ colspan=""2"" align=""center""><b><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strHeadFontColor & """>S U J E T O R I G I N A L</font></b></td>" & vbNewLine & _
" </tr>" & vbNewLine
if (mLev = 4) or (chkForumModerator(strRqForumId, strDBNTUserName) = "1") then
Moderation = "N"
else
' DEM --> Added Select of Moderation Fields
strSQL = "SELECT C.CAT_MODERATION, F.F_MODERATION "
strSQL = strSQL & "FROM " & strTablePrefix & "CATEGORY C, " & strTablePrefix & "FORUM F "
strSQL = strSQL & " WHERE C.CAT_ID = " & strRqCatID
strSQL = strSQL & " AND F.FORUM_ID = " & strRqForumID
set rsa = my_Conn.Execute (strSql)
' ## Moderators and Admins can see unmoderated posts.
if strModeration = 1 and rsa("CAT_MODERATION") = 1 and (rsa("F_MODERATION") = 1 or rsa("F_MODERATION") = 3) then
Moderation = "Y"
else
Moderation = "N"
end if
set rsa = nothing
end if
' DEM --> End of Moderation Code
'## Forum_SQL
strSql = "SELECT M.M_NAME, T.T_DATE, T.T_MESSAGE "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS M, " & strActivePrefix & "TOPICS T "
strSql = strSql & " WHERE M.MEMBER_ID = T.T_AUTHOR AND T.TOPIC_ID = " & strRqTopicID
set rs = my_Conn.Execute (strSql)
Response.Write " <tr>" & vbNewline
Response.Write " <td bgcolor=""" & strForumFirstCellColor & """ valign=""top"" width=""" & strTopicWidthLeft & """"
if lcase(strTopicNoWrapLeft) = "1" then
Response.Write " nowrap"
end if
Response.Write "><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>" & ChkString(rs("M_NAME"),"display") & "</b></font></td>" & vbNewline
Response.Write " <td bgcolor=""" & strForumFirstCellColor & """ valign=""top"" width=""" & strTopicWidthRight & """"
if lcase(strTopicNoWrapRight) = "1" then
Response.Write " nowrap"
end if
Response.Write "><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><small>Mis Le - " & ChkDate(rs("T_DATE"), " :" ,true) & "</small><hr size=""" & strFooterFontSize & """><span class=""spnMessageText"">" & formatStr(rs("T_MESSAGE")) & "</span></font></td>" & vbNewline
Response.Write " </tr>" & vbNewline
rs.close
set rs = nothing
'## Forum_SQL - Get all replies to Topic from the DB
strSql ="SELECT M.M_NAME, R.R_DATE, R.R_MESSAGE "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS M, " & strActivePrefix & "REPLY R "
strSql = strSql & " WHERE M.MEMBER_ID = R.R_AUTHOR AND R.TOPIC_ID = " & strRqTopicID
' DEM --> Added check for moderation so that only admins and moderators can see the unapproved posts.
if Moderation = "Y" then
strSql = strSql & " AND R.R_STATUS < 2 " ' Ignore unapproved and rejected posts...
else
strSql = strSql & " AND R.R_STATUS < 3 " ' Ignore all rejected posts....
end if
strSql = strSql & " ORDER BY R.R_DATE DESC;"
set rs = Server.CreateObject("ADODB.Recordset")
rs.open TopSQL(strSql,strPageSize), my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
if rs.EOF then
recReplyCount = ""
else
allReplyData = rs.GetRows(adGetRowsRest)
recReplyCount = UBound(allReplyData,2)
end if
rs.close
set rs = nothing
strI = 0
if recReplyCount = "" then
Response.Write ""
else
Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""" & strHeadCellColor & """ colspan=""2"" align=""center""><b><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strHeadFontColor & """>" & recReplyCount+1 & " D E R N I E R E S R E P O N S E S S (Les récentes en premier)</font></b></td>" & vbNewLine & _
" </tr>" & vbNewLine
mM_NAME = 0
rR_DATE = 1
rR_MESSAGE = 2
for iReply = 0 to recReplyCount
ReplyMemberName = allReplyData(mM_NAME, iReply)
ReplyDate = allReplyData(rR_DATE, iReply)
ReplyMessage = allReplyData(rR_MESSAGE, iReply)
if strI = 0 then
CColor = strAltForumCellColor
else
CColor = strForumCellColor
end if
Response.Write " <tr>" & vbNewline & _
" <td bgcolor=""" & CColor & """ valign=""top""" & vbNewline
if lcase(strTopicNoWrapLeft) = "1" then
Response.Write " nowrap"
end if
Response.Write "><b><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & ChkString(ReplyMemberName,"display") & "</font></b></td>" & vbNewline & _
" <td bgcolor=""" & CColor & """ valign=""top"""
if lcase(strTopicNoWrapRight) = "1" then
Response.Write " nowrap"
end if
Response.Write "><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><small>Mis le - " & ChkDate(ReplyDate, " :" ,true) & "</small><hr size=""" & strFooterFontSize & """><span class=""spnMessageText"">" & formatStr(ReplyMessage) & "</span></font></td>" & vbNewline & _
" </tr>" & vbNewline
strI = strI + 1
if strI = 2 then
strI = 0
end if
next
end if
Response.Write " </table>" & vbNewline & _
" </td>" & vbNewline & _
" </tr>" & vbNewline & _
" </table>" & vbNewline & _
" <br />" & vbNewline
end if
WriteFooter
function Go_Result(message)
Response.write " <br /><div align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiliteFontColor & """>" & message & "</font></div>" &_
" <br />" &_
" <meta http-equiv=""Refresh"" content=""2; URL=default.asp"">"
WriteFooter
Response.end
end function
%>
|
Cordially, Maxime
Taxation consists in so plucking the goose to get the most out of feathers with the least possible cries.(Jean-Baptiste Colbert)
|
|
|
Maxime
Average Member
France
521 Posts |
Posted - 14 June 2014 : 04:02:13
|
post_info.asp
<%
'#################################################################################
'## Snitz Forums 2000 v3.4.07
'#################################################################################
'## Copyright (C) 2000-09 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.
'##
'## 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_header.asp" -->
<!--#INCLUDE FILE="inc_func_secure.asp" -->
<!--#INCLUDE FILE="inc_func_member.asp" -->
<!--#INCLUDE FILE="inc_moderation.asp" -->
<!--#INCLUDE FILE="inc_subscription.asp" -->
<!--#INCLUDE FILE="inc_func_count.asp" -->
<%
if request("ARCHIVE") = "true" then
strActivePrefix = strTablePrefix & "A_"
ArchiveView = "true"
else
strActivePrefix = strTablePrefix
ArchiveView = ""
end if
'Topic Move Check
Dim blnTopicMoved
Dim fSubscription
fsubscription = 1
blnTopicMoved = false
if strAuthType = "db" and strDBNTUserName = "" and len(Request.Form("Password")) <> 64 then
strPassword = sha256("" & Request.Form("Password"))
else
strPassword = ChkString(Request.Form("Password"),"SQLString")
end if
if strAuthType = "db" and strDBNTUserName = "" then
strDBNTUserName = Request.Form("UserName")
if mLev = 0 then mLev = cLng(chkUser(strDBNTUserName, strPassword,-1))
end if
MethodType = chkString(Request.Form("Method_Type"),"SQLString")
if Request.Form("CAT_ID") <> "" then
if IsNumeric(Request.Form("CAT_ID")) = True then
Cat_ID = cLng(Request.Form("CAT_ID"))
else
Response.Redirect("default.asp")
end if
end if
if Request.Form("FORUM_ID") <> "" then
if IsNumeric(Request.Form("FORUM_ID")) = True then
Forum_ID = cLng(Request.Form("FORUM_ID"))
else
Response.Redirect("default.asp")
end if
end if
if Request.Form("TOPIC_ID") <> "" then
if IsNumeric(Request.Form("TOPIC_ID")) = True then
Topic_ID = cLng(Request.Form("TOPIC_ID"))
else
Response.Redirect("default.asp")
end if
end if
if Request.Form("REPLY_ID") <> "" then
if IsNumeric(Request.Form("REPLY_ID")) = True then
Reply_ID = cLng(Request.Form("REPLY_ID"))
else
Response.Redirect("default.asp")
end if
end if
if Request.Form("Subscription") <> "" then
fSubscription = cLng(Request.Form("Subscription"))
else
fSubscription = 0
end if
if Request.Form("cookies") = "yes" then
strSelectSize = Request.Form("SelectSize")
end if
if strSelectSize = "" or IsNull(strSelectSize) then
strSelectSize = Request.Cookies(strUniqueID & "strSelectSize")
end if
if not(IsNull(strSelectSize)) and strSelectSize <> "" then
if strSetCookieToForum = 1 then
Response.Cookies(strUniqueID & "strSelectSize").Path = strCookieURL
else
Response.Cookies(strUniqueID & "strSelectSize").Path = "/"
end if
Response.Cookies(strUniqueID & "strSelectSize") = strSelectSize
Response.Cookies(strUniqueID & "strSelectSize").expires = dateAdd("yyyy", 1, strForumTimeAdjust)
end if
if MethodType = "Edit" or _
MethodType = "EditTopic" or _
MethodType = "Reply" or _
MethodType = "ReplyQuote" or _
MethodType = "TopicQuote" then
'## check if topic exists in TOPICS table
set rsTCheck = my_Conn.Execute ("SELECT TOPIC_ID FROM " & strActivePrefix & "TOPICS WHERE TOPIC_ID = " & Topic_ID)
if rsTCheck.EOF or rsTCheck.BOF then
set rsTCheck = nothing
Go_Result "Désolé, ce sujet n'existe plus dans la base de données", 0
end if
set rsTCheck = nothing
end if
'set rs = Server.CreateObject("ADODB.RecordSet")
err_Msg = ""
ok = ""
if ArchiveView <> "" then
if MethodType = "Reply" or _
MethodType = "ReplyQuote" or _
MethodType = "TopicQuote" then
Go_Result "Cela n'est pas autorisé dans les archives.", 0
end if
end if
if MethodType = "Edit" then
'## Forum_SQL - Get the author of the reply
strSql = "SELECT R_AUTHOR "
strSql = strSql & " FROM " & strActivePrefix & "REPLY "
strSql = strSql & " WHERE REPLY_ID = " & REPLY_ID
set rsStatus = my_Conn.Execute(strSql)
if rsStatus.EOF or rsStatus.BOF then
rsStatus.close
set rsStatus = nothing
Go_Result "S'il vous plaît ne pas essayer de modifier l'URL<br />d'accéder à Verrouiller Forums/Categories.", 0
else
strReplyAuthor = rsStatus("R_AUTHOR")
rsStatus.close
set rsStatus = nothing
end if
end if
if MethodType = "Edit" or _
MethodType = "EditTopic" or _
MethodType = "Reply" or _
MethodType = "ReplyQuote" or _
MethodType = "Topic" or _
MethodType = "TopicQuote" then
if MethodType <> "Topic" then
'## Forum_SQL - Find out if the Category, Forum or Topic is Locked or Un-Locked and if it Exists
strSql = "SELECT C.CAT_STATUS, C.CAT_NAME, " &_
"F.FORUM_ID, F.F_STATUS, F.F_TYPE, F.F_SUBJECT, " &_
"T.T_STATUS, T.T_AUTHOR, T.T_SUBJECT " &_
" FROM " & strTablePrefix & "CATEGORY C, " &_
strTablePrefix & "FORUM F, " &_
strActivePrefix & "TOPICS T" &_
" WHERE C.CAT_ID = T.CAT_ID " &_
" AND F.FORUM_ID = T.FORUM_ID " &_
" AND T.TOPIC_ID = " & Topic_ID & ""
else
'## Forum_SQL - Find out if the Category or Forum is Locked or Un-Locked and if it Exists
strSql = "SELECT C.CAT_STATUS, C.CAT_NAME, " &_
"F.FORUM_ID, F.F_STATUS, F.F_TYPE, F.F_SUBJECT " &_
" FROM " & strTablePrefix & "CATEGORY C, " &_
strTablePrefix & "FORUM F" &_
" WHERE C.CAT_ID = F.CAT_ID " &_
" AND F.FORUM_ID = " & Forum_ID & ""
end if
set rsStatus = my_Conn.Execute(strSql)
if rsStatus.EOF or rsStatus.BOF then
rsStatus.close
set rsStatus = nothing
Go_Result "S'il vous plaît ne pas essayer de modifier l'URL<br />d'accéder à verrouillée Forums/Categories.", 0
else
blnCStatus = rsStatus("CAT_STATUS")
strCatTitle = rsStatus("CAT_NAME")
blnFStatus = rsStatus("F_STATUS")
Forum_ID = rsStatus("FORUM_ID")
Forum_Type = rsStatus("F_TYPE")
strForum_Title = rsStatus("F_SUBJECT")
if MethodType <> "Topic" then
blnTStatus = rsStatus("T_STATUS")
strTopicAuthor = rsStatus("T_AUTHOR")
strTopicTitle = rsStatus("T_SUBJECT")
else
blnTStatus = 1
end if
rsStatus.close
set rsStatus = nothing
end if
if mLev = 4 then
Adminowed = 1
ForumChkSkipowed = 1
elseif mLev = 3 then
if chkForumModerator(Forum_ID, ChkString(strDBNTUserName, "decode")) = "1" then
Adminowed = 1
ForumChkSkipowed = 1
else
if lcase(strNoCookies) = "1" then
Adminowed = 1
ForumChkSkipowed = 0
else
Adminowed = 0
ForumChkSkipowed = 0
end if
end if
elseif lcase(strNoCookies) = "1" then
Adminowed = 1
ForumChkSkipowed = 0
else
Adminowed = 0
ForumChkSkipowed = 0
end if
select case MethodType
case "Topic"
if (Forum_Type = 1) then
Go_Result "Vous avez essayé de poster un nouveau sujet sur ??un forum désigné comme un lien Internet",0
end if
if (blnCStatus = 0) and (Adminowed = 0) then
Go_Result "Vous avez essayé de poster un nouveau sujet à une catégorie Verrouillé", 0
end if
if (blnFStatus = 0) and (Adminowed = 0) then
Go_Result "Vous avez essayé de poster un nouveau sujet sur ??un forum fermé", 0
end if
case "EditTopic"
if ((blnCStatus = 0) or (blnFStatus = 0) or (blnTStatus = 0)) and (Adminowed = 0) then
Go_Result "Vous avez tenté de modifier un Sujet fermé", 0
end if
case "Reply", "ReplyQuote", "TopicQuote"
if ((blnCStatus = 0) or (blnFStatus = 0) or (blnTStatus = 0)) and (Adminowed = 0) then
Go_Result "Vous avez tenté de répondre à un Sujet fermé", 0
end if
case "Edit"
if ((blnCStatus = 0) or (blnFStatus = 0) or (blnTStatus = 0)) and (Adminowed = 0) then
Go_Result "Vous avez tenté de modifier une réponse à un sujet fermé", 0
end if
end select
if strPrivateForums = "1" and ForumChkSkipowed = 0 then
if not(chkForumAccess(Forum_ID,MemberID,false)) then
Go_Result "Vous n'avez pas accès à publier sur ce forum", 0
end if
end if
end if
' If Creating a new topic or reply, the subscription and moderation capabilities will need to be checked.
Moderation = "No"
if MethodType = "Topic" or _
MethodType = "Edit" or _
MethodType = "Reply" or _
MethodType = "ReplyQuote" or _
MethodType = "TopicQuote" or _
MethodType = "Forum" or _
MethodType = "EditForum" then
if strModeration > 0 or strSubscription > 0 then
'## Forum_SQL - Get the Cat_Subscription, Cat_Moderation, Forum_Subscription, Forum_Moderation
strSql = "SELECT C.CAT_MODERATION, C.CAT_SUBSCRIPTION, C.CAT_NAME "
if MethodType <> "Forum" then
strSql = strSql & ", F.F_MODERATION, F.F_SUBSCRIPTION "
end if
strsql = strsql & " FROM " & strTablePrefix & "CATEGORY C"
if MethodType <> "Forum" then
strSql = strSql & ", " & strTablePrefix & "FORUM F"
end if
strSql = strSql & " WHERE C.CAT_ID = " & Cat_ID
if MethodType <> "Forum" then
strSql = strSql & " AND F.FORUM_ID = " & Forum_ID
end if
set rsCheck = my_Conn.Execute (strSql)
CatName = rsCheck("CAT_NAME")
CatSubscription = rsCheck("CAT_SUBSCRIPTION")
CatModeration = rsCheck("CAT_MODERATION")
if MethodType <> "Forum" then
ForumSubscription = rsCheck("F_SUBSCRIPTION")
ForumModeration = rsCheck("F_MODERATION")
end if
rsCheck.Close
set rsCheck = nothing
if MethodType <> "Forum" then
'## Moderators and Admins are not subject to Moderation
if strModeration = 0 or mlev = 4 or chkForumModerator(Forum_ID, strDBNTUserName) = "1" then
Moderation = "No"
'## Is Moderation owed on the category?
elseif CatModeration = 1 then
'## if this is a topic, is forum moderation set to posts or topic?
if (ForumModeration = 1 or ForumModeration = 2) and (MethodType = "Topic") then
Moderation = "Yes"
'## if this is a reply, is forum moderation set to posts or reply?
elseif (ForumModeration = 1 or ForumModeration = 3) and (MethodType <> "Topic") then
Moderation = "Yes"
end if
end if
end if
end if
end if
if MethodType = "Edit" then
member = cLng(ChkUser(strDBNTUserName, strPassword, strReplyAuthor))
Select Case Member
case 0 '## Invalid Pword
Go_Result "Mot de passe non valide ou nom d'utilisateur", 0
Response.End
case 1 '## Author of Post so OK
'## Do Nothing
case 2 '## Normal User - Not Authorised
Go_Result "Seul un Administrateur, un Modérateur ou l'auteur peut modifier ce message", 0
Response.End
case 3 '## Moderator so OK - check the Moderator of this forum
if chkForumModerator(Forum_ID, strDBNTUserName) = "0" then
Go_Result "Seul un Administrateur, un Modérateur ou à l'auteur peut modifier ce message", 0
end if
if strReplyAuthor = intAdminMemberID and MemberID <> intAdminMemberID then
Go_Result "Seul le Forum Admin pouvez modifier ce message", 0
end if
case 4 '## Admin so OK
if strReplyAuthor = intAdminMemberID and MemberID <> intAdminMemberID then
Go_Result "Seul le Forum Admin pouvez modifier ce message", 0
end if
case else
Go_Result cstr(Member), 0
Response.End
end select
txtMessage = ChkString(Request.Form("Message"),"message")
Err_Msg = ""
if txtMessage = " " then
Err_Msg = Err_Msg & "<li>Vous devez saisir un message pour votre réponse</li>"
end if
if Err_Msg = "" then
'## Forum_SQL - Do DB Update
strSql = "UPDATE " & strActivePrefix & "REPLY "
strSql = strSql & " SET R_MESSAGE = '" & txtMessage & "'"
if Request.Form("sig") = "yes" and strDSignatures = "1" then
strSql = strSql & ", R_SIG = 1"
else
strSql = strSql & ", R_SIG = 0"
end if
if mLev < 4 and strEditedByDate = "1" then
strSql = strSql & ", R_LAST_EDIT = '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", R_LAST_EDITBY = " & MemberID
end if
strSql = strSql & " WHERE REPLY_ID=" & Reply_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
if mLev <> 4 and Moderation = "No" then
'## Forum_SQL - Update Last Post
strSql = " UPDATE " & strTablePrefix & "FORUM"
strSql = strSql & " SET F_LAST_POST = '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", F_LAST_POST_AUTHOR = " & MemberID
strSql = strSql & ", F_LAST_POST_TOPIC_ID = " & Topic_ID
strSql = strSql & ", F_LAST_POST_REPLY_ID = " & Reply_ID
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
'## Forum_SQL - Update Last Post
strSql = " UPDATE " & strActivePrefix & "TOPICS"
strSql = strSql & " SET T_LAST_POST = '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", T_LAST_POST_AUTHOR = " & MemberID
strSql = strSql & ", T_LAST_POST_REPLY_ID = " & Reply_ID
strSql = strSql & " WHERE TOPIC_ID = " & Topic_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end if
if Moderation = "No" then
'## Subscribe checkbox start ##
if request.form("TNotify") <> "" then
if request.form("TNotify") = "1" then
AddSubscription "TOPIC", MemberID, Cat_ID, Forum_ID, Topic_ID
else
DeleteSubscription "TOPIC", MemberID, Cat_ID, Forum_ID, Topic_ID
end if
end if
'## Subscribe checkbox end ##
end if
err_Msg = ""
if Err.description <> "" then
Go_Result "Il y a une erreur = " & Err.description, 0
Response.End
else
Go_Result "Mise à Jour Faite", 1
end if
else
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>Il Y A Un Problème Avec Vos Détails</font></p>" & vbNewLine & _
" <table align=""center"" border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """><ul>" & Err_Msg & "</ul></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""JavaScript:history.go(-1)"">Retour Pour Entrer des Données</a></font></p>" & vbNewLine
end if
end if
if MethodType = "EditTopic" then
member = cLng(ChkUser(strDBNTUserName, strPassword, strTopicAuthor))
select case Member
case 0 '## Invalid Pword
Go_Result "Mot de passe non valide ou nom d'utilisateur", 0
Response.End
case 1 '## Author of Post so OK
'## Do Nothing
case 2 '## Normal User - Not Authorised
Go_Result "Seul un Administrateur, un Modérateur ou l'auteur peut modifier ce message", 0
Response.End
case 3 '## Moderator so
if chkForumModerator(Forum_ID, strDBNTUserName) = "0" then
Go_Result "Seul un Administrateur, un Modérateur ou l'auteur peut modifier ce message", 0
end if
if strTopicAuthor = intAdminMemberID and MemberID <> intAdminMemberID then
Go_Result "Seul le Forum Admin pouvez modifier ce message", 0
end if
case 4 '## Admin so OK
if strTopicAuthor = intAdminMemberID and MemberID <> intAdminMemberID then
Go_Result "Seul le Forum Admin pouvez modifier ce message", 0
end if
'## Do Nothing
case else
Go_Result cstr(Member), 0
Response.End
end select
txtMessage = chkString(Request.Form("Message"),"message")
txtSubject = chkString(Request.Form("Subject"),"SQLString")
if strBadWordFilter = "1" then
txtSubject = chkString(ChkBadWords(Request.Form("Subject")),"SQLString")
end if
Err_Msg = ""
if txtSubject = " " then
Err_Msg = Err_Msg & "<li>Vous devez entrer un objet pour le sujet</li>"
end if
if Len(Request.Form("Subject")) > 50 then
Err_Msg = Err_Msg & "<li>Le Objet ne peut être supérieure à 50 caractères</li>"
end if
if txtMessage = " " then
Err_Msg = Err_Msg & "<li>Vous devez saisir un message pour le sujet</li>"
end if
if Err_Msg = "" then
'##Get Status of this Topic
strSql = "SELECT T_STATUS, T_UREPLIES"
strSql = Strsql & " FROM " & strActivePrefix & "TOPICS "
strSql = strSql & " WHERE TOPIC_ID = " & Topic_ID
set rsTopicStatusCheck = my_Conn.Execute (strSql)
Topic_Status = rsTopicStatusCheck("T_STATUS")
Topic_UReplies = rsTopicStatusCheck("T_UREPLIES")
rsTopicStatusCheck.Close
set rsTopicStatusCheck = nothing
if ArchiveView = "true" then
'## Prevent moving of topics in archives
Dim aryForum(1)
aryForum(1) = 0
Forum_ID = 0
else
'## Set array to pull out CAT_ID and FORUM_ID from dropdown values in post.asp
aryForum = split(Request.Form("Forum"), "|")
end if
'## if the forum we are moving to doesn't have MODERATION, and this topic did have that
'## we are going to have to auto-approve the topic !
AutoApprove = "No"
Moderation = "No"
if Forum_ID <> cLng(aryForum(1)) then
blnTopicMoved = true
strSql = "SELECT " & strTablePrefix & "FORUM.F_MODERATION "
strSql = strsql & " FROM " & strTablePrefix & "FORUM "
strSql = strSql & " WHERE " & strTablePrefix & "FORUM.FORUM_ID = " & Forum_ID
set rsForumCheck = my_Conn.Execute (strSql)
ForumModeration = rsForumCheck("F_MODERATION")
rsForumCheck.Close
set rsForumCheck = nothing
'## Is Moderation owed on the topic in the old forum ?
if (ForumModeration = 1 or ForumModeration = 2) then
Moderation = "Yes"
end if
if Moderation = "Yes" and Topic_Status > 0 then
strSql = "SELECT " & strTablePrefix & "FORUM.F_MODERATION "
strSql = Strsql & " FROM " & strTablePrefix & "FORUM "
strSql = strSql & " WHERE " & strTablePrefix & "FORUM.FORUM_ID = " & cLng(aryForum(1))
set rsNewForumCheck = my_Conn.Execute (strSql)
NewForumModeration = rsNewForumCheck("F_MODERATION")
rsNewForumCheck.Close
set rsNewForumCheck = nothing
'## Is Moderation owed on the topic in the new forum ?
if not(NewForumModeration = 1 or NewForumModeration = 2) then
AutoApprove = "Yes"
end if
end if
end if
if Moderation = "Yes" and AutoApprove = "Yes" and Topic_UReplies > 0 then
Go_Result "Il y avait une erreur = Le sujet que vous essayez de passer à un forum non modéré a pas de modérateur réponses <br /> Merci d'approuver ou de les supprimer, puis essayez à nouveau.", 0
Response.End
end if
' ## Anti-Spam Humans Below
If strAntiSpamDays > 0 or strAntiSpamPosts > 0 Then
strSqlP="SELECT M_POSTS, M_DATE FROM " & strMemberTablePrefix & "MEMBERS WHERE MEMBER_ID=" & MemberID
Set rsP=my_Conn.Execute(strSqlP)
If not rsP.EOF Then
strDays=rsP("M_DATE")
intPosts=rsP("M_POSTS")
rsP.Close
End If
Set rsP=Nothing
If strAntiSpamPosts > 0 Then
If intPosts<strAntiSpamPosts Then
If inStr(txtMessage, "http")>0 Then
Go_Result "Pas autorisé à poster des liens.",0
Response.End
End If
End If
End If
If strAntiSpamDays > 0 Then
intDays=DateDiff("d",StrtoDate(strDays),Now())
If intDays<strAntiSpamDays Then
If inStr(txtMessage, "http")>0 Then
Go_Result "Pas autorisé à poster des liens.",0
Response.End
End If
End If
End If
End If
' ## Anti-Spam Humans Above
'## Forum_SQL
strSql = "UPDATE " & strActivePrefix & "TOPICS "
strSql = strSql & " SET T_MESSAGE = '" & txtMessage & "'"
strSql = strSql & ", T_SUBJECT = '" & txtSubject & "'"
if blnTopicMoved then
strSql = strSql & ", CAT_ID = " & cLng(aryForum(0))
strSql = strSql & ", FORUM_ID = " & cLng(aryForum(1))
if AutoApprove = "Yes" then
strSql = strSql & ", T_STATUS = 1 "
end if
end if
if Request.Form("sig") = "yes" and strDSignatures = "1" then
strSql = strSql & ", T_SIG = 1"
else
strSql = strSql & ", T_SIG = 0"
end if
if mLev < 4 and strEditedByDate = "1" then
strSql = strSql & ", T_LAST_EDIT = '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", T_LAST_EDITBY = " & MemberID
end if
if ForumChkSkipowed = 1 then
if Request.Form("sticky") = 1 then
strSql = strSql & ", T_STICKY = " & 1
strSql = strSql & ", T_ARCHIVE_FLAG = " & 0
else
strSql = strSql & ", T_STICKY = " & 0
strSql = strSql & ", T_ARCHIVE_FLAG = " & 1
end if
end if
strSql = strSql & " WHERE TOPIC_ID = " & Topic_ID
my_Conn.Execute(strSql),,adCmdText + adExecuteNoRecords
'# Subscribe checkbox start ##
if request.form("TNotify") <> "" then
if request.form("TNotify") = "1" then
AddSubscription "TOPIC", MemberID, Cat_ID, Forum_ID, Topic_ID
elseif request.form("TNotify") = "0" then
DeleteSubscription "TOPIC", MemberID, Cat_ID, Forum_ID, Topic_ID
end if
end if
'## Subscribe checkbox end ##
if blnTopicMoved then
if strEmail = "1" and strMoveNotify = "1" then DoAutoMoveEmail(Topic_ID)
strSQL = "SELECT F_SUBSCRIPTION FROM " & strTablePrefix & "FORUM WHERE FORUM_ID=" & cLng(aryForum(1))
set rs = my_conn.execute (strSQL)
if rs("F_SUBSCRIPTION") < 3 then
strSQL = "DELETE FROM " & strTablePrefix & "SUBSCRIPTIONS WHERE TOPIC_ID=" & Topic_ID
my_conn.execute(strSQL),,adCmdText + adExecuteNoRecords
end if
rs.close
set rs = nothing
end if
if Forum_ID <> cLng(aryForum(1)) then
'## Forum_SQL
strSql = "UPDATE " & strActivePrefix & "REPLY "
strSql = strSql & " SET CAT_ID = " & cLng(aryForum(0))
strSql = strSql & ", FORUM_ID = " & cLng(aryForum(1))
strSql = strSql & " WHERE TOPIC_ID = " & Topic_ID
my_Conn.Execute(strSql),,adCmdText + adExecuteNoRecords
'set rs = Server.CreateObject("ADODB.Recordset")
'## if the topic hasn't been approved yet, it isn't counted either
'## so then the topic count doesn't need to be updated
if Moderation = "No" or AutoApprove = "Yes" or Topic_Status < 2 then
'## Forum_SQL - count total number of replies in Topics table
strSql = "SELECT T_REPLIES, T_LAST_POST, T_LAST_POST_AUTHOR "
strSql = strSql & " FROM " & strActivePrefix & "TOPICS "
strSql = strSql & " WHERE TOPIC_ID = " & Topic_ID
set rs = my_Conn.Execute (strSql)
intResetCount = rs("T_REPLIES") + 1
strT_Last_Post = rs("T_LAST_POST")
strT_Last_Post_Author = rs("T_LAST_POST_AUTHOR")
rs.Close
set rs = nothing
'## Forum_SQL - Get last_post and last_post_author for MoveFrom-Forum
strSql = "SELECT TOPIC_ID, T_LAST_POST, T_LAST_POST_AUTHOR, T_LAST_POST_REPLY_ID "
strSql = strSql & " FROM " & strActivePrefix & "TOPICS "
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID & " "
strSql = strSql & " ORDER BY T_LAST_POST DESC;"
set rs = my_Conn.Execute (strSql)
if not rs.eof then
strLast_Post_Topic_ID = rs("TOPIC_ID")
strLast_Post = rs("T_LAST_POST")
strLast_Post_Author = rs("T_LAST_POST_AUTHOR")
strLast_Post_Reply_ID = rs("T_LAST_POST_REPLY_ID")
else
strLast_Post_Topic_ID = 0
strLast_Post = ""
strLast_Post_Author = 0
strLast_Post_Reply_ID = 0
end if
rs.Close
set rs = nothing
if Moderation = "No" or Topic_Status < 2 then
'## Forum_SQL - Update count of replies to a topic in Forum table
strSql = "UPDATE " & strTablePrefix & "FORUM SET "
strSql = strSql & " F_COUNT = F_COUNT - " & intResetCount
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
my_Conn.Execute(strSql),,adCmdText + adExecuteNoRecords
'## Forum_SQL
strSql = "UPDATE " & strTablePrefix & "FORUM SET "
strSql = strSql & " F_TOPICS = F_TOPICS - 1 "
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
my_Conn.Execute(strSql),,adCmdText + adExecuteNoRecords
end if
strSql = "UPDATE " & strTablePrefix & "FORUM SET "
'if strLast_Post <> "" then
strSql = strSql & "F_LAST_POST = '" & strLast_Post & "'"
'if strLast_Post_Author <> "" then
strSql = strSql & ", F_LAST_POST_AUTHOR = " & strLast_Post_Author
'end if
'end if
strSql = strSql & ", F_LAST_POST_TOPIC_ID = " & strLast_Post_Topic_ID
strSql = strSql & ", F_LAST_POST_REPLY_ID = " & strLast_Post_Reply_ID
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
my_Conn.Execute(strSql),,adCmdText + adExecuteNoRecords
'## Forum_SQL - Get last_post and last_post_author for Forum
strSql = "SELECT TOPIC_ID, T_LAST_POST, T_LAST_POST_AUTHOR, T_AUTHOR, T_LAST_POST_REPLY_ID "
strSql = strSql & " FROM " & strActivePrefix & "TOPICS "
strSql = strSql & " WHERE FORUM_ID = " & cLng(aryForum(1))
strSql = strSql & " ORDER BY T_LAST_POST DESC;"
set rs = my_Conn.Execute (strSql)
if not rs.eof then
strAuthor = getMemberName(strT_Last_Post_Author)
strLast_Post_Topic_ID = rs("TOPIC_ID")
strLast_Post = rs("T_LAST_POST")
strLast_Post_Author = rs("T_LAST_POST_AUTHOR")
strLast_Post_Reply_ID = rs("T_LAST_POST_REPLY_ID")
else
strAuthor = ""
strLast_Post_Topic_ID = 0
strLast_Post = ""
strLast_Post_Author = ""
strLast_Post_Reply_ID = 0
end if
rs.Close
set rs = nothing
'Huw -- Update member count
if (AutoApprove = "Yes") and blnTStatus = 2 and blnTopicMoved then
set rsFCountMP = my_Conn.Execute("SELECT F_COUNT_M_POSTS FROM " & strTablePrefix & "FORUM WHERE FORUM_ID = " & cLng(aryForum(1)))
ForumCountMPosts = rsFCountMP("F_COUNT_M_POSTS")
rsFCountMP.close
set rsFCountMP = nothing
if ForumCountMPosts <> 0 then
doUCount(strT_Last_Post_Author)
end if
doULastPost(strT_Last_Post_Author)
end if
'## Forum_SQL - Update count of replies to a topic in Forum table
strSql = "UPDATE " & strTablePrefix & "FORUM SET "
strSql = strSql & " F_COUNT = (F_COUNT + " & intResetCount & ")"
strSql = strSql & ", F_LAST_POST_TOPIC_ID = " & strLast_Post_Topic_ID
strSql = strSql & ", F_LAST_POST_REPLY_ID = " & strLast_Post_Reply_ID
if strLast_Post <> "" then
strSql = strSql & ", F_LAST_POST = '" & strLast_Post & "'"
if strLast_Post_Author <> "" then
strSql = strSql & ", F_LAST_POST_AUTHOR = " & strLast_Post_Author
end if
end if
strSql = strSql & " WHERE FORUM_ID = " & cLng(aryForum(1))
my_Conn.Execute(strSql),,adCmdText + adExecuteNoRecords
'## Forum_SQL
strSql = "UPDATE " & strTablePrefix & "FORUM SET "
strSql = strSql & " F_TOPICS = F_TOPICS + 1 "
strSql = strSql & " WHERE FORUM_ID = " & cLng(aryForum(1))
my_Conn.Execute(strSql),,adCmdText + adExecuteNoRecords
end if
else
if mLev <> 4 and Moderation = "No" then
'## Forum_SQL - Update Last Post
strSql = " UPDATE " & strTablePrefix & "FORUM"
strSql = strSql & " SET F_LAST_POST = '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", F_LAST_POST_AUTHOR = " & MemberID
strSql = strSql & ", F_LAST_POST_TOPIC_ID = " & Topic_ID
strSql = strSql & ", F_LAST_POST_REPLY_ID = " & 0
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
'## Forum_SQL - Update Last Post
strSql = " UPDATE " & strActivePrefix & "TOPICS"
strSql = strSql & " SET T_LAST_POST = '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", T_LAST_POST_AUTHOR = " & MemberID
strSql = strSql & ", T_LAST_POST_REPLY_ID = " & 0
strSql = strSql & " WHERE TOPIC_ID = " & Topic_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end if
end if
err_Msg = ""
'aryForum = ""
if Err.description <> "" then
Go_Result "Il y a une erreur = " & Err.description, 0
Response.End
else
Go_Result "Mise à Jour Faite", 1
end if
else
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>Il Y A Un Problème Avec Vos Détails</font></p>" & vbNewLine & _
" <table align=""center"" border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """><ul>" & Err_Msg & "</ul></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""JavaScript:history.go(-1)"">Retour Pour Entrer des Données</a></font></p>" & vbNewLine
end if
end if
if MethodType = "Topic" then
'## Forum_SQL
strSql = "SELECT MEMBER_ID, M_LEVEL, M_EMAIL, M_LASTPOSTDATE, " & strDBNTSQLName
if strAuthType = "db" then
strSql = strSql & ", M_PASSWORD "
end if
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE " & strDBNTSQLName & " = '" & ChkString(strDBNTUserName, "SQLString") & "'"
strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.M_STATUS = " & 1
if strAuthType = "db" then
strSql = strSql & " AND M_PASSWORD = '" & ChkString(strPassword, "SQLString") &"'"
QuoteOk = (ChkQuoteOk(strDBNTUserName) and ChkQuoteOk(strPassword))
else
QuoteOk = ChkQuoteOk(strDBNTUserName)
end if
set rs = my_Conn.Execute (strSql)
if rs.BOF or rs.EOF or not(QuoteOk) or not (ChkQuoteOk(strPassword))then '## Invalid Password
rs.close
set rs = nothing
Go_Result "Nom d'utilisateur ou mot de passe invalide!", 0
Response.End
else
if strPrivateForums = "1" and ForumChkSkipowed = 0 then
if not(chkForumAccess(Forum_ID, MemberID,false)) then
Go_Result "You are not owed to post in this forum !", 0
end if
end if
if strFloodCheck = 1 then
if rs("M_LASTPOSTDATE") > DateToStr(DateAdd("s",strFloodCheckTime,strForumTimeAdjust)) and mLev < 3 then
strTimeLimit = replace(strFloodCheckTime, "-", "")
Go_Result "Désolé! Nous avons activé le contrôle des flood. <br /> Vous ne pouvez pas poster dans "& strTimeLimit &" secondes de votre dernier message. <br /> Veuillez essayer à nouveau après cette période de temps s'écoule.", 0
end if
end if
txtMessage = ChkString(Request.Form("Message"),"message")
txtSubject = ChkString(Request.Form("Subject"),"SQLString")
UserIPAddress = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
if UserIPAddress = "" or left(UserIPAddress, 7) = "unknown" then
UserIPAddress = Request.ServerVariables("REMOTE_ADDR")
elseif InStr(UserIPAddress, ",") > 0 then
UserIPAddress = Left(UserIPAddress, InStr(UserIPAddress, ",")-1)
elseif InStr(UserIPAddress, ";") > 0 then
UserIPAddress= Left(UserIPAddress, InStr(UserIPAddress, ";")-1)
end if
UserIPAddress = Trim(ChkString(UserIPAddress,"SQLString"))
if InStr(UserIPAddress, ":") > 0 then
UserIPAddress = Left(UserIPAddress, InStr(UserIPAddress, ":")-1)
end if
if strBadWordFilter = "1" then
txtSubject = chkString(ChkBadWords(Request.Form("Subject")),"SQLString")
end if
if txtMessage = " " then
Go_Result "Vous devez envoyer un message!", 0
Response.End
end if
if txtSubject = " " then
Go_Result "Vous devez poster un objet!", 0
Response.End
end if
if Len(Request.Form("Subject")) > 50 then
Go_Result "L'objet ne peut être supérieure à 50 caractères", 0
Response.End
end if
if strSignatures = "1" and strDSignatures <> "1" then
if Request.Form("sig") = "yes" and GetSig(strDBNTUserName) <> " " then
txtMessage = txtMessage & vbNewline & vbNewline & ChkString(GetSig(strDBNTUserName), "signature" )
end if
end if
' ## Anti-Spam Humans Below
If strAntiSpamDays > 0 or strAntiSpamPosts > 0 Then
strSqlP="SELECT M_POSTS, M_DATE FROM " & strMemberTablePrefix & "MEMBERS WHERE MEMBER_ID=" & MemberID
Set rsP=my_Conn.Execute(strSqlP)
If not rsP.EOF Then
strDays=rsP("M_DATE")
intPosts=rsP("M_POSTS")
rsP.Close
End If
Set rsP=Nothing
If strAntiSpamPosts > 0 Then
If intPosts<strAntiSpamPosts Then
If inStr(txtMessage, "http")>0 Then
Go_Result "Pas autorisé à poster des liens.",0
Response.End
End If
End If
End If
If strAntiSpamDays > 0 Then
intDays=DateDiff("d",StrtoDate(strDays),Date(Now()))
If intDays<strAntiSpamDays Then
If inStr(txtMessage, "http")>0 Then
Go_Result "Pas autorisé à poster des liens.",0
Response.End
End If
End If
End If
End If
' ## Anti-Spam Humans Above
'## Forum_SQL - Add new post to Topics Table
strSql = "INSERT INTO " & strTablePrefix & "TOPICS (FORUM_ID"
strSql = strSql & ", CAT_ID"
strSql = strSql & ", T_SUBJECT"
strSql = strSql & ", T_MESSAGE"
strSql = strSql & ", T_AUTHOR"
strSql = strSql & ", T_LAST_POST"
strSql = strSql & ", T_LAST_POST_AUTHOR"
strSql = strSql & ", T_LAST_POST_REPLY_ID"
strSql = strSql & ", T_DATE"
strSql = strSql & ", T_STATUS"
if strIPLogging <> "0" then
strSql = strSql & ", T_IP"
end if
strSql = strSql & ", T_STICKY"
strSql = strSql & ", T_SIG"
strSql = strSql & ", T_ARCHIVE_FLAG"
strSql = strSql & ", T_REPLIES"
strSql = strSql & ", T_UREPLIES"
strSql = strSql & ") VALUES ("
strSql = strSql & Forum_ID
strSql = strSql & ", " & Cat_ID
strSql = strSql & ", '" & txtSubject & "'"
strSql = strSql & ", '" & txtMessage & "'"
strSql = strSql & ", " & rs("MEMBER_ID")
strSql = strSql & ", '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", " & rs("MEMBER_ID")
strSql = strSql & ", 0 "
strSql = strSql & ", '" & DateToStr(strForumTimeAdjust) & "'"
if Request.Form("lock") = 1 and ForumChkSkipowed = 1 then
strSql = strSql & ", 0 "
else
if Moderation = "Yes" then
strSql = strSql & ", 2 "
else
strSql = strSql & ", 1 "
end if
end if
if strIPLogging <> "0" then
strSql = strSql & ", '" & UserIPAddress & "'"
end if
if ForumChkSkipowed = 1 then
if Request.Form("sticky") = 1 then
strSql = strSql & ", 1 "
else
strSql = strSql & ", 0 "
end if
else
strSql = strSql & ", 0 "
end if
if Request.Form("sig") = "yes" and strDSignatures = "1" then
strSql = strSql & ", 1 "
else
strSql = strSql & ", 0 "
end if
if ForumChkSkipowed = 1 then
if Request.Form("sticky") = 1 then
strSql = strSql & ", 0 "
else
strSql = strSql & ", 1 "
end if
else
strSql = strSql & ", 1 "
end if
strSql = strSql & ", 0 "
strSql = strSql & ", 0 "
strSql = strSql & ")"
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
if Err.description <> "" then
err_Msg = "Il y a une erreur = " & Err.description
else
err_Msg = "Mise à Jour Faite"
end if
strSql = "SELECT Max(TOPIC_ID) as NewTopicID "
strSql = strSql & " FROM " & strActivePrefix & "TOPICS "
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
strSql = strSql & " and T_AUTHOR = " & rs("MEMBER_ID")
set rs9 = my_Conn.Execute (strSql)
NewTopicID = rs9("NewTopicId")
rs9.close
set rs9 = nothing
' DEM --> Do not update forum count if topic is moderated.... Added if and end if
if Moderation = "No" then
'## Forum_SQL - Increase count of topics and replies in Forum table by 1
strSql = "UPDATE " & strTablePrefix & "FORUM "
strSql = strSql & " SET F_LAST_POST = '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", F_TOPICS = F_TOPICS + 1"
strSql = strSql & ", F_COUNT = F_COUNT + 1"
strSql = strSql & ", F_LAST_POST_AUTHOR = " & rs("MEMBER_ID") & ""
strSql = strSql & ", F_LAST_POST_TOPIC_ID = " & NewTopicID
strSql = strSql & ", F_LAST_POST_REPLY_ID = " & 0
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end if
ProcessSubscriptions rs("MEMBER_ID"), Cat_ID, Forum_ID, NewTopicID, Moderation
if Moderation = "No" then
'## Subscribe checkbox ##
if request.form("TNotify") <> "" then
if request.form("TNotify") = "1" then
AddSubscription "TOPIC", rs("MEMBER_ID"), Cat_ID, Forum_ID, NewTopicID
elseif request.form("TNotify") = "0" then
DeleteSubscription "TOPIC", MemberID, Cat_ID, Forum_ID, NewTopicID
end if
end if
'## Subscribe checkbox end ##
end if
Go_Result err_Msg, 1
Response.End
end if
end if
if MethodType = "Reply" or MethodType = "ReplyQuote" or MethodType = "TopicQuote" then
'## Forum_SQL
strSql = "SELECT MEMBER_ID, M_LEVEL, M_EMAIL, M_LASTPOSTDATE, " & strDBNTSQLname
if strAuthType = "db" then
strSql = strSql & ", M_PASSWORD "
end if
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE " & strDBNTSQLName & " = '" & ChkString(strDBNTUserName, "SQLString") & "'"
strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.M_STATUS = " & 1
if strAuthType = "db" then
' ## Anti-Spam Topics Below
If intMod140 = "1" Then
strSql = "SELECT * FROM " & strTablePrefix & "ANTI_SPAM WHERE AS_ID=" & Request("intQ")
Set rsQ=my_Conn.Execute(strSql)
If not rsQ.EOF Then
strQText=rsQ("AS_Q")
rsQ.Close
End If
Set rsQ=Nothing
strGKA="":intQA=0
For ii = 1 to len(strQText)
If mid(strQText,ii,1)=" " Then
intQA=intQA+1
If intQA=cInt(Request("intWord"))-1 Then
ij=ii+1
End If
If intQA=cInt(Request("intWord")) Then
ik=ii
Exit For
End If
End If
Next
strGKA=mid(strQText,ij,ik-ij)
If strGKA <> Request("GateKeeperAnswer") Then Go_Result "Anti-Spam answer was incorrect.", 2
End If
' ## Anti-Spam Topics Above
strSql = strSql & " AND M_PASSWORD = '" & ChkString(strPassword, "SQLString") &"'"
QuoteOk = (ChkQuoteOk(strDBNTUserName) and ChkQuoteOk(strPassword))
else
QuoteOk = ChkQuoteOk(strDBNTUserName)
end if
set rs = my_Conn.Execute (strSql)
if rs.BOF or rs.EOF or not(QuoteOk) or not(ChkQuoteOk(strPassword)) then '## Invalid Password
rs.close
set rs = nothing
err_Msg = "Mot de passe non valide ou nom d'utilisateur"
Go_Result(err_Msg), 0
Response.End
else
if strPrivateForums = "1" and ForumChkSkipowed = 0 then
if not(chkForumAccess(Forum_ID,MemberID,false)) then
Go_Result "Vous n'êtes pas autorisé à poster dans ce forum !", 0
end if
end if
if strFloodCheck = 1 then
if rs("M_LASTPOSTDATE") > DateToStr(DateAdd("s",strFloodCheckTime,strForumTimeAdjust)) and mLev < 3 then
strTimeLimit = replace(strFloodCheckTime, "-", "")
Go_Result "Désolé! Nous avons activé le contrôle des flood.<br />Vous ne pouvez pas poster dans les " & strTimeLimit & " secondes de votre dernier message.<br />S'il vous plaît essayer de nouveau après cette période de temps s'écoule.", 0
end if
end if
txtMessage = ChkString(Request.Form("Message"),"message")
UserIPAddress = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
if UserIPAddress = "" or left(UserIPAddress, 7) = "unknown" then
UserIPAddress = Request.ServerVariables("REMOTE_ADDR")
elseif InStr(UserIPAddress, ",") > 0 then
UserIPAddress = Left(UserIPAddress, InStr(UserIPAddress, ",")-1)
elseif InStr(UserIPAddress, ";") > 0 then
UserIPAddress= Left(UserIPAddress, InStr(UserIPAddress, ";")-1)
end if
UserIPAddress = Trim(ChkString(UserIPAddress,"SQLString"))
if InStr(UserIPAddress, ":") > 0 then
UserIPAddress = Left(UserIPAddress, InStr(UserIPAddress, ":")-1)
end if
if txtMessage = " " then
Go_Result "Vous devez envoyer un message!", 0
Response.End
end if
if strSignatures = "1" and strDSignatures <> "1" then
if Request.Form("sig") = "yes" and GetSig(strDBNTUserName) <> " " then
txtMessage = txtMessage & vbNewline & vbNewline & ChkString(GetSig(strDBNTUserName), "signature" )
end if
end if
'## Forum_SQL
strSql = "INSERT INTO " & strTablePrefix & "REPLY "
strSql = strSql & "(TOPIC_ID"
strSql = strSql & ", FORUM_ID"
strSql = strSql & ", CAT_ID"
strSql = strSql & ", R_AUTHOR"
strSql = strSql & ", R_DATE "
if strIPLogging <> "0" then
strSql = strSql & ", R_IP"
end if
strSql = strSql & ", R_STATUS"
strSql = strSql & ", R_SIG"
strSql = strSql & ", R_MESSAGE"
strSql = strSql & ") VALUES ("
strSql = strSql & Topic_ID
strSql = strSql & ", " & Forum_ID
strSql = strSql & ", " & Cat_ID
strSql = strSql & ", " & rs("MEMBER_ID")
strSql = strSql & ", " & "'" & DateToStr(strForumTimeAdjust) & "'"
if strIPLogging <> "0" then
strSql = strSql & ", " & "'" & UserIPAddress & "'"
end if
' DEM --> Added R_STATUS to ow for moderation of posts
' Used R_STATUS = 1 to match the topic status code.
if Moderation = "Yes" then
strSql = strSql & ", 2"
else
strSql = strSql & ", 1"
end if
' DEM --> End of Code added
if Request.Form("sig") = "yes" and strDSignatures = "1" then
strSql = strSql & ", 1 "
else
strSql = strSql & ", 0 "
end if
strSql = strSql & ", " & "'" & txtMessage & "'"
strSql = strSql & ")"
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
' DEM --> Do not update totals on topics and forums database if post is moderated...Added if and end if
if Moderation = "No" then
strSql = "SELECT Max(REPLY_ID) as NewReplyID "
strSql = strSql & " FROM " & strActivePrefix & "REPLY "
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
strSql = strSql & " and R_AUTHOR = " & rs("MEMBER_ID")
set rs9 = my_Conn.Execute (strSql)
NewReplyID = rs9("NewReplyID")
rs9.close
set rs9 = nothing
'## Forum_SQL - Update Last Post and count
strSql = "UPDATE " & strActivePrefix & "TOPICS "
strSql = strSql & " SET T_LAST_POST = '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", T_REPLIES = T_REPLIES + 1 "
strSql = strSql & ", T_LAST_POST_AUTHOR = " & rs("MEMBER_ID")
strSql = strSql & ", T_LAST_POST_REPLY_ID = " & NewReplyID
if Request.Form("lock") = 1 and ForumChkSkipowed = 1 then
strSql = strSql & ", T_STATUS = 0 "
end if
strSql = strSql & " WHERE TOPIC_ID = " & Topic_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
'## Subscribe checkbox start ##
if request.form("TNotify") <> "" then
if request.form("TNotify") = "1" then
AddSubscription "TOPIC", rs("MEMBER_ID"), Cat_ID, Forum_ID, Topic_ID
elseif request.form("TNotify") = "0" then
DeleteSubscription "TOPIC", MemberID, Cat_ID, Forum_ID, Topic_ID
end if
end if
'## Subscribe checkbox end ##
'## Forum_SQL
strSql = "UPDATE " & strTablePrefix & "FORUM "
strSql = strSql & " SET F_LAST_POST = '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", F_LAST_POST_AUTHOR = " & rs("MEMBER_ID")
strSql = strSql & ", F_LAST_POST_TOPIC_ID = " & Topic_ID
strSql = strSql & ", F_LAST_POST_REPLY_ID = " & NewReplyID
strSql = strSql & ", F_COUNT = F_COUNT + 1 "
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
else
'## Forum_SQL - Update Unmoderated post count
strSql = "UPDATE " & strActivePrefix & "TOPICS "
strSql = strSql & " SET T_UREPLIES = T_UREPLIES + 1 "
strSql = strSql & " WHERE TOPIC_ID = " & Topic_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end if
if Err.description <> "" then
Go_Result "il y a une erreur = " & Err.description, 0
Response.End
else
'if Moderation = "No" then
ProcessSubscriptions rs("MEMBER_ID"), Cat_ID, Forum_ID, Topic_ID, Moderation
'end if
Go_Result "Mise à Jour Faite", 1
Response.End
end if
end if
end if
if MethodType = "Forum" then
member = cLng(ChkUser(strDBNTUserName, strPassword,-1))
select case Member
case 0 '## Invalid Pword
Go_Result "Mot de passe non valide ou nom d'utilisateur", 0
Response.End
case 1 '## Author of Post
'## Do Nothing
case 2 '## Normal User - Not Authorized
Go_Result "Seul un Administrateur peut créer un Forum", 0
Response.End
case 3 '## Moderator - Not Authorized
Go_Result "Seul un Administrateur peut créer un Forum", 0
Response.End
case 4 '## Admin
'## Do Nothing
case else
Go_Result cstr(Member), 0
Response.End
end select
txtMessage = ChkString(Request.Form("Message"),"message")
txtSubject = ChkString(Request.Form("Subject"),"SQLString")
if strBadWordFilter = "1" then
txtSubject = chkString(ChkBadWords(Request.Form("Subject")),"SQLString")
end if
Err_Msg = ""
if txtSubject = " " then
Err_Msg = Err_Msg & "<li>Vous devez entrer un objet pour le Nouveau Forum</li>"
end if
if Err_Msg = "" then
'## Forum_SQL - Do DB Update
strSql = "INSERT INTO " & strTablePrefix & "FORUM "
strSql = strSql & "(CAT_ID"
strSql = strSql & ", F_STATUS"
if strPrivateForums = "1" then
strSql = strSql & ", F_PRIVATEFORUMS"
if Request.Form("AuthPassword") <> " " then
strSql = strSql & ", F_PASSWORD_NEW"
end if
end if
'strSql = strSql & ", F_LAST_POST"
strSql = strSql & ", F_SUBJECT"
strSql = strSql & ", F_DESCRIPTION"
strSql = strSql & ", F_TYPE"
strSql = strSql & ", F_L_ARCHIVE "
strSql = strSql & ", F_ARCHIVE_SCHED "
strSql = strSql & ", F_L_DELETE "
strSql = strSql & ", F_DELETE_SCHED "
strSql = strSql & ", F_SUBSCRIPTION"
strSql = strSql & ", F_MODERATION"
strSql = strSql & ", F_ORDER "
strSql = strSql & ", F_DEFAULTDAYS "
strSql = strSql & ", F_COUNT_M_POSTS "
strSql = strSql & ") VALUES ("
strSql = strSql & Cat_ID
strSql = strSql & ", 1 "
if strPrivateForums = "1" then
strSql = strSql & ", " & chkString(Request.Form("AuthType"), "SQLString") & ""
if Request.Form("AuthPassword") <> " " then
strSql = strSql & ", '" & ChkString(Request.Form("AuthPassword"),"SQLString") & "'"
end if
end if
'strSql = strSql & ", " & "'" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", '" & txtSubject & "'"
strSql = strSql & ", '" & txtMessage & "'"
strSql = strSql & ", 0"
strSql = strSql & ", '' "
strSql = strSql & ", 30 "
strSql = strSql & ", '' "
strSql = strSql & ", 365 "
' DEM --> Start of Code added for moderation and subscription
if strSubscription > 0 and CatSubscription > 0 and strEmail = "1" then
strSql = strSql & ", " & fSubscription
else
strSql = strSql & ", 0"
end if
if strModeration = 1 and CatModeration = 1 then
strSql = strSql & ", " & ChkString(Request.Form("Moderation"), "SQLString")
else
strSql = strSql & ", 0"
end if
' DEM --> End of Code added for moderation and subscription
strSql = strSql & ", 1 "
strSql = strSql & ", " & ChkString(Request.Form("DefaultDays"), "SQLString")
strSql = strSql & ", " & ChkString(Request.Form("ForumCntMPosts"), "SQLString")
strSql = strSql & ")"
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
Application.Lock
Application(strCookieURL & "JumpBoxChanged")= DateToStr(strForumTimeAdjust)
Application.UnLock
err_Msg = ""
if Err.description <> "" then
Go_Result "Il y a une erreur = " & Err.description, 0
Response.End
Else
set rsCount = my_Conn.execute("SELECT MAX(FORUM_ID) AS maxForumID FROM " & strTablePrefix & "FORUM ")
newForumMembers rsCount("maxForumId")
newForumModerators rsCount("maxForumId")
set rsCount = nothing
Go_Result "Mise à Jour Faite", 1
end if
else
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>Il Y A Un Problème Avec Vos Détails</font></p>" & vbNewLine & _
" <table align=""center"" border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """><ul>" & Err_Msg & "</ul></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""JavaScript:history.go(-1)"">Retour Pour Entrer des Données</a></font></p>" & vbNewLine
end if
end if
if MethodType = "URL" then
member = cLng(ChkUser(strDBNTUserName, strPassword,-1))
select case Member
case 0 '## Invalid Pword
Go_Result "Mot de passe non valide ou nom d'utilisateur", 0
Response.End
case 1 '## Author of Post
'## Do Nothing
case 2 '## Normal User - Not Authorised
Go_Result "Seul un administrateur peut créer un lien Web", 0
Response.End
case 3 '## Moderator
Go_Result "Seul un administrateur peut créer un lien Web", 0
Response.End
case 4 '## Admin
'## Do Nothing
case else
Go_Result cstr(Member), 0
Response.End
end select
txtMessage = ChkString(Request.Form("Message"),"message")
txtAddress = ChkString(Request.Form("Address"),"SQLString")
txtSubject = ChkString(Request.Form("Subject"),"SQLString")
if strBadWordFilter = "1" then
txtSubject = chkString(ChkBadWords(Request.Form("Subject")),"SQLString")
end if
Err_Msg = ""
if txtSubject = " " then
Err_Msg = Err_Msg & "<li>Vous devez entrer un objet pour le New URL</li>"
end if
if txtAddress = " " or lcase(txtAddress) = "http://" or lcase(txtAddress) = "https://" or lcase(txtAddress) = "file:///" then
Err_Msg = Err_Msg & "<li>Vous devez entrer une adresse pour le New URL</li>"
end if
if (left(lcase(txtAddress), 7) <> "http://" and left(lcase(txtAddress), 8) <> "https://" and left(lcase(txtAddress), 8) <> "file:///") and txtAddress <> "" then
Err_Msg = Err_Msg & "<li>Vous devez faire précéder l'adresse de <b>http://</b>, <b>https://</b> ou <b>file:///</b></li>"
end if
if Err_Msg = "" then
'## Forum_SQL - Do DB Update
strSql = "INSERT INTO " & strTablePrefix & "FORUM "
strSql = strSql & "(CAT_ID"
strSql = strSql & ", F_STATUS"
if strPrivateForums = "1" then
strSql = strSql & ", F_PRIVATEFORUMS"
end if
strSql = strSql & ", F_LAST_POST"
strSql = strSql & ", F_LAST_POST_AUTHOR"
strSql = strSql & ", F_SUBJECT"
strSql = strSql & ", F_URL"
strSql = strSql & ", F_DESCRIPTION"
strSql = strSql & ", F_TYPE"
strSql = strSql & ", F_L_ARCHIVE "
strSql = strSql & ", F_ARCHIVE_SCHED "
strSql = strSql & ", F_L_DELETE "
strSql = strSql & ", F_DELETE_SCHED "
strSql = strSql & ", F_SUBSCRIPTION, F_MODERATION"
strSql = strSql & ", F_ORDER "
strSql = strSql & ", F_DEFAULTDAYS "
strSql = strSql & ") VALUES ("
strSql = strSql & Cat_ID
strSql = strSql & ", 1"
if strPrivateForums = "1" then
strSql = strSql & ", " & ChkString(Request.Form("AuthType"), "SQLString") & ""
end if
strSql = strSql & ", " & "'" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", " & MemberID & " "
strSql = strSql & ", " & "'" & txtSubject & "'"
strSql = strSql & ", " & "'" & txtAddress & "'"
strSql = strSql & ", " & "'" & txtMessage & "'"
strSql = strSql & ", 1"
strSql = strSql & ", ''"
strSql = strSql & ", 30"
strSql = strSql & ", ''"
strSql = strSql & ", 365"
' DEM --> Added 0's for the subscription and moderation fields since they are ignored for URLS
strSql = strSql & ", 0, 0"
strSql = strSql & ", 1"
strSql = strSql & ", 30"
strSql = strSql & ") "
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
Application.Lock
Application(strCookieURL & "JumpBoxChanged")= DateToStr(strForumTimeAdjust)
Application.UnLock
err_Msg = ""
if Err.description <> "" then
Go_Result "Il y a une erreur = " & Err.description, 0
Response.End
else
set rsCount = my_Conn.execute("SELECT MAX(FORUM_ID) AS maxForumID FROM " & strTablePrefix & "FORUM ")
newForumMembers rsCount("maxForumId")
newForumModerators rsCount("maxForumId")
set rsCount = nothing
Go_Result "Mise à Jour Faite", 1
end if
else
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>Il Y A Un Problème Avec Vos Détails</font></p>" & vbNewLine & _
" <table align=""center"" border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """><ul>" & Err_Msg & "</ul></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""JavaScript:history.go(-1)"">Retour Pour Entrer des Données</a></font></p>" & vbNewLine
end if
end if
if MethodType = "EditForum" then
member = cLng(ChkUser(strDBNTUserName, strPassword,-1))
select case Member
case 0 '## Invalid Pword
Go_Result "Mot de passe non valide ou nom d'utilisateur", 0
Response.End
case 1 '## Author of Post
'## Do Nothing
case 2 '## Normal User - Not Authorised
Go_Result "Seul un Administrateur ou un Modérateur peut modifier ce Forum", 0
Response.End
case 3 '## Moderator
if chkForumModerator(Forum_ID, strDBNTUserName) = "0" then
Go_Result "Seul un Administrateur ou un Modérateur peut modifier ce Forum", 0
end if
case 4 '## Admin
'## Do Nothing
case else
Go_Result cstr(Member), 0
Response.End
end select
txtMessage = ChkString(Request.Form("Message"),"message")
txtSubject = ChkString(Request.Form("Subject"),"SQLString")
if strBadWordFilter = "1" then
txtSubject = chkString(ChkBadWords(Request.Form("Subject")),"SQLString")
end if
Err_Msg = ""
if txtSubject = " " then
Err_Msg = Err_Msg & "<li>Vous devez entrer un objet pour le Forum</li>"
end if
if strModeration <> 0 and Request.Form("Moderation") = 0 then
if CheckForUnModeratedPosts("FORUM", Cat_ID, Forum_ID, 0) > 0 then
Err_Msg = Err_Msg & "<li>S'il vous plaît Approuver ou Supprimer tous les messages Non Modérés / En Attente dans ce forum avant de se tourner Modération off</li>"
end if
end if
if Err_Msg = "" then
'## Forum_SQL - Check if CAT_ID changed
strSql = "SELECT " & strTablePrefix & "FORUM.CAT_ID "
strSql = strSql & " FROM " & strTablePrefix & "FORUM "
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
set rsCatIDCheck = my_Conn.execute(strSql)
bolCatIDChanged = (cSTr(rsCatIDCheck("CAT_ID")) <> ChkString(Request.Form("Category"), "SQLString"))
rsCatIDCheck.Close
set rsCatIDCheck = Nothing
'## Forum_SQL - Do DB Update
strSql = "UPDATE " & strTablePrefix & "FORUM "
strSql = strSql & " SET CAT_ID = " & cLng("0" & Request.Form("Category"))
if strPrivateForums = "1" then
strSql = strSql & ", F_PRIVATEFORUMS = " & cLng("0" & Request.Form("AuthType"))
if Request.Form("AuthPassword") <> " " then
strSql = strSql & ", F_PASSWORD_NEW = '" & ChkString(Request.Form("AuthPassword"),"SQLString") & "'"
end if
end if
strSql = strSql & ", F_SUBJECT = '" & txtSubject & "'"
strSql = strSql & ", F_DESCRIPTION = '" & txtMessage & "'"
if Request.Form("Moderation") <> "" then
strSql = strSql & ", F_MODERATION = " & cLng("0" & Request.Form("Moderation"))
end if
if fSubscription <> "" then
strSql = strSql & ", F_SUBSCRIPTION = " & cLng("0" & fSubscription)
end if
strSql = strSql & ", F_DEFAULTDAYS = " & cLng(Request.Form("DefaultDays"))
strSql = strSql & ", F_COUNT_M_POSTS = " & cLng("0" & Request.Form("ForumCntMPosts"))
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
Application.Lock
Application(strCookieURL & "JumpBoxChanged")= DateToStr(strForumTimeAdjust)
Application.UnLock
if bolCatIDChanged then
'## Update category CAT_SUBSCRIPTION/CAT_MODERATION if required
strSQL = "SELECT " & strTablePrefix & "CATEGORY.CAT_SUBSCRIPTION, " & strTablePrefix & "CATEGORY.CAT_MODERATION FROM " & strTablePrefix & "CATEGORY "
strSQL = strSQL & " WHERE CAT_ID=" & cLng("0" & Request.Form("Category"))
set rs = my_conn.execute(strSQL)
intCatSubs = rs("CAT_SUBSCRIPTION")
intCatMod = rs("CAT_MODERATION")
rs.close
set rs = nothing
if intCatSubs < fSubscription then
strSQL = "UPDATE " & strTablePrefix & "CATEGORY SET " & strTablePrefix & "CATEGORY.CAT_SUBSCRIPTION = " & fSubscription
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end if
if intCatMod = 0 and Request.Form("Moderation") > 0 then
strSQL = "UPDATE " & strTablePrefix & "CATEGORY SET " & strTablePrefix & "CATEGORY.CAT_MODERATION = " & 1
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end if
'## Forum_SQL - Do DB Update
strSql = "UPDATE " & strActivePrefix & "TOPICS "
strSql = strSql & " SET CAT_ID = " & cLng("0" & Request.Form("Category"))
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
'## Forum_SQL - Do DB Update
strSql = "UPDATE " & strActivePrefix & "REPLY "
strSql = strSql & " SET CAT_ID = " & cLng("0" & Request.Form("Category"))
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
' DEM --> Added _SUBSCRIPTIONS table
'## Forum_SQL - Do DB Update
strSql = "UPDATE " & strTablePrefix & "SUBSCRIPTIONS "
strSql = strSql & " SET CAT_ID = " & cLng("0" & Request.Form("Category"))
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end if
err_Msg= ""
if Err.description <> "" then
Go_Result "Il y a une erreur = " & Err.description, 0
Response.End
else
updateForumMembers Forum_ID
if mLev = 4 then
updateForumModerators Forum_ID
end if
Go_Result "Mise à Jour Faite", 1
end if
else
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>Il Y A Un Problème Avec Vos Détails</font></p>" & vbNewLine & _
" <table align=""center"" border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """><ul>" & Err_Msg & "</ul></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""JavaScript:history.go(-1)"">Retour Pour Entrer des Données</a></font></p>" & vbNewLine
end if
end if
if MethodType = "EditURL" then
member = cLng(ChkUser(strDBNTUserName, strPassword,-1))
select case Member
case 0 '## Invalid Pword
Go_Result "Mot de passe non valide ou nom d'utilisateur", 0
Response.End
case 1 '## Author of Post
'## Do Nothing
case 2 '## Normal User - Not Authorised
Go_Result "Seul un Administrateur ou un Modérateur peut changer ce lien web", 0
Response.End
case 3 '## Moderator
if chkForumModerator(Forum_ID, strDBNTUserName) = "0" then
Go_Result "Seul un Administrateur ou un Modérateur peut changer ce lien web", 0
end if
case 4 '## Admin
'## Do Nothing
case else
Go_Result cstr(Member), 0
Response.End
end select
txtMessage = ChkString(Request.Form("Message"),"message")
txtAddress = ChkString(Request.Form("Address"),"SQLString")
txtSubject = ChkString(Request.Form("Subject"),"SQLString")
if strBadWordFilter = "1" then
txtSubject = chkString(ChkBadWords(Request.Form("Subject")),"SQLString")
end if
Err_Msg = ""
if txtSubject = " " then
Err_Msg = Err_Msg & "<li>vous devez entrer un sujet pour le New URL</li>"
end if
if txtAddress = " " or lcase(txtAddress) = "http://" or lcase(txtAddress) = "https://" or lcase(txtAddress) = "file:///" then
Err_Msg = Err_Msg & "<li>Vous devez entrer une adresse pour le New URL</li>"
end if
if (left(lcase(txtAddress), 7) <> "http://" and left(lcase(txtAddress), 8) <> "https://" and left(lcase(txtAddress), 8) <> "file:///") and (txtAddress <> "") then
Err_Msg = Err_Msg & "<li>Vous devez faire précéder l'adresse de <b>http://</b>, <b>https://</b> ou <b>file:///</b></li>"
end if
if Err_Msg = "" then
'## Forum_SQL - Do DB Update
strSql = "UPDATE " & strTablePrefix & "FORUM "
strSql = strSql & " SET CAT_ID = " & cLng("0" & Request.Form("Category"))
if strPrivateForums = "1" then
strSql = strSql & ", F_PRIVATEFORUMS = " & cLng("0" & Request.Form("AuthType"))
end if
strSql = strSql & ", F_SUBJECT = '" & txtSubject & "'"
strSql = strSql & ", F_URL = '" & txtAddress & "'"
strSql = strSql & ", F_DESCRIPTION = '" & txtMessage & "'"
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
Application.Lock
Application(strCookieURL & "JumpBoxChanged")= DateToStr(strForumTimeAdjust)
Application.UnLock
err_Msg= ""
if Err.description <> "" then
Go_Result "Il y a une erreur = " & Err.description, 0
Response.End
else
updateForumMembers Forum_ID
if mLev = 4 then
updateForumModerators Forum_ID
end if
Go_Result "Mise à Jour Faite", 1
end if
else
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>Il Y A Un Problème Avec Vos Détails</font></p>" & vbNewLine & _
" <table align=""center"" border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """><ul>" & Err_Msg & "</ul></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""JavaScript:history.go(-1)"">Retour Pour Entrer des Données</a></font></p>" & vbNewLine
end if
end if
if MethodType = "Category" then
member = cLng(ChkUser(strDBNTUserName, strPassword,-1))
select case Member
case 0 '## Invalid Pword
Go_Result "Mot de passe non valide ou nom d'utilisateur", 0
Response.End
case 1 '## Author of Post
'## Do Nothing
case 2 '## Normal User - Not Authorised
Go_Result "Seul un administrateur peut créer une catégorie", 0
Response.End
case 3 '## Moderator
Go_Result "Seul un administrateur peut créer une catégorie", 0
Response.End
case 4 '## Admin
'## Do Nothing
case else
Go_Result cstr(Member), 0
Response.End
end select
txtSubject = chkString(Request.Form("Subject"),"SQLString")
if strBadWordFilter = "1" then
txtSubject = chkString(ChkBadWords(Request.Form("Subject")),"SQLString")
end if
Err_Msg = ""
if txtSubject = "" then
Err_Msg = Err_Msg & "<li>Vous devez entrer un objet pour la Nouvelle Catégorie</li>"
end if
if Err_Msg = "" then
'## Forum_SQL - Do DB Update
' DEM --> Insert replaced to add subscription and moderation capabilities
strSql = "INSERT INTO " & strTablePrefix & "CATEGORY (CAT_NAME, CAT_STATUS, CAT_SUBSCRIPTION, CAT_MODERATION, CAT_ORDER) "
strSql = strSql & " VALUES ('" & txtSubject & "'"
strSql = strSql & ", 1"
if strSubscription <> 0 and strEmail = "1" then
strSql = strSql & ", " & fSubscription
else
strSql = strSql & ", 0"
end if
if strModeration <> 0 then
strSql = strSql & ", " & ChkString(Request.Form("Moderation"), "SQLString")
else
strSql = strSql & ", 0"
end if
strSql = strSql & ", 1"
strSql = strSql & ")"
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
Application.Lock
Application(strCookieURL & "JumpBoxChanged")= DateToStr(strForumTimeAdjust)
Application.UnLock
err_Msg= ""
if Err.description <> "" then
Go_Result "Il y a une erreur = " & Err.description, 0
Response.End
else
Go_Result "Mise à Jour Faite", 1
end if
else
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>Il Y A Un Problème Avec Vos Détails</font></p>" & vbNewLine & _
" <table align=""center"" border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """><ul>" & Err_Msg & "</ul></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""JavaScript:history.go(-1)"">Retour Pour Entrer des Données</a></font></p>" & vbNewLine
end if
end if
if MethodType = "EditCategory" then
member = cLng(ChkUser(strDBNTUserName, strPassword,-1))
select case Member
case 0 '## Invalid Pword
Go_Result "Mot de passe non valide ou nom d'utilisateur", 0
Response.End
case 1 '## Author of Post
'## Do Nothing
case 2 '## Normal User - Not Authorised
Go_Result "Seul un Administrateur peut modifier une catégorie", 0
Response.End
case 3 '## Moderator
'## Do Nothing
Go_Result "Seul un Administrateur peut modifier une catégorie", 0
Response.End
case 4 '## Admin
'## Do Nothing
case else
Go_Result cstr(Member), 0
Response.End
end select
txtSubject = chkString(Request.Form("Subject"),"SQLString")
if strBadWordFilter = "1" then
txtSubject = chkString(ChkBadWords(Request.Form("Subject")),"SQLString")
end if
Err_Msg = ""
if txtSubject = "" then
Err_Msg = Err_Msg & "<li>Vous devez entrer un objet pour la catégorie</li>"
end if
if strModeration <> 0 and Request.Form("Moderation") = 0 then
if CheckForUnmoderatedPosts("CAT", Cat_ID, 0, 0) > 0 then
Err_Msg = Err_Msg & "<li>S'il vous plaît Approuver ou Supprimer tous les messages non modérés / détenus dans cette catégorie avant de se tourner Modération off</li>"
end if
end if
if Err_Msg = "" then
'## Forum_SQL - Do DB Update
strSql = "UPDATE " & strTablePrefix & "CATEGORY "
strSql = strSql & " SET CAT_NAME = '" & txtSubject & "'"
' DEM --> Start of Code added for moderation and subscription functionality
if strModeration <> 0 then
strSql = strSql & ", CAT_MODERATION = " & cLng("0" & Request.Form("Moderation"))
end if
if strSubscription <> 0 and strEmail = "1" then
strSql = strSql & ", CAT_SUBSCRIPTION = " & cLng("0" & Request.Form("Subscription"))
end if
' DEM --> End of code added for moderation and subscription functionality
strSql = strSql & " WHERE CAT_ID = " & Cat_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
Application.Lock
Application(strCookieURL & "JumpBoxChanged")= DateToStr(strForumTimeAdjust)
Application.UnLock
err_Msg= ""
if Err.description <> "" then
Go_Result "Il y a une erreur = " & Err.description, 0
Response.End
else
Go_Result "Mise à Jour Faite", 1
end if
else
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>Il Y A Un Problème Avec Vos Détails</font></p>" & vbNewLine & _
" <table align=""center"" border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """><ul>" & Err_Msg & "</ul></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""JavaScript:history.go(-1)"">Retour Pour Entrer des Données</a></font></p>" & vbNewLine
end if
end if
'set rs = nothing
WriteFooter
Response.End
sub Go_Result(str_err_Msg, boolOk)
select case MethodType
case "Topic", "TopicQuote", "Reply", "ReplyQuote"
set rsFCountMP = my_Conn.Execute("SELECT F_COUNT_M_POSTS FROM " & strTablePrefix & "FORUM WHERE FORUM_ID = " & Forum_ID)
ForumCountMPosts = rsFCountMP("F_COUNT_M_POSTS")
rsFCountMP.close
set rsFCountMP = nothing
end select
Response.write " <table border=""0"" width=""100%"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td width=""33%"" align=""left""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" " & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " <a href=""default.asp"">Tous Les Forums</a><br />" & vbNewLine
if MethodType = "Topic" or _
MethodType = "TopicQuote" or _
MethodType = "Reply" or _
MethodType = "ReplyQuote" or _
MethodType = "Edit" or _
MethodType = "EditTopic" then
Response.Write " " & getCurrentIcon(strIconBar,"","align=""absmiddle""")
if blnCStatus <> 0 then
Response.Write getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""")
else
Response.Write getCurrentIcon(strIconFolderClosed,"","align=""absmiddle""")
end if
Response.Write " <a href=""default.asp?CAT_ID=" & Cat_ID & """>" & ChkString(strCatTitle, "title") & "</a><br />" & vbNewLine
Response.Write " " & getCurrentIcon(strIconBlank,"","align=""absmiddle""") & getCurrentIcon(strIconBar,"","align=""absmiddle""")
if blnFStatus <> 0 and blnCStatus <> 0 then
Response.Write getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""")
else
Response.Write getCurrentIcon(strIconFolderClosed,"","align=""absmiddle""")
end if
Response.Write " <a href=""forum.asp?FORUM_ID=" & Forum_ID & """>" & ChkString(strForum_Title, "title") & "</a><br />" & vbNewLine
end if
if MethodType = "Reply" or _
MethodType = "ReplyQuote" or _
MethodType = "TopicQuote" or _
MethodType = "Edit" or _
MethodType = "EditTopic" then
Response.Write " " & getCurrentIcon(strIconBlank,"","align=""absmiddle""") & getCurrentIcon(strIconBlank,"","align=""absmiddle""") & getCurrentIcon(strIconBar,"","align=""absmiddle""")
if blnTStatus <> 0 and blnFStatus <> 0 and blnCStatus <> 0 then
Response.Write getCurrentIcon(strIconFolderOpenTopic,"","align=""absmiddle""")
else
Response.Write getCurrentIcon(strIconFolderClosedTopic,"","align=""absmiddle""")
end if
Response.Write " <a href=""" & chkString(Request.Form("refer"),"refer") & """>" & ChkString(strTopicTitle,"title") & "</a>" & vbNewLine
end if
Response.write " </font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine
if boolOk = 1 then
Response.write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>"
select case MethodType
case "Edit"
Response.Write("Votre Réponse a été Modifié avec Succès!")
case "EditCategory"
' DEM --> Added if statement to handle if subscriptions or moderation is allowed
if strSubscription > 0 or strModeration > 0 then
Response.Write("Renseignements sur la Catégorie Modifiées avec Succès")
else
Response.Write("Nom de la Catégorie Modifiée avec Succès!")
end if
case "EditForum"
Response.Write("Mise à Jour de l'Information FORUM Avec Succès!")
case "EditTopic"
Response.Write("Sujet Modifié avec Succès!")
case "EditURL"
Response.Write("URL Information Mise à Jour avec Succès!")
case "Reply", "ReplyQuote", "TopicQuote"
' DEM --> If moderated post, the counts should not be updated until after approval
' Combined the Reply, ReplyQuote and TopicQuote because the basic code was the same.
if Moderation = "Yes" then
Response.Write("Nouvelle Réponse Postée! Elle apparaîtra une fois approuvé par un modérateur")
else
Response.Write("Nouvelle Réponse Postée!")
DoPCount
if ForumCountMPosts <> 0 then
DoUCount MemberID
end if
end if
DoULastPost MemberID
case "Topic"
' DEM --> If moderated post, the counts should not be updated until after approval
if Moderation = "Yes" then
Response.Write("Nouveau Sujet Posté! Il apparaîtra une fois approuvé par un modérateur")
else
Response.Write("Nouveau Sujet Posté!")
DoTCount
DoPCount
if ForumCountMPosts <> 0 then
DoUCount MemberID
end if
end if
DoULastPost MemberID
case "Forum"
Response.Write("Nouveau Forum Créé!")
case "URL"
Response.Write("Nouveau URL Créé!")
case "Category"
Response.Write("Nouvelle Catégorie Créée!")
case else
Response.Write("Completé!")
'DoPCount
'DoUCount Request.Form("UserName")
'DoULastPost Request.Form("UserName")
end select
if MethodType = "Topic" then
strReturnURL = "topic.asp?TOPIC_ID=" & NewTopicID
strReturnTxt = "Aller au Nouveau Sujet"
elseif MethodType = "Reply" or MethodType = "ReplyQuote" or MethodType = "TopicQuote" then
strReturnURL = "topic.asp?whichpage=-1&TOPIC_ID=" & Topic_ID & "&REPLY_ID=" & NewReplyID
strReturnTxt = "Revenir au sujet"
elseif MethodType = "EditTopic" then
strReturnURL = "topic.asp?TOPIC_ID=" & Topic_ID
strReturnTxt = "Revenir au sujet"
elseif MethodType = "Edit" then
strReturnURL = "topic.asp?whichpage=-1&TOPIC_ID=" & Topic_ID & "&REPLY_ID=" & Reply_ID
strReturnTxt = "Revenir au sujet"
else
strReturnURL = chkString(Request.Form("refer"),"refer")
strReturnTxt = "Revenir Au Forum"
end if
Response.write "</font></p>" & vbNewLine & _
" <meta http-equiv=""Refresh"" content=""2; URL=" & strReturnURL & """>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>"
select case MethodType
case "Category"
Response.Write("N'oubliez pas de créer au moins un nouveau forum dans cette catégorie.")
case "Forum"
Response.Write("Le nouveau forum est prêt pour les utilisateurs de commencer à poster!")
case "EditForum", "EditCategory"
Response.Write("Je vous remercie de votre contribution!")
case "URL"
Response.Write("La nouvelle Mise à Jour Faite URL est en Place!")
case "EditURL"
Response.Write("Bonne journée!")
case "Topic", "TopicQuote", "EditTopic", "Reply", "ReplyQuote", "Edit"
Response.Write("Je vous remercie de votre contribution!")
case else
Response.Write("Bonne journée!")
end select
Response.write "</font></p>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""" & strReturnURL & """>" & strReturnTxt & "</a></font></p>" & vbNewLine
else
Response.write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>Il Y A Un Problème!</font></p>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """>" & str_err_Msg & "</font></p>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""JavaScript:history.go(-1)"">Retour pour Corriger le Problème.</a></font></p>" & vbNewLine
end if
WriteFooter
Response.End
end sub
sub newForumMembers(fForumID)
on error resume next
if Request.Form("AuthUsers") = "" then
exit Sub
end if
Users = split(Request.Form("AuthUsers"),",")
for count = Lbound(Users) to Ubound(Users)
strSql = "INSERT INTO " & strTablePrefix & "ALLOWED_MEMBERS ("
strSql = strSql & " MEMBER_ID, FORUM_ID) VALUES ( "& CLng(Users(count)) & ", " & fForumID & ")"
my_conn.execute (strSql),,adCmdText + adExecuteNoRecords
if err.number <> 0 then
Go_REsult err.description, 0
end if
next
on error goto 0
end sub
sub updateForumMembers(fForumID)
my_Conn.execute ("DELETE FROM " & strTablePrefix & "ALLOWED_MEMBERS WHERE FORUM_ID = " & fForumId),,adCmdText + adExecuteNoRecords
newForumMembers(fForumID)
end sub
sub newForumModerators(fForumID)
on error resume next
if Request.Form("ForumMod") = "" then
exit Sub
end if
Users = split(Request.Form("ForumMod"),",")
for count = Lbound(Users) to Ubound(Users)
strSql = "INSERT INTO " & strTablePrefix & "MODERATOR ("
strSql = strSql & " MEMBER_ID, FORUM_ID) VALUES ( "& CLng(Users(count)) & ", " & fForumID & ")"
my_conn.execute (strSql),,adCmdText + adExecuteNoRecords
if err.number <> 0 then
Go_REsult err.description, 0
end if
next
on error goto 0
end sub
sub updateForumModerators(fForumID)
my_Conn.execute ("DELETE FROM " & strTablePrefix & "MODERATOR WHERE FORUM_ID = " & fForumId),,adCmdText + adExecuteNoRecords
newForumModerators(fForumID)
end sub
sub DoAutoMoveEmail(TopicNum)
'## Emails Topic Author if Topic Moved.
strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.MEMBER_ID," & strMemberTablePrefix & "MEMBERS.M_NAME, " & strMemberTablePrefix & "MEMBERS.M_EMAIL, " & strActivePrefix & "TOPICS.FORUM_ID, " & strActivePrefix & "TOPICS.T_SUBJECT "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS, " & strActivePrefix & "TOPICS "
strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strActivePrefix & "TOPICS.T_AUTHOR "
strSql = strSql & " AND " & strActivePrefix & "TOPICS.TOPIC_ID = " & TopicNum
strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.M_STATUS <> 0"
set rs2 = my_Conn.Execute (strSql)
If Not rs2.EOF Then
email = rs2("M_EMAIL")
user_name = rs2("M_NAME")
Topic_Title = rs2("T_SUBJECT")
ForumId = rs2("FORUM_ID")
Usernum = rs2("MEMBER_ID")
rs2.close
set rs2 = nothing
if lcase(strEmail) = "1" then
strRecipientsName = user_name
strRecipients = email
strSubject = strForumTitle & " - Sujet Déplacé"
strMessage = "Bonjour " & user_name & vbNewLine & vbNewLine
strMessage = strMessage & "Votre annonce sur " & strForumTitle & "." & vbNewLine
strMessage = strMessage & "Regarder l'objet - " & Topic_Title & "." & vbNewLine & vbNewLine
if not(chkForumAccess(ForumID,Usernum,false)) then
strMessage = strMessage & "A été retiré de l'affichage public, Si vous avez des questions concernant cela, s'il vous plaît contacter l'administrateur du forum" & vbNewLine
else
strMessage = strMessage & "A été déplacé vers un nouveau forum, vous pouvez le voir à " & vbNewLine & Left(Request.Form("refer"), InstrRev(Request.Form("refer"), "/")) & "topic.asp?TOPIC_ID=" & TopicNum & vbNewLine
end if
%>
<!--#INCLUDE FILE="inc_mail.asp" -->
<%
end if
Else
rs2.Close
Set rs2 = nothing
End if
end sub
'## Subscribe checkbox start ##
sub DeleteSubscription(Level, MemberID, CatID, ForumID, TopicID)
' --- Delete the appropriate sublevel of subscriptions
StrSql = "DELETE FROM " & strTablePrefix & "SUBSCRIPTIONS"
StrSql = StrSql & " WHERE " & strTablePrefix & "SUBSCRIPTIONS.MEMBER_ID = " & MemberID
if sublevel = "CAT" then
StrSql = StrSQL & " AND " & strTablePrefix & "SUBSCRIPTIONS.CAT_ID = " & CatID
elseif sublevel = "FORUM" then
StrSql = StrSQL & " AND " & strTablePrefix & "SUBSCRIPTIONS.FORUM_ID = " & ForumID
elseif sublevel = "TOPIC" then
StrSql = StrSQL & " AND " & strTablePrefix & "SUBSCRIPTIONS.TOPIC_ID = " & TopicID
end if
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end sub
sub AddSubscription(SubLevel, MemberID, CatID, ForumID, TopicID)
' --- Insert the appropriate sublevel subscription
StrSql = "INSERT INTO " & strTablePrefix & "SUBSCRIPTIONS"
StrSql = StrSql & "(MEMBER_ID, CAT_ID, FORUM_ID, TOPIC_ID) VALUES (" & MemberID & ", "
if sublevel = "BOARD" then
StrSql = StrSql & "0, 0, 0)"
elseif sublevel = "CAT" then
StrSql = StrSql & CatID & ", 0, 0)"
elseif sublevel = "FORUM" then
StrSql = StrSql & CatID & ", " & ForumID & ", 0)"
else
StrSql = StrSql & CatID & ", " & ForumID & ", " & TopicID & ")"
end if
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end sub
'## Subscribe checkbox end ##
%>
& "SUBSCRIPTIONS.FORUM_ID = " & ForumID
elseif sublevel = "TOPIC" then
StrSql = StrSQL & " AND " & strTablePrefix & "SUBSCRIPTIONS.TOPIC_ID = " & TopicID
end if
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end sub
sub AddSubscription(SubLevel, MemberID, CatID, ForumID, TopicID)
' --- Insert the appropriate sublevel subscription
StrSql = "INSERT INTO " & strTablePrefix & "SUBSCRIPTIONS"
StrSql = StrSql & "(MEMBER_ID, CAT_ID, FORUM_ID, TOPIC_ID) VALUES (" & MemberID & ", "
if sublevel = "BOARD" then
StrSql = StrSql & "0, 0, 0)"
elseif sublevel = "CAT" then
StrSql = StrSql & CatID & ", 0, 0)"
elseif sublevel = "FORUM" then
StrSql = StrSql & CatID & ", " & ForumID & ", 0)"
else
StrSql = StrSql & CatID & ", " & ForumID & ", " & TopicID & ")"
end if
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end sub
'## Subscribe checkbox end ##
%>
|
Cordially, Maxime
Taxation consists in so plucking the goose to get the most out of feathers with the least possible cries.(Jean-Baptiste Colbert)
|
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 14 June 2014 : 06:06:01
|
Sorry, I used the wrong sample file ... very confusing to you. I have replaced it on SnitzBitz. The code was in the wrong place in this file. I moved it.
post_info.asp
<%
'#################################################################################
'## Snitz Forums 2000 v3.4.07
'#################################################################################
'## Copyright (C) 2000-09 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.
'##
'## 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_header.asp" -->
<!--#INCLUDE FILE="inc_func_secure.asp" -->
<!--#INCLUDE FILE="inc_func_member.asp" -->
<!--#INCLUDE FILE="inc_moderation.asp" -->
<!--#INCLUDE FILE="inc_subscription.asp" -->
<!--#INCLUDE FILE="inc_func_count.asp" -->
<%
if request("ARCHIVE") = "true" then
strActivePrefix = strTablePrefix & "A_"
ArchiveView = "true"
else
strActivePrefix = strTablePrefix
ArchiveView = ""
end if
'Topic Move Check
Dim blnTopicMoved
Dim fSubscription
fsubscription = 1
blnTopicMoved = false
if strAuthType = "db" and strDBNTUserName = "" and len(Request.Form("Password")) <> 64 then
strPassword = sha256("" & Request.Form("Password"))
else
strPassword = ChkString(Request.Form("Password"),"SQLString")
end if
if strAuthType = "db" and strDBNTUserName = "" then
strDBNTUserName = Request.Form("UserName")
if mLev = 0 then mLev = cLng(chkUser(strDBNTUserName, strPassword,-1))
end if
MethodType = chkString(Request.Form("Method_Type"),"SQLString")
if Request.Form("CAT_ID") <> "" then
if IsNumeric(Request.Form("CAT_ID")) = True then
Cat_ID = cLng(Request.Form("CAT_ID"))
else
Response.Redirect("default.asp")
end if
end if
if Request.Form("FORUM_ID") <> "" then
if IsNumeric(Request.Form("FORUM_ID")) = True then
Forum_ID = cLng(Request.Form("FORUM_ID"))
else
Response.Redirect("default.asp")
end if
end if
if Request.Form("TOPIC_ID") <> "" then
if IsNumeric(Request.Form("TOPIC_ID")) = True then
Topic_ID = cLng(Request.Form("TOPIC_ID"))
else
Response.Redirect("default.asp")
end if
end if
if Request.Form("REPLY_ID") <> "" then
if IsNumeric(Request.Form("REPLY_ID")) = True then
Reply_ID = cLng(Request.Form("REPLY_ID"))
else
Response.Redirect("default.asp")
end if
end if
if Request.Form("Subscription") <> "" then
fSubscription = cLng(Request.Form("Subscription"))
else
fSubscription = 0
end if
if Request.Form("cookies") = "yes" then
strSelectSize = Request.Form("SelectSize")
end if
if strSelectSize = "" or IsNull(strSelectSize) then
strSelectSize = Request.Cookies(strUniqueID & "strSelectSize")
end if
if not(IsNull(strSelectSize)) and strSelectSize <> "" then
if strSetCookieToForum = 1 then
Response.Cookies(strUniqueID & "strSelectSize").Path = strCookieURL
else
Response.Cookies(strUniqueID & "strSelectSize").Path = "/"
end if
Response.Cookies(strUniqueID & "strSelectSize") = strSelectSize
Response.Cookies(strUniqueID & "strSelectSize").expires = dateAdd("yyyy", 1, strForumTimeAdjust)
end if
if MethodType = "Edit" or _
MethodType = "EditTopic" or _
MethodType = "Reply" or _
MethodType = "ReplyQuote" or _
MethodType = "TopicQuote" then
'## check if topic exists in TOPICS table
set rsTCheck = my_Conn.Execute ("SELECT TOPIC_ID FROM " & strActivePrefix & "TOPICS WHERE TOPIC_ID = " & Topic_ID)
if rsTCheck.EOF or rsTCheck.BOF then
set rsTCheck = nothing
Go_Result "Désolé, ce sujet n'existe plus dans la base de données", 0
end if
set rsTCheck = nothing
end if
'set rs = Server.CreateObject("ADODB.RecordSet")
err_Msg = ""
ok = ""
if ArchiveView <> "" then
if MethodType = "Reply" or _
MethodType = "ReplyQuote" or _
MethodType = "TopicQuote" then
Go_Result "Cela n'est pas autorisé dans les archives.", 0
end if
end if
if MethodType = "Edit" then
'## Forum_SQL - Get the author of the reply
strSql = "SELECT R_AUTHOR "
strSql = strSql & " FROM " & strActivePrefix & "REPLY "
strSql = strSql & " WHERE REPLY_ID = " & REPLY_ID
set rsStatus = my_Conn.Execute(strSql)
if rsStatus.EOF or rsStatus.BOF then
rsStatus.close
set rsStatus = nothing
Go_Result "S'il vous plaît ne pas essayer de modifier l'URL<br />d'accéder à Verrouiller Forums/Categories.", 0
else
strReplyAuthor = rsStatus("R_AUTHOR")
rsStatus.close
set rsStatus = nothing
end if
end if
if MethodType = "Edit" or _
MethodType = "EditTopic" or _
MethodType = "Reply" or _
MethodType = "ReplyQuote" or _
MethodType = "Topic" or _
MethodType = "TopicQuote" then
if MethodType <> "Topic" then
'## Forum_SQL - Find out if the Category, Forum or Topic is Locked or Un-Locked and if it Exists
strSql = "SELECT C.CAT_STATUS, C.CAT_NAME, " &_
"F.FORUM_ID, F.F_STATUS, F.F_TYPE, F.F_SUBJECT, " &_
"T.T_STATUS, T.T_AUTHOR, T.T_SUBJECT " &_
" FROM " & strTablePrefix & "CATEGORY C, " &_
strTablePrefix & "FORUM F, " &_
strActivePrefix & "TOPICS T" &_
" WHERE C.CAT_ID = T.CAT_ID " &_
" AND F.FORUM_ID = T.FORUM_ID " &_
" AND T.TOPIC_ID = " & Topic_ID & ""
else
'## Forum_SQL - Find out if the Category or Forum is Locked or Un-Locked and if it Exists
strSql = "SELECT C.CAT_STATUS, C.CAT_NAME, " &_
"F.FORUM_ID, F.F_STATUS, F.F_TYPE, F.F_SUBJECT " &_
" FROM " & strTablePrefix & "CATEGORY C, " &_
strTablePrefix & "FORUM F" &_
" WHERE C.CAT_ID = F.CAT_ID " &_
" AND F.FORUM_ID = " & Forum_ID & ""
end if
set rsStatus = my_Conn.Execute(strSql)
if rsStatus.EOF or rsStatus.BOF then
rsStatus.close
set rsStatus = nothing
Go_Result "S'il vous plaît ne pas essayer de modifier l'URL<br />d'accéder à verrouillée Forums/Categories.", 0
else
blnCStatus = rsStatus("CAT_STATUS")
strCatTitle = rsStatus("CAT_NAME")
blnFStatus = rsStatus("F_STATUS")
Forum_ID = rsStatus("FORUM_ID")
Forum_Type = rsStatus("F_TYPE")
strForum_Title = rsStatus("F_SUBJECT")
if MethodType <> "Topic" then
blnTStatus = rsStatus("T_STATUS")
strTopicAuthor = rsStatus("T_AUTHOR")
strTopicTitle = rsStatus("T_SUBJECT")
else
blnTStatus = 1
end if
rsStatus.close
set rsStatus = nothing
end if
if mLev = 4 then
Adminowed = 1
ForumChkSkipowed = 1
elseif mLev = 3 then
if chkForumModerator(Forum_ID, ChkString(strDBNTUserName, "decode")) = "1" then
Adminowed = 1
ForumChkSkipowed = 1
else
if lcase(strNoCookies) = "1" then
Adminowed = 1
ForumChkSkipowed = 0
else
Adminowed = 0
ForumChkSkipowed = 0
end if
end if
elseif lcase(strNoCookies) = "1" then
Adminowed = 1
ForumChkSkipowed = 0
else
Adminowed = 0
ForumChkSkipowed = 0
end if
select case MethodType
case "Topic"
if (Forum_Type = 1) then
Go_Result "Vous avez essayé de poster un nouveau sujet sur ??un forum désigné comme un lien Internet",0
end if
if (blnCStatus = 0) and (Adminowed = 0) then
Go_Result "Vous avez essayé de poster un nouveau sujet à une catégorie Verrouillé", 0
end if
if (blnFStatus = 0) and (Adminowed = 0) then
Go_Result "Vous avez essayé de poster un nouveau sujet sur ??un forum fermé", 0
end if
case "EditTopic"
if ((blnCStatus = 0) or (blnFStatus = 0) or (blnTStatus = 0)) and (Adminowed = 0) then
Go_Result "Vous avez tenté de modifier un Sujet fermé", 0
end if
case "Reply", "ReplyQuote", "TopicQuote"
if ((blnCStatus = 0) or (blnFStatus = 0) or (blnTStatus = 0)) and (Adminowed = 0) then
Go_Result "Vous avez tenté de répondre à un Sujet fermé", 0
end if
case "Edit"
if ((blnCStatus = 0) or (blnFStatus = 0) or (blnTStatus = 0)) and (Adminowed = 0) then
Go_Result "Vous avez tenté de modifier une réponse à un sujet fermé", 0
end if
end select
if strPrivateForums = "1" and ForumChkSkipowed = 0 then
if not(chkForumAccess(Forum_ID,MemberID,false)) then
Go_Result "Vous n'avez pas accès à publier sur ce forum", 0
end if
end if
end if
' If Creating a new topic or reply, the subscription and moderation capabilities will need to be checked.
Moderation = "No"
if MethodType = "Topic" or _
MethodType = "Edit" or _
MethodType = "Reply" or _
MethodType = "ReplyQuote" or _
MethodType = "TopicQuote" or _
MethodType = "Forum" or _
MethodType = "EditForum" then
if strModeration > 0 or strSubscription > 0 then
'## Forum_SQL - Get the Cat_Subscription, Cat_Moderation, Forum_Subscription, Forum_Moderation
strSql = "SELECT C.CAT_MODERATION, C.CAT_SUBSCRIPTION, C.CAT_NAME "
if MethodType <> "Forum" then
strSql = strSql & ", F.F_MODERATION, F.F_SUBSCRIPTION "
end if
strsql = strsql & " FROM " & strTablePrefix & "CATEGORY C"
if MethodType <> "Forum" then
strSql = strSql & ", " & strTablePrefix & "FORUM F"
end if
strSql = strSql & " WHERE C.CAT_ID = " & Cat_ID
if MethodType <> "Forum" then
strSql = strSql & " AND F.FORUM_ID = " & Forum_ID
end if
set rsCheck = my_Conn.Execute (strSql)
CatName = rsCheck("CAT_NAME")
CatSubscription = rsCheck("CAT_SUBSCRIPTION")
CatModeration = rsCheck("CAT_MODERATION")
if MethodType <> "Forum" then
ForumSubscription = rsCheck("F_SUBSCRIPTION")
ForumModeration = rsCheck("F_MODERATION")
end if
rsCheck.Close
set rsCheck = nothing
if MethodType <> "Forum" then
'## Moderators and Admins are not subject to Moderation
if strModeration = 0 or mlev = 4 or chkForumModerator(Forum_ID, strDBNTUserName) = "1" then
Moderation = "No"
'## Is Moderation owed on the category?
elseif CatModeration = 1 then
'## if this is a topic, is forum moderation set to posts or topic?
if (ForumModeration = 1 or ForumModeration = 2) and (MethodType = "Topic") then
Moderation = "Yes"
'## if this is a reply, is forum moderation set to posts or reply?
elseif (ForumModeration = 1 or ForumModeration = 3) and (MethodType <> "Topic") then
Moderation = "Yes"
end if
end if
end if
end if
end if
if MethodType = "Edit" then
member = cLng(ChkUser(strDBNTUserName, strPassword, strReplyAuthor))
Select Case Member
case 0 '## Invalid Pword
Go_Result "Mot de passe non valide ou nom d'utilisateur", 0
Response.End
case 1 '## Author of Post so OK
'## Do Nothing
case 2 '## Normal User - Not Authorised
Go_Result "Seul un Administrateur, un Modérateur ou l'auteur peut modifier ce message", 0
Response.End
case 3 '## Moderator so OK - check the Moderator of this forum
if chkForumModerator(Forum_ID, strDBNTUserName) = "0" then
Go_Result "Seul un Administrateur, un Modérateur ou à l'auteur peut modifier ce message", 0
end if
if strReplyAuthor = intAdminMemberID and MemberID <> intAdminMemberID then
Go_Result "Seul le Forum Admin pouvez modifier ce message", 0
end if
case 4 '## Admin so OK
if strReplyAuthor = intAdminMemberID and MemberID <> intAdminMemberID then
Go_Result "Seul le Forum Admin pouvez modifier ce message", 0
end if
case else
Go_Result cstr(Member), 0
Response.End
end select
txtMessage = ChkString(Request.Form("Message"),"message")
Err_Msg = ""
if txtMessage = " " then
Err_Msg = Err_Msg & "<li>Vous devez saisir un message pour votre réponse</li>"
end if
if Err_Msg = "" then
'## Forum_SQL - Do DB Update
strSql = "UPDATE " & strActivePrefix & "REPLY "
strSql = strSql & " SET R_MESSAGE = '" & txtMessage & "'"
if Request.Form("sig") = "yes" and strDSignatures = "1" then
strSql = strSql & ", R_SIG = 1"
else
strSql = strSql & ", R_SIG = 0"
end if
if mLev < 4 and strEditedByDate = "1" then
strSql = strSql & ", R_LAST_EDIT = '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", R_LAST_EDITBY = " & MemberID
end if
strSql = strSql & " WHERE REPLY_ID=" & Reply_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
if mLev <> 4 and Moderation = "No" then
'## Forum_SQL - Update Last Post
strSql = " UPDATE " & strTablePrefix & "FORUM"
strSql = strSql & " SET F_LAST_POST = '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", F_LAST_POST_AUTHOR = " & MemberID
strSql = strSql & ", F_LAST_POST_TOPIC_ID = " & Topic_ID
strSql = strSql & ", F_LAST_POST_REPLY_ID = " & Reply_ID
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
'## Forum_SQL - Update Last Post
strSql = " UPDATE " & strActivePrefix & "TOPICS"
strSql = strSql & " SET T_LAST_POST = '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", T_LAST_POST_AUTHOR = " & MemberID
strSql = strSql & ", T_LAST_POST_REPLY_ID = " & Reply_ID
strSql = strSql & " WHERE TOPIC_ID = " & Topic_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end if
if Moderation = "No" then
'## Subscribe checkbox start ##
if request.form("TNotify") <> "" then
if request.form("TNotify") = "1" then
AddSubscription "TOPIC", MemberID, Cat_ID, Forum_ID, Topic_ID
else
DeleteSubscription "TOPIC", MemberID, Cat_ID, Forum_ID, Topic_ID
end if
end if
'## Subscribe checkbox end ##
end if
err_Msg = ""
if Err.description <> "" then
Go_Result "Il y a une erreur = " & Err.description, 0
Response.End
else
Go_Result "Mise à Jour Faite", 1
end if
else
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>Il Y A Un Problème Avec Vos Détails</font></p>" & vbNewLine & _
" <table align=""center"" border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """><ul>" & Err_Msg & "</ul></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""JavaScript:history.go(-1)"">Retour Pour Entrer des Données</a></font></p>" & vbNewLine
end if
end if
if MethodType = "EditTopic" then
member = cLng(ChkUser(strDBNTUserName, strPassword, strTopicAuthor))
select case Member
case 0 '## Invalid Pword
Go_Result "Mot de passe non valide ou nom d'utilisateur", 0
Response.End
case 1 '## Author of Post so OK
'## Do Nothing
case 2 '## Normal User - Not Authorised
Go_Result "Seul un Administrateur, un Modérateur ou l'auteur peut modifier ce message", 0
Response.End
case 3 '## Moderator so
if chkForumModerator(Forum_ID, strDBNTUserName) = "0" then
Go_Result "Seul un Administrateur, un Modérateur ou l'auteur peut modifier ce message", 0
end if
if strTopicAuthor = intAdminMemberID and MemberID <> intAdminMemberID then
Go_Result "Seul le Forum Admin pouvez modifier ce message", 0
end if
case 4 '## Admin so OK
if strTopicAuthor = intAdminMemberID and MemberID <> intAdminMemberID then
Go_Result "Seul le Forum Admin pouvez modifier ce message", 0
end if
'## Do Nothing
case else
Go_Result cstr(Member), 0
Response.End
end select
txtMessage = chkString(Request.Form("Message"),"message")
txtSubject = chkString(Request.Form("Subject"),"SQLString")
if strBadWordFilter = "1" then
txtSubject = chkString(ChkBadWords(Request.Form("Subject")),"SQLString")
end if
Err_Msg = ""
if txtSubject = " " then
Err_Msg = Err_Msg & "<li>Vous devez entrer un objet pour le sujet</li>"
end if
if Len(Request.Form("Subject")) > 50 then
Err_Msg = Err_Msg & "<li>Le Objet ne peut être supérieure à 50 caractères</li>"
end if
if txtMessage = " " then
Err_Msg = Err_Msg & "<li>Vous devez saisir un message pour le sujet</li>"
end if
if Err_Msg = "" then
'##Get Status of this Topic
strSql = "SELECT T_STATUS, T_UREPLIES"
strSql = Strsql & " FROM " & strActivePrefix & "TOPICS "
strSql = strSql & " WHERE TOPIC_ID = " & Topic_ID
set rsTopicStatusCheck = my_Conn.Execute (strSql)
Topic_Status = rsTopicStatusCheck("T_STATUS")
Topic_UReplies = rsTopicStatusCheck("T_UREPLIES")
rsTopicStatusCheck.Close
set rsTopicStatusCheck = nothing
if ArchiveView = "true" then
'## Prevent moving of topics in archives
Dim aryForum(1)
aryForum(1) = 0
Forum_ID = 0
else
'## Set array to pull out CAT_ID and FORUM_ID from dropdown values in post.asp
aryForum = split(Request.Form("Forum"), "|")
end if
'## if the forum we are moving to doesn't have MODERATION, and this topic did have that
'## we are going to have to auto-approve the topic !
AutoApprove = "No"
Moderation = "No"
if Forum_ID <> cLng(aryForum(1)) then
blnTopicMoved = true
strSql = "SELECT " & strTablePrefix & "FORUM.F_MODERATION "
strSql = strsql & " FROM " & strTablePrefix & "FORUM "
strSql = strSql & " WHERE " & strTablePrefix & "FORUM.FORUM_ID = " & Forum_ID
set rsForumCheck = my_Conn.Execute (strSql)
ForumModeration = rsForumCheck("F_MODERATION")
rsForumCheck.Close
set rsForumCheck = nothing
'## Is Moderation owed on the topic in the old forum ?
if (ForumModeration = 1 or ForumModeration = 2) then
Moderation = "Yes"
end if
if Moderation = "Yes" and Topic_Status > 0 then
strSql = "SELECT " & strTablePrefix & "FORUM.F_MODERATION "
strSql = Strsql & " FROM " & strTablePrefix & "FORUM "
strSql = strSql & " WHERE " & strTablePrefix & "FORUM.FORUM_ID = " & cLng(aryForum(1))
set rsNewForumCheck = my_Conn.Execute (strSql)
NewForumModeration = rsNewForumCheck("F_MODERATION")
rsNewForumCheck.Close
set rsNewForumCheck = nothing
'## Is Moderation owed on the topic in the new forum ?
if not(NewForumModeration = 1 or NewForumModeration = 2) then
AutoApprove = "Yes"
end if
end if
end if
if Moderation = "Yes" and AutoApprove = "Yes" and Topic_UReplies > 0 then
Go_Result "Il y avait une erreur = Le sujet que vous essayez de passer à un forum non modéré a pas de modérateur réponses <br /> Merci d'approuver ou de les supprimer, puis essayez à nouveau.", 0
Response.End
end if
' ## Anti-Spam Humans Below
If strAntiSpamDays > 0 or strAntiSpamPosts > 0 Then
strSqlP="SELECT M_POSTS, M_DATE FROM " & strMemberTablePrefix & "MEMBERS WHERE MEMBER_ID=" & MemberID
Set rsP=my_Conn.Execute(strSqlP)
If not rsP.EOF Then
strDays=rsP("M_DATE")
intPosts=rsP("M_POSTS")
rsP.Close
End If
Set rsP=Nothing
If strAntiSpamPosts > 0 Then
If intPosts<strAntiSpamPosts Then
If inStr(txtMessage, "http")>0 Then
Go_Result "Pas autorisé à poster des liens.",0
Response.End
End If
End If
End If
If strAntiSpamDays > 0 Then
intDays=DateDiff("d",StrtoDate(strDays),Now())
If intDays<strAntiSpamDays Then
If inStr(txtMessage, "http")>0 Then
Go_Result "Pas autorisé à poster des liens.",0
Response.End
End If
End If
End If
End If
' ## Anti-Spam Humans Above
'## Forum_SQL
strSql = "UPDATE " & strActivePrefix & "TOPICS "
strSql = strSql & " SET T_MESSAGE = '" & txtMessage & "'"
strSql = strSql & ", T_SUBJECT = '" & txtSubject & "'"
if blnTopicMoved then
strSql = strSql & ", CAT_ID = " & cLng(aryForum(0))
strSql = strSql & ", FORUM_ID = " & cLng(aryForum(1))
if AutoApprove = "Yes" then
strSql = strSql & ", T_STATUS = 1 "
end if
end if
if Request.Form("sig") = "yes" and strDSignatures = "1" then
strSql = strSql & ", T_SIG = 1"
else
strSql = strSql & ", T_SIG = 0"
end if
if mLev < 4 and strEditedByDate = "1" then
strSql = strSql & ", T_LAST_EDIT = '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", T_LAST_EDITBY = " & MemberID
end if
if ForumChkSkipowed = 1 then
if Request.Form("sticky") = 1 then
strSql = strSql & ", T_STICKY = " & 1
strSql = strSql & ", T_ARCHIVE_FLAG = " & 0
else
strSql = strSql & ", T_STICKY = " & 0
strSql = strSql & ", T_ARCHIVE_FLAG = " & 1
end if
end if
strSql = strSql & " WHERE TOPIC_ID = " & Topic_ID
my_Conn.Execute(strSql),,adCmdText + adExecuteNoRecords
'# Subscribe checkbox start ##
if request.form("TNotify") <> "" then
if request.form("TNotify") = "1" then
AddSubscription "TOPIC", MemberID, Cat_ID, Forum_ID, Topic_ID
elseif request.form("TNotify") = "0" then
DeleteSubscription "TOPIC", MemberID, Cat_ID, Forum_ID, Topic_ID
end if
end if
'## Subscribe checkbox end ##
if blnTopicMoved then
if strEmail = "1" and strMoveNotify = "1" then DoAutoMoveEmail(Topic_ID)
strSQL = "SELECT F_SUBSCRIPTION FROM " & strTablePrefix & "FORUM WHERE FORUM_ID=" & cLng(aryForum(1))
set rs = my_conn.execute (strSQL)
if rs("F_SUBSCRIPTION") < 3 then
strSQL = "DELETE FROM " & strTablePrefix & "SUBSCRIPTIONS WHERE TOPIC_ID=" & Topic_ID
my_conn.execute(strSQL),,adCmdText + adExecuteNoRecords
end if
rs.close
set rs = nothing
end if
if Forum_ID <> cLng(aryForum(1)) then
'## Forum_SQL
strSql = "UPDATE " & strActivePrefix & "REPLY "
strSql = strSql & " SET CAT_ID = " & cLng(aryForum(0))
strSql = strSql & ", FORUM_ID = " & cLng(aryForum(1))
strSql = strSql & " WHERE TOPIC_ID = " & Topic_ID
my_Conn.Execute(strSql),,adCmdText + adExecuteNoRecords
'set rs = Server.CreateObject("ADODB.Recordset")
'## if the topic hasn't been approved yet, it isn't counted either
'## so then the topic count doesn't need to be updated
if Moderation = "No" or AutoApprove = "Yes" or Topic_Status < 2 then
'## Forum_SQL - count total number of replies in Topics table
strSql = "SELECT T_REPLIES, T_LAST_POST, T_LAST_POST_AUTHOR "
strSql = strSql & " FROM " & strActivePrefix & "TOPICS "
strSql = strSql & " WHERE TOPIC_ID = " & Topic_ID
set rs = my_Conn.Execute (strSql)
intResetCount = rs("T_REPLIES") + 1
strT_Last_Post = rs("T_LAST_POST")
strT_Last_Post_Author = rs("T_LAST_POST_AUTHOR")
rs.Close
set rs = nothing
'## Forum_SQL - Get last_post and last_post_author for MoveFrom-Forum
strSql = "SELECT TOPIC_ID, T_LAST_POST, T_LAST_POST_AUTHOR, T_LAST_POST_REPLY_ID "
strSql = strSql & " FROM " & strActivePrefix & "TOPICS "
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID & " "
strSql = strSql & " ORDER BY T_LAST_POST DESC;"
set rs = my_Conn.Execute (strSql)
if not rs.eof then
strLast_Post_Topic_ID = rs("TOPIC_ID")
strLast_Post = rs("T_LAST_POST")
strLast_Post_Author = rs("T_LAST_POST_AUTHOR")
strLast_Post_Reply_ID = rs("T_LAST_POST_REPLY_ID")
else
strLast_Post_Topic_ID = 0
strLast_Post = ""
strLast_Post_Author = 0
strLast_Post_Reply_ID = 0
end if
rs.Close
set rs = nothing
if Moderation = "No" or Topic_Status < 2 then
'## Forum_SQL - Update count of replies to a topic in Forum table
strSql = "UPDATE " & strTablePrefix & "FORUM SET "
strSql = strSql & " F_COUNT = F_COUNT - " & intResetCount
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
my_Conn.Execute(strSql),,adCmdText + adExecuteNoRecords
'## Forum_SQL
strSql = "UPDATE " & strTablePrefix & "FORUM SET "
strSql = strSql & " F_TOPICS = F_TOPICS - 1 "
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
my_Conn.Execute(strSql),,adCmdText + adExecuteNoRecords
end if
strSql = "UPDATE " & strTablePrefix & "FORUM SET "
'if strLast_Post <> "" then
strSql = strSql & "F_LAST_POST = '" & strLast_Post & "'"
'if strLast_Post_Author <> "" then
strSql = strSql & ", F_LAST_POST_AUTHOR = " & strLast_Post_Author
'end if
'end if
strSql = strSql & ", F_LAST_POST_TOPIC_ID = " & strLast_Post_Topic_ID
strSql = strSql & ", F_LAST_POST_REPLY_ID = " & strLast_Post_Reply_ID
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
my_Conn.Execute(strSql),,adCmdText + adExecuteNoRecords
'## Forum_SQL - Get last_post and last_post_author for Forum
strSql = "SELECT TOPIC_ID, T_LAST_POST, T_LAST_POST_AUTHOR, T_AUTHOR, T_LAST_POST_REPLY_ID "
strSql = strSql & " FROM " & strActivePrefix & "TOPICS "
strSql = strSql & " WHERE FORUM_ID = " & cLng(aryForum(1))
strSql = strSql & " ORDER BY T_LAST_POST DESC;"
set rs = my_Conn.Execute (strSql)
if not rs.eof then
strAuthor = getMemberName(strT_Last_Post_Author)
strLast_Post_Topic_ID = rs("TOPIC_ID")
strLast_Post = rs("T_LAST_POST")
strLast_Post_Author = rs("T_LAST_POST_AUTHOR")
strLast_Post_Reply_ID = rs("T_LAST_POST_REPLY_ID")
else
strAuthor = ""
strLast_Post_Topic_ID = 0
strLast_Post = ""
strLast_Post_Author = ""
strLast_Post_Reply_ID = 0
end if
rs.Close
set rs = nothing
'Huw -- Update member count
if (AutoApprove = "Yes") and blnTStatus = 2 and blnTopicMoved then
set rsFCountMP = my_Conn.Execute("SELECT F_COUNT_M_POSTS FROM " & strTablePrefix & "FORUM WHERE FORUM_ID = " & cLng(aryForum(1)))
ForumCountMPosts = rsFCountMP("F_COUNT_M_POSTS")
rsFCountMP.close
set rsFCountMP = nothing
if ForumCountMPosts <> 0 then
doUCount(strT_Last_Post_Author)
end if
doULastPost(strT_Last_Post_Author)
end if
'## Forum_SQL - Update count of replies to a topic in Forum table
strSql = "UPDATE " & strTablePrefix & "FORUM SET "
strSql = strSql & " F_COUNT = (F_COUNT + " & intResetCount & ")"
strSql = strSql & ", F_LAST_POST_TOPIC_ID = " & strLast_Post_Topic_ID
strSql = strSql & ", F_LAST_POST_REPLY_ID = " & strLast_Post_Reply_ID
if strLast_Post <> "" then
strSql = strSql & ", F_LAST_POST = '" & strLast_Post & "'"
if strLast_Post_Author <> "" then
strSql = strSql & ", F_LAST_POST_AUTHOR = " & strLast_Post_Author
end if
end if
strSql = strSql & " WHERE FORUM_ID = " & cLng(aryForum(1))
my_Conn.Execute(strSql),,adCmdText + adExecuteNoRecords
'## Forum_SQL
strSql = "UPDATE " & strTablePrefix & "FORUM SET "
strSql = strSql & " F_TOPICS = F_TOPICS + 1 "
strSql = strSql & " WHERE FORUM_ID = " & cLng(aryForum(1))
my_Conn.Execute(strSql),,adCmdText + adExecuteNoRecords
end if
else
if mLev <> 4 and Moderation = "No" then
'## Forum_SQL - Update Last Post
strSql = " UPDATE " & strTablePrefix & "FORUM"
strSql = strSql & " SET F_LAST_POST = '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", F_LAST_POST_AUTHOR = " & MemberID
strSql = strSql & ", F_LAST_POST_TOPIC_ID = " & Topic_ID
strSql = strSql & ", F_LAST_POST_REPLY_ID = " & 0
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
'## Forum_SQL - Update Last Post
strSql = " UPDATE " & strActivePrefix & "TOPICS"
strSql = strSql & " SET T_LAST_POST = '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", T_LAST_POST_AUTHOR = " & MemberID
strSql = strSql & ", T_LAST_POST_REPLY_ID = " & 0
strSql = strSql & " WHERE TOPIC_ID = " & Topic_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end if
end if
err_Msg = ""
'aryForum = ""
if Err.description <> "" then
Go_Result "Il y a une erreur = " & Err.description, 0
Response.End
else
Go_Result "Mise à Jour Faite", 1
end if
else
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>Il Y A Un Problème Avec Vos Détails</font></p>" & vbNewLine & _
" <table align=""center"" border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """><ul>" & Err_Msg & "</ul></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""JavaScript:history.go(-1)"">Retour Pour Entrer des Données</a></font></p>" & vbNewLine
end if
end if
if MethodType = "Topic" then
'## Forum_SQL
strSql = "SELECT MEMBER_ID, M_LEVEL, M_EMAIL, M_LASTPOSTDATE, " & strDBNTSQLName
if strAuthType = "db" then
strSql = strSql & ", M_PASSWORD "
end if
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE " & strDBNTSQLName & " = '" & ChkString(strDBNTUserName, "SQLString") & "'"
strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.M_STATUS = " & 1
if strAuthType = "db" then
strSql = strSql & " AND M_PASSWORD = '" & ChkString(strPassword, "SQLString") &"'"
QuoteOk = (ChkQuoteOk(strDBNTUserName) and ChkQuoteOk(strPassword))
else
QuoteOk = ChkQuoteOk(strDBNTUserName)
end if
set rs = my_Conn.Execute (strSql)
if rs.BOF or rs.EOF or not(QuoteOk) or not (ChkQuoteOk(strPassword))then '## Invalid Password
rs.close
set rs = nothing
Go_Result "Nom d'utilisateur ou mot de passe invalide!", 0
Response.End
else
if strPrivateForums = "1" and ForumChkSkipowed = 0 then
if not(chkForumAccess(Forum_ID, MemberID,false)) then
Go_Result "You are not owed to post in this forum !", 0
end if
end if
if strFloodCheck = 1 then
if rs("M_LASTPOSTDATE") > DateToStr(DateAdd("s",strFloodCheckTime,strForumTimeAdjust)) and mLev < 3 then
strTimeLimit = replace(strFloodCheckTime, "-", "")
Go_Result "Désolé! Nous avons activé le contrôle des flood. <br /> Vous ne pouvez pas poster dans "& strTimeLimit &" secondes de votre dernier message. <br /> Veuillez essayer à nouveau après cette période de temps s'écoule.", 0
end if
end if
txtMessage = ChkString(Request.Form("Message"),"message")
txtSubject = ChkString(Request.Form("Subject"),"SQLString")
UserIPAddress = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
if UserIPAddress = "" or left(UserIPAddress, 7) = "unknown" then
UserIPAddress = Request.ServerVariables("REMOTE_ADDR")
elseif InStr(UserIPAddress, ",") > 0 then
UserIPAddress = Left(UserIPAddress, InStr(UserIPAddress, ",")-1)
elseif InStr(UserIPAddress, ";") > 0 then
UserIPAddress= Left(UserIPAddress, InStr(UserIPAddress, ";")-1)
end if
UserIPAddress = Trim(ChkString(UserIPAddress,"SQLString"))
if InStr(UserIPAddress, ":") > 0 then
UserIPAddress = Left(UserIPAddress, InStr(UserIPAddress, ":")-1)
end if
if strBadWordFilter = "1" then
txtSubject = chkString(ChkBadWords(Request.Form("Subject")),"SQLString")
end if
if txtMessage = " " then
Go_Result "Vous devez envoyer un message!", 0
Response.End
end if
if txtSubject = " " then
Go_Result "Vous devez poster un objet!", 0
Response.End
end if
if Len(Request.Form("Subject")) > 50 then
Go_Result "L'objet ne peut être supérieure à 50 caractères", 0
Response.End
end if
' ## Anti-Spam Topics Below
If intMod140 = "1" Then
strSql = "SELECT * FROM " & strTablePrefix & "ANTI_SPAM WHERE AS_ID=" & Request("intQ")
Set rsQ=my_Conn.Execute(strSql)
If not rsQ.EOF Then
strQText=rsQ("AS_Q")
rsQ.Close
End If
Set rsQ=Nothing
strGKA="":intQA=0
For ii = 1 to len(strQText)
If mid(strQText,ii,1)=" " Then
intQA=intQA+1
If intQA=cInt(Request("intWord"))-1 Then
ij=ii+1
End If
If intQA=cInt(Request("intWord")) Then
ik=ii
Exit For
End If
End If
Next
strGKA=mid(strQText,ij,ik-ij)
If strGKA <> Request("GateKeeperAnswer") Then Go_Result "Anti-Spam answer was incorrect.", 2
End If
' ## Anti-Spam Topics Above
if strSignatures = "1" and strDSignatures <> "1" then
if Request.Form("sig") = "yes" and GetSig(strDBNTUserName) <> " " then
txtMessage = txtMessage & vbNewline & vbNewline & ChkString(GetSig(strDBNTUserName), "signature" )
end if
end if
' ## Anti-Spam Humans Below
If strAntiSpamDays > 0 or strAntiSpamPosts > 0 Then
strSqlP="SELECT M_POSTS, M_DATE FROM " & strMemberTablePrefix & "MEMBERS WHERE MEMBER_ID=" & MemberID
Set rsP=my_Conn.Execute(strSqlP)
If not rsP.EOF Then
strDays=rsP("M_DATE")
intPosts=rsP("M_POSTS")
rsP.Close
End If
Set rsP=Nothing
If strAntiSpamPosts > 0 Then
If intPosts<strAntiSpamPosts Then
If inStr(txtMessage, "http")>0 Then
Go_Result "Pas autorisé à poster des liens.",0
Response.End
End If
End If
End If
If strAntiSpamDays > 0 Then
intDays=DateDiff("d",StrtoDate(strDays),Date(Now()))
If intDays<strAntiSpamDays Then
If inStr(txtMessage, "http")>0 Then
Go_Result "Pas autorisé à poster des liens.",0
Response.End
End If
End If
End If
End If
' ## Anti-Spam Humans Above
'## Forum_SQL - Add new post to Topics Table
strSql = "INSERT INTO " & strTablePrefix & "TOPICS (FORUM_ID"
strSql = strSql & ", CAT_ID"
strSql = strSql & ", T_SUBJECT"
strSql = strSql & ", T_MESSAGE"
strSql = strSql & ", T_AUTHOR"
strSql = strSql & ", T_LAST_POST"
strSql = strSql & ", T_LAST_POST_AUTHOR"
strSql = strSql & ", T_LAST_POST_REPLY_ID"
strSql = strSql & ", T_DATE"
strSql = strSql & ", T_STATUS"
if strIPLogging <> "0" then
strSql = strSql & ", T_IP"
end if
strSql = strSql & ", T_STICKY"
strSql = strSql & ", T_SIG"
strSql = strSql & ", T_ARCHIVE_FLAG"
strSql = strSql & ", T_REPLIES"
strSql = strSql & ", T_UREPLIES"
strSql = strSql & ") VALUES ("
strSql = strSql & Forum_ID
strSql = strSql & ", " & Cat_ID
strSql = strSql & ", '" & txtSubject & "'"
strSql = strSql & ", '" & txtMessage & "'"
strSql = strSql & ", " & rs("MEMBER_ID")
strSql = strSql & ", '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", " & rs("MEMBER_ID")
strSql = strSql & ", 0 "
strSql = strSql & ", '" & DateToStr(strForumTimeAdjust) & "'"
if Request.Form("lock") = 1 and ForumChkSkipowed = 1 then
strSql = strSql & ", 0 "
else
if Moderation = "Yes" then
strSql = strSql & ", 2 "
else
strSql = strSql & ", 1 "
end if
end if
if strIPLogging <> "0" then
strSql = strSql & ", '" & UserIPAddress & "'"
end if
if ForumChkSkipowed = 1 then
if Request.Form("sticky") = 1 then
strSql = strSql & ", 1 "
else
strSql = strSql & ", 0 "
end if
else
strSql = strSql & ", 0 "
end if
if Request.Form("sig") = "yes" and strDSignatures = "1" then
strSql = strSql & ", 1 "
else
strSql = strSql & ", 0 "
end if
if ForumChkSkipowed = 1 then
if Request.Form("sticky") = 1 then
strSql = strSql & ", 0 "
else
strSql = strSql & ", 1 "
end if
else
strSql = strSql & ", 1 "
end if
strSql = strSql & ", 0 "
strSql = strSql & ", 0 "
strSql = strSql & ")"
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
if Err.description <> "" then
err_Msg = "Il y a une erreur = " & Err.description
else
err_Msg = "Mise à Jour Faite"
end if
strSql = "SELECT Max(TOPIC_ID) as NewTopicID "
strSql = strSql & " FROM " & strActivePrefix & "TOPICS "
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
strSql = strSql & " and T_AUTHOR = " & rs("MEMBER_ID")
set rs9 = my_Conn.Execute (strSql)
NewTopicID = rs9("NewTopicId")
rs9.close
set rs9 = nothing
' DEM --> Do not update forum count if topic is moderated.... Added if and end if
if Moderation = "No" then
'## Forum_SQL - Increase count of topics and replies in Forum table by 1
strSql = "UPDATE " & strTablePrefix & "FORUM "
strSql = strSql & " SET F_LAST_POST = '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", F_TOPICS = F_TOPICS + 1"
strSql = strSql & ", F_COUNT = F_COUNT + 1"
strSql = strSql & ", F_LAST_POST_AUTHOR = " & rs("MEMBER_ID") & ""
strSql = strSql & ", F_LAST_POST_TOPIC_ID = " & NewTopicID
strSql = strSql & ", F_LAST_POST_REPLY_ID = " & 0
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end if
ProcessSubscriptions rs("MEMBER_ID"), Cat_ID, Forum_ID, NewTopicID, Moderation
if Moderation = "No" then
'## Subscribe checkbox ##
if request.form("TNotify") <> "" then
if request.form("TNotify") = "1" then
AddSubscription "TOPIC", rs("MEMBER_ID"), Cat_ID, Forum_ID, NewTopicID
elseif request.form("TNotify") = "0" then
DeleteSubscription "TOPIC", MemberID, Cat_ID, Forum_ID, NewTopicID
end if
end if
'## Subscribe checkbox end ##
end if
Go_Result err_Msg, 1
Response.End
end if
end if
if MethodType = "Reply" or MethodType = "ReplyQuote" or MethodType = "TopicQuote" then
'## Forum_SQL
strSql = "SELECT MEMBER_ID, M_LEVEL, M_EMAIL, M_LASTPOSTDATE, " & strDBNTSQLname
if strAuthType = "db" then
strSql = strSql & ", M_PASSWORD "
end if
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE " & strDBNTSQLName & " = '" & ChkString(strDBNTUserName, "SQLString") & "'"
strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.M_STATUS = " & 1
if strAuthType = "db" then
strSql = strSql & " AND M_PASSWORD = '" & ChkString(strPassword, "SQLString") &"'"
QuoteOk = (ChkQuoteOk(strDBNTUserName) and ChkQuoteOk(strPassword))
else
QuoteOk = ChkQuoteOk(strDBNTUserName)
end if
set rs = my_Conn.Execute (strSql)
if rs.BOF or rs.EOF or not(QuoteOk) or not(ChkQuoteOk(strPassword)) then '## Invalid Password
rs.close
set rs = nothing
err_Msg = "Mot de passe non valide ou nom d'utilisateur"
Go_Result(err_Msg), 0
Response.End
else
if strPrivateForums = "1" and ForumChkSkipowed = 0 then
if not(chkForumAccess(Forum_ID,MemberID,false)) then
Go_Result "Vous n'êtes pas autorisé à poster dans ce forum !", 0
end if
end if
if strFloodCheck = 1 then
if rs("M_LASTPOSTDATE") > DateToStr(DateAdd("s",strFloodCheckTime,strForumTimeAdjust)) and mLev < 3 then
strTimeLimit = replace(strFloodCheckTime, "-", "")
Go_Result "Désolé! Nous avons activé le contrôle des flood.<br />Vous ne pouvez pas poster dans les " & strTimeLimit & " secondes de votre dernier message.<br />S'il vous plaît essayer de nouveau après cette période de temps s'écoule.", 0
end if
end if
txtMessage = ChkString(Request.Form("Message"),"message")
UserIPAddress = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
if UserIPAddress = "" or left(UserIPAddress, 7) = "unknown" then
UserIPAddress = Request.ServerVariables("REMOTE_ADDR")
elseif InStr(UserIPAddress, ",") > 0 then
UserIPAddress = Left(UserIPAddress, InStr(UserIPAddress, ",")-1)
elseif InStr(UserIPAddress, ";") > 0 then
UserIPAddress= Left(UserIPAddress, InStr(UserIPAddress, ";")-1)
end if
UserIPAddress = Trim(ChkString(UserIPAddress,"SQLString"))
if InStr(UserIPAddress, ":") > 0 then
UserIPAddress = Left(UserIPAddress, InStr(UserIPAddress, ":")-1)
end if
if txtMessage = " " then
Go_Result "Vous devez envoyer un message!", 0
Response.End
end if
if strSignatures = "1" and strDSignatures <> "1" then
if Request.Form("sig") = "yes" and GetSig(strDBNTUserName) <> " " then
txtMessage = txtMessage & vbNewline & vbNewline & ChkString(GetSig(strDBNTUserName), "signature" )
end if
end if
'## Forum_SQL
strSql = "INSERT INTO " & strTablePrefix & "REPLY "
strSql = strSql & "(TOPIC_ID"
strSql = strSql & ", FORUM_ID"
strSql = strSql & ", CAT_ID"
strSql = strSql & ", R_AUTHOR"
strSql = strSql & ", R_DATE "
if strIPLogging <> "0" then
strSql = strSql & ", R_IP"
end if
strSql = strSql & ", R_STATUS"
strSql = strSql & ", R_SIG"
strSql = strSql & ", R_MESSAGE"
strSql = strSql & ") VALUES ("
strSql = strSql & Topic_ID
strSql = strSql & ", " & Forum_ID
strSql = strSql & ", " & Cat_ID
strSql = strSql & ", " & rs("MEMBER_ID")
strSql = strSql & ", " & "'" & DateToStr(strForumTimeAdjust) & "'"
if strIPLogging <> "0" then
strSql = strSql & ", " & "'" & UserIPAddress & "'"
end if
' DEM --> Added R_STATUS to ow for moderation of posts
' Used R_STATUS = 1 to match the topic status code.
if Moderation = "Yes" then
strSql = strSql & ", 2"
else
strSql = strSql & ", 1"
end if
' DEM --> End of Code added
if Request.Form("sig") = "yes" and strDSignatures = "1" then
strSql = strSql & ", 1 "
else
strSql = strSql & ", 0 "
end if
strSql = strSql & ", " & "'" & txtMessage & "'"
strSql = strSql & ")"
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
' DEM --> Do not update totals on topics and forums database if post is moderated...Added if and end if
if Moderation = "No" then
strSql = "SELECT Max(REPLY_ID) as NewReplyID "
strSql = strSql & " FROM " & strActivePrefix & "REPLY "
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
strSql = strSql & " and R_AUTHOR = " & rs("MEMBER_ID")
set rs9 = my_Conn.Execute (strSql)
NewReplyID = rs9("NewReplyID")
rs9.close
set rs9 = nothing
'## Forum_SQL - Update Last Post and count
strSql = "UPDATE " & strActivePrefix & "TOPICS "
strSql = strSql & " SET T_LAST_POST = '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", T_REPLIES = T_REPLIES + 1 "
strSql = strSql & ", T_LAST_POST_AUTHOR = " & rs("MEMBER_ID")
strSql = strSql & ", T_LAST_POST_REPLY_ID = " & NewReplyID
if Request.Form("lock") = 1 and ForumChkSkipowed = 1 then
strSql = strSql & ", T_STATUS = 0 "
end if
strSql = strSql & " WHERE TOPIC_ID = " & Topic_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
'## Subscribe checkbox start ##
if request.form("TNotify") <> "" then
if request.form("TNotify") = "1" then
AddSubscription "TOPIC", rs("MEMBER_ID"), Cat_ID, Forum_ID, Topic_ID
elseif request.form("TNotify") = "0" then
DeleteSubscription "TOPIC", MemberID, Cat_ID, Forum_ID, Topic_ID
end if
end if
'## Subscribe checkbox end ##
'## Forum_SQL
strSql = "UPDATE " & strTablePrefix & "FORUM "
strSql = strSql & " SET F_LAST_POST = '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", F_LAST_POST_AUTHOR = " & rs("MEMBER_ID")
strSql = strSql & ", F_LAST_POST_TOPIC_ID = " & Topic_ID
strSql = strSql & ", F_LAST_POST_REPLY_ID = " & NewReplyID
strSql = strSql & ", F_COUNT = F_COUNT + 1 "
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
else
'## Forum_SQL - Update Unmoderated post count
strSql = "UPDATE " & strActivePrefix & "TOPICS "
strSql = strSql & " SET T_UREPLIES = T_UREPLIES + 1 "
strSql = strSql & " WHERE TOPIC_ID = " & Topic_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end if
if Err.description <> "" then
Go_Result "il y a une erreur = " & Err.description, 0
Response.End
else
'if Moderation = "No" then
ProcessSubscriptions rs("MEMBER_ID"), Cat_ID, Forum_ID, Topic_ID, Moderation
'end if
Go_Result "Mise à Jour Faite", 1
Response.End
end if
end if
end if
if MethodType = "Forum" then
member = cLng(ChkUser(strDBNTUserName, strPassword,-1))
select case Member
case 0 '## Invalid Pword
Go_Result "Mot de passe non valide ou nom d'utilisateur", 0
Response.End
case 1 '## Author of Post
'## Do Nothing
case 2 '## Normal User - Not Authorized
Go_Result "Seul un Administrateur peut créer un Forum", 0
Response.End
case 3 '## Moderator - Not Authorized
Go_Result "Seul un Administrateur peut créer un Forum", 0
Response.End
case 4 '## Admin
'## Do Nothing
case else
Go_Result cstr(Member), 0
Response.End
end select
txtMessage = ChkString(Request.Form("Message"),"message")
txtSubject = ChkString(Request.Form("Subject"),"SQLString")
if strBadWordFilter = "1" then
txtSubject = chkString(ChkBadWords(Request.Form("Subject")),"SQLString")
end if
Err_Msg = ""
if txtSubject = " " then
Err_Msg = Err_Msg & "<li>Vous devez entrer un objet pour le Nouveau Forum</li>"
end if
if Err_Msg = "" then
'## Forum_SQL - Do DB Update
strSql = "INSERT INTO " & strTablePrefix & "FORUM "
strSql = strSql & "(CAT_ID"
strSql = strSql & ", F_STATUS"
if strPrivateForums = "1" then
strSql = strSql & ", F_PRIVATEFORUMS"
if Request.Form("AuthPassword") <> " " then
strSql = strSql & ", F_PASSWORD_NEW"
end if
end if
'strSql = strSql & ", F_LAST_POST"
strSql = strSql & ", F_SUBJECT"
strSql = strSql & ", F_DESCRIPTION"
strSql = strSql & ", F_TYPE"
strSql = strSql & ", F_L_ARCHIVE "
strSql = strSql & ", F_ARCHIVE_SCHED "
strSql = strSql & ", F_L_DELETE "
strSql = strSql & ", F_DELETE_SCHED "
strSql = strSql & ", F_SUBSCRIPTION"
strSql = strSql & ", F_MODERATION"
strSql = strSql & ", F_ORDER "
strSql = strSql & ", F_DEFAULTDAYS "
strSql = strSql & ", F_COUNT_M_POSTS "
strSql = strSql & ") VALUES ("
strSql = strSql & Cat_ID
strSql = strSql & ", 1 "
if strPrivateForums = "1" then
strSql = strSql & ", " & chkString(Request.Form("AuthType"), "SQLString") & ""
if Request.Form("AuthPassword") <> " " then
strSql = strSql & ", '" & ChkString(Request.Form("AuthPassword"),"SQLString") & "'"
end if
end if
'strSql = strSql & ", " & "'" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", '" & txtSubject & "'"
strSql = strSql & ", '" & txtMessage & "'"
strSql = strSql & ", 0"
strSql = strSql & ", '' "
strSql = strSql & ", 30 "
strSql = strSql & ", '' "
strSql = strSql & ", 365 "
' DEM --> Start of Code added for moderation and subscription
if strSubscription > 0 and CatSubscription > 0 and strEmail = "1" then
strSql = strSql & ", " & fSubscription
else
strSql = strSql & ", 0"
end if
if strModeration = 1 and CatModeration = 1 then
strSql = strSql & ", " & ChkString(Request.Form("Moderation"), "SQLString")
else
strSql = strSql & ", 0"
end if
' DEM --> End of Code added for moderation and subscription
strSql = strSql & ", 1 "
strSql = strSql & ", " & ChkString(Request.Form("DefaultDays"), "SQLString")
strSql = strSql & ", " & ChkString(Request.Form("ForumCntMPosts"), "SQLString")
strSql = strSql & ")"
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
Application.Lock
Application(strCookieURL & "JumpBoxChanged")= DateToStr(strForumTimeAdjust)
Application.UnLock
err_Msg = ""
if Err.description <> "" then
Go_Result "Il y a une erreur = " & Err.description, 0
Response.End
Else
set rsCount = my_Conn.execute("SELECT MAX(FORUM_ID) AS maxForumID FROM " & strTablePrefix & "FORUM ")
newForumMembers rsCount("maxForumId")
newForumModerators rsCount("maxForumId")
set rsCount = nothing
Go_Result "Mise à Jour Faite", 1
end if
else
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>Il Y A Un Problème Avec Vos Détails</font></p>" & vbNewLine & _
" <table align=""center"" border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """><ul>" & Err_Msg & "</ul></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""JavaScript:history.go(-1)"">Retour Pour Entrer des Données</a></font></p>" & vbNewLine
end if
end if
if MethodType = "URL" then
member = cLng(ChkUser(strDBNTUserName, strPassword,-1))
select case Member
case 0 '## Invalid Pword
Go_Result "Mot de passe non valide ou nom d'utilisateur", 0
Response.End
case 1 '## Author of Post
'## Do Nothing
case 2 '## Normal User - Not Authorised
Go_Result "Seul un administrateur peut créer un lien Web", 0
Response.End
case 3 '## Moderator
Go_Result "Seul un administrateur peut créer un lien Web", 0
Response.End
case 4 '## Admin
'## Do Nothing
case else
Go_Result cstr(Member), 0
Response.End
end select
txtMessage = ChkString(Request.Form("Message"),"message")
txtAddress = ChkString(Request.Form("Address"),"SQLString")
txtSubject = ChkString(Request.Form("Subject"),"SQLString")
if strBadWordFilter = "1" then
txtSubject = chkString(ChkBadWords(Request.Form("Subject")),"SQLString")
end if
Err_Msg = ""
if txtSubject = " " then
Err_Msg = Err_Msg & "<li>Vous devez entrer un objet pour le New URL</li>"
end if
if txtAddress = " " or lcase(txtAddress) = "http://" or lcase(txtAddress) = "https://" or lcase(txtAddress) = "file:///" then
Err_Msg = Err_Msg & "<li>Vous devez entrer une adresse pour le New URL</li>"
end if
if (left(lcase(txtAddress), 7) <> "http://" and left(lcase(txtAddress), 8) <> "https://" and left(lcase(txtAddress), 8) <> "file:///") and txtAddress <> "" then
Err_Msg = Err_Msg & "<li>Vous devez faire précéder l'adresse de <b>http://</b>, <b>https://</b> ou <b>file:///</b></li>"
end if
if Err_Msg = "" then
'## Forum_SQL - Do DB Update
strSql = "INSERT INTO " & strTablePrefix & "FORUM "
strSql = strSql & "(CAT_ID"
strSql = strSql & ", F_STATUS"
if strPrivateForums = "1" then
strSql = strSql & ", F_PRIVATEFORUMS"
end if
strSql = strSql & ", F_LAST_POST"
strSql = strSql & ", F_LAST_POST_AUTHOR"
strSql = strSql & ", F_SUBJECT"
strSql = strSql & ", F_URL"
strSql = strSql & ", F_DESCRIPTION"
strSql = strSql & ", F_TYPE"
strSql = strSql & ", F_L_ARCHIVE "
strSql = strSql & ", F_ARCHIVE_SCHED "
strSql = strSql & ", F_L_DELETE "
strSql = strSql & ", F_DELETE_SCHED "
strSql = strSql & ", F_SUBSCRIPTION, F_MODERATION"
strSql = strSql & ", F_ORDER "
strSql = strSql & ", F_DEFAULTDAYS "
strSql = strSql & ") VALUES ("
strSql = strSql & Cat_ID
strSql = strSql & ", 1"
if strPrivateForums = "1" then
strSql = strSql & ", " & ChkString(Request.Form("AuthType"), "SQLString") & ""
end if
strSql = strSql & ", " & "'" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", " & MemberID & " "
strSql = strSql & ", " & "'" & txtSubject & "'"
strSql = strSql & ", " & "'" & txtAddress & "'"
strSql = strSql & ", " & "'" & txtMessage & "'"
strSql = strSql & ", 1"
strSql = strSql & ", ''"
strSql = strSql & ", 30"
strSql = strSql & ", ''"
strSql = strSql & ", 365"
' DEM --> Added 0's for the subscription and moderation fields since they are ignored for URLS
strSql = strSql & ", 0, 0"
strSql = strSql & ", 1"
strSql = strSql & ", 30"
strSql = strSql & ") "
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
Application.Lock
Application(strCookieURL & "JumpBoxChanged")= DateToStr(strForumTimeAdjust)
Application.UnLock
err_Msg = ""
if Err.description <> "" then
Go_Result "Il y a une erreur = " & Err.description, 0
Response.End
else
set rsCount = my_Conn.execute("SELECT MAX(FORUM_ID) AS maxForumID FROM " & strTablePrefix & "FORUM ")
newForumMembers rsCount("maxForumId")
newForumModerators rsCount("maxForumId")
set rsCount = nothing
Go_Result "Mise à Jour Faite", 1
end if
else
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>Il Y A Un Problème Avec Vos Détails</font></p>" & vbNewLine & _
" <table align=""center"" border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """><ul>" & Err_Msg & "</ul></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""JavaScript:history.go(-1)"">Retour Pour Entrer des Données</a></font></p>" & vbNewLine
end if
end if
if MethodType = "EditForum" then
member = cLng(ChkUser(strDBNTUserName, strPassword,-1))
select case Member
case 0 '## Invalid Pword
Go_Result "Mot de passe non valide ou nom d'utilisateur", 0
Response.End
case 1 '## Author of Post
'## Do Nothing
case 2 '## Normal User - Not Authorised
Go_Result "Seul un Administrateur ou un Modérateur peut modifier ce Forum", 0
Response.End
case 3 '## Moderator
if chkForumModerator(Forum_ID, strDBNTUserName) = "0" then
Go_Result "Seul un Administrateur ou un Modérateur peut modifier ce Forum", 0
end if
case 4 '## Admin
'## Do Nothing
case else
Go_Result cstr(Member), 0
Response.End
end select
txtMessage = ChkString(Request.Form("Message"),"message")
txtSubject = ChkString(Request.Form("Subject"),"SQLString")
if strBadWordFilter = "1" then
txtSubject = chkString(ChkBadWords(Request.Form("Subject")),"SQLString")
end if
Err_Msg = ""
if txtSubject = " " then
Err_Msg = Err_Msg & "<li>Vous devez entrer un objet pour le Forum</li>"
end if
if strModeration <> 0 and Request.Form("Moderation") = 0 then
if CheckForUnModeratedPosts("FORUM", Cat_ID, Forum_ID, 0) > 0 then
Err_Msg = Err_Msg & "<li>S'il vous plaît Approuver ou Supprimer tous les messages Non Modérés / En Attente dans ce forum avant de se tourner Modération off</li>"
end if
end if
if Err_Msg = "" then
'## Forum_SQL - Check if CAT_ID changed
strSql = "SELECT " & strTablePrefix & "FORUM.CAT_ID "
strSql = strSql & " FROM " & strTablePrefix & "FORUM "
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
set rsCatIDCheck = my_Conn.execute(strSql)
bolCatIDChanged = (cSTr(rsCatIDCheck("CAT_ID")) <> ChkString(Request.Form("Category"), "SQLString"))
rsCatIDCheck.Close
set rsCatIDCheck = Nothing
'## Forum_SQL - Do DB Update
strSql = "UPDATE " & strTablePrefix & "FORUM "
strSql = strSql & " SET CAT_ID = " & cLng("0" & Request.Form("Category"))
if strPrivateForums = "1" then
strSql = strSql & ", F_PRIVATEFORUMS = " & cLng("0" & Request.Form("AuthType"))
if Request.Form("AuthPassword") <> " " then
strSql = strSql & ", F_PASSWORD_NEW = '" & ChkString(Request.Form("AuthPassword"),"SQLString") & "'"
end if
end if
strSql = strSql & ", F_SUBJECT = '" & txtSubject & "'"
strSql = strSql & ", F_DESCRIPTION = '" & txtMessage & "'"
if Request.Form("Moderation") <> "" then
strSql = strSql & ", F_MODERATION = " & cLng("0" & Request.Form("Moderation"))
end if
if fSubscription <> "" then
strSql = strSql & ", F_SUBSCRIPTION = " & cLng("0" & fSubscription)
end if
strSql = strSql & ", F_DEFAULTDAYS = " & cLng(Request.Form("DefaultDays"))
strSql = strSql & ", F_COUNT_M_POSTS = " & cLng("0" & Request.Form("ForumCntMPosts"))
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
Application.Lock
Application(strCookieURL & "JumpBoxChanged")= DateToStr(strForumTimeAdjust)
Application.UnLock
if bolCatIDChanged then
'## Update category CAT_SUBSCRIPTION/CAT_MODERATION if required
strSQL = "SELECT " & strTablePrefix & "CATEGORY.CAT_SUBSCRIPTION, " & strTablePrefix & "CATEGORY.CAT_MODERATION FROM " & strTablePrefix & "CATEGORY "
strSQL = strSQL & " WHERE CAT_ID=" & cLng("0" & Request.Form("Category"))
set rs = my_conn.execute(strSQL)
intCatSubs = rs("CAT_SUBSCRIPTION")
intCatMod = rs("CAT_MODERATION")
rs.close
set rs = nothing
if intCatSubs < fSubscription then
strSQL = "UPDATE " & strTablePrefix & "CATEGORY SET " & strTablePrefix & "CATEGORY.CAT_SUBSCRIPTION = " & fSubscription
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end if
if intCatMod = 0 and Request.Form("Moderation") > 0 then
strSQL = "UPDATE " & strTablePrefix & "CATEGORY SET " & strTablePrefix & "CATEGORY.CAT_MODERATION = " & 1
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end if
'## Forum_SQL - Do DB Update
strSql = "UPDATE " & strActivePrefix & "TOPICS "
strSql = strSql & " SET CAT_ID = " & cLng("0" & Request.Form("Category"))
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
'## Forum_SQL - Do DB Update
strSql = "UPDATE " & strActivePrefix & "REPLY "
strSql = strSql & " SET CAT_ID = " & cLng("0" & Request.Form("Category"))
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
' DEM --> Added _SUBSCRIPTIONS table
'## Forum_SQL - Do DB Update
strSql = "UPDATE " & strTablePrefix & "SUBSCRIPTIONS "
strSql = strSql & " SET CAT_ID = " & cLng("0" & Request.Form("Category"))
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end if
err_Msg= ""
if Err.description <> "" then
Go_Result "Il y a une erreur = " & Err.description, 0
Response.End
else
updateForumMembers Forum_ID
if mLev = 4 then
updateForumModerators Forum_ID
end if
Go_Result "Mise à Jour Faite", 1
end if
else
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>Il Y A Un Problème Avec Vos Détails</font></p>" & vbNewLine & _
" <table align=""center"" border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """><ul>" & Err_Msg & "</ul></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""JavaScript:history.go(-1)"">Retour Pour Entrer des Données</a></font></p>" & vbNewLine
end if
end if
if MethodType = "EditURL" then
member = cLng(ChkUser(strDBNTUserName, strPassword,-1))
select case Member
case 0 '## Invalid Pword
Go_Result "Mot de passe non valide ou nom d'utilisateur", 0
Response.End
case 1 '## Author of Post
'## Do Nothing
case 2 '## Normal User - Not Authorised
Go_Result "Seul un Administrateur ou un Modérateur peut changer ce lien web", 0
Response.End
case 3 '## Moderator
if chkForumModerator(Forum_ID, strDBNTUserName) = "0" then
Go_Result "Seul un Administrateur ou un Modérateur peut changer ce lien web", 0
end if
case 4 '## Admin
'## Do Nothing
case else
Go_Result cstr(Member), 0
Response.End
end select
txtMessage = ChkString(Request.Form("Message"),"message")
txtAddress = ChkString(Request.Form("Address"),"SQLString")
txtSubject = ChkString(Request.Form("Subject"),"SQLString")
if strBadWordFilter = "1" then
txtSubject = chkString(ChkBadWords(Request.Form("Subject")),"SQLString")
end if
Err_Msg = ""
if txtSubject = " " then
Err_Msg = Err_Msg & "<li>vous devez entrer un sujet pour le New URL</li>"
end if
if txtAddress = " " or lcase(txtAddress) = "http://" or lcase(txtAddress) = "https://" or lcase(txtAddress) = "file:///" then
Err_Msg = Err_Msg & "<li>Vous devez entrer une adresse pour le New URL</li>"
end if
if (left(lcase(txtAddress), 7) <> "http://" and left(lcase(txtAddress), 8) <> "https://" and left(lcase(txtAddress), 8) <> "file:///") and (txtAddress <> "") then
Err_Msg = Err_Msg & "<li>Vous devez faire précéder l'adresse de <b>http://</b>, <b>https://</b> ou <b>file:///</b></li>"
end if
if Err_Msg = "" then
'## Forum_SQL - Do DB Update
strSql = "UPDATE " & strTablePrefix & "FORUM "
strSql = strSql & " SET CAT_ID = " & cLng("0" & Request.Form("Category"))
if strPrivateForums = "1" then
strSql = strSql & ", F_PRIVATEFORUMS = " & cLng("0" & Request.Form("AuthType"))
end if
strSql = strSql & ", F_SUBJECT = '" & txtSubject & "'"
strSql = strSql & ", F_URL = '" & txtAddress & "'"
strSql = strSql & ", F_DESCRIPTION = '" & txtMessage & "'"
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
Application.Lock
Application(strCookieURL & "JumpBoxChanged")= DateToStr(strForumTimeAdjust)
Application.UnLock
err_Msg= ""
if Err.description <> "" then
Go_Result "Il y a une erreur = " & Err.description, 0
Response.End
else
updateForumMembers Forum_ID
if mLev = 4 then
updateForumModerators Forum_ID
end if
Go_Result "Mise à Jour Faite", 1
end if
else
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>Il Y A Un Problème Avec Vos Détails</font></p>" & vbNewLine & _
" <table align=""center"" border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """><ul>" & Err_Msg & "</ul></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""JavaScript:history.go(-1)"">Retour Pour Entrer des Données</a></font></p>" & vbNewLine
end if
end if
if MethodType = "Category" then
member = cLng(ChkUser(strDBNTUserName, strPassword,-1))
select case Member
case 0 '## Invalid Pword
Go_Result "Mot de passe non valide ou nom d'utilisateur", 0
Response.End
case 1 '## Author of Post
'## Do Nothing
case 2 '## Normal User - Not Authorised
Go_Result "Seul un administrateur peut créer une catégorie", 0
Response.End
case 3 '## Moderator
Go_Result "Seul un administrateur peut créer une catégorie", 0
Response.End
case 4 '## Admin
'## Do Nothing
case else
Go_Result cstr(Member), 0
Response.End
end select
txtSubject = chkString(Request.Form("Subject"),"SQLString")
if strBadWordFilter = "1" then
txtSubject = chkString(ChkBadWords(Request.Form("Subject")),"SQLString")
end if
Err_Msg = ""
if txtSubject = "" then
Err_Msg = Err_Msg & "<li>Vous devez entrer un objet pour la Nouvelle Catégorie</li>"
end if
if Err_Msg = "" then
'## Forum_SQL - Do DB Update
' DEM --> Insert replaced to add subscription and moderation capabilities
strSql = "INSERT INTO " & strTablePrefix & "CATEGORY (CAT_NAME, CAT_STATUS, CAT_SUBSCRIPTION, CAT_MODERATION, CAT_ORDER) "
strSql = strSql & " VALUES ('" & txtSubject & "'"
strSql = strSql & ", 1"
if strSubscription <> 0 and strEmail = "1" then
strSql = strSql & ", " & fSubscription
else
strSql = strSql & ", 0"
end if
if strModeration <> 0 then
strSql = strSql & ", " & ChkString(Request.Form("Moderation"), "SQLString")
else
strSql = strSql & ", 0"
end if
strSql = strSql & ", 1"
strSql = strSql & ")"
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
Application.Lock
Application(strCookieURL & "JumpBoxChanged")= DateToStr(strForumTimeAdjust)
Application.UnLock
err_Msg= ""
if Err.description <> "" then
Go_Result "Il y a une erreur = " & Err.description, 0
Response.End
else
Go_Result "Mise à Jour Faite", 1
end if
else
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>Il Y A Un Problème Avec Vos Détails</font></p>" & vbNewLine & _
" <table align=""center"" border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """><ul>" & Err_Msg & "</ul></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""JavaScript:history.go(-1)"">Retour Pour Entrer des Données</a></font></p>" & vbNewLine
end if
end if
if MethodType = "EditCategory" then
member = cLng(ChkUser(strDBNTUserName, strPassword,-1))
select case Member
case 0 '## Invalid Pword
Go_Result "Mot de passe non valide ou nom d'utilisateur", 0
Response.End
case 1 '## Author of Post
'## Do Nothing
case 2 '## Normal User - Not Authorised
Go_Result "Seul un Administrateur peut modifier une catégorie", 0
Response.End
case 3 '## Moderator
'## Do Nothing
Go_Result "Seul un Administrateur peut modifier une catégorie", 0
Response.End
case 4 '## Admin
'## Do Nothing
case else
Go_Result cstr(Member), 0
Response.End
end select
txtSubject = chkString(Request.Form("Subject"),"SQLString")
if strBadWordFilter = "1" then
txtSubject = chkString(ChkBadWords(Request.Form("Subject")),"SQLString")
end if
Err_Msg = ""
if txtSubject = "" then
Err_Msg = Err_Msg & "<li>Vous devez entrer un objet pour la catégorie</li>"
end if
if strModeration <> 0 and Request.Form("Moderation") = 0 then
if CheckForUnmoderatedPosts("CAT", Cat_ID, 0, 0) > 0 then
Err_Msg = Err_Msg & "<li>S'il vous plaît Approuver ou Supprimer tous les messages non modérés / détenus dans cette catégorie avant de se tourner Modération off</li>"
end if
end if
if Err_Msg = "" then
'## Forum_SQL - Do DB Update
strSql = "UPDATE " & strTablePrefix & "CATEGORY "
strSql = strSql & " SET CAT_NAME = '" & txtSubject & "'"
' DEM --> Start of Code added for moderation and subscription functionality
if strModeration <> 0 then
strSql = strSql & ", CAT_MODERATION = " & cLng("0" & Request.Form("Moderation"))
end if
if strSubscription <> 0 and strEmail = "1" then
strSql = strSql & ", CAT_SUBSCRIPTION = " & cLng("0" & Request.Form("Subscription"))
end if
' DEM --> End of code added for moderation and subscription functionality
strSql = strSql & " WHERE CAT_ID = " & Cat_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
Application.Lock
Application(strCookieURL & "JumpBoxChanged")= DateToStr(strForumTimeAdjust)
Application.UnLock
err_Msg= ""
if Err.description <> "" then
Go_Result "Il y a une erreur = " & Err.description, 0
Response.End
else
Go_Result "Mise à Jour Faite", 1
end if
else
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>Il Y A Un Problème Avec Vos Détails</font></p>" & vbNewLine & _
" <table align=""center"" border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """><ul>" & Err_Msg & "</ul></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""JavaScript:history.go(-1)"">Retour Pour Entrer des Données</a></font></p>" & vbNewLine
end if
end if
'set rs = nothing
WriteFooter
Response.End
sub Go_Result(str_err_Msg, boolOk)
select case MethodType
case "Topic", "TopicQuote", "Reply", "ReplyQuote"
set rsFCountMP = my_Conn.Execute("SELECT F_COUNT_M_POSTS FROM " & strTablePrefix & "FORUM WHERE FORUM_ID = " & Forum_ID)
ForumCountMPosts = rsFCountMP("F_COUNT_M_POSTS")
rsFCountMP.close
set rsFCountMP = nothing
end select
Response.write " <table border=""0"" width=""100%"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td width=""33%"" align=""left""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" " & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " <a href=""default.asp"">Tous Les Forums</a><br />" & vbNewLine
if MethodType = "Topic" or _
MethodType = "TopicQuote" or _
MethodType = "Reply" or _
MethodType = "ReplyQuote" or _
MethodType = "Edit" or _
MethodType = "EditTopic" then
Response.Write " " & getCurrentIcon(strIconBar,"","align=""absmiddle""")
if blnCStatus <> 0 then
Response.Write getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""")
else
Response.Write getCurrentIcon(strIconFolderClosed,"","align=""absmiddle""")
end if
Response.Write " <a href=""default.asp?CAT_ID=" & Cat_ID & """>" & ChkString(strCatTitle, "title") & "</a><br />" & vbNewLine
Response.Write " " & getCurrentIcon(strIconBlank,"","align=""absmiddle""") & getCurrentIcon(strIconBar,"","align=""absmiddle""")
if blnFStatus <> 0 and blnCStatus <> 0 then
Response.Write getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""")
else
Response.Write getCurrentIcon(strIconFolderClosed,"","align=""absmiddle""")
end if
Response.Write " <a href=""forum.asp?FORUM_ID=" & Forum_ID & """>" & ChkString(strForum_Title, "title") & "</a><br />" & vbNewLine
end if
if MethodType = "Reply" or _
MethodType = "ReplyQuote" or _
MethodType = "TopicQuote" or _
MethodType = "Edit" or _
MethodType = "EditTopic" then
Response.Write " " & getCurrentIcon(strIconBlank,"","align=""absmiddle""") & getCurrentIcon(strIconBlank,"","align=""absmiddle""") & getCurrentIcon(strIconBar,"","align=""absmiddle""")
if blnTStatus <> 0 and blnFStatus <> 0 and blnCStatus <> 0 then
Response.Write getCurrentIcon(strIconFolderOpenTopic,"","align=""absmiddle""")
else
Response.Write getCurrentIcon(strIconFolderClosedTopic,"","align=""absmiddle""")
end if
Response.Write " <a href=""" & chkString(Request.Form("refer"),"refer") & """>" & ChkString(strTopicTitle,"title") & "</a>" & vbNewLine
end if
Response.write " </font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine
if boolOk = 1 then
Response.write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>"
select case MethodType
case "Edit"
Response.Write("Votre Réponse a été Modifié avec Succès!")
case "EditCategory"
' DEM --> Added if statement to handle if subscriptions or moderation is allowed
if strSubscription > 0 or strModeration > 0 then
Response.Write("Renseignements sur la Catégorie Modifiées avec Succès")
else
Response.Write("Nom de la Catégorie Modifiée avec Succès!")
end if
case "EditForum"
Response.Write("Mise à Jour de l'Information FORUM Avec Succès!")
case "EditTopic"
Response.Write("Sujet Modifié avec Succès!")
case "EditURL"
Response.Write("URL Information Mise à Jour avec Succès!")
case "Reply", "ReplyQuote", "TopicQuote"
' DEM --> If moderated post, the counts should not be updated until after approval
' Combined the Reply, ReplyQuote and TopicQuote because the basic code was the same.
if Moderation = "Yes" then
Response.Write("Nouvelle Réponse Postée! Elle apparaîtra une fois approuvé par un modérateur")
else
Response.Write("Nouvelle Réponse Postée!")
DoPCount
if ForumCountMPosts <> 0 then
DoUCount MemberID
end if
end if
DoULastPost MemberID
case "Topic"
' DEM --> If moderated post, the counts should not be updated until after approval
if Moderation = "Yes" then
Response.Write("Nouveau Sujet Posté! Il apparaîtra une fois approuvé par un modérateur")
else
Response.Write("Nouveau Sujet Posté!")
DoTCount
DoPCount
if ForumCountMPosts <> 0 then
DoUCount MemberID
end if
end if
DoULastPost MemberID
case "Forum"
Response.Write("Nouveau Forum Créé!")
case "URL"
Response.Write("Nouveau URL Créé!")
case "Category"
Response.Write("Nouvelle Catégorie Créée!")
case else
Response.Write("Completé!")
'DoPCount
'DoUCount Request.Form("UserName")
'DoULastPost Request.Form("UserName")
end select
if MethodType = "Topic" then
strReturnURL = "topic.asp?TOPIC_ID=" & NewTopicID
strReturnTxt = "Aller au Nouveau Sujet"
elseif MethodType = "Reply" or MethodType = "ReplyQuote" or MethodType = "TopicQuote" then
strReturnURL = "topic.asp?whichpage=-1&TOPIC_ID=" & Topic_ID & "&REPLY_ID=" & NewReplyID
strReturnTxt = "Revenir au sujet"
elseif MethodType = "EditTopic" then
strReturnURL = "topic.asp?TOPIC_ID=" & Topic_ID
strReturnTxt = "Revenir au sujet"
elseif MethodType = "Edit" then
strReturnURL = "topic.asp?whichpage=-1&TOPIC_ID=" & Topic_ID & "&REPLY_ID=" & Reply_ID
strReturnTxt = "Revenir au sujet"
else
strReturnURL = chkString(Request.Form("refer"),"refer")
strReturnTxt = "Revenir Au Forum"
end if
Response.write "</font></p>" & vbNewLine & _
" <meta http-equiv=""Refresh"" content=""2; URL=" & strReturnURL & """>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>"
select case MethodType
case "Category"
Response.Write("N'oubliez pas de créer au moins un nouveau forum dans cette catégorie.")
case "Forum"
Response.Write("Le nouveau forum est prêt pour les utilisateurs de commencer à poster!")
case "EditForum", "EditCategory"
Response.Write("Je vous remercie de votre contribution!")
case "URL"
Response.Write("La nouvelle Mise à Jour Faite URL est en Place!")
case "EditURL"
Response.Write("Bonne journée!")
case "Topic", "TopicQuote", "EditTopic", "Reply", "ReplyQuote", "Edit"
Response.Write("Je vous remercie de votre contribution!")
case else
Response.Write("Bonne journée!")
end select
Response.write "</font></p>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""" & strReturnURL & """>" & strReturnTxt & "</a></font></p>" & vbNewLine
else
Response.write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>Il Y A Un Problème!</font></p>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """>" & str_err_Msg & "</font></p>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""JavaScript:history.go(-1)"">Retour pour Corriger le Problème.</a></font></p>" & vbNewLine
end if
WriteFooter
Response.End
end sub
sub newForumMembers(fForumID)
on error resume next
if Request.Form("AuthUsers") = "" then
exit Sub
end if
Users = split(Request.Form("AuthUsers"),",")
for count = Lbound(Users) to Ubound(Users)
strSql = "INSERT INTO " & strTablePrefix & "ALLOWED_MEMBERS ("
strSql = strSql & " MEMBER_ID, FORUM_ID) VALUES ( "& CLng(Users(count)) & ", " & fForumID & ")"
my_conn.execute (strSql),,adCmdText + adExecuteNoRecords
if err.number <> 0 then
Go_REsult err.description, 0
end if
next
on error goto 0
end sub
sub updateForumMembers(fForumID)
my_Conn.execute ("DELETE FROM " & strTablePrefix & "ALLOWED_MEMBERS WHERE FORUM_ID = " & fForumId),,adCmdText + adExecuteNoRecords
newForumMembers(fForumID)
end sub
sub newForumModerators(fForumID)
on error resume next
if Request.Form("ForumMod") = "" then
exit Sub
end if
Users = split(Request.Form("ForumMod"),",")
for count = Lbound(Users) to Ubound(Users)
strSql = "INSERT INTO " & strTablePrefix & "MODERATOR ("
strSql = strSql & " MEMBER_ID, FORUM_ID) VALUES ( "& CLng(Users(count)) & ", " & fForumID & ")"
my_conn.execute (strSql),,adCmdText + adExecuteNoRecords
if err.number <> 0 then
Go_REsult err.description, 0
end if
next
on error goto 0
end sub
sub updateForumModerators(fForumID)
my_Conn.execute ("DELETE FROM " & strTablePrefix & "MODERATOR WHERE FORUM_ID = " & fForumId),,adCmdText + adExecuteNoRecords
newForumModerators(fForumID)
end sub
sub DoAutoMoveEmail(TopicNum)
'## Emails Topic Author if Topic Moved.
strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.MEMBER_ID," & strMemberTablePrefix & "MEMBERS.M_NAME, " & strMemberTablePrefix & "MEMBERS.M_EMAIL, " & strActivePrefix & "TOPICS.FORUM_ID, " & strActivePrefix & "TOPICS.T_SUBJECT "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS, " & strActivePrefix & "TOPICS "
strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strActivePrefix & "TOPICS.T_AUTHOR "
strSql = strSql & " AND " & strActivePrefix & "TOPICS.TOPIC_ID = " & TopicNum
strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.M_STATUS <> 0"
set rs2 = my_Conn.Execute (strSql)
If Not rs2.EOF Then
email = rs2("M_EMAIL")
user_name = rs2("M_NAME")
Topic_Title = rs2("T_SUBJECT")
ForumId = rs2("FORUM_ID")
Usernum = rs2("MEMBER_ID")
rs2.close
set rs2 = nothing
if lcase(strEmail) = "1" then
strRecipientsName = user_name
strRecipients = email
strSubject = strForumTitle & " - Sujet Déplacé"
strMessage = "Bonjour " & user_name & vbNewLine & vbNewLine
strMessage = strMessage & "Votre annonce sur " & strForumTitle & "." & vbNewLine
strMessage = strMessage & "Regarder l'objet - " & Topic_Title & "." & vbNewLine & vbNewLine
if not(chkForumAccess(ForumID,Usernum,false)) then
strMessage = strMessage & "A été retiré de l'affichage public, Si vous avez des questions concernant cela, s'il vous plaît contacter l'administrateur du forum" & vbNewLine
else
strMessage = strMessage & "A été déplacé vers un nouveau forum, vous pouvez le voir à " & vbNewLine & Left(Request.Form("refer"), InstrRev(Request.Form("refer"), "/")) & "topic.asp?TOPIC_ID=" & TopicNum & vbNewLine
end if
%>
<!--#INCLUDE FILE="inc_mail.asp" -->
<%
end if
Else
rs2.Close
Set rs2 = nothing
End if
end sub
'## Subscribe checkbox start ##
sub DeleteSubscription(Level, MemberID, CatID, ForumID, TopicID)
' --- Delete the appropriate sublevel of subscriptions
StrSql = "DELETE FROM " & strTablePrefix & "SUBSCRIPTIONS"
StrSql = StrSql & " WHERE " & strTablePrefix & "SUBSCRIPTIONS.MEMBER_ID = " & MemberID
if sublevel = "CAT" then
StrSql = StrSQL & " AND " & strTablePrefix & "SUBSCRIPTIONS.CAT_ID = " & CatID
elseif sublevel = "FORUM" then
StrSql = StrSQL & " AND " & strTablePrefix & "SUBSCRIPTIONS.FORUM_ID = " & ForumID
elseif sublevel = "TOPIC" then
StrSql = StrSQL & " AND " & strTablePrefix & "SUBSCRIPTIONS.TOPIC_ID = " & TopicID
end if
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end sub
sub AddSubscription(SubLevel, MemberID, CatID, ForumID, TopicID)
' --- Insert the appropriate sublevel subscription
StrSql = "INSERT INTO " & strTablePrefix & "SUBSCRIPTIONS"
StrSql = StrSql & "(MEMBER_ID, CAT_ID, FORUM_ID, TOPIC_ID) VALUES (" & MemberID & ", "
if sublevel = "BOARD" then
StrSql = StrSql & "0, 0, 0)"
elseif sublevel = "CAT" then
StrSql = StrSql & CatID & ", 0, 0)"
elseif sublevel = "FORUM" then
StrSql = StrSql & CatID & ", " & ForumID & ", 0)"
else
StrSql = StrSql & CatID & ", " & ForumID & ", " & TopicID & ")"
end if
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end sub
'## Subscribe checkbox end ##
%>
& "SUBSCRIPTIONS.FORUM_ID = " & ForumID
elseif sublevel = "TOPIC" then
StrSql = StrSQL & " AND " & strTablePrefix & "SUBSCRIPTIONS.TOPIC_ID = " & TopicID
end if
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end sub
sub AddSubscription(SubLevel, MemberID, CatID, ForumID, TopicID)
' --- Insert the appropriate sublevel subscription
StrSql = "INSERT INTO " & strTablePrefix & "SUBSCRIPTIONS"
StrSql = StrSql & "(MEMBER_ID, CAT_ID, FORUM_ID, TOPIC_ID) VALUES (" & MemberID & ", "
if sublevel = "BOARD" then
StrSql = StrSql & "0, 0, 0)"
elseif sublevel = "CAT" then
StrSql = StrSql & CatID & ", 0, 0)"
elseif sublevel = "FORUM" then
StrSql = StrSql & CatID & ", " & ForumID & ", 0)"
else
StrSql = StrSql & CatID & ", " & ForumID & ", " & TopicID & ")"
end if
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end sub
'## Subscribe checkbox end ##
%>
|
Edited by - Carefree on 14 June 2014 06:11:34 |
|
|
|
Topic |
|
|
|