Gönderen Konu: Forumda en çok okunanlar bloğu  (Okunma sayısı 2753 defa)

0 Üye ve 2 Ziyaretçi konuyu incelemekte.

Çevrimiçi AdmiN

  • Genel Sorumlu
  • Administrator
  • *
  • İleti: 7976
  • Puan: 750
  • Cinsiyet: Bay
  • ~|| Bilginin Gücü ||~
    • Kişisel Web Sitem
-Forumda en çok okunanlar bloğu
« Yanıtla #10 : Eylül 28, 2009, 19:22:17 ÖS »
Bu şekilde dene.

Kod: [Seç]
<%
mwpThemeTitle= "En Çok Okunan 10 Konu"
mwpThemeBlock_open()%>


<%
dim intReadTopics

intReadTopics = 10 ' number of top read topics to display
%>


    <%=displayReadTopics%>
 
<%
mwpThemeBlock_close()%>

<%



function displayReadTopics()
dim rs
set rs = server.CreateObject("adodb.recordset")

strSql = "SELECT TOP " & intReadTopics & " TOPIC_ID, T_SUBJECT, T_VIEW_COUNT FROM " & strTablePrefix & "TOPICS ORDER BY T_VIEW_COUNT DESC"
rs.Open strSql, my_Conn
%>
<table border="0" cellpadding="0" cellspacing="5" width="100%">
<tr>
<td valign="middle" width="10%"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><b>No.</b></font></td>
<td valign="middle" align="left"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><b>Konu Başlığı</b></font></td>
<td valign="middle" align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><b>Okunma Sayısı</b></font></td>
</tr>
<%
dim intCounter
intCounter = 1
do while not rs.EOF%>
<tr>
<td><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><%= intCounter%>.</font></td>
<td align="left"><a href="link.asp?TOPIC_ID=<%=rs("TOPIC_ID")%>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><%= rs("T_SUBJECT")%></font></a></td>
<td align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><%= rs("T_VIEW_COUNT")%></font></td>
</tr>
<%
intCounter = intCounter + 1
rs.movenext
loop
rs.Close
set rs = nothing
end function

%>
</div></table>
Konuyu Paylaş:
  delicious  facebook  twitter  google

 

Benzer Konular

  Konu / Başlatan Yanıt Son İleti
0 Yanıt
1052 Gösterim
Son İleti Şubat 17, 2007, 22:36:53 ÖS
Gönderen: tekniker
3 Yanıt
2102 Gösterim
Son İleti Şubat 12, 2008, 16:15:50 ÖS
Gönderen: massive
10 Yanıt
2379 Gösterim
Son İleti Eylül 28, 2009, 11:52:45 ÖÖ
Gönderen: kavalu
16 Yanıt
2248 Gösterim
Son İleti Ağustos 29, 2008, 00:02:29 ÖÖ
Gönderen: AdmiN
0 Yanıt
850 Gösterim
Son İleti Ağustos 14, 2010, 18:16:40 ÖS
Gönderen: AdmiN