%
dim xxid, exec, rs, title, isPrivate, isLock
dim page,recordcount,pagecount
dim maxid, minid
xxid=replace(trim(request("id")),"'","")
if xxid="" or not isnumeric(xxid) then
session("error")="非法访问!"
connclose()
response.redirect "error.asp"
end if
set rs=server.createobject("adodb.recordset")
'留言本方式查看
rcperpage=rcperpage1
exec="select * from ly where id="&xxid
rs.open exec,conn,1,1
isPrivate=rs("isPrivate")
isLock=rs("isLock")
recordcount=rs("hf")
'悄悄话的显示限制
if isPrivate then
if (not theUser.reged) or (not theUser.master and theUser.name<>rs("name") ) then
session("error")="您无权查看此留言!"
rsclose()
connclose()
response.redirect "error.asp"
end if
end if
exec="update ly set yd=yd+1 where id="&xxid
conn.execute(exec)
title=rs("title")
page=encodestr(Request.querystring("page"))
pageCount=getPageCount(pageCount,recordcount,rcPerPage)
page=getPage(page,pageCount)
%>
<%=sitetitle%>
<% '回复,只有版主能回复或都可以回复
if theUser.master or (not masterRe and not IsLock) then %>
::: 您 可 以 在 此 直 接 回 复 当 前 主 题 :::
<% end if
function pageList()
dim p
if page<1 then
page=1
end if
if pagecount<1 then
pagecount=1
end if
pageList=pageList & "
"
pageList=pageList & "
共有回复 "& RecordCount &" 个,共 "& pageCount &" 页
"
pageList=pageList & "
"
if page=1 then
pageList=pageList & " "
else
pageList=pageList & " "
end if
if page=1 then
pageList=pageList & " "
else
pageList=pageList & " "
end if
if pagecount-page=0 then
pageList=pageList & " "
else
pageList=pageList & " "
end if
pageList=pageList & "
"
p=int(page/pageLinkNum)
if page mod pageLinkNum>0 then
p=p+1
end if
p=(p-1)*pageLinkNum+1
i=p+(pageLinkNum-1)
if i> pagecount then
i=pagecount
end if
if p>pageLinkNum then
pageList=pageList & "[<<]"
end if
do while p<=i
if p=page then
pageList=pageList & "["&p&"]"
else
pageList=pageList & "["&p&"]"
end if
p=p+1
loop
p=p-1
if p< pagecount then
pageList=pageList & "[>>]"
end if
pageList=pageList & "