|
<%
pagename="查看留言"
%>
<%=pagename%>
<%
call pageinfo()
dim mainpic
mainpic="page_index.gif"
call skin1()
'---------------以下显示页面主体--------
%>
<%
if session("login")="true" then
sql="Select * from topic order by top desc,usertime desc"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn2,1,1
else
sql="Select * from topic where checked=1 and whisper=0 order by top desc,usertime desc"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn2,1,1
end if
if rs.eof and rs.bof then
%>
<%
set rs=nothing
call skin2()
Response.End
end if
dim currentpage,page_count,Pcount
dim totalrec,endpage
if request("page")="" then
currentPage=1
else
if (not isnumeric(request("page"))) then
response.write "
非法的页面参数!"
set rs=nothing
call skin2()
Response.End
end if
currentPage=cint(request("page"))
end if
rs.PageSize = perpage
rs.AbsolutePage=currentpage
page_count=0
totalrec=rs.recordcount
call pages()
while (not rs.eof) and (not page_count = rs.PageSize)
%>
|
标题:<%=htmlencode(rs("usertitle"))%> 时间:<%=rs("usertime")%> |
<%=ubbcode(rs("usercontent"))%> | <%if rs("reply")=1 then%>管理员回复: <%=rs("retime")%> ---------------------------------------------------------- <%=ubbcode(rs("recontent"))%> | <%end if%>
|
<%if session("login")="true" then%><%if rs("checked")=0 then%>通过审核 <%end if%>删除 <%if rs("whisper")=1 then%>悄悄话留言,无法回复<%else%>',600,500)">回复/编辑回复<%end if%> 留言IP:<%=rs("ip")%> | <%end if%>
<%
page_count = page_count + 1
rs.movenext
wend
call pages()
rs.close
set rs=nothing
sub pages() '------分页代码------------
dim ii,p,n
if totalrec mod perpage=0 then
n= totalrec \ perpage
else
n= totalrec \ perpage+1
end if
if currentpage-1 mod 10=0 then
p=(currentpage-1) \ 10
else
p=(currentpage-1) \ 10
end if
response.write " "
end sub
'--------------页面主题显示结束--------
call skin2()
%>
|
|