<table width="615" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><table border="0" cellpadding="3" cellspacing="0" width="615" id="table2">
      <%


sql = "select * from newspl where newsid="&clng(id)
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1
%>
      <%
	if rs.recordcount<>0 then
	
	page=int(request("page"))
rs.PageSize=10
pagecount=rs.pagesize
if page<=0 then page=1
if request("page")="" then page=1
rs.AbsolutePage=page

 for i=1 to pagecount
 
 content=rs("content")
 content=replace(content,chr(10),"")
content=replace(content,chr(13),"<BR>")
	%>
      <tr>
        <td width="660" bgcolor="#F5F5F5" style='word-break:break-all'><img border="0" src="szwyadmin/images/bbstitle.gif" width="16" height="15"><font color="#336699"><%=rs("username")%></font>　于　<%=rs("addtime")%></td>
      </tr>
      <tr>
        <td width="660"><%=content%></td>
      </tr>
      <%
	rs.movenext
	if rs.eof then exit for
	next
else
  Response.Write "<tr><td>暂无评论！</td></tr>"
end if
	%>
      <%
				
				rs.close
		set rs=nothing %>
    </table>
        <div align="center">
          <%if rs.recordcount<>0 then
  if page>1 then
    response.write "<a href="&request.servervariables("URL")&"?page=1&id="&id&">首页</a>　"
    response.write "<a href="&request.servervariables("URL")&"?page="&page-1&"&id="&id&">上一页</a>　"
  end if
  if page<rs.pagecount then
    response.write "<a href="&request.servervariables("URL")&"?page="&page+1&"&id="&id&">下一页</a>　"
    response.write "<a href="&request.servervariables("URL")&"?page="&rs.pagecount&"&id="&id&">尾页</a>　"
  end if
    response.write "共"&rs.recordcount&"条　每页显示"&pagecount&"条　共"&rs.pagecount&"页　"
  %>
          <script language="JavaScript">
  <!--
  function FP_jumpMenu(el,frm,sel) {//v1.0
    var href=el.options[el.selectedIndex].value; if(sel) el.selectedIndex=0;
    if('_new'==frm) open(href); else eval(frm+".location='"+href+"'");
    }
    // -->
                      </script>
          <select size="1" onChange="FP_jumpMenu(this,'window',false)" id="id1" name="D1" style="font-size: 9pt; border-style: solid; border-width: 1px">
            <%for i=1 to rs.pagecount%>
            <option value="<%=request.servervariables("URL")%>?page=<%=i%>&id=<%=id%>" <%if page=i then response.write "selected"%> style="font-size: 9pt">第<%=i%>页</option>
            <%next%>
          </select>
          <%end if%>
      </div></td>
  </tr>
</table>
 
