<%
function WebContent()
dim ID
ID=request.QueryString("ID")
dim rs,sql
set rs = server.createobject("adodb.recordset")
if request.QueryString("ID")="" then
sql="select top 1 ID,AboutName,Source,Content,GroupID,Exclusive,ClickNumber,AddTime from Ameav_About where ViewFlag and not ChildFlag order by Sequence asc"
else
sql="select ID,AboutName,Source,Content,GroupID,Exclusive,ClickNumber,AddTime from Ameav_About where ViewFlag and not ChildFlag and ID="&ID
end if
rs.open sql,conn,1,3
if not rs.eof then
numbers=len(rs("content")) '总字节数
pagenum=Sitenum '每页显示的数量
maxpage=-int(-numbers/pagenum)'总页数
requestpage=clng(request("p"))'接收页码
if requestpage="" or requestpage=0 then'获取默认页码
requestpage=1
end if
if requestpage>maxpage then '当前页的页码大于最大页码时,使当前页码等于最大页码
requestpage=maxpage
end if
if not requestpage=1 then '当前页码不等于1时,向下移动相应的字节数
content=mid(rs("content"),(requestpage-1)*pagenum+1,Sitenum)
else
content=left(rs("content"),Sitenum) '当页码等于1时,截取相应文本
end if
if isempty(requestpage) then
thispage=1
else
thispage=cint(requestpage)
end if
if ViewNoRight(rs("GroupID"),rs("Exclusive")) then
%>
<%=Replace(content,chr(13),"")%>
<%
rs("ClickNumber")=rs("ClickNumber")+1
else
WebContent="