<% dim classid classid = trim(request("classid")) if classid = "" then sqll = "select top 1 * from BigClass_New where bigclassname <> '企业信息'" set rsbigclass = Server.CreateObject("ADODB.Recordset") rsbigclass.open sqll,conn,1,1 if not(rsbigclass.bof and rsbigclass.eof) then classid = rsbigclass("bigclassname") end if rsbigclass.close set rsbigclass = nothing end if %> <% dim maxpagesize maxpagesize = 18 %> <%=classid%> - 上海泰通阀门有限公司
    <% sql = "select * from news where bigclassname = '"&classid&"'" set rsnews = server.CreateObject("ADODB.recordset") sql = sql & "order by id desc" rsnews.open sql,conn,1,1 if not(rsnews.bof and rsnews.eof) then dim currentpage rsnews.pagesize=maxpagesize currentpage=request.querystring("pageid") if currentpage="" then currentpage=1 elseif currentpage<1 then currentpage=1 else currentpage=clng(currentpage) if currentpage > rsnews.pagecount then currentpage=rsnews.pagecount end if end if if not isnumeric(currentpage) then currentpage=1 end if dim totalput,n totalput=rsnews.recordcount if totalput mod maxpagesize=0 then n=totalput\maxpagesize else n=totalput\maxpagesize+1 end if if n=0 then n=1 end if rsnews.move(currentpage-1)*maxpagesize i=0 w=1 do while i< maxpagesize and not rsnews.eof %>
  • .htm"><%=rsnews("title")%>
  • <% i=i+1 w=w+1 rsnews.movenext loop end if rsnews.close set rsnews = nothing %>
<% if n > 1 then %>
<% k=currentpage %> <%if k<>1 then%>首页 上一页 <%else%>首页 上一页 <%end if%><%if k<>n then%>下一页 尾页 <%else%>下一页 尾页 <%end if%>页次:<%=currentpage%>/<% =n%>页 共<%=totalput%>条记录 <%=maxpagesize%> 条记录/页
<% end if %>