<% '################################################################################# '## Copyright (C) 2000 Michael Anderson and Pierre Gorissen '## '## This program is free software; you can redistribute it and/or '## modify it under the terms of the GNU General Public License '## as published by the Free Software Foundation; either version 2 '## of the License, or any later version. '## '## All copyright notices regarding Snitz Forums 2000 '## must remain intact in the scripts and in the outputted HTML '## The "powered by" text/logo with a link back to '## http://forum.snitz.com in the footer of the pages MUST '## remain visible when the pages are viewed on the internet or intranet. '## '## This program is distributed in the hope that it will be useful, '## but WITHOUT ANY WARRANTY; without even the implied warranty of '## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the '## GNU General Public License for more details. '## '## You should have received a copy of the GNU General Public License '## along with this program; if not, write to the Free Software '## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. '## '## Support can be obtained from support forums at: '## http://forum.snitz.com '## '## Correspondence and Marketing Questions can be sent to: '## reinhold@bigfoot.com '## '## or '## '## Snitz Communications '## C/O: Michael Anderson '## PO Box 200 '## Harpswell, ME 04079 '################################################################################# %> <% strDBNTUserName = Request.Cookies(strUniqueID & "User")("Name") strDBNTFUserName = Request.Form("Name") if strAuthType = "nt" then strDBNTUserName = Session(strCookieURL & "userID") strDBNTFUserName = Session(strCookieURL & "userID") end if if strAutoLogon = 1 then if (ChkAccountReg() <> "1") then Response.Redirect "register.asp?mode=DoIt" end if end if if IsEmpty(Session(strCookieURL & "last_here_date")) then Session(strCookieURL & "last_here_date") = ReadLastHereDate(strDBNTUserName) end if if strShowStatistics <> "1" then 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 end if '## Forum_SQL - Get all Forums From DB strSql = "SELECT " & strTablePrefix & "CATEGORY.CAT_ID, " & strTablePrefix & "CATEGORY.CAT_STATUS, " strSql = strSql & strTablePrefix & "CATEGORY.CAT_NAME " strSql = strSql & " FROM " & strTablePrefix & "CATEGORY " strSql = strSql & " ORDER BY " & strTablePrefix & "CATEGORY.CAT_NAME ASC;" set rs = my_Conn.Execute (strSql) %>
<% ShowLastHere = (cint(ChkUser2(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword"))) > 0) if strShowStatistics <> "1" then %>
<% if ShowLasthere then %> Su última visita - <% =ChkDate(Session(strCookieURL & "last_here_date")) %> <% =ChkTime(Session(strCookieURL & "last_here_date")) %> <% else %>   <% end if %> Hay <% =Posts %> anuncios en <% =Topics %> categorías publicados por <% =Users %> usuarios  
<% else Response.Write("  ") 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 %> <% if rs.EOF or rs.BOF then %> <% if (mlev = 4 or mlev = 3) then %> <% end if %> <% else intPostCount = 0 intTopicCount = 0 intForumCount = 0 strLastPostDate = "" do until rs.EOF '## Forum_SQL - Build SQL to get forums via category strSql = "SELECT " & strTablePrefix & "FORUM.FORUM_ID, " strSql = strSql & strTablePrefix & "FORUM.F_STATUS, " strSql = strSql & strTablePrefix & "FORUM.CAT_ID, " strSql = strSql & strTablePrefix & "FORUM.F_SUBJECT, " strSql = strSql & strTablePrefix & "FORUM.F_URL, " strSql = strSql & strTablePrefix & "FORUM.F_DESCRIPTION, " strSql = strSql & strTablePrefix & "FORUM.CAT_ID, " strSql = strSql & strTablePrefix & "FORUM.F_TOPICS, " strSql = strSql & strTablePrefix & "FORUM.F_COUNT, " strSql = strSql & strTablePrefix & "FORUM.F_LAST_POST, " strSql = strSql & strTablePrefix & "FORUM.F_STATUS, " strSql = strSql & strTablePrefix & "FORUM.F_TYPE, " strSql = strSql & strTablePrefix & "FORUM.F_PRIVATEFORUMS, " strSql = strSql & strMemberTablePrefix & "MEMBERS.MEMBER_ID, " strSql = strSql & strMemberTablePrefix & "MEMBERS.M_NAME " strSql = strSql & "FROM " & strTablePrefix & "FORUM " strSql = strSql & "LEFT JOIN " & strMemberTablePrefix & "MEMBERS ON " strSql = strSql & strTablePrefix & "FORUM.F_LAST_POST_AUTHOR = " strSql = strSql & strMemberTablePrefix & "MEMBERS.MEMBER_ID " 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 & _ " " & vbCrLf if (mlev = 4 or mlev = 3) then Response.Write " " & vbCrLf end if Response.Write " " & vbCrLf else blnHiddenForums = false do until rsForum.Eof if ChkDisplayForum(rsForum("FORUM_ID")) then if rsForum("F_TYPE") <> "1" then intPostCount = intPostCount + rsForum("F_COUNT") intTopicCount = intTopicCount + rsForum("F_TOPICS") intForumCount = intForumCount + 1 if rsForum("F_LAST_POST") > strLastPostDate then strLastPostDate = rsForum("F_LAST_POST") intLastPostForum_ID = rsForum("FORUM_ID") end if end if if chkDisplayHeader then Response.Write " " & vbcrlf & _ " " & vbcrlf if (mlev = 4 or mlev = 3) or (lcase(strNoCookies) = "1") then Response.Write " " & vbcrlf end if Response.Write " " & vbcrlf chkDisplayHeader = false end if Response.Write " " & vbcrlf & _ " " & vbcrlf %> bgcolor="<% =strForumCellColor %>" valign="top"> "><% =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 if IsNull(rsForum("MEMBER_ID")) then strLastUser = "" else strLastUser = "
por: " if strUseExtendedProfile then strLastUser = strLastUser & "" else strLastUser = strLastUser & "" end if strLastUser = strLastUser & ChkString(rsForum("M_NAME"),"display") & "" 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 %> <% else blnHiddenForums = true end if ' ChkDisplayForum() rsForum.MoveNext loop end if rs.MoveNext loop end if if strShowStatistics = "1" then WriteStatistics end if %>
  Categorías Subcategorías Anuncios Ultimo anuncio<% PostingOptions() %>
">No Categories/Forums Found 
"><% =ChkString(rs("CAT_NAME"),"display") %><% call CategoryAdminOptions() %>
No Forums Found 
" & ChkString(rs("CAT_NAME"),"display") & "" call CategoryAdminOptions() Response.Write "
" & vbcrlf if rsForum("F_TYPE") = 0 then if rs("CAT_STATUS") = 0 then Response.Write " " if rsForum("F_LAST_POST") > Session(strCookieURL & "last_here_date") then Response.Write "" else Response.Write "" end if else if rsForum("F_STATUS") <> 0 then Response.Write " " & ChkIsNew(rsForum("F_LAST_POST")) & "" else Response.Write " " if rsForum("F_LAST_POST") > Session(strCookieURL & "last_here_date") then Response.Write "" else Response.Write "" end if end if end if else if rsForum("F_TYPE") = 1 then Response.Write "" end if end if Response.Write " 0<% =rsForum("F_TOPICS") %>0<% =rsForum("F_COUNT") %><% =ChkDate(rsForum("F_LAST_POST")) %>
<% =ChkTime(rsForum("F_LAST_POST")) %><%= strLastUser%>
<% if (listForumModerators(rsForum("FORUM_ID")) <> "") then Response.Write(listForumModerators(rsForum("FORUM_ID"))) else Response.Write(" ") end if %> <% call ForumAdminOptions %>
New Posts Contiene anuncios nuevos desde su última visita.
Old Posts No contiene anuncios nuevos desde su última visita.
<% set rs = nothing set rsForum = nothing %> <% sub PostingOptions() if (mlev = 4) or (lcase(strNoCookies) = "1") then Response.Write "" & vbcrlf else Response.Write " " & vbcrlf end if end sub function ChkIsNew(dt) if rsForum("F_STATUS") <> 0 then if dt > Session(strCookieURL & "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 Response.Write " " & vbcrlf else Response.Write " " & vbcrlf end if if (rs("CAT_STATUS") <> 0) or (mlev = 4) then Response.Write " " & vbcrlf end if Response.Write " " & vbcrlf if (rs("CAT_STATUS") <> 0) or (mlev = 4) then Response.Write " " & vbcrlf end if if (rs("CAT_STATUS") <> 0) or (mlev = 4) then Response.Write " " & vbcrlf end if else Response.Write "  " & vbcrlf end if end sub sub ForumAdminOptions() if (mLev = 4) or (chkForumModerator(rsForum("FORUM_ID"), strDBNTUserName) = "1") or (lcase(strNoCookies) = "1") then if rsForum("F_TYPE") = 0 then if rs("CAT_STATUS") = 0 then if (mlev = 4) then %> ')">desbloquear categoría <% end if else if rsForum("F_STATUS") = 1 then %> &CAT_ID=<% =rsForum("CAT_ID") %>&Forum_Title=<% =ChkString(rsForum("F_SUBJECT"),"JSurlpath")%>')">Bloquear foro <% else %> &CAT_ID=<% =rsForum("CAT_ID") %>&Forum_Title=<% =ChkString(rsForum("F_SUBJECT"),"JSurlpath")%>')">DEsbloquear foro <% 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">Editar foro <% end if else if rsForum("F_TYPE") = 1 then %> &CAT_ID=<% =rsForum("CAT_ID") %>&Forum_Title=<% =ChkString(rsForum("F_SUBJECT"),"urlpath") %>&type=1">Editar enlace <% end if end if if (mlev = 4) or (lcase(strNoCookies) = "1") then %> &CAT_ID=<% =rsForum("CAT_ID") %>&Forum_Title=<% =ChkString(rsForum("F_SUBJECT"),"JSurlpath") %>')">Eliminar foro <% 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") %>">Nuevo anuncio <% end if end if else Response.Write " " end if end sub sub WriteStatistics() Dim Forum_Count Dim NewMember_Name, NewMember_Id, Member_Count Dim LastPostDate, LastPostLink set rs = Server.CreateObject("ADODB.Recordset") Forum_Count = intForumCount '## Forum_SQL - Get newest membername and id from DB strSql = "SELECT M_NAME, MEMBER_ID FROM " & strMemberTablePrefix & "MEMBERS WHERE M_STATUS=1 AND MEMBER_ID > 1" strSql = strSQL & " ORDER BY M_DATE desc;" set rs = my_Conn.Execute(strSql) if not rs.EOF then NewMember_Name = ChkString(rs("M_NAME"), "display") NewMember_Id = rs("MEMBER_ID") else NewMember_Name = "" end if '## Forum_SQL - Get Active membercount from DB strSql = "SELECT COUNT(MEMBER_ID) AS U_COUNT FROM " & strMemberTablePrefix & "MEMBERS WHERE M_POSTS > 0 AND M_STATUS=1" set rs = my_Conn.Execute(strSql) if not rs.EOF then Member_Count = rs("U_COUNT") else Member_Count = 0 end if LastPostDate = "" LastPostLink = "" LastPostAuthorLink = "" if not (intLastPostForum_ID = "") then '## Forum_SQL - Get lastPostDate and link to that post from DB strSql = "SELECT " & strTablePrefix & "FORUM.CAT_ID, " & strTablePrefix & "FORUM.FORUM_ID, " strSql = strSql & strTablePrefix & "FORUM.F_SUBJECT, " & strTablePrefix & "TOPICS.TOPIC_ID, " & strTablePrefix & "TOPICS.T_SUBJECT, " strSql = strSql & strTablePrefix & "TOPICS.T_LAST_POST, " & strMemberTablePrefix & "MEMBERS.M_NAME, " & strMemberTablePrefix & "MEMBERS.MEMBER_ID " strSql = strSql & "FROM " & strTablePrefix & "FORUM, " & strTablePrefix & "TOPICS, " strSql = strSql & strMemberTablePrefix & "MEMBERS " strSql = strSql & " WHERE " & strTablePrefix & "FORUM.FORUM_ID = " & strTablePrefix & "TOPICS.FORUM_ID " strSql = strSql & " AND " & strTablePrefix & "FORUM.CAT_ID = " & strTablePrefix & "TOPICS.CAT_ID " strSql = strSql & " AND " & strTablePrefix & "TOPICS.T_LAST_POST_AUTHOR = " & strMemberTablePrefix & "MEMBERS.MEMBER_ID " strSql = strSql & " AND " & strTablePrefix & "FORUM.FORUM_ID = " & intLastPostForum_ID & " " strSql = strSql & "ORDER BY " & strTablePrefix & "TOPICS.T_LAST_POST DESC;" set rs = my_Conn.Execute(strSql) if not rs.EOF then LastPostDate = ChkDate(rs("T_LAST_POST")) & ChkTime(rs("T_LAST_POST")) LastPostLink = "topic.asp?TOPIC_ID=" & rs("TOPIC_ID") & "&FORUM_ID=" & rs("FORUM_ID") & "&CAT_ID=" & rs("CAT_ID") LastPostLink = LastPostLink & "&Topic_Title=" & ChkString(rs("T_SUBJECT"),"urlpath") LastPostLink = LastPostLink & "&Forum_Title=" & ChkString(rs("F_SUBJECT"),"urlpath") LastPostAuthorLink = " por: " strMember_ID = rs("MEMBER_ID") strM_NAME = ChkString(rs("M_NAME"),"display") if strUseExtendedProfile then LastPostAuthorLink = LastPostAuthorLink & "" else LastPostAuthorLink = LastPostAuthorLink & "" end if LastPostAuthorLink = LastPostAuthorLink & strM_NAME & "" end if end if ActiveTopicCount = -1 if not IsNull(Session(strCookieURL & "last_here_date")) then if not blnHiddenForums then '## Forum_SQL - Get ActiveTopicCount from DB strSql = "SELECT COUNT(" & strTablePrefix & "TOPICS.T_LAST_POST) AS NUM_ACTIVE " strSql = strSql & "FROM " & strTablePrefix & "TOPICS " strSql = strSql & "WHERE (((" & strTablePrefix & "TOPICS.T_LAST_POST)>'"& Session(strCookieURL & "last_here_date") & "'))" set rs = my_Conn.Execute(strSql) if not rs.EOF then ActiveTopicCount = rs("NUM_ACTIVE") else ActiveTopicCount = 0 end if end if end if rs.close set rs = nothing ShowLastHere = (cint(ChkUser2(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword"))) > 0) %> ">Estadísticas del foro " bgcolor="<%= strForumCellColor %>">  <% if ShowLastHere then %> "> Su última visita el <% =ChkDate(Session(strCookieURL & "last_here_date")) %> <% =ChkTime(Session(strCookieURL & "last_here_date")) %> <% end if if intPostCount > 0 then %> "> <% if Member_Count = 1 then Response.Write("1 Participante ha ") else Response.Write(Member_Count & " Participantes han ") end if %> enviado <% if intPostCount = 1 then Response.Write("1 anuncio ") else Response.Write(intPostCount & " anuncios") end if %> en <% if intForumCount = 1 then Response.Write("1 foro") else Response.Write(intForumCount & " categorías") end if %> <% if (LastPostDate = "" or LastPostLink = "" or intPostCount = 0) then Response.Write("") else Response.Write(", el último anuncio fue enviado el "& lastPostDate & "") if LastPostAuthorLink <> "" then Response.Write(LastPostAuthorLink & ".") else Response.Write(".") end if end if %> <% end if %> "> <% if intTopicCount = 1 then Response.Write("Existe ") else Response.Write("Existen") end if%> actualmente <%= intTopicCount %> <%if intTopicCount = 1 then Response.Write(" anuncio ") else Response.Write(" anuncios ") end if %><% if ActiveTopicCount > 0 then %> y <%= ActiveTopicCount %> <% if ActiveTopicCount = 1 then Response.Write("anuncio") else Response.Write("anuncios") end if %> activos desde su última visita.<% elseif blnHiddenForums and (strLastPostDate > Session(strCookieURL & "last_here_date")) and ShowLastHere then %> y hay anuncios activos desde su última visita.<% elseif not(ShowLastHere) then Response.Write "." else %>y no hay anuncios activos desde su última visita.<% end if %> <% if NewMember_Name <> "" then %> "> Damos la bienvenida a nuestro nuevo participante: <% if strUseExtendedProfile then Response.Write " " else Response.Write " " end if Response.Write NewMember_Name & "." & vbcrlf %> <% end if end sub %>