<%
sql="select * from guest order by id desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "
还 没 有 任 何 留 言
"
else
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage=totalPut \ MaxPerPage
else
currentpage=totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showContent
showpage totalput,MaxPerPage,"index.asp"
else
if (currentPage-1)*MaxPerPage
| |
姓名:<%=rs("guestname")%>
">
<% if rs("from")<>"" then %>
來自:<%=rs("from")%>
<%end if%>
|
|
|
| |
<%
if len(rs("guestcontent"))>110 then
response.write ubbcode(left(rs("guestcontent"),80))
else
response.write ubbcode(rs("guestcontent"))
end if
%>
<%if rs("guestreply")<>"" then %>
回复:
<%=ubbcode(rs("guestreply"))%>
<%end if%>
|
|
| 发表于:<%=rs("guestdate")%> Admin |
<%
a=a+1
if a>=MaxPerPage then exit do
rs.movenext
loop
end sub
function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
n=totalnumber \ maxperpage
else
n=totalnumber \ maxperpage + 1
end if
response.write "
"
end function
%>