<table cellspacing="1" cellpadding="3" class="tableBorder" align="center">
<tr class="tableLedger">
<td colspan="5">En Son Mesaj Yazılan Konular</td>
</tr>
<tr class="tableSubLedger">
<td width="38%" align="center">Konu</td>
<td width="19%" align="center">Forum</td>
<td width="15%" align="center">Yazan</td>
<td width="21%" align="center">Tarih</td>
<td width="7%" align="center">Okunma</td>
</tr>
<%
Dim rsLatestPosts
Dim intSay
Dim rsLatestPosts2
Dim sql2
Dim LastLatestPostsDateTime
Dim LastLatestPostsDate
Dim LastLatestPostsTime
Set rsLatestPosts = Server.CreateObject("ADODB.Recordset")
strSql = "Select " & strDbTable & "Topic.Subject, " & strDbTable & "Topic.Topic_ID, " & strDbTable & "Forum.Forum_ID, " & strDbTable & "Forum.Forum_name, " & strDbTable & "Topic.Last_Thread_ID, " & strDbTable & "Topic.No_of_views "
strSql = strSql & "From " & strDbTable & "Topic, " & strDbTable & "Forum Where " & strDbTable & "Topic.Hide = False And " & strDbTable & "Topic.Forum_ID = " & strDbTable & "Forum.Forum_ID Order By " & strDbTable & "Topic.Last_Thread_ID desc"
rsLatestPosts.Open strSQL, adoCon
For intSay = 1 to 30
if rsLatestPosts.Eof Then Exit For
Set rsLatestPosts2 = Server.CreateObject("ADODB.Recordset")
sql2 = "SELECT " & strDbTable & "Thread.Thread_ID, " & strDbTable & "Thread.Topic_ID, " & strDbTable & "Thread.Message_date, " & strDbTable & "Author.Username, " & strDbTable & "Author.Author_ID FROM (" & strDbTable & "Author INNER JOIN " & strDbTable & "Thread ON " & strDbTable & "Author.Author_ID = " & strDbTable & "Thread.Author_ID) WHERE " & strDbTable & "Thread.Hide = False And Topic_ID= " & rsLatestPosts("Topic_ID") & " order by Message_date desc"
rsLatestPosts2.Open sql2, adoCon
LastLatestPostsDateTime = rsLatestPosts2("Message_date")
LastLatestPostsDate = DateFormat(LastLatestPostsDateTime)
LastLatestPostsTime = TimeFormat(LastLatestPostsDateTime)
Response.Write "<tr class=""tableRow""><td><a href=""forum_posts.asp?TID=" & rsLatestPosts("Topic_ID") & strQsSID2 & """><img border=""0"" src=""" & strImagePath & "right_arrow.gif"" alt="""" /></a> <a href=""forum_posts.asp?TID=" & rsLatestPosts("Topic_ID") & "&get=last#" & rsLatestPosts("Last_Thread_ID") & strQsSID2 &""" title=""Son Mesajı Görüntülemek İçin Tıklayın"">" & rsLatestPosts("Subject") & "</a></td><td><a href=""forum_topics.asp?FID=" & rsLatestPosts("Forum_ID") & strQsSID2 & """ title=""Forum Ana Sayfasını Görüntülemek İçin Tıklayın"">" & rsLatestPosts("Forum_name") & "</a></td><td align=""center"">"&rsLatestPosts2("Username") &"</td><td align=""center"">" & LastLatestPostsDate & "-" & LastLatestPostsTime & "</td><td align=""center"">" & rsLatestPosts("No_of_views") & "</td></tr>"
rsLatestPosts2.Close
rsLatestPosts.MoveNext
Next
rsLatestPosts.Close
%>
</table>