top10.asp
资源名称:wapjsp.rar [点击查看]
上传用户:xiao85513
上传日期:2010-01-11
资源大小:2160k
文件大小:2k
源码类别:
手机WAP编程
开发平台:
Java
- <!--#include file="conna.asp"-->
- <% Response.ContentType="text/vnd.wap.wml" %>
- <?xml version="1.0" encoding="gb2312"?>
- <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
- "http://www.wapforum.org/DTD/wml_1.1.xml">
- <wml>
- <head> <meta forua="true" http-equiv="Cache-Control" content="max-age=0"/> </head>
- <card id="forum" title="forum" newcontext="true">
- <p><do type="prev" name="Prev" label="Back"><prev/></do>
- **今日十大**<br/>
- <%
- ''=======================================================
- ''select top10 posters which has the most replies
- ''based on /wwwroot/html/xslt/index.asp modified by Kevin
- ''=======================================================
- set rs=server.createobject("adodb.recordset")
- 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"
- set rs=conn.execute(sql)
- dim rscount
- rscount=10
- do while not rs.eof
- response.write "∴ "
- ''cyndi modify
- titles=rs("title")
- titles=replace(titles,"<","<")
- titles=replace(titles,">",">")
- response.write titles & "<br/>"
- rscount=rscount-1
- rs.movenext
- ''set rs_herald=nothing
- loop
- rs.close
- set rs=nothing
- if rscount>0 then
- 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"
- set rs=conn.execute(sql)
- do while not rs.eof
- response.write "∴ "
- ''cyndi modify
- titles=rs("title")
- titles=replace(titles,"<","<")
- titles=replace(titles,">",">")
- response.write titles & "<br/>"
- rs.movenext
- loop
- rs.close
- set rs=nothing
- end if
- %>
- <b>* * * * * * * * *</b>
- <br/><a href="index.wml">返回论坛</a><br/>
- <br/><a href="http://herald.seu.edu.cn/ewap/index.wml">返回主页</a><br/>
- </p>
- </card>
- </wml>