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

手机WAP编程

开发平台:

ASP/ASPX

  1. <!--#include file="wml.ini"-->
  2. <!--#include file="CommentDAOClass.asp" -->
  3. <%  
  4. id=request("id")
  5. page=cint(request("page")) 
  6. p=cint(request("p"))
  7. pp=cint(request("pp")) 
  8. %>
  9. <% 
  10. Set commentDAO=new CommentDAOClass
  11.    set rs=conn.execute("select * from [Picture] WHERE id=" & id & "")
  12.   
  13. do while not rs.eof
  14. v1=wap.rndc()
  15. call wmlbegin(wap.filter("wml",rs("Title")),"wrap")
  16. if wap.ftype(rs("File_Url"))="gif" then
  17. Set fso = Server.CreateObject("Scripting.FileSystemObject") 
  18. fso.copyfile server.mappath(replace(rs("File_Url"),"/","")),server.mappath("") & "imagestemp"
  19. set objfso=nothing  
  20. end if
  21. if wap.ftype(rs("File_Url"))<>"gif" then
  22. Call (new ImageClass).zoom(rs("File_Url"),"images/temp/"& v1 & rs("id") &"_176x220." & wap.ftype(rs("File_Url")) & "",176,220)
  23. call wmlimg("/images/temp/" & v1 & rs("id") & "_176x220." & wap.ftype(rs("File_Url")) & "",wap.filter("wml",rs("Title")),true) 
  24. else
  25. call wmlimg("/images/temp/" & Split(rs("File_Url"),"/")(4) & "",wap.filter("wml",rs("Title")),true) 
  26. end if
  27. 'call wmlimg(wap.filter("wml",rs("File_Url")),wap.filter("wml",rs("Title")),true)
  28. if wap.ftype(rs("File_Url"))<>"gif" then
  29. call wmllink("Downloads.Asp?id=" & rs("id") & "&amp;t=176&amp;h=220","下载原图",false)
  30. else
  31. call wmllink("/images/temp/" & Split(rs("File_Url"),"/")(4) & "","下载原图",false)
  32. end if
  33. call wmllink("Graffiti.Asp?id=" & id & "&amp;page=" & pp & "&amp;p=" & p & "","涂鸦文字",true)
  34. 'call wmllink("OtherDownload.Asp?id=" & rs("id") & "&amp;p=" & p & "&amp;pp=" & pp & "","其他尺寸",false)
  35. %>
  36. =常见尺寸下载=<br/>
  37. <a href="Downloads.Asp?id=<%=rs("id")%>&amp;t=128&amp;h=128">128x128</a>
  38. <a href="Downloads.Asp?id=<%=rs("id")%>&amp;t=176&amp;h=220">176x220</a>
  39. <a href="Downloads.Asp?id=<%=rs("id")%>&amp;t=176&amp;h=208">176x208</a><br/>
  40. <a href="Downloads.Asp?id=<%=rs("id")%>&amp;t=128&amp;h=160">128x160</a>
  41. <a href="Downloads.Asp?id=<%=rs("id")%>&amp;t=174&amp;h=131">174x131</a>
  42. <a href="Downloads.Asp?id=<%=rs("id")%>&amp;t=240&amp;h=320">240x320</a><br/>
  43. =自定义尺寸下载=<br/>
  44.       宽:<input size="3" type="text" name="t" value="128"/>
  45.       高:<input size="3" type="text" name="h" value="128"/><br/>
  46.       <a href="Downloads.Asp?id=<%=rs("id")%>&amp;t=$(t)&amp;h=$(h)">[确定下载]</a><br/>
  47. <%
  48. ClassID=rs("ClassID")
  49. AlbumID=rs("AlbumID")
  50. rs.movenext
  51. loop
  52. Closers()
  53. '统计分析
  54. Set picture=load(AlbumID)
  55. Public Sub analyze(ByVal is_dcount)
  56. if(is_dcount) then
  57. Dim statDAO
  58. Set statDAO=new StatDAOClass
  59. Call statDAO.analyze(date,"pid",AlbumID,"down_count")
  60. Set statDAO=nothing
  61. end if
  62. Dim analysisDAO
  63. Set analysisDAO=new AnalysisDAOClass
  64. Call analysisDAO.analyze(date,"pic_down")
  65. Set analysisDAO=nothing
  66. End Sub
  67. Call analyze(picture.getIs_dcount())
  68.     %>
  69. <br/>
  70. <%
  71. if Download_Ad_Top<>0 then
  72.  ads(cint(Download_Ad_Top))
  73. end if
  74. set rs=conn.execute("select * from [Class] WHERE id=" & ClassID & "")
  75. do while not rs.eof
  76. Class_Title=wap.filter("wml",rs("Class_Title"))
  77. rs.movenext
  78. loop
  79. Closers()
  80. sql="select * from [Album] WHERE id=" & AlbumID
  81. set rs=getRecordSet(conn,sql,1,2)
  82. do while not rs.eof
  83. Album_Title=rs("Album_Title")
  84. rs("Down_count")=rs("Down_count")+1
  85. rs("Down_count_f")=rs("Down_count_f")+1
  86. if(datediff("d",now(),rs("Last_down_time"))=0) then
  87. rs("Down_count_today")=rs("Down_count_today")+1
  88. else
  89. if(datediff("d",now(),rs("Last_down_time"))=-1) then
  90. rs("Down_count_yes")=rs("Down_count_today")
  91. else
  92. rs("Down_count_yes")=0
  93. end if
  94. rs("Down_count_yes")=1
  95. end if
  96. if(datediff("ww",now(),rs("Last_down_time"))=0) then
  97. rs("Down_count_week")=rs("Down_count_week")+1
  98. else
  99. rs("Down_count_week")=1
  100. end if
  101. if(datediff("m",now(),rs("Last_down_time"))=0) then
  102. rs("Down_count_month")=rs("Down_count_month")+1
  103. else
  104. rs("Down_count_month")=1
  105. end if
  106. rs("Last_down_time")=now
  107. rs.movenext
  108. loop
  109. Closers()
  110. '  call wmlimg("/images/DIY.gif",".",false)
  111.  ' call wmllink2("Graffiti.Asp?id=" & id & "&amp;page=" & pp & "&amp;p=" & p & "","DIY","制作涂鸦图片",true)
  112.   
  113. Dim inputName
  114. inputName=wap.formId("comment")
  115. call wmlimg("Clear_temporary_files.Asp",".",false)
  116. response.Write("<input type=""text"" name=""comment"" /><anchor title=""发表评论"">发表评论<go method=""GET"" href=""Comment.Asp"" ><postfield name=""content"" value=""$comment"" /><postfield name=""action"" value=""post"" /><postfield name=""id"" value="""&id&""" /></go></anchor><br/>")
  117. Set rs=commentDAO.show(1,id,3)
  118. if not rs.eof then
  119. Dim ic,cc
  120. ic=0
  121. cc=commentDAO.counts(1,id)
  122. do while not rs.eof
  123. response.Write((cc-ic)&"."&wap.cut(rs("content"),11,"..")&"<br/>")
  124. ic=ic+1
  125. rs.movenext
  126. loop
  127. response.Write("<a href=""comment.asp?id="&id&""">更多评论("&cc&"条)</a><br/>")
  128. end if
  129. rs.close
  130. Set rs=nothing
  131. call wmllink("View.Asp?id=" & AlbumID & "&amp;page=" & pp & "&amp;p=" & p & "","返回" & Album_Title,true)
  132. set rs=conn.execute("select top " & Download_Top_download_Show_Amount & " * from [Album] WHERE Show=1 order by newid(),last_down_time")
  133. if not rs.eof then
  134. call wmlwrite("+热门下载+",false)
  135. call wmllink("explore.asp?action=rank&amp;datetime=Finally","更多",true)
  136. do while not rs.eof
  137. call wmllink("View.Asp?id=" & rs("id") & "","" & wap.filter("wml",rs("Album_Title")) & "",true)
  138. rs.movenext
  139. loop
  140. end if
  141. Closers()
  142. if Download_Ad_Medium<>0 then
  143.  ads(cint(Download_Ad_Medium))
  144. end if
  145. set rs=conn.execute("select top " & Download_Latest_recommend_Show_Amount & " * from [Album] WHERE Show=1 order by last_view_time desc")
  146. if not rs.eof then
  147. call wmlwrite("+最新推荐+",false)
  148. call wmllink("explore.asp?action=rank&amp;datetime=new","更多",true)
  149. do while not rs.eof
  150. call wmllink("View.Asp?id=" & rs("id") & "","" & wap.filter("wml",rs("Album_Title")) & "",true)
  151. rs.movenext
  152. loop
  153. end if
  154. Closers()
  155. if Download_Ad_Bottom<>0 then
  156.  ads(cint(Download_Ad_Bottom))
  157. end if
  158. call wap.navs(Class_Title&",Categories.Asp?id="& ClassID &"&amp;page=" & p & "|"&wap.filter("wml",Album_Title)&",View.Asp?id=" & AlbumID & "&amp;page=" & pp & "&amp;p=" & p & ",")
  159. call wmlend
  160. %>