wapuser.asp
资源名称:WAPblaog.zip [点击查看]
上传用户:dragonczj
上传日期:2013-07-05
资源大小:56k
文件大小:3k
源码类别:
手机WAP编程
开发平台:
Java
- <!--#include file="wapconn.asp"-->
- <!--#include file="wapstr.asp"-->
- <%
- response.ContentType="text/vnd.wap.wml;charset=utf-8"
- Response.Expires = -1
- Response.AddHeader "Pragma", "no-cache"
- Response.AddHeader "Cache-Control", "no-cache, must-revalidate"
- %><?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>
- <%
- Dim Page
- Dim Num
- Dim PageSize
- Dim PageCount
- Dim Pageto
- Dim i,xID
- Dim SQL,rs
- dim show_username,show_userid
- Dim Topic,boardname,ars,tempaimg,istop,LastPost
- Page=1
- if Request("Page")<>"" then Page = CLng(Request("Page"))
- if Request("id")<>"" then show_userid = CLng(Request("id"))
- dim msql,rsmain,username
- msql="select userid,username,logcount from [user] where userid="&show_userid
- Set rsmain=Server.CreateObject("Adodb.RecordSet")
- rsmain.Open msql,Conn,1,1
- show_username=rsmain(1)
- Num=rsmain(2)
- rsmain.Close
- set rsmain=Nothing
- PageSize=20
- PageCount=Cint((Num)/PageSize+0.5)
- Pageto=Cint(Num)
- if Page < 1 or IsNull(Page) Then Page = 1
- if Page > PageCount Then Page = PageCount
- %>
- <card id="wapuser" title="<%=converttowide(show_username)%>">
- <p>
- <%
- sql="SELECT top "&cstr(PageSize*(Page))&" username,topic,id,addtime from blog where username='"&show_username&"' and ishide<>'true' order by addtime desc"
- Set rs=conn.execute(SQL)
- If not(rs.bof and rs.eof) then
- rs.Move PageSize*(Page-1)
- While not rs.eof
- Topic=rs(1)
- Topic=left(topic,25)
- username=rs(0)
- xID=rs(2)
- Response.Write "<a href=""wapview.asp?ID="&xid&""">"&(converttowide(Topic))&"</a></br>"
- rs.MoveNext
- wend
- End if
- Rs.close:Set rs=Nothing
- Response.Write (converttowide("主题"))&Pageto&(converttowide("篇,每页"))&PageSize&(converttowide("篇,共分"))&PageCount&(converttowide("页。"))&"<br/>"
- if Page="" or Page=1 then
- Response.Write "<a href=""wapuser.asp?id="&show_userid&"&Page="&Page+1&""">"&(converttowide("下一页"))&"</a><br/>"
- elseif Page=PageCount then
- Response.Write "<a href=""wapuser.asp?id="&show_userid&"&Page="&Page-1&""">"&(converttowide("上一页"))&"</a><br/>"
- else
- Response.Write "<a href=""wapuser.asp?id="&show_userid&"&Page="&Page-1&""">"&(converttowide("上一页"))&"</a><br/>"
- Response.Write "<a href=""wapuser.asp?id="&show_userid&"&Page="&Page+1&""">"&(converttowide("下一页"))&"</a><br/>"
- end if
- Response.Write "<a href=""wapblog.asp"">"&(converttowide("返还最新日志"))&"</a><br/>"
- Response.Write "<a href=""wapuserlist.asp"">"&(converttowide("返还博客排行"))&"</a><br/>"
- Response.Write"<a href=""wap.asp"">"&(converttowide("返还博客首页"))&"</a>"
- %>
- </p>
- </card>
- </wml>