<% '################################################################################# '## Copyright (C) 2000 Michael Anderson '## '## This program is free software; you can redistribute it and/or '## modify it under the terms of the GNU General Public License '## as published by the Free Software Foundation; either version 2 '## of the License, or any later version. '## '## This program is distributed in the hope that it will be useful, '## but WITHOUT ANY WARRANTY; without even the implied warranty of '## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the '## GNU General Public License for more details. '## '## You should have received a copy of the GNU General Public License '## along with this program; if not, write to the Free Software '## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. '## '## Correspondence and Questions can be sent to: '## reinhold@bigfoot.com '## '## or '## '## Snitz Communications '## C/O: Michael Anderson '## PO Box 200 '## Harpswell, ME 04079 '################################################################################# %> <% if Request.QueryString("FORUM_ID") = "" and (Request.Form("Method_Type") <> "login") and (Request.Form("Method_Type") <> "logout") then Response.Redirect "default.asp" end if %> <% mypage = request("whichpage") if mypage = "" then mypage = 1 end if mypagesize = request("pagesize") If mypagesize = "" then mypagesize = 15 end if nDays = Request.Cookies("NumDays") if Request.form("cookie") = 1 then if strSetCookieToForum = "1" then Response.Cookies("User").Path = strCookieURL end if Response.Cookies("NumDays") = Request.Form("days") Response.Cookies("NumDays").expires = strForumTimeAdjust + 365 nDays = Request.Form("Days") mypage = 1 end if if nDays = "" then nDays = 30 end if defDate = DateToStr(dateadd("d", -(nDays), StrToDate(strForumTimeAdjust))) if (strAuthType = "nt") then set my_Conn = Server.CreateObject("ADODB.Connection") my_Conn.Open strConnString call NTauthenticate() if (ChkAccountReg() = "1") then call NTUser() end if end if if strPrivateForums = "1" then if Request("Method_Type") = "" then chkUser4() end if end if %> <% '## Forum_SQL - Find out if the Category is Locked or Un-Locked and if it Exists strSql = "SELECT " & strTablePrefix & "CATEGORY.CAT_STATUS " strSql = strSql & " FROM " & strTablePrefix & "CATEGORY " strSql = strSql & " WHERE " & strTablePrefix & "CATEGORY.CAT_ID = " & Request.QueryString("CAT_ID") set rsCStatus = my_Conn.Execute (StrSql) '## Forum_SQL - Find out if the Topic is Locked or Un-Locked and if it Exists strSql = "SELECT " & strTablePrefix & "FORUM.F_STATUS " strSql = strSql & " FROM " & strTablePrefix & "FORUM " strSql = strSql & " WHERE " & strTablePrefix & "FORUM.FORUM_ID = " & Request.QueryString("FORUM_ID") set rsFStatus = my_Conn.Execute (StrSql) '## Forum_SQL - Get all topics from DB strSql ="SELECT " & strTablePrefix & "TOPICS.T_STATUS, " & strTablePrefix & "TOPICS.CAT_ID, " & strTablePrefix & "TOPICS.FORUM_ID, " & strTablePrefix & "TOPICS.TOPIC_ID, " & strTablePrefix & "TOPICS.T_VIEW_COUNT, " & strTablePrefix & "TOPICS.T_SUBJECT, " & strTablePrefix & "TOPICS.T_MAIL, " & strTablePrefix & "TOPICS.T_AUTHOR, " & strTablePrefix & "TOPICS.T_REPLIES, " & strTablePrefix & "TOPICS.T_LAST_POST, " & strMemberTablePrefix & "MEMBERS.M_NAME " strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS, " & strTablePrefix & "TOPICS " strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "TOPICS.T_AUTHOR " strSql = strSql & " AND " & strTablePrefix & "TOPICS.FORUM_ID = " & Request.QueryString("FORUM_ID") & " " if nDays = "-1" then strSql = strSql & " AND " & strTablePrefix & "TOPICS.T_STATUS <> 0 " end if 'Response.Write "

