Products Search " style="border:1px solid #FFFFFF; height:10px; line-height:10px; width:130px;"/>
Latest News
<%set rs=Server.CreateObject("adodb.recordset") sql="select smallclassname,smallclassid from smallclass_new where bigclassname='Latest news' order by orderid asc,smallclassid asc" sql,conn,1,1 while not rs.eof %> <%rs.movenext wend rs.close set rs=nothing %>
<%dim id id=cint(Request.QueryString("id")) if id<=0 then response.Redirect "news.asp" else set rs=Server.CreateObject("adodb.recordset") "select top 1 * from News where id="&id,conn,1,1 content=rs("content") %>
<%dim page,pagecount,thispage,linenum,allline const pageline=1 ''每页显示10行 linenum=split(content,"[分页标记]") ''本例为计算字符串
标记的个数 allline=ubound(linenum)+1 ''全文
(换行标记)总数 pagecount=int(allline) ''计算总页数 page=request("page") if isempty(page) then thispage=1 else thispage=cint(page) end if for i=0 to allline if i+1>thispage*pageline-pageline and i" ''输出分页后的内容 end if next if pagecount>1 then response.write "

Total:"&pagecount&" pages ,"&page&"page " for i=1 to pagecount if thispage=i then response.write i & " " else response.write " ["&i&"]  " end if next end if %>

<%end if rs.close set rs=nothing %>