<% nDays = Request.Cookies("NumDays") if Request.form("cookie") = "true" then Response.Cookies("NumDays") = Request.Form("days") Response.Cookies("NumDays").expires = date + 365 nDays = Request.Form("Days") End If if nDays = "" then nDays = 30 End If defDate = dateadd("d", -cint(nDays), date) '## Open DataBase Connection '## (Change to include file soon!) set my_conn= Server.CreateObject("ADODB.Connection") my_Conn.Open ConnString '## Get all topicsFrom DB strSql ="SELECT Topics.T_Status, Topics.Forum_ID, Topics.Topic_ID, Topics.T_subject,Topics.T_Mail, Topics.T_Originator, Topics.T_Replies, Topics.T_Last_Post, Members.M_Name " strSql = strSql & "FROM Members INNER JOIN Topics ON Members.Member_id = Topics.T_Originator " strSql = strSql & "where Topics.Forum_ID = " & Request.QueryString("forum_id") & "and T_Last_Post >#" & defDate & "# order by Topics.T_Last_Post DESC" set rs = my_conn.Execute (StrSql) '## Function to display new icon Function isNew(dt) if datediff("s", session("last_here_date"), dt) > 1 then isNew = "New Topic" Else isNew = "" End If End Function %>
Fóruns | &forum_title=<%=server.Urlencode(Request.QueryString("forum_title"))%>"><%=Request.QueryString("forum_title")%>     Dos últimos <%= ndays %> dias
&method=Topic&forum_title=<%=server.Urlencode(Request.QueryString("forum_title"))%>">Colocar nova mensagem
<% If rs.Eof or rs.Bof then ' No categories found in DB Response.Write "" Else do until rs.Eof '## Display Forum Response.Write "" if rs("T_Status") <> false then Response.Write "" & vbcrlf Else Response.Write "" & vbcrlf End if Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" rs.MoveNext loop End If %>
  Tema Autor Respostas Última mensagem
Sem mensagens
" & isNew(rs("T_Last_Post")) & "Thread Closed" Response.Write left(rs("T_Subject"), 50) & " " & rs("M_Name") & "" & rs("T_Replies") & "" & rs("T_Last_Post") & "

Todos os Fóruns | &method=Topic&forum_title=<%=server.Urlencode(Request.QueryString("forum_title"))%>">Colocar nova mensagem

<% my_conn.Close set my_conn = nothing %>