%
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 = "
"
Else
isNew = "
"
End If
End Function
%>
Fóruns |
&forum_title=<%=server.Urlencode(Request.QueryString("forum_title"))%>"><%=Request.QueryString("forum_title")%>
Dos últimos <%= ndays %> dias
| Tema | Autor | Respostas | Última mensagem | ||
| Sem mensagens | |||||
| " & isNew(rs("T_Last_Post")) & " | " & vbcrlf Else Response.Write "![]() | " & vbcrlf
End if
Response.Write "" Response.Write left(rs("T_Subject"), 50) & " | " Response.Write "" & rs("M_Name") & " | " Response.Write "" & rs("T_Replies") & " | " Response.Write "" & rs("T_Last_Post") & " | " Response.Write "
Todos os Fóruns | &method=Topic&forum_title=<%=server.Urlencode(Request.QueryString("forum_title"))%>">Colocar nova mensagem
<% my_conn.Close set my_conn = nothing %>