" & defDate & "

" if nDays > "0" then strSql = strSql & " AND " & strTablePrefix & "TOPICS.T_LAST_POST > '" & defDate & "'" end if strSql = strSql & " ORDER BY " & strTablePrefix & "TOPICS.T_LAST_POST DESC" set rs = Server.CreateObject("ADODB.Recordset") rs.cachesize=20 rs.open strSql, my_Conn, 3 if not (rs.EOF or rs.BOF) then rs.movefirst rs.pagesize = mypagesize maxpages = cint(rs.pagecount) rs.absolutepage = mypage end if '## Forum_SQL - Get all Forum Categories From DB strSql = "SELECT CAT_ID FROM " & strTablePrefix & "CATEGORY" set rsCat = my_Conn.Execute (StrSql) %>
All Forums Tous les Forums
0 and rsFStatus("F_STATUS") <> 0 then Response.Write("icon_folder_open_topic.gif") else Response.Write("icon_folder_closed_topic.gif") %>" height=15 width=15 border="0"> <% =ChkString(Request.QueryString("FORUM_Title"),"display") %>
<% if (mlev = 4 or mlev = 3 or mlev = 2 or mlev = 1) or (lcase(strNoCookies) = "1") or (Request.Cookies("User")("Name") = "" or Request.Cookies("User")("Pword") = "") then %>
<% call PostNewTopic() %>
<% else %>   <% end if %>
" method="post" name="DaysFilter">
<% if maxpages > 1 then %>
Pages:   <% Call Paging() %>
<% else %>   <% end if %>
<% if (mlev = 4 or mlev = 3) or (lcase(strNoCookies) = "1") then %> <% end if %> <% if rs.EOF or rs.BOF then %> <% else %> <% rec = 1 %> <% do until rs.EOF or (rec = 16) %> <% if (mlev = 4 or mlev = 3) or (lcase(strNoCookies) = "1") then %> <% end if %> <% rec = rec + 1 %> <% rs.MoveNext %> <% loop %> <% end if %>
  Sujet Auteur Reponses Lu Dernier message<% call ForumAdminOptions() %>
