Now I have a little request, Could someone please help me make so it also shows WHO posted the topic.
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE file="inc_func_secure.asp" -->
<!--#INCLUDE file="inc_sha256.asp"-->
<%
connString = strConnstring
function getlast_topics(numdays)
set tConn= Server.CreateObject("ADODB.Connection")
tConn.Open ConnString
'''''''''''''''''''''''''''''''''''''
''Don't display if from private forum
'''''''''''''''''''''''''''''''''''''
set PrivateForum = tConn.Execute("select FORUM_ID from FORUM_FORUM where F_PRIVATEFORUMS = 6")
SQL = "SELECT TOP " & numdays & " * from FORUM_TOPICS WHERE "
do until PrivateForum.eof
SQL = SQL & "FORUM_ID <> " & PrivateForum("FORUM_ID") & " and "
PrivateForum.movenext
Loop
'''''''''''''''''
strSql = "SELECT TOP " & numdays & " T_AUTHOR,T_LAST_POST,T_LAST_POSTER,T_DATE,T_SUBJECT,TOPIC_ID,FORUM_ID,CAT_ID from FORUM_TOPICS order by T_LAST_POST DESC"
CColor = strForumCellColor
set rss = tConn.Execute (strSql)
response.write "<tr><td bgcolor=""" & strCategoryCellColor & """ height=""24"" align=""center"">Nyeste Forum Indlæg</td></tr>" & vbnewline
do until rss.eof
tID = rss("TOPIC_ID")
tPOSTER = rss("T_LAST_POSTER")
tDATE = rss("T_DATE")
tSUBJECT = rss("T_SUBJECT")
strlast = strlast & "<tr><td onMouseOver=""this.style.background='" & strForumFirstcellcolor & "';"" onMouseOut=""this.style.background='"& CColor &"';"" style=""cursor: hand"" bgcolor=" & CColor & " onClick=""window.location.href='/forum/link.asp?TOPIC_ID=" & tID & "'"" height=""18"" class=""button"">" & vbcrlf
strlast = strlast & "<div align=""left"" class=""button (unavailable)""><font face=""Veranda, Arial, Helvetica, san-serif"" size=""1"">Emne: <a href=""link.asp?TOPIC_ID=" & tID & """ class=""button (unavailable)"" target=""_blank""><small>" & tSUBJECT & "</small></a></font></div>" & vbcrlf
strlast = strlast & "</td></tr>" & vbcrlf
rss.movenext
loop
rss.close
set rss=nothing
tConn.close
set tConn=nothing
getlast_topics=strlast
end function
%>
<table width="100%" cellspacing="1" cellpadding="0" border="0" bgcolor="#333333">
<%=getlast_topics(5)%>
</table>