28,407
社区成员
发帖
与我相关
我的任务
分享
<%
Sub TagsList(tMode)
Dim TagRS,MAXTag
IF tMode="Hot" Then
Sql="Select TOP 20 * from blog_tags order by TagBlogCount desc, CreateDate asc"
Else
Sql="Select * from blog_tags order by CreateDate desc"
End IF
Set TagRS = Server.CreateObject("Adodb.RecordSet")
TagRS.Open Sql,Conn,1,1
IF TagRS.Eof AND TagRS.Bof Then
Response.Write ("目前没有 Tags 分类.")
Else
'得到当前最多日志分类数
MAXTag=conn.Execute("select top 1 TagBlogCount From Blog_Tags Order By TagBlogCount Desc")(0)
Do While Not TagRS.Eof
IF TagRS("TagBlogCount")>=cint(MAXTag*0.2) AND TagRS("TagBlogCount") <=cint(MAXTag*0.6) then
%>
<a href="BloglistTag.asp?tags= <%=Server.URLEncode(TagRS("TagName"))%>"> <span class="Tag_size2" title="此Tag共有 <%=TagRS("TagBlogCount")%>篇日志"> <%=TagRS("TagName")%> </span> </a>
<%
Else IF TagRS("TagBlogCount")> cint(MAXTag*0.6) AND TagRS("TagBlogCount") <=cint(MAXTag*0.9) Then
%>
<a href="BloglistTag.asp?tags= <%=Server.URLEncode(TagRS("TagName"))%>"> <span class="Tag_size3" title="此Tag共有 <%=TagRS("TagBlogCount")%>篇日志"> <%=TagRS("TagName")%> </span> </a>
<%
Else IF TagRS("TagBlogCount")> cint(MAXTag*0.9) Then
%>
<a href="BloglistTag.asp?tags= <%=Server.URLEncode(TagRS("TagName"))%>"> <span class="Tag_size4" title="此Tag共有 <%=TagRS("TagBlogCount")%>篇日志"> <%=TagRS("TagName")%> </span> </a>
<%
Else
%>
<a href="BloglistTag.asp?tags= <%=Server.URLEncode(TagRS("TagName"))%>"> <span class="Tag_size1" title="此Tag共有 <%=TagRS("TagBlogCount")%>篇日志"> <%=TagRS("TagName")%> </span> </a>
<%
End IF
Response.Write("¦")
TagRS.MoveNext
Loop
End IF
TagRS.Close
Set TagRS=NoThing
End Sub
%>
<%
Do While Not TagRS.Eof
IF TagRS("TagBlogCount")> =cint(MAXTag*0.2) AND TagRS("TagBlogCount") <=cint(MAXTag*0.6)
%>
<a href="BloglistTag.asp?tags=<%=Server.URLEncode(TagRS("TagName"))%>"><span class="Tag_size2" title="此Tag共有<%=TagRS("TagBlogCount")%>篇日志"><%=TagRS("TagName")%></span></a>
<%
ElseIF TagRS("TagBlogCount")> cint(MAXTag*0.6) AND TagRS("TagBlogCount") <=cint(MAXTag*0.9) Then
%>
<a href=""BloglistTag.asp?tags=<%=Server.URLEncode(TagRS("TagName"))%>"> <span class="Tag_size3" title="此Tag共有<%=TagRS("TagBlogCount")%>篇日志"><%=TagRS("TagName")%></span></a>
<%
ElseIF TagRS("TagBlogCount")> cint(MAXTag*0.9) Then
%>
<a href="BloglistTag.asp?tags=<%=Server.URLEncode(TagRS("TagName"))%>"> <span class="Tag_size4" title="此Tag共有<%=TagRS("TagBlogCount")%>篇日志"><%=TagRS("TagName")%></span></a>
<%
Else
%>
<a href="BloglistTag.asp?tags=<%=Server.URLEncode(TagRS("TagName"))%>"> <span class="Tag_size1" title="此Tag共有<%=TagRS("TagBlogCount")%>篇日志"><%=TagRS("TagName")%></span></a>
<%
End IF
Response.Write (" ¦ ")
TagRS.MoveNext
Loop
%>