<% dim conns dim rs dim sql set conns=server.createobject("ADODB.Connection") conns.open "provider=Microsoft.Jet.OLEDB.4.0;data Source="& server.mappath("admin/article.mdb") set rs=server.createobject("ADODB.Recordset") %>
 
| 首页 | 公司介绍 | 新闻中心 | 应用方案 | 成功案例 | 人才招聘 | 合作伙伴 |
下载中心
产品展示
 
 
新闻中心
新闻综合  |  市场动态  | 

新闻综合
<% const MaxPerPage=30 dim totalPut dim CurrentPage dim TotalPages dim i,j dim idlist if not isempty(request("page")) then currentPage=cint(request("page")) else currentPage=1 end if sql="select * from article where Nclassid=7 order by article.articleid desc" rs.open sql,conns,1,1 %> <%if rs.eof and rs.bof then%> 没有新闻 <% 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 totalput,MaxPerPage,"news.asp" else if (currentPage-1)*MaxPerPage <% do while not rs.eof %>          &" title=<%=left(rs("key"),140)%>> <%=rs("title")%> <% if rs("dateandtime")=date() then %> <% end if %> <% i=i+1 if i>=MaxPerPage then exit do rs.movenext%>
<% loop %> <% rs.close %>
 
<% end sub function showpage(totalnumber,maxperpage,filename) dim n if totalnumber mod maxperpage=0 then n= totalnumber \ maxperpage else n= totalnumber \ maxperpage+1 end if response.write "

 " if CurrentPage<2 then response.write "[首页] [上一页] " else response.write "[首页] " response.write "[上一页] " end if if n-currentpage<1 then response.write "[下一页] [尾页]" else response.write "" response.write "[下一页] [尾页]" end if end function %>

 
 
 
服务条款 | 关于波特 | 联系我们
Copyright © 2002-2009 版权所有 波特科技(北京)有限公司