Categories.Asp
上传用户:qfkgdy
上传日期:2020-06-18
资源大小:1888k
文件大小:8k
源码类别:

手机WAP编程

开发平台:

ASP/ASPX

  1. <!--#include file="wml.ini"-->
  2. <%  
  3. id=request("id")
  4. page=cint(request("page")) 
  5. Sort=request("Sort") 
  6. dim rss,Page_Style,Class_Title
  7. set rss = server.CreateObject ("adodb.recordset")
  8. sql="select * from Class where id=" & id & " order by id desc"
  9.    set rss=conn.execute(sql)
  10. if not rss.eof and not rss.bof then
  11.    do while not rss.eof
  12. Class_Title=wap.filter("wml",rss("Class_Title"))
  13.      call wmlbegin(""&wap.filter("wml",rss("Class_Title"))&"",""&rss("p")&"")
  14. rss.movenext
  15. loop
  16. end if
  17. rss.close
  18. set rss=Nothing
  19. Page_Style=Categories_Page_Style
  20. if Categories_Ad_Top<>0 then
  21.  ads(cint(Categories_Ad_Top))
  22. end if
  23. %>
  24. <% 
  25. call WMLT("排序:按",false)
  26. if(Sort="") then
  27. str=str&"新":ls=2
  28. column="Add_Time"
  29. else
  30. str=str&"<a href=""Categories.Asp?id="&id&""">新</a>"
  31. end if
  32. str=str&"|"
  33. if(Sort="j") then
  34. str=str&"今":ls=2
  35. column="down_count_today"
  36. else
  37. str=str&"<a href=""Categories.Asp?id="&id&"&amp;Sort=j"">今</a>"
  38. end if
  39. str=str&"|"
  40. if(Sort="week") then
  41. str=str&"周":ls=3
  42. column="down_count_week"
  43. else
  44. str=str&"<a href=""Categories.Asp?id="&id&"&amp;Sort=week"">周</a>"
  45. end if
  46. str=str&"|"
  47. if(Sort="month") then
  48. str=str&"月":ls=4
  49. column="down_count_month"
  50. else
  51. str=str&"<a href=""Categories.Asp?id="&id&"&amp;Sort=month"">月</a>"
  52. end if
  53. str=str&"|"
  54. if(Sort="all") then
  55. str=str&"总":ls=5
  56. column="down_count"
  57. else
  58. str=str&"<a href=""Categories.Asp?id="&id&"&amp;Sort=all"">总</a>"
  59. end if
  60. str=str&"|"
  61. if(Sort="Finally") then
  62. str=str&"热":ls=6
  63. column="last_down_time"
  64. else
  65. str=str&"<a href=""Categories.Asp?id="&id&"&amp;Sort=Finally"">热</a>"
  66. end if
  67. str=str&"<br/>"
  68. response.Write(str)
  69.     sql="Select * from [Album] where Show=1 and Album_ClassID=" & id & "  order by " & column & " desc"
  70.     Set rs = Server.CreateObject("ADODB.Recordset")
  71.     rs.open sql,conn,1,1 
  72.     n=rs.RecordCount 
  73.     PageSize=Categories_Page_Show_Amount
  74.     rs.pagesize=PageSize
  75.     m=cint(rs.pagecount) 
  76.     if page="" then 
  77.     page=1 
  78.     elseif page<1 then 
  79.     page=1 
  80.     end if 
  81.     if page>m then 
  82.     page=m 
  83.     end if 
  84.     page=cint(page) 
  85.     if not rs.eof then 
  86.     rs.absolutepage=page 
  87.     end if 
  88.     
  89.     if m>page+3 then 
  90.     endpage=page+3 
  91.     else 
  92.     endpage=m 
  93.     end if 
  94.     if page>4 then 
  95.     pagetitle=pagetitle & " " & "" 
  96.     end if 
  97.     
  98.     for i=page-3 to endpage 
  99.     if not i<1 then 
  100.     if i = page then 
  101.     select case Page_Style
  102.     case 2
  103.     pagetitle=pagetitle & " " & "" & i & "" 
  104.    case 3
  105.     pagetitle=pagetitle & " " & "" & wap.corder(i) & "" 
  106.     end select
  107.     else 
  108.     select case Page_Style
  109.     case 2
  110.     pagetitle=pagetitle & " " & "<a href='Categories.Asp?id=" & id & "&amp;Sort=" & Sort & "&amp;page=" & i & "'>" & i & "</a>" 
  111.     case 3
  112.     pagetitle=pagetitle & " " & "<a href='Categories.Asp?id=" & id & "&amp;Sort=" & Sort & "&amp;page=" & i & "'>" & wap.corder(i) & "</a>" 
  113.     end select
  114.     end if 
  115.     end if 
  116.     next 
  117.     if page+3 < m then 
  118.     pagetitle=pagetitle & " " & "" 
  119.     end if 
  120.     %>
  121.     <%
  122.        i=0
  123.        j=1
  124.       
  125.        Do While Not rs.Eof And i<PageSize
  126.    
  127.        i = i + 1
  128.      
  129.         ci=ci+1
  130.        
  131. if(ci<Categories_Page_Show_Pic_Amount+1) then
  132. set rs1=conn.execute("select top 1 * from [Picture] WHERE AlbumID=" & rs("id") & " order by newid() ")
  133. do while not rs1.eof
  134. v1=wap.rndc()
  135.         Call (new ImageClass).zoom(rs1("File_Url"),"images/temp/"& v1 & rs1("id") &"_80x80." & wap.ftype(rs1("File_Url")) & "",80,80)
  136.   call wmlimg("/images/temp/" & v1 & rs1("id") & "_80x80." & wap.ftype(rs1("File_Url")) & "",wap.filter("wml",rs("Album_Title")),true)
  137. call wmllink2("View.Asp?id=" & rs("id") & "&amp;p=" & page & "",((page-1)*Categories_Page_Show_Amount+j),"" & wap.filter("wml",rs("Album_Title")) & "",true)
  138. rs1.movenext
  139. loop
  140. Closers1()
  141. else
  142. call wmllink2("View.Asp?id=" & rs("id") & "&amp;p=" & page & "",((page-1)*Categories_Page_Show_Amount+j),"" & wap.filter("wml",rs("Album_Title")) & "",true)
  143. end if
  144.      %>
  145.    
  146.      
  147.           
  148.     <% 
  149.       rs.MoveNext
  150.         j=j+1
  151.       loop  
  152.       
  153.      
  154. select case Page_Style
  155. case 1
  156.      if page>1 then
  157.       
  158.        'response.write("<a href='Categories.Asp?id=" & id & "&amp;Sort=" & Sort & "&amp;Page=1'>&lt;&lt;</a>")
  159.           call wmllink("Categories.Asp?id=" & id & "&amp;Sort=" & Sort & "&amp;Page=1","&lt;&lt;",false)
  160.        end if
  161. if page="" and page=0 then page=1
  162. if page*Categories_Page_Show_Amount<rs.recordcount then
  163. 'response.write("<a href='Categories.Asp?id=" & id & "&amp;Sort=" & Sort & "&amp;Page=" & page+1 & "'>下页</a>")
  164. call wmllink("Categories.Asp?id=" & id & "&amp;Sort=" & Sort & "&amp;Page=" & page+1 & "","下页",false)
  165. end if
  166. if Page*Categories_Page_Show_Amount<rs.recordcount or Page>1 then response.write("(" & Page & "/" & (int((rs.recordcount-1)/Categories_Page_Show_Amount)+1) & ")")
  167. if page>1 then
  168. response.write("<a href='Categories.Asp?id=" & id & "&amp;Sort=" & Sort & "&amp;Page=" & page-1 & "'>上页</a>")
  169. end if
  170. if page*Categories_Page_Show_Amount<rs.recordcount then
  171. response.write("<a href='Categories.Asp?id=" & id & "&amp;Sort=" & Sort & "&amp;Page=" & (int((rs.recordcount-1)/Categories_Page_Show_Amount)+1) & "'>&gt;&gt;</a>")
  172. end if
  173. response.write("<br/>")
  174. %>
  175.    <% if Page*Categories_Page_Show_Amount<rs.recordcount or Page>1 then %>
  176. <input name="page" title="页码" type="text" format="*N" emptyok="true" size="3" maxlength="4" value="2"/>
  177. <anchor>跳页<go href="Categories.Asp?id=<%=id%>&amp;Sort=<%=Sort%>" accept-charset='utf-8'><postfield name="Page" value="$(page)"/></go></anchor><br/>
  178.     <% end if %>
  179. <%
  180.       case 2 
  181.  response.write("第")
  182.       if page>1 then
  183.        
  184.         call wmllink("Categories.Asp?id=" & id & "&amp;Sort=" & Sort & "&amp;Page=1","1",false)
  185.         call wmlwrite("&lt;",false)
  186.       end if
  187.        response.write(pagetitle) 
  188.        if page*Categories_Page_Show_Amount<rs.recordcount then
  189. call wmlwrite("&gt;",false)
  190.         call wmllink("Categories.Asp?id=" & id & "&amp;Sort=" & Sort & "&amp;Page=" & (int((rs.recordcount-1)/Categories_Page_Show_Amount)+1) & "","" & (int((rs.recordcount-1)/Categories_Page_Show_Amount)+1) & "",false)
  191.        end if
  192. response.write("页<br/>") 
  193.       case 3 
  194.        response.write("第")
  195.          if page>1 then
  196.        
  197.         call wmllink("Categories.Asp?id=" & id & "&amp;Sort=" & Sort & "&amp;Page=1",wap.corder("1"),false)
  198.         call wmlwrite("&lt;",false)
  199.       end if
  200.        response.write(pagetitle) 
  201.        if page*Categories_Page_Show_Amount<rs.recordcount then
  202. call wmlwrite("&gt;",false)
  203.         call wmllink("Categories.Asp?id=" & id & "&amp;Sort=" & Sort & "&amp;Page=" & (int((rs.recordcount-1)/Categories_Page_Show_Amount)+1) & "","" & wap.corder((int((rs.recordcount-1)/Categories_Page_Show_Amount)+1)) & "",false)
  204.        end if   
  205.  response.write("页<br/>") 
  206.        end select
  207.        
  208.      
  209.     
  210. 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")
  211. if not rs.eof then
  212.     call wmlwrite("+热门下载+",false)
  213. call wmllink("explore.asp?action=rank&amp;Sort=Finally","更多",true)
  214. do while not rs.eof
  215. call wmllink("View.Asp?id=" & rs("id") & "","" & wap.filter("wml",rs("Album_Title")) & "",true)
  216. rs.movenext
  217. loop
  218. end if
  219. Closers()
  220. if Categories_Ad_Medium<>0 then
  221.  ads(cint(Categories_Ad_Medium))
  222. end if
  223. 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")
  224. if not rs.eof then
  225. call wmlwrite("+最新推荐+",false)
  226. call wmllink("explore.asp?action=rank&amp;Sort=new","更多",true)
  227. do while not rs.eof
  228. call wmllink("View.Asp?id=" & rs("id") & "","" & wap.filter("wml",rs("Album_Title")) & "",true)
  229. rs.movenext
  230. loop
  231. end if
  232. Closers()
  233. if Categories_Ad_Bottom<>0 then
  234.  ads(cint(Categories_Ad_Bottom))
  235. end if
  236.     %>
  237. <%
  238. call wap.navs("|" & Class_Title & ",")
  239. call wmlend
  240. %>