Pas de sujets
&FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Topic_Title=<% =ChkString(left(rs("T_SUBJECT"), 50),"urlpath") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>"><% if rsCStatus("CAT_STATUS") <> 0 and rsFStatus("F_STATUS") <> 0 and rs("T_STATUS") <> 0 then %><% =ChkIsNew(rs("T_LAST_POST")) %><% else %>Topic Locked<% end if %> &FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Topic_Title=<% =ChkString(left(rs("T_SUBJECT"), 50),"urlpath") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>"><% =ChkString(left(rs("T_SUBJECT"), 50),"display") %>  <% =ChkString(rs("M_NAME"),"display") %> <% =rs("T_REPLIES") %> <% =rs("T_VIEW_COUNT") %> <% =ChkDate(rs("T_LAST_POST")) %> <% =ChkTime(rs("T_LAST_POST")) %> <% if rsCStatus("CAT_STATUS") = 0 then %> ')">Un-Lock Category <% else %> <% if rsFStatus("F_STATUS") = 0 then %> &CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"JSurlpath") %>')">Un-Lock Forum <% else %> <% if rs("T_STATUS") <> 0 then %> &FORUM_ID=<% =rs("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Topic_Title=<% =ChkString(rs("T_SUBJECT"),"JSurlpath") %>')">Lock Topic <% else %> &FORUM_ID=<% =rs("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Topic_Title=<% =ChkString(rs("T_SUBJECT"),"JSurlpath") %>')">Un-Lock Topic <% end if %> <% end if %> <% end if %> <% if (mlev = 4 or mlev = 3) or (rsCStatus("CAT_STATUS") <> 0 and rsFStatus("F_STATUS") <> 0 and rs("T_STATUS") <> 0) then %> &FORUM_ID=<% =rs("FORUM_ID") %>&CAT_ID=<% =rs("CAT_ID") %>&auth=<% =ChkString(rs("T_AUTHOR"),"urlpath") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>&Topic_Title=<% =ChkString(rs("T_SUBJECT"),"urlpath") %>">Edit Message <% end if %> &FORUM_ID=<% =rs("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Topic_Title=<% =ChkString(rs("T_SUBJECT"),"JSurlpath") %>')">Delete Topic &FORUM_ID=<% =rs("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Topic_Title=<% =ChkString(rs("T_SUBJECT"),"urlpath") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>">Reply to Topic
<% if maxpages > 1 then %>
There are <% =maxpages %> Pages des sujets:    <% Call Paging() %>
<% else %>   <% end if %>

New Posts Nouveaux sujets depuis votre dernier passage.
Old Posts Sujet actif. <% if lcase(strHotTopic) = "1" then %>(Hot Topic <% =intHotTopicNum %> replies or more.)<% end if %>
Locked Topic Sujet réservé.

<% if (mlev = 4 or mlev = 3 or mlev = 2 or mlev = 1) or (lcase(strNoCookies) = "1") then %>

<% call PostNewTopic() %>

<% else %>   <% end if %>
<% Function ChkIsNew(dt) if lcase(strHotTopic) = "1" then if dt > session("last_here_date") then if rs("T_REPLIES") >= intHotTopicNum Then ChkIsNew = "Hot Topic" else ChkIsNew = "New Topic" end if Else if rs("T_REPLIES") >= intHotTopicNum Then ChkIsNew = "Hot Topic" else ChkIsNew = "" end if end if else if dt > session("last_here_date") then ChkIsNew = "New Topic" Else ChkIsNew = "" end if end if End Function %> <% sub PostNewTopic() %> <% if rsCStatus("CAT_STATUS") = 0 or rsFStatus("F_STATUS") = 0 then %> <% if (mlev = 4 or mlev = 3) then %> &CAT_ID=<% =Request.QueryString("CAT_ID")%>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>">Category Locked &CAT_ID=<% =Request.QueryString("CAT_ID")%>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>">Nouveau sujet <% else %> Category Locked Category Locked <% end if %> <% else %> <% if rsFStatus("F_STATUS") <> 0 then %> &CAT_ID=<% =Request.QueryString("CAT_ID")%>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>">New Topic &CAT_ID=<% =Request.QueryString("CAT_ID")%>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>">Nouveau sujet <% else %> FORUM Locked Forum Locked <% end if %> <% end if %> <% end sub %> <% sub ForumAdminOptions() %> <% if (mlev = 4 or mlev = 3) or (lcase(strNoCookies) = "1") then %> <% if rsCStatus("CAT_STATUS") = 0 then %> <% if mlev = 4 then %> ')">Un-Lock Category <% else %> Category Locked <% end if %> <% else %> <% if rsFStatus("F_STATUS") <> 0 then %> &CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"JSurlpath") %>')">Lock Forum <% else %> &CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"JSurlpath") %>')">Un-Lock Forum <% end if %> <% end if %> <% if (rsCStatus("CAT_STATUS") <> 0 and rsFStatus("F_STATUS") <> 0) or (mlev = 4 or mlev = 3) then %> &CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"JSurlpath") %>&type=0">Edit Forum Properties <% end if %> &CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"JSurlpath") %>')">Delete Forum &CAT_ID=<% =Request.QueryString("CAT_ID")%>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"JSurlpath") %>">New Topic <% end if %> <% end sub sub Paging() if maxpages > 1 then if mypage = "" then pge = 1 else pge = mypage end if scriptname = request.servervariables("script_name") Response.Write("") for counter = 1 to maxpages if counter <> cint(pge) then ref = "" Response.Write ref else Response.Write("") end if if counter mod 15 = 0 then Response.Write("") end if next Response.Write("
" & " " & widenum(counter) & "" & counter & "" & " " & widenum(counter) & "" & counter & "
") end if end sub %>