UzmanWeb.Net Forum

Forumda en çok okunanlar bloğu (Okunma sayısı 5169 defa)

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

AdmiN

#10 * Eylül 29, 2009, 04:22:17 ÖÖ
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>
Kayıtlı