<% dim strFileName const MaxPerPage=20 dim totalPut,CurrentPage,TotalPages dim ClassName,Newsstatus Catid=trim(request("Catid")) Newsstatus=1 strFileName="newslist.asp?Catid=" & Catid ID=Request("ID") if request("page")<>"" then currentPage=cint(request("page")) else currentPage=1 end if sql="select * from news where ID>0" if Catid<>"" then sql=sql & " and Catid='" & Catid & "' " end if sql=sql & " order by id desc" Set rs= Server.CreateObject("ADODB.Recordset") rs.open sql,conn,1,1 dim sqlclass,rsclass Set rsclass = Server.CreateObject("ADODB.Recordset") sqlclass="select * from ClassSort where catid=" &catid rsclass.open sqlclass,conn,1,1 %> <%=rsclass("ClassName")%> <%=Keywords%><%else%><%=rsclass("key")%><%end if%>"> <%=Description%><%else%><%=rsclass("Desc")%><%end if%>">
<%=rsclass("ClassName")%> / News dynamic
<% sub showContent dim i i=0 %> <% end sub %> <% 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 strFileName,totalput,MaxPerPage,true,false,"条新闻" else if (currentPage-1)*MaxPerPage