<!--#include file="conn.asp"-->
<%
set rs=server.CreateObject("adodb.recordset")
sql="select * from PPst_News where 1=1 order by AddTime desc"
rs.open sql,conn,1,1

if rs.recordcount=0 then
total=1
pages=1
cotent=0
kk="暂无内容..."
else '如果记录不为空则计算显示
content=rs.recordcount
if (content mod 14)=0 then
total=content \ 14
else
total=(content \ 14)+1
end if
rs.PageSize =14'每页记录条数
iCount=content '记录总数
iPageSize=rs.PageSize
maxpage=total
page=request("page")   
if Not IsNumeric(page) or page="" then
	page=1
else
	page=cint(page)
end if
if page<1 then
	page=1
elseif  page>maxpage then
	page=maxpage
end if
rs.AbsolutePage=Page
'rs.open sql,conn,1,1
if page=maxpage then
	x=iCount-(maxpage-1)*iPageSize
else
	x=iPageSize
end if
For i=1 To x
BigClassID=rs("BigClassID")
id=rs("id")
Title=rs("Title")
w_Content=rs("w_Content")
if len(w_Content)>8 then
'w_Content=left(w_Content,8)+" ..."
w_Content=replace(left(w_Content,8)+" ...",chr(13)," ")
else
w_Content=replace(w_Content,chr(13)," ")
end if
AddTime=rs("AddTime")
ReadCishu=rs("ReadCishu")
kk=kk & "<info BigClassID=" & chr(39) & BigClassID & chr(39) & " id=" & chr(39) & id & chr(39) & " w_content=" & chr(39) & w_content & chr(39) & " Title=" & chr(39) & Title & chr(39) & " AddTime=" & chr(39) & AddTime & chr(39) & " ReadCishu=" & chr(39) & ReadCishu & chr(39) & "/>"
rs.movenext
next
end if
kk="<?xml version="& """" & "1.0" & """" & " encoding=" & """" & "gb2312"& """" & " ?>" & "<data total=" & chr(39) & content & chr(39) & " maxpage=" & chr(39) & total & chr(39) &  " page=" & chr(39) & page & chr(39) &  ">" & kk & "</data>"
response.Write(kk)
rs.close
set rs=nothing
'response.write("111" & chr(39) & "222")
%>