<% '################################################################################# '## 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 IsEmpty(Session("last_here_date")) then Session("last_here_date") = ReadLastHereDate(Request.Cookies("User")("Name")) end if set rs1 = Server.CreateObject("ADODB.Recordset") '## Forum_SQL strSql = "SELECT " & strTablePrefix & "TOTALS.P_COUNT, " & strTablePrefix & "TOTALS.T_COUNT, " & strTablePrefix & "TOTALS.U_COUNT " strSql = strSql & " FROM " & strTablePrefix & "TOTALS" rs1.open strSql, my_Conn Users = rs1("U_COUNT") Topics = rs1("T_COUNT") Posts = rs1("P_COUNT") rs1.Close set rs1 = nothing '## Forum_SQL - Get all Forums From DB strSql = "SELECT " & strTablePrefix & "CATEGORY.CAT_ID, " & strTablePrefix & "CATEGORY.CAT_STATUS, " & strTablePrefix & "CATEGORY.CAT_NAME " strSql = strSql & " FROM " & strTablePrefix & "CATEGORY " strSql = strSql & " ORDER BY " & strTablePrefix & "CATEGORY.CAT_NAME ASC;" set rs = my_Conn.Execute (strSql) %>
Ultima visita: <% =ChkDate(session("last_here_date")) %> - <% =ChkTime(session("last_here_date")) %> <% =Posts %> messaggi in <% =Topics %> forum da <% =Users %> autori  
<% if (strShowModerators = "1") or (mlev = 4 or mlev = 3) then %> <% end if %> <% if (mlev = 4 or mlev = 3) or (lcase(strNoCookies) = "1") then %> <% end if %> <% If rs.EOF or rs.BOF then %> <% if (mlev = 4 or mlev = 3) then %> <% end if %> <% Else %> <% do until rs.EOF %> <% '## Forum_SQL - Build SQL to get forums via category strSql = "SELECT " & strTablePrefix & "FORUM.FORUM_ID, " & strTablePrefix & "FORUM.F_STATUS, " & strTablePrefix & "FORUM.CAT_ID, " & strTablePrefix & "FORUM.F_SUBJECT, " & strTablePrefix & "FORUM.F_URL, " & strTablePrefix & "FORUM.F_DESCRIPTION, " & strTablePrefix & "FORUM.CAT_ID, " & strTablePrefix & "FORUM.F_TOPICS, " & strTablePrefix & "FORUM.F_COUNT, " & strTablePrefix & "FORUM.F_LAST_POST, " & strTablePrefix & "FORUM.F_STATUS, " & strTablePrefix & "FORUM.F_TYPE " strSql = strSql & " FROM " & strTablePrefix & "FORUM " strSql = strSql & " WHERE " & strTablePrefix & "FORUM.CAT_ID = " & rs("CAT_ID") & " " strSql = strSql & " ORDER BY " & strTablePrefix & "FORUM.F_SUBJECT ASC;" set rsForum = my_Conn.Execute (strSql) chkDisplayHeader = true if rsForum.eof or rsForum.bof then %> <% if (mlev = 4 or mlev = 3) or (lcase(strNoCookies) = "1") then %> <% end if %> <% Response.Write " " & vbCrLf Response.Write " " & vbCrLf if (mlev = 4 or mlev = 3) then Response.Write " " & vbCrLf end if Response.Write " " & vbCrLf else do until rsForum.Eof if ChkDisplayForum(rsForum("FORUM_ID")) then if chkDisplayHeader then %> <% if (mlev = 4 or mlev = 3) or (lcase(strNoCookies) = "1") then %> <% end if %> <% chkDisplayHeader = false end if %> bgcolor="<% =strForumCellColor %>">"><% =ChkString(rsForum("F_SUBJECT"),"display") %>
<% = rsForum("F_DESCRIPTION") %> <% if rsForum("F_TYPE") = 0 then %> <% if IsNull(rsForum("F_TOPICS")) then %>
<% else %> <% end if %> <% if IsNull(rsForum("F_COUNT")) then %> <% else %> <% end if %> <% else %> <% if rsForum("F_TYPE") = 1 then %> <% '## Do Nothing %> <% end if %> <% end if %> <% if (strShowModerators = "1") or (mlev = 4 or mlev = 3) then %> <% end if %> <% if (mlev = 4 or mlev = 3) or (lcase(strNoCookies) = "1") then %> <% end if %> <% end if %> <% rsForum.movenext %> <% loop %> <% end if %> <% rs.MoveNext %> <% loop %> <% end if %>
  FORUM TITOLO MESSAGGI ULTIMA VISITA MODERATORE <% PostingOptions() %>
">No Categories/Forums Found 
"><% =ChkString(rs("CAT_NAME"),"display") %> <% call CategoryAdminOptions() %>
No Forums Found 
"><% =ChkString(rs("CAT_NAME"),"display") %> <% call CategoryAdminOptions() %>
<% if rsForum("F_TYPE") = 0 then %> <% if rs("CAT_STATUS") = 0 then %> &CAT_ID=<% =rsForum("CAT_ID") %>&Forum_Title=<% =ChkString(rsForum("F_SUBJECT"),"urlpath") %>">Category Closed <% else %> <% if rsForum("F_STATUS") <> 0 then %> &CAT_ID=<% =rsForum("CAT_ID") %>&Forum_Title=<% =ChkString(rsForum("F_SUBJECT"),"urlpath") %>"><% =ChkIsNew(rsForum("F_LAST_POST")) %> <% else %> &CAT_ID=<% =rsForum("CAT_ID") %>&Forum_Title=<% =ChkString(rsForum("F_SUBJECT"),"urlpath") %>">FORUM Closed <% end if %> <% end if %> <% else %> <% if rsForum("F_TYPE") = 1 then %> "> <% end if %> <% end if %> 0<% =rsForum("F_TOPICS") %>0<% =rsForum("F_COUNT") %><% =ChkDate(rsForum("F_LAST_POST")) %>
<% =ChkTime(rsForum("F_LAST_POST")) %>
<% if (listForumModerators(rsForum("FORUM_ID")) <> "") then Response.Write(listForumModerators(rsForum("FORUM_ID"))) else Response.Write(" ") end if %> <% call ForumAdminOptions %>
<% set rs = nothing %> <% set rsForum = nothing %> <% sub PostingOptions() %> <% if (mlev = 4) or (lcase(strNoCookies) = "1") then %> Create New Category <% end if %> <% end sub %> <% function ChkIsNew(dt) if rsForum("F_STATUS") <> 0 then if dt > session("last_here_date") then ChkIsNew = "New Posts" Else ChkIsNew = "Old Posts" end if else ChkIsNew = "Forum Locked" end if end function %> <% sub CategoryAdminOptions() %> <% if (mlev = 4) or (lcase(strNoCookies) = "1") then %> <% if (rs("CAT_STATUS") <> 0) then %> &Cat_Title=<% =ChkString(rs("CAT_NAME"),"JSurlpath")%>')">Lock Category <% else %> ')">Un-Lock Category <% end if %> <% if (rs("CAT_STATUS") <> 0) or (mlev = 4) then %> &Cat_Title=<% =ChkString(rs("CAT_NAME"),"urlpath") %>">Edit Category Name <% end if %> &Cat_Title=<% =ChkString(rs("CAT_NAME"),"JSurlpath") %>')">Delete Category <% if (rs("CAT_STATUS") <> 0) or (mlev = 4) then %> &type=0">Create New Forum <% end if %> <% if (rs("CAT_STATUS") <> 0) or (mlev = 4) then %> &type=1">Create New Web Link <% end if %> <% else %>   <% end if %> <% end sub %> <% sub ForumAdminOptions() %> <% if rsForum("F_TYPE") = 0 then %> <% if rs("CAT_STATUS") = 0 then %> <% if (mlev = 4) then %> ')">Un-Lock Category <% end if %> <% else %> <% if rsForum("F_STATUS") = 1 then %> &CAT_ID=<% =rsForum("CAT_ID") %>&Forum_Title=<% =ChkString(rsForum("F_SUBJECT"),"JSurlpath")%>')">Lock Forum <% else %> &CAT_ID=<% =rsForum("CAT_ID") %>&Forum_Title=<% =ChkString(rsForum("F_SUBJECT"),"JSurlpath")%>')">Un-Lock Forum <% end if %> <% end if %> <% end if %> <% if rsForum("F_TYPE") = 0 then %> <% if (rs("CAT_STATUS") <> 0 and rsForum("F_STATUS") <> 0) or (mlev = 4 or mlev = 3) then %> &CAT_ID=<% =rsForum("CAT_ID") %>&Forum_Title=<% =ChkString(rsForum("F_SUBJECT"),"urlpath") %>&type=0">Edit Forum Properties <% end if %> <% else %> <% if rsForum("F_TYPE") = 1 then %> &CAT_ID=<% =rsForum("CAT_ID") %>&Forum_Title=<% =ChkString(rsForum("F_SUBJECT"),"urlpath") %>&type=1">Edit URL Properties <% end if %> <% end if %> <% if (mlev = 4) or (lcase(strNoCookies) = "1") then %> &CAT_ID=<% =rsForum("CAT_ID") %>&Forum_Title=<% =ChkString(rsForum("F_SUBJECT"),"JSurlpath") %>')">Delete Forum <% end if %> <% if rsForum("F_TYPE") = 0 then %> <% if (mlev = 4) or (lcase(strNoCookies) = "1") then %> &CAT_ID=<% =rsForum("CAT_ID") %>&Forum_Title=<% =ChkString(rsForum("F_SUBJECT"),"urlpath") %>">New Topic <% end if %> <% end if %> <% end sub %>