<% Option Explicit %> <%response.buffer=true%> <% '************************************** '** Index.asp '** '** 文件说明:留言本首页 '** 修改日期:2004-9-22 '** 作者:Howlion '** 蚌埠易发网 http://www.bbe8.com '************************************** 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,conn,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,conn,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) %>

<%if session("login")="true" then%><%end if%>
<%if rs("top")=1 then%><%else%>.gif" style='border: 1 solid #000000'><%end if%>

<%if rs("top")=1 then%>管理员公告<%else%><%=htmlencode(rs("username"))%><%end if%>
<%if not rs("userurl")="" then%>" title="个人主页"><%=htmlencode(rs("userurl"))%><%else%>个人主页未填<%end if%>
<%if not rs("usermail")="" then%>" title="电子邮件"><%=htmlencode(rs("usermail"))%><%else%>电子邮件未填<%end if%>
<%if not rs("userqq")="" then%>" title="QQ号码"><%=rs("userqq")%> <%else%>QQ号码未填<%end if%>
标题:<%=htmlencode(rs("usertitle"))%>
时间:<%=rs("usertime")%>
<%=ubbcode(rs("usercontent"))%><%if rs("reply")=1 then%>

管理员回复:
<%=rs("retime")%>
----------------------------------------------------------
<%=ubbcode(rs("recontent"))%>

<%end if%>

<%if rs("checked")=0 then%>通过审核   <%end if%>删除   <%if rs("whisper")=1 then%>悄悄话留言,无法回复<%else%>',600,500)">回复/编辑回复<%end if%>  留言IP:<%=rs("ip")%>

<% 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 ""&_ ""&_ "
页次:"& currentPage &"/"& n &"页, 每页"& rs.PageSize &"条, 共"& totalrec &"条  " if currentPage=1 then response.write "9 " else response.write "9 " end if if p*10>0 then response.write "7 " response.write "" for ii=p*10+1 to P*10+10 if ii=currentPage then response.write ""+Cstr(ii)+" " else response.write ""+Cstr(ii)+" " end if if ii=n then exit for 'p=p+1 next response.write "" if ii8 " if currentPage=n then response.write ": " else response.write ": " end if response.write "
" end sub '--------------页面主题显示结束-------- call skin2() %>