Explore.Asp
上传用户:qfkgdy
上传日期:2020-06-18
资源大小:1888k
文件大小:9k
- <!--#include file="wml.ini"-->
- <%
- id=cint(request("id"))
- page=cint(request("page"))
- p=cint(request("p"))
- pp=cint(request("pp"))
- action=wap.req("action","")
- datetime=wap.req("datetime","")
- if action="" then action="rank"
- %>
- <%
- call wmlbegin("排行榜","wrap")
- if Top_Ad_Top<>0 then
- ads(cint(Top_Ad_Top))
- end if
- Page_Style=Top_Page_Style
- call list()
- set rs=conn.execute("select top " & Top_Top_download_Show_Amount & " * from [Album] WHERE Show=1 order by last_view_time desc")
- if not rs.eof then
-
- call wmlwrite("+热门下载+",false)
- call wmllink("explore.asp?action=rank&datetime=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 Top_Ad_Medium<>0 then
- ads(cint(Top_Ad_Medium))
- end if
-
- set rs=conn.execute("select top " & Top_Latest_recommend_Show_Amount & " * from [Album] WHERE Show=1 order by newid(),last_update_time")
- if not rs.eof then
- call wmlwrite("+最新推荐+",false)
- call wmllink("explore.asp?action=rank&datetime=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 Top_Ad_Bottom<>0 then
- ads(cint(Top_Ad_Bottom))
- end if
- %>
- <br/>
- <%
- Public Sub list()
- Dim rs,str,column,ls
- select case action
-
- case "rank":
-
- sTitle="排行榜"
- eTitle=title&sTitle
- if(datetime="commend") then
- str=str&"荐":ls=2
- column="last_update_time"
- else
- str=str&"<a href=""explore.asp?action=rank&datetime=commend"">荐</a>"
- end if
- str=str&"|"
- if(datetime="new") then
- str=str&"新":ls=2
- column="last_update_time"
- else
- str=str&"<a href=""explore.asp?action="&action&"&datetime=new"">新</a>"
- end if
- str=str&"|"
- if(datetime="") then
- str=str&"今":ls=2
- column="down_count_today"
- else
- str=str&"<a href=""explore.asp?action="&action&""">今</a>"
- end if
- str=str&"|"
- if(datetime="week") then
- str=str&"周":ls=3
- column="down_count_week"
- else
- str=str&"<a href=""explore.asp?action="&action&"&datetime=week"">周</a>"
- end if
- str=str&"|"
- if(datetime="month") then
- str=str&"月":ls=4
- column="down_count_month"
- else
- str=str&"<a href=""explore.asp?action="&action&"&datetime=month"">月</a>"
- end if
- str=str&"|"
- if(datetime="all") then
- str=str&"总":ls=5
- column="down_count"
- else
- str=str&"<a href=""explore.asp?action="&action&"&datetime=all"">总</a>"
- end if
- str=str&"|"
- if(datetime="Finally") then
- str=str&"热":ls=6
- column="last_down_time"
- else
- str=str&"<a href=""explore.asp?action="&action&"&datetime=Finally"">热</a>"
- end if
- str=str&"<br/>"
- if(datetime="commend") then
- Set rs=show("","Recommend=1","last_commend_time desc")
- else
- Set rs=show("",cases,column&" desc")
- end if
- end select
- n=rs.RecordCount
- PageSize=Top_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='Explore.Asp?id=" & id & "&action=" & action & "&datetime=" & datetime & "&page=" & i & "'>" & i & "</a>"
- case 3
- pagetitle=pagetitle & " " & "<a href='Explore.Asp?id=" & id & "&action=" & action & "&datetime=" & datetime & "&page=" & i & "'>" & wap.corder(i) & "</a>"
- end select
- end if
- end if
- next
- if page+3 < m then
- pagetitle=pagetitle & " " & ""
- end if
- %>
- <%
- if(action="rank") then
-
- call wmlwrite(sTitle,true)
- response.Write(str)
- end if
- i=0
- j=1
- Do While Not rs.Eof And i<PageSize
-
- i = i + 1
-
- ci=ci+1
- if(ci<Top_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()
- set fso1=Server.CreateObject ("Scripting.FileSystemObject")
- fpath=server.mappath(replace(rs1("File_Url"),"/",""))
- if fso1.FileExists(fpath) then
- 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")),rs1("Title"),true)
-
- call wmllink2("View.Asp?id=" & rs("id") & "&p=" & page & "",((page-1)*PageSize+j),"" & wap.filter("wml",rs("Album_Title")) & "",true)
- end if
- rs1.movenext
-
- loop
-
-
- else
- call wmllink2("View.Asp?id=" & rs("id") & "&p=" & page & "",((page-1)*PageSize+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='Explore.Asp?id=" & id & "&action=" & action & "&datetime=" & datetime & "&Page=1'><<</a>")
- call wmllink("Explore.Asp?id=" & id & "&action=" & action & "&datetime=" & datetime & "&Page=1","<<",false)
- end if
- if page="" and page=0 then page=1
- if page*PageSize<rs.recordcount then
- 'response.write("<a href='Explore.Asp?id=" & id & "&action=" & action & "&datetime=" & datetime & "&Page=" & page+1 & "'>下页</a>")
- call wmllink("Explore.Asp?id=" & id & "&action=" & action & "&datetime=" & datetime & "&Page=" & page+1 & "","下页",false)
- end if
- if Page*PageSize<rs.recordcount or Page>1 then response.write("(" & Page & "/" & (int((rs.recordcount-1)/PageSize)+1) & ")")
- if page>1 then
- response.write("<a href='Explore.Asp?id=" & id & "&action=" & action & "&datetime=" & datetime & "&Page=" & page-1 & "'>上页</a>")
- end if
- if page*PageSize<rs.recordcount then
- response.write("<a href='Explore.Asp?id=" & id & "&action=" & action & "&datetime=" & datetime & "&Page=" & (int((rs.recordcount-1)/PageSize)+1) & "'>>></a>")
- end if
- response.write("<br/>")
- %>
- <% if Page*10<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="Explore.Asp?id=<%=id%>&action=<%=action%>&datetime=<%=datetime%>" accept-charset='utf-8'><postfield name="Page" value="$(page)"/></go></anchor><br/>
- <% end if %>
- <%
- case 2
- response.write("第")
- if page>1 then
-
- call wmllink("Explore.Asp?id=" & id & "&action=" & action & "&datetime=" & datetime & "&Page=1","1",false)
- call wmlwrite("<",false)
- end if
- response.write(pagetitle)
- if page*PageSize<rs.recordcount then
- call wmlwrite(">",false)
- call wmllink("Explore.Asp?id=" & id & "&action=" & action & "&datetime=" & datetime & "&Page=" & (int((rs.recordcount-1)/PageSize)+1) & "","" & (int((rs.recordcount-1)/PageSize)+1) & "",false)
- end if
- response.write("页<br/>")
- case 3
- response.write("第")
- if page>1 then
-
- call wmllink("Explore.Asp?id=" & id & "&action=" & action & "&datetime=" & datetime & "&Page=1",wap.corder("1"),false)
- call wmlwrite("<",false)
- end if
- response.write(pagetitle)
- if page*PageSize<rs.recordcount then
- call wmlwrite(">",false)
- call wmllink("Explore.Asp?id=" & id & "&action=" & action & "&datetime=" & datetime & "&Page=" & (int((rs.recordcount-1)/PageSize)+1) & "","" & wap.corder((int((rs.recordcount-1)/PageSize)+1)) & "",false)
- end if
- response.write("页<br/>")
- end select
-
-
- End Sub
-
- Public Function show(ByVal num,conditions,orders)
- Dim strNum
- if(num<>"") then
- strNum=" top "&num
- end if
- Dim strCon
- if(conditions<>"") then
- strCon=" AND "&conditions
- end if
- Dim strOrder
- if(orders<>"") then
- strOrder=" ORDER BY "&orders
- end if
- sql="SELECT "&strNum&" * FROM Album WHERE Show=1 "&strCon&" "&strOrder
- Set show=getRecordSet(conn,sql,1,1)
- End Function
- '栏目名称
- Public Function getTitle(ByVal caid)
- sql="SELECT Class_Title FROM Class WHERE id="&caid
- Set DAORS=getRecordSet(conn,sql,1,1)
- if not DAORS.eof then
- getTitle=wap.filter("wml",DAORS("Class_Title"))
- else
- getTitle=""
- end if
- DAORS.close
- Set DAORS=nothing
- End Function
-
-
-
-
-
-
- call wap.navs("排行榜,")
- call wmlend
- %>