index1.asp
上传用户:chinaxaoli
上传日期:2010-01-01
资源大小:14k
文件大小:3k
- <!--#include file="conn.asp"-->
- <%Response.ContentType = "text/vnd.wap.wml; charset=utf-8"%>
- <?xml version="1.0" encoding="utf-8"?>
- <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
- <wml>
- <head><meta http-equiv='Cache-Control' content='no-cache'/>
- </head>
- <template><do type="accept" label="返回"><prev/></do></template>
- <card title="掌中聊吧" id="test" ontimer="index1.asp">
- <timer value="300"/>
- <p><a href="#post">发言</a>|<a href='index1.asp'>在线刷新</a></p>
- <p>--------------</p>
- <%
- 'gbook 页面
- '显示记录
- dim page
- page=Request.querystring("page")
- if page="" then page=request.Cookies("page")
- if page="" then page=1 else page=cint(page)
- if page<1 then page=1
- response.Cookies("page")=page
- dim sql,i
- ' sql="select id,userid,标题,点击,回复?from gbook where pid=0 order by 发表时间 desc"
- sql="SELECT ID, 内容,名称,标题,点击,回复,发表时间 "
- sql=sql&"FROM GBOOK "
- sql=sql&"where pid=0 order by 最后回复 desc,发表时间 desc"
-
- dim pageCount,recordcount
- set rs=server.CreateObject("adodb.recordset")
- rs.open sql,conn,1
- rs.PageSize=50 '设置分页
- recordcount=rs.recordcount
- PageCount=rs.PageCount '取得总页
- if page>PageCount then page=PageCount
- if not(rs.eof and rs.bof) then
- i=1
- rs.AbsolutePage=page '设置页码
- do while not rs.eof
- response.Write "<p mode='wrap'>"&i
- response.Write "."& rs(3) &"说:"
- response.Write ""& rs(2) &""
- response.Write ""& rs(1) &""
- response.Write"<br/>[" & rs(6)&"]"
-
- response.Write "</p>"
- rs.movenext
- i=i+1
- if i>10then exit do
- loop
- rs.close
- set rs=nothing
- response.Write "<p><a href='#post'>发言</a>|<a href='index.asp'>在线刷新</a></p>"
- response.Write "<p mode='nowrap'><a href='index.asp'>聊天室首页</a></p>"
- response.Write "<p><a href='http://wap.2hy.net' title='='>掌中梦网制作</a></p>"
- else
- response.Write"<p>暂无内容</p>"
- response.Write "<p><a href='#post'>发言</a></p>"
- response.Write "<p><a href='index.asp'>聊天室首页</a></p>"
- response.Write "<p><a href='http://wap.2hy.net' title='='>掌中梦网制作</a></p>"
- end if
- %>
- </card>
- <card id='post' title='发言'>
- <p>
- 昵称:<input type="text" name="title" title="昵称" maxlength="20" value=""/><br/>
- 内容:<input type="text" name="note" title="内容" value=""/><br/>
- <anchor>提交<go href="post.asp" method="post">
- <postfield name="name" value="$(name)"/>
- <postfield name="pid" value="<%=gid%>"/>
- <postfield name="title" value="$(title)"/>
- <postfield name="note" value="$(note)"/></go></anchor></p>
- <p><a href='index1.asp'>返回</a><a href='http://wap.2hy.net'>掌中梦网制作</a></p>
- </card></wml>