View.Asp
上传用户:qfkgdy
上传日期:2020-06-18
资源大小:1888k
文件大小:13k
- <!--#include file="wml.ini"-->
- <%
- id=cint(request("id"))
- page=cint(request("page"))
- p=cint(request("p"))
- tt=cint(request("tt"))
- v=cint(request("v"))
- PicSize=cint(request("PicSize"))
- if PicSize="" or PicSize=0 then
- PicSize=Session("PicSize")
- end if
- if v="" or v=0 then
- v=Session("v")
- end if
- Session("v")=v
- Session("PicSize")=PicSize
- if PicSize="" or PicSize=0 then PicSize=1
- if v="" or v=0 then v=2
- dim rss,Page_Style,Album_Title,last_update_time
- set rss = server.CreateObject ("adodb.recordset")
- sql="select * from Album where id=" & id & " order by id desc"
- set rss=getRecordSet(conn,sql,1,2)
- if not rss.eof and not rss.bof then
- do while not rss.eof
- Album_ClassID=rss("Album_ClassID")
- last_update_time=rss("Add_Time")
- Album_Title=wap.filter("wml",rss("Album_Title"))
- rss("View_count")=rss("View_count")+1
- rss("last_view_time")=now
- call wmlbegin(""&wap.filter("wml",rss("Album_Title"))&"","wrap")
- rss.movenext
- loop
- end if
- rss.close
- set rss=Nothing
- if View_Ad_Top<>0 then
- ads(cint(View_Ad_Top))
- end if
- Page_Style=View_Page_Style
- '统计分析
- Set picture=load(id)
- Public Sub analyze(ByVal is_dcount)
- if(is_dcount) then
- Dim statDAO
- Set statDAO=new StatDAOClass
- Call statDAO.analyze(date,"pid",id,"view_count")
- Set statDAO=nothing
- end if
- Dim analysisDAO
- Set analysisDAO=new AnalysisDAOClass
- Call analysisDAO.analyze(date,"pic_view")
- Set analysisDAO=nothing
- End Sub
- Call analyze(picture.getIs_dcount())
-
- %><%=Album_Title%><br/>
- 每页显:
- <% if v=2 then
- response.write "2."
- else
- %>
- <a href= "View.Asp?id=<%=id%>&page=<%=page%>&p=<%=p%>&tt=<%=tt%>&v=2&PicSize=<%=PicSize%>">2</a>.
- <% end if %>
- <% if v=4 then
- response.write "4."
- else
- %>
- <a href= "View.Asp?id=<%=id%>&page=<%=page%>&p=<%=p%>&tt=<%=tt%>&v=4&PicSize=<%=PicSize%>">4</a>.
- <% end if %>
- <% if v=6 then
- response.write "6."
- else
- %>
- <a href= "View.Asp?id=<%=id%>&page=<%=page%>&p=<%=p%>&tt=<%=tt%>&v=6&PicSize=<%=PicSize%>">6</a>.
- <% end if %>
- <% if v=8 then
- response.write "8"
- else
- %>
- <a href= "View.Asp?id=<%=id%>&page=<%=page%>&p=<%=p%>&tt=<%=tt%>&v=8&PicSize=<%=PicSize%>">8</a>
- <% end if %>
- 张
- <br/>
- 预览大小:<% if PicSize=1 then
- response.write "小-"
- else
- %>
- <a href= "View.Asp?id=<%=id%>&page=<%=page%>&p=<%=p%>&tt=<%=tt%>&v=<%=v%>&PicSize=1">小</a>-
- <% end if %>
- <% if PicSize=2 then
- response.write "中-"
- else
- %>
- <a href= "View.Asp?id=<%=id%>&page=<%=page%>&p=<%=p%>&tt=<%=tt%>&v=<%=v%>&PicSize=2">中</a>-
- <% end if %>
- <% if PicSize=3 then
- response.write "大"
- else
- %>
- <a href= "View.Asp?id=<%=id%>&page=<%=page%>&p=<%=p%>&tt=<%=tt%>&v=<%=v%>&PicSize=3">大</a>
- <% end if %><br/>----------<br/>
- <%
- sql="Select * from [Picture] where AlbumID=" & id & " order by id desc"
- Set rs = Server.CreateObject("ADODB.Recordset")
- rs.open sql,conn,1,1
- n=rs.RecordCount
- PageSize=v
- 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='View.Asp?id=" & id & "&page=" & i & "&p=" & p & "&tt=" & tt & "&v=" & v & "&PicSize=" & PicSize & "'>" & i & "</a>"
- case 3
- pagetitle=pagetitle & " " & "<a href='View.Asp?id=" & id & "&page=" & i & "&p=" & p & "&tt=" & tt & "&v=" & v & "&PicSize=" & PicSize & "'>" & wap.corder(i) & "</a>"
- end select
- end if
- end if
- next
- if page+3 < m then
- pagetitle=pagetitle & " " & ""
- end if
- %>
- <%
- i=0
- j=0
- Do While Not rs.Eof And i<PageSize
- vv1=wap.rndc()
- i = i + 1
- j=j+1
- dim ii, k
- ii=int(rnd*100)
-
- if wap.ftype(rs("File_Url"))="gif" then
- Set fso = Server.CreateObject("Scripting.FileSystemObject")
- fso.copyfile server.mappath(replace(rs("File_Url"),"/","")),server.mappath("") & "imagestemp"
- set objfso=nothing
- end if
- set fso1=Server.CreateObject ("Scripting.FileSystemObject")
- fpath=server.mappath(replace(rs("File_Url"),"/",""))
- if fso1.FileExists(fpath) then
- if tt=1 then
-
- if PicSize=1 then
- k="100x133"
- Call (new ImageClass).zoom(rs("File_Url"),"images/temp/b"& vv1 & rs("id") &"_100x133." & wap.ftype(rs("File_Url")) & "",100,133)
- elseif PicSize=2 then
- k="176x220"
- Call (new ImageClass).zoom(rs("File_Url"),"images/temp/b"& vv1 & rs("id") &"_176x220." & wap.ftype(rs("File_Url")) & "",176,220)
- elseif PicSize=3 then
- k="240x320"
- Call (new ImageClass).zoom(rs("File_Url"),"images/temp/b"& vv1 & rs("id") &"_240x320." & wap.ftype(rs("File_Url")) & "",240,320)
- end if
- if wap.ftype(rs("File_Url"))<>"gif" then
- call wmlimgl("/images/temp/b" & vv1 & rs("id") & "_" & k & "." & wap.ftype(rs("File_Url")) & "",wap.filter("wml",rs("Title")),"Download.Asp?id=" & rs("id") & "&pp=" & page & "&p=" & p & "&tt=" & tt & "&v=" & v & "",wap.filter("wml",rs("Title")),false)
- else
- call wmlimgl("/images/temp/" & Split(rs("File_Url"),"/")(4) & "",wap.filter("wml",rs("Title")),"Download.Asp?id=" & rs("id") & "&pp=" & page & "&p=" & p & "&tt=" & tt & "&v=" & v & "",wap.filter("wml",rs("Title")),false)
- end if
- else
- if PicSize=1 then
- k="100x133"
- Call (new ImageClass).zoom(rs("File_Url"),"images/temp/b"& vv1 & rs("id") &"_100x133." & wap.ftype(rs("File_Url")) & "",100,133)
- elseif PicSize=2 then
- k="176x220"
- Call (new ImageClass).zoom(rs("File_Url"),"images/temp/b"& vv1 & rs("id") &"_176x220." & wap.ftype(rs("File_Url")) & "",176,220)
- elseif PicSize=3 then
- k="240x320"
- Call (new ImageClass).zoom(rs("File_Url"),"images/temp/b"& vv1 & rs("id") &"_240x320." & wap.ftype(rs("File_Url")) & "",240,320)
- end if
- if wap.ftype(rs("File_Url"))<>"gif" then
- call wmlimg("/images/temp/b" & vv1 & rs("id") & "_" & k & "." & wap.ftype(rs("File_Url")) & "",wap.filter("wml",rs("Title")),true)
- else
- call wmlimg("/images/temp/" & Split(rs("File_Url"),"/")(4) & "",wap.filter("wml",rs("Title")),true)
- end if
- if wap.ftype(rs("File_Url"))<>"gif" then
- call wmllink("Downloads.Asp?id=" & rs("id") & "&t=100&h=133","小图",false)
- response.write("-")
- call wmllink("Downloads.Asp?id=" & rs("id") & "&t=176&h=220","中图",false)
- response.write("-")
- call wmllink("Downloads.Asp?id=" & rs("id") & "&t=240&h=320","大图",true)
- else
- call wmllink("/images/temp/" & Split(rs("File_Url"),"/")(4) & "","下载原图",true)
- end if
- 'call wmlimg(rs("File_Url"),wap.filter("wml",rs("Title")),true)
- call wmllink("Download.Asp?id=" & rs("id") & "&pp=" & page & "&p=" & p & "&tt=" & tt & "&v=" & v & "","自定义下载",true)
- end if
- end if
- %>
-
-
-
- <%
- rs.MoveNext
- loop
-
- call wmlwrite("",true)
- select case Page_Style
- case 1
- if page>1 then
-
- 'response.write("<a href='Categories.Asp?id=" & id & "&Page=1&p=" & p & "&tt=" & tt & "&v=" & v & "'><<</a>")
- call wmllink("View.Asp?id=" & id & "&Page=1&p=" & p & "&tt=" & tt & "&v=" & v & "&PicSize=" & PicSize & "","<<",false)
- end if
- if page="" and page=0 then page=1
- if page*v<rs.recordcount then
- 'response.write("<a href='Categories.Asp?id=" & id & "&Page=" & page+1 & "&p=" & p & "&tt=" & tt & "&v=" & v & "&PicSize=" & PicSize & "'>下页</a>")
- call wmllink("View.Asp?id=" & id & "&Page=" & page+1 & "&p=" & p & "&tt=" & tt & "&v=" & v & "&PicSize=" & PicSize & "","下页",false)
- end if
- if Page*v<rs.recordcount or Page>1 then response.write("(" & Page & "/" & (int((rs.recordcount-1)/v)+1) & ")")
- if page>1 then
- response.write("<a href='View.Asp?id=" & id & "&Page=" & page-1 & "&p=" & p & "&tt=" & tt & "&v=" & v & "&PicSize=" & PicSize & "'>上页</a>")
- end if
- if page*v<rs.recordcount then
- response.write("<a href='View.Asp?id=" & id & "&Page=" & (int((rs.recordcount-1)/v)+1) & "&p=" & p & "&tt=" & tt & "&v=" & v & "&PicSize=" & PicSize & "'>>></a>")
- end if
- response.write("<br/>")
- %>
- <% if Page*v<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="View.Asp?id=<%=id%>&p=<%=p%>&tt=<%=tt%>&v=<%=v%>&PicSize=<%=PicSize%>" accept-charset='utf-8'><postfield name="Page" value="$(page)"/></go></anchor><br/>
- <% end if %>
- <%
- case 2
- response.write("第")
- if page>1 then
-
- call wmllink("View.Asp?id=" & id & "&Page=1","1",false)
- call wmlwrite("<",false)
- end if
- response.write(pagetitle)
- if page*v<rs.recordcount then
- call wmlwrite(">",false)
- call wmllink("View.Asp?id=" & id & "&Page=" & (int((rs.recordcount-1)/v)+1) & "&p=" & p & "&tt=" & tt & "&v=" & v & "&PicSize=" & PicSize & "","" & (int((rs.recordcount-1)/v)+1) & "",false)
- end if
- response.write("页<br/>")
- case 3
- response.write("第")
- if page>1 then
-
- call wmllink("View.Asp?id=" & id & "&Page=1",wap.corder("1"),false)
- call wmlwrite("<",false)
- end if
- response.write(pagetitle)
- if page*v<rs.recordcount then
- call wmlwrite(">",false)
- call wmllink("View.Asp?id=" & id & "&Page=" & (int((rs.recordcount-1)/v)+1) & "&p=" & p & "&tt=" & tt & "&v=" & v & "&PicSize=" & PicSize & "","" & wap.corder((int((rs.recordcount-1)/v)+1)) & "",false)
- end if
- response.write("页<br/>")
- end select
- %>
- <%
-
-
- set rs=conn.execute("select * from [Class] WHERE id=" & Album_ClassID & "")
- if not rs.eof then
- do while not rs.eof
- Class_Title=rs("Class_Title")
- rs.movenext
- loop
- end if
- Closers()
-
- call wmllink("Categories.Asp?id="& Album_ClassID &"&page=" & p & "","返回上级",false)
- call wmlwrite("|",false)
- if tt<>1 then
- call wmllink("View.Asp?id="& id &"&page=" & p & "&tt=1&v=" & v & "&PicSize=" & PicSize & "","图片墙模式",true)
- else
- call wmllink("View.Asp?id="& id &"&page=" & p & "&tt=0&v=" & v & "&PicSize=" & PicSize & "","列表模式",true)
- end if
- call wmlimg("/images/g.gif","<",false)
- call wmlwrite("共" & n & "张图片",true)
- call wmlimg("/images/time.gif","<",false)
- 'call wmlimg("Clear_temporary_files.Asp",".",false)
- call wmlwrite("更新日期:" & wap.formatTime(last_update_time,8),true)
- set rs3=conn.execute("select top 1 * from Album where id>"& id &" order by id asc")
- if not rs3.eof then
- call wmlimg("/images/Under.gif","<",false)
- call wmlwrite("下一组:",false)
- call wmllink("View.Asp?id=" & rs3("id") & "","" & wap.filter("wml",rs3("Album_Title")) & "",true)
- end if
- set rs2=conn.execute("select top 1 * from Album where id<"& id &" order by id desc")
- if not rs2.eof then
- call wmlimg("/images/On.gif",">",false)
-
- call wmlwrite("上一组:",false)
- call wmllink("View.Asp?id=" & rs2("id") & "","" & wap.filter("wml",rs2("Album_Title")) & "",true)
- end if
- set rs=conn.execute("select top " & View_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 View_Ad_Medium<>0 then
- ads(cint(View_Ad_Medium))
- end if
- set rs=conn.execute("select top " & View_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 View_Ad_Bottom<>0 then
- ads(cint(View_Ad_Bottom))
- end if
- call wap.navs(Class_Title&",Categories.Asp?id="& Album_ClassID &"&page=" & p & "|"&Album_Title&",")
- call wmlend
- %>