Thanks for the code. For some reason after I have inserted the code in my page I get the error:
Error Type:
Microsoft VBScript compilation (0x800A0400)
Expected statement
/original/Default.asp, line 866
end if
My code has been inserted in the default.asp page and looks as follows:
%><table cellspacing="1" cellpadding="3" class="tableBorder" align="center">
<tr class="tableLedger">
<td colspan="7">Last Topics</td>
</tr>
<tr class="tableSubLedger">
<td width="2%" align="center"></td>
<td width="30%" align="center">Forum</td>
<td width="2%" align="center"></td>
<td width="36%" align="center">Topic</td>
<td width="10%" align="center">Sent by</td>
<td width="10%" align="center">Reply</td>
<td width="10%" align="center">Read</td>
</tr>
<%
Dim siralama
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, tbltopic.no_of_replies, tblAuthor.Author_ID, tblAuthor.Username "
strSql = strSql & "From " & strDbTable & "Topic, " & strDbTable & "Forum, tblthread, tblAuthor Where " & strDbTable & "Topic.Hide = 0 And " & strDbTable & "Topic.Forum_ID = " & strDbTable & "Forum.Forum_ID AND tblthread.thread_ID =tblTopic.Last_Thread_ID AND tblAuthor.Author_ID =tblthread.Author_ID Order By " & strDbTable & "Topic.Topic_ID desc"
rscommon.Open strSQL, adoCon
For siralama= 1 to 10
if rscommon.Eof Then Exit For
Response.Write "<tr class=""tableRow""><td><img border=""1"" src=""" & strImagePath & "hot_topic_no_new_posts_icon.gif""/></td><td><a href=""forum_topics.asp?FID=" & rsCommon("Forum_ID") & """ title=""click for forum page"">" & rsCommon("Forum_name") & "</a></td><td><img style=""border:1px solid #000000;"" src=""" & strImagePath & "read_private_message.gif"" alt=""show message"" /></td><td><a href=""forum_posts.asp?TID=" & rsCommon("Topic_ID") & "&get=last#" & rsCommon("Last_Thread_ID") & """ title=""Topic"">" & rsCommon("Subject") & "</a></td><td align=""center""><a href=""member_profile.asp?PF=" & rsCommon("Author_ID") & """ title=""by"">" & rsCommon("username") & "</a></td><td align=""center"">" & rsCommon("no_of_replies") & "</td><td align=""center"">" & rsCommon("No_of_views") & "</td></tr>"
rsCommon.MoveNext
Next
rscommon.close
end if
%></table>