Categories.Asp
上传用户:qfkgdy
上传日期:2020-06-18
资源大小:1888k
文件大小:8k
- <!--#include file="wml.ini"-->
- <%
- id=request("id")
- page=cint(request("page"))
- Sort=request("Sort")
- dim rss,Page_Style,Class_Title
- set rss = server.CreateObject ("adodb.recordset")
- sql="select * from Class where id=" & id & " order by id desc"
- set rss=conn.execute(sql)
- if not rss.eof and not rss.bof then
- do while not rss.eof
- Class_Title=wap.filter("wml",rss("Class_Title"))
- call wmlbegin(""&wap.filter("wml",rss("Class_Title"))&"",""&rss("p")&"")
- rss.movenext
- loop
- end if
- rss.close
- set rss=Nothing
- Page_Style=Categories_Page_Style
- if Categories_Ad_Top<>0 then
- ads(cint(Categories_Ad_Top))
- end if
- %>
- <%
- call WMLT("排序:按",false)
- if(Sort="") then
- str=str&"新":ls=2
- column="Add_Time"
- else
- str=str&"<a href=""Categories.Asp?id="&id&""">新</a>"
- end if
- str=str&"|"
- if(Sort="j") then
- str=str&"今":ls=2
- column="down_count_today"
- else
- str=str&"<a href=""Categories.Asp?id="&id&"&Sort=j"">今</a>"
- end if
- str=str&"|"
- if(Sort="week") then
- str=str&"周":ls=3
- column="down_count_week"
- else
- str=str&"<a href=""Categories.Asp?id="&id&"&Sort=week"">周</a>"
- end if
- str=str&"|"
- if(Sort="month") then
- str=str&"月":ls=4
- column="down_count_month"
- else
- str=str&"<a href=""Categories.Asp?id="&id&"&Sort=month"">月</a>"
- end if
- str=str&"|"
- if(Sort="all") then
- str=str&"总":ls=5
- column="down_count"
- else
- str=str&"<a href=""Categories.Asp?id="&id&"&Sort=all"">总</a>"
- end if
- str=str&"|"
- if(Sort="Finally") then
- str=str&"热":ls=6
- column="last_down_time"
- else
- str=str&"<a href=""Categories.Asp?id="&id&"&Sort=Finally"">热</a>"
- end if
- str=str&"<br/>"
-
-
-
- response.Write(str)
-
- sql="Select * from [Album] where Show=1 and Album_ClassID=" & id & " order by " & column & " desc"
- Set rs = Server.CreateObject("ADODB.Recordset")
- rs.open sql,conn,1,1
- n=rs.RecordCount
- PageSize=Categories_Page_Show_Amount
- rs.pagesize=PageSize
- m=cint(rs.pagecount)
- if page="" then
- page=1
- elseif page<1 then
- page=1
- end if
- if page>m then
- page=m
- end if
- page=cint(page)
- if not rs.eof then
- rs.absolutepage=page
- end if
-
- if m>page+3 then
- endpage=page+3
- else
- endpage=m
- end if
- if page>4 then
- pagetitle=pagetitle & " " & ""
- end if
-
- for i=page-3 to endpage
- if not i<1 then
- if i = page then
- select case Page_Style
- case 2
- pagetitle=pagetitle & " " & "" & i & ""
- case 3
- pagetitle=pagetitle & " " & "" & wap.corder(i) & ""
- end select
- else
- select case Page_Style
- case 2
- pagetitle=pagetitle & " " & "<a href='Categories.Asp?id=" & id & "&Sort=" & Sort & "&page=" & i & "'>" & i & "</a>"
- case 3
- pagetitle=pagetitle & " " & "<a href='Categories.Asp?id=" & id & "&Sort=" & Sort & "&page=" & i & "'>" & wap.corder(i) & "</a>"
- end select
- end if
- end if
- next
- if page+3 < m then
- pagetitle=pagetitle & " " & ""
- end if
- %>
- <%
- i=0
- j=1
-
- Do While Not rs.Eof And i<PageSize
-
- i = i + 1
-
- ci=ci+1
-
- if(ci<Categories_Page_Show_Pic_Amount+1) then
-
- set rs1=conn.execute("select top 1 * from [Picture] WHERE AlbumID=" & rs("id") & " order by newid() ")
- do while not rs1.eof
- v1=wap.rndc()
- Call (new ImageClass).zoom(rs1("File_Url"),"images/temp/"& v1 & rs1("id") &"_80x80." & wap.ftype(rs1("File_Url")) & "",80,80)
- call wmlimg("/images/temp/" & v1 & rs1("id") & "_80x80." & wap.ftype(rs1("File_Url")) & "",wap.filter("wml",rs("Album_Title")),true)
- call wmllink2("View.Asp?id=" & rs("id") & "&p=" & page & "",((page-1)*Categories_Page_Show_Amount+j),"" & wap.filter("wml",rs("Album_Title")) & "",true)
-
- rs1.movenext
- loop
-
- Closers1()
- else
- call wmllink2("View.Asp?id=" & rs("id") & "&p=" & page & "",((page-1)*Categories_Page_Show_Amount+j),"" & wap.filter("wml",rs("Album_Title")) & "",true)
- end if
- %>
-
-
-
- <%
- rs.MoveNext
- j=j+1
- loop
-
-
- select case Page_Style
- case 1
- if page>1 then
-
- 'response.write("<a href='Categories.Asp?id=" & id & "&Sort=" & Sort & "&Page=1'><<</a>")
- call wmllink("Categories.Asp?id=" & id & "&Sort=" & Sort & "&Page=1","<<",false)
- end if
- if page="" and page=0 then page=1
- if page*Categories_Page_Show_Amount<rs.recordcount then
- 'response.write("<a href='Categories.Asp?id=" & id & "&Sort=" & Sort & "&Page=" & page+1 & "'>下页</a>")
- call wmllink("Categories.Asp?id=" & id & "&Sort=" & Sort & "&Page=" & page+1 & "","下页",false)
- end if
- if Page*Categories_Page_Show_Amount<rs.recordcount or Page>1 then response.write("(" & Page & "/" & (int((rs.recordcount-1)/Categories_Page_Show_Amount)+1) & ")")
- if page>1 then
- response.write("<a href='Categories.Asp?id=" & id & "&Sort=" & Sort & "&Page=" & page-1 & "'>上页</a>")
- end if
- if page*Categories_Page_Show_Amount<rs.recordcount then
- response.write("<a href='Categories.Asp?id=" & id & "&Sort=" & Sort & "&Page=" & (int((rs.recordcount-1)/Categories_Page_Show_Amount)+1) & "'>>></a>")
- end if
- response.write("<br/>")
- %>
- <% if Page*Categories_Page_Show_Amount<rs.recordcount or Page>1 then %>
- <input name="page" title="页码" type="text" format="*N" emptyok="true" size="3" maxlength="4" value="2"/>
- <anchor>跳页<go href="Categories.Asp?id=<%=id%>&Sort=<%=Sort%>" accept-charset='utf-8'><postfield name="Page" value="$(page)"/></go></anchor><br/>
- <% end if %>
- <%
- case 2
- response.write("第")
- if page>1 then
-
- call wmllink("Categories.Asp?id=" & id & "&Sort=" & Sort & "&Page=1","1",false)
- call wmlwrite("<",false)
- end if
- response.write(pagetitle)
- if page*Categories_Page_Show_Amount<rs.recordcount then
- call wmlwrite(">",false)
- call wmllink("Categories.Asp?id=" & id & "&Sort=" & Sort & "&Page=" & (int((rs.recordcount-1)/Categories_Page_Show_Amount)+1) & "","" & (int((rs.recordcount-1)/Categories_Page_Show_Amount)+1) & "",false)
- end if
- response.write("页<br/>")
- case 3
- response.write("第")
- if page>1 then
-
- call wmllink("Categories.Asp?id=" & id & "&Sort=" & Sort & "&Page=1",wap.corder("1"),false)
- call wmlwrite("<",false)
- end if
- response.write(pagetitle)
- if page*Categories_Page_Show_Amount<rs.recordcount then
- call wmlwrite(">",false)
- call wmllink("Categories.Asp?id=" & id & "&Sort=" & Sort & "&Page=" & (int((rs.recordcount-1)/Categories_Page_Show_Amount)+1) & "","" & wap.corder((int((rs.recordcount-1)/Categories_Page_Show_Amount)+1)) & "",false)
- end if
- response.write("页<br/>")
- end select
-
-
-
- set rs=conn.execute("select top " & Categories_Top_download_Show_Amount & " * from [Album] WHERE Show=1 and Album_ClassID=" & id & " order by last_view_time desc")
- if not rs.eof then
- call wmlwrite("+热门下载+",false)
- call wmllink("explore.asp?action=rank&Sort=Finally","更多",true)
-
- do while not rs.eof
-
- call wmllink("View.Asp?id=" & rs("id") & "","" & wap.filter("wml",rs("Album_Title")) & "",true)
- rs.movenext
- loop
- end if
- Closers()
- if Categories_Ad_Medium<>0 then
- ads(cint(Categories_Ad_Medium))
- end if
- set rs=conn.execute("select top " & Categories_Latest_recommend_Show_Amount & " * from [Album] WHERE Show=1 and Album_ClassID=" & id & " order by newid(),last_update_time")
- if not rs.eof then
-
- call wmlwrite("+最新推荐+",false)
- call wmllink("explore.asp?action=rank&Sort=new","更多",true)
- do while not rs.eof
-
- call wmllink("View.Asp?id=" & rs("id") & "","" & wap.filter("wml",rs("Album_Title")) & "",true)
- rs.movenext
- loop
- end if
- Closers()
- if Categories_Ad_Bottom<>0 then
- ads(cint(Categories_Ad_Bottom))
- end if
- %>
- <%
- call wap.navs("|" & Class_Title & ",")
- call wmlend
- %>