<% const MaxPerPage=10 '分页显示的纪录个数 dim sql dim rs dim gstBookID dim totalPut dim CurrentPage dim TotalPages dim i,j if not isempty(request("page")) then currentPage=cint(request("page")) else currentPage=1 end if %> 网友留言簿


影友如有需转让摄影器材,请在这里添加留言,将您的信息公开于此处,方便影友间的 器材交流.请注明您 器材的状况价格联系地址电话电子邮箱! (相关事宜由影友间自行处理)

<% set rs=server.createobject("adodb.recordset") sql="select * from book order by id desc" rs.open sql,conn,1,1 if rs.eof and rs.bof then showpages response.write "

还 没 有 任 何 留 言

" else totalPut=rs.recordcount '记录总数 if currentPage=1 then showpages showContent showpages else if (currentPage-1)*MaxPerPage <% do while not (rs.eof or err) %>

 
<% if rs("contenttop")<>"" then if rs("content")<>"" then contop=rs("contenttop") Response.Write contop else contop=rs("contenttop") & "
(无内容)" Response.Write contop end if else contop=rs("name") & "留言说(无主题)" Response.Write contop end if %>

<% if rs("fromwhere")<>"" then %> <% end if if rs("email")<>"" then %> <% end if if rs("homepage")<>"" and rs("homepage")<>"http://" then %> <% end if %> <% if rs("content")<>"" then %> <% end if if rs("anser")<>"" then%> <%sss=cstr(rs("id"))+"abc"%> <%end if%>

大 名

<% if rs("sex")<>"不想说" then name=rs("name") & "(" & rs("sex") & ")" else name=rs("name") end if Response.Write name %>

来 自

<% display rs("fromwhere") %>

邮 箱

"><% display rs("email") %>

主 页

" target="_blank"><% display rs("homepage") %>

时 间

<% =rs("dateandtime") %>

留 言

<% display rs("content") ' Response.Write rs("content") %>

回复留言

[<%Response.Write rs("ansertime")%>]
<% display rs("anser") 'Response.Write rs("anser") %>

<% i=i+1 if i>=MaxPerPage then exit do '循环时如果到尾部则先退出,如果记录达到页最大显示数,也退出 rs.movenext loop end sub sub showpages() %>

[返回主页] [我要留言] <% If currentPage <> 1 Then Response.Write "[第一页] " Response.Write "[上一页] " End If If currentPage <> rs.PageCount Then Response.Write "[下一页] " Response.Write "[最后一页] " End If %> <%=currentPage%>页,共<%=rs.PageCount%>输入页数: [管理员]

<% end sub %>