top10.asp
上传用户:xiao85513
上传日期:2010-01-11
资源大小:2160k
文件大小:2k
源码类别:

手机WAP编程

开发平台:

Java

  1. <!--#include file="conna.asp"-->
  2. <% Response.ContentType="text/vnd.wap.wml" %>
  3. <?xml version="1.0" encoding="gb2312"?>
  4. <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
  5.                      "http://www.wapforum.org/DTD/wml_1.1.xml">
  6. <wml>
  7. <head> <meta forua="true" http-equiv="Cache-Control" content="max-age=0"/> </head>
  8. <card id="forum" title="forum" newcontext="true">
  9. <p><do type="prev" name="Prev" label="Back"><prev/></do>
  10. **今日十大**<br/>
  11. <%
  12. ''=======================================================
  13. ''select top10 posters which has the most replies
  14. ''based on /wwwroot/html/xslt/index.asp modified by Kevin
  15. ''=======================================================
  16. set rs=server.createobject("adodb.recordset")
  17. sql="select top 10 board.boardtype,cyndi.TopicID,cyndi.boardid,cyndi.title,cyndi.postusername,cyndi.postuserid,cyndi.dateandtime from board,(select * from Topic where datediff(d,dateandtime,GetDate())<1 and locktopic<2 and hits>10 and boardid<>25 and boardid<>13) as cyndi where cyndi.boardid=board.boardid and board.parentid<>92 ORDER BY cyndi.Child desc"
  18. set rs=conn.execute(sql)
  19. dim rscount
  20. rscount=10
  21. do while not rs.eof
  22. response.write "∴&nbsp;"
  23. ''cyndi modify
  24. titles=rs("title")
  25. titles=replace(titles,"<","&lt;")
  26. titles=replace(titles,">","&gt;")
  27. response.write titles & "<br/>"
  28. rscount=rscount-1
  29. rs.movenext
  30. ''set rs_herald=nothing
  31. loop
  32. rs.close
  33. set rs=nothing
  34. if rscount>0 then
  35. sql="select top "&rscount&" board.boardtype,cyndi.TopicID,cyndi.boardid,cyndi.title,cyndi.postusername,cyndi.postuserid,cyndi.dateandtime from board,(select * from Topic where datediff(d,dateandtime,GetDate())<2 and locktopic<2 and hits>10 and boardid<>25 and boardid<>13) as cyndi where cyndi.boardid=board.boardid and board.parentid<>92 ORDER BY cyndi.Child desc"
  36. set rs=conn.execute(sql)
  37. do while not rs.eof
  38. response.write "∴&nbsp;"
  39. ''cyndi modify
  40. titles=rs("title")
  41. titles=replace(titles,"<","&lt;")
  42. titles=replace(titles,">","&gt;")
  43. response.write titles & "<br/>"
  44. rs.movenext
  45. loop
  46. rs.close
  47. set rs=nothing
  48. end if
  49. %>
  50. <b>* * * * * * * * *</b>
  51. <br/><a href="index.wml">返回论坛</a><br/>
  52. <br/><a href="http://herald.seu.edu.cn/ewap/index.wml">返回主页</a><br/>
  53. </p>
  54. </card>
  55. </wml>