<% if Trim(Request.Form("cl"))="最新动态" then strCurrMenu="14974" elseif Trim(Request.Form("cl"))="环境工程" then strCurrMenu="14975" elseif Trim(Request.Form("cl"))="投资咨询" then strCurrMenu="14978" elseif Trim(Request.Form("cl"))="想关案例" then strCurrMenu="14976" end if if Trim(Request.Form("ti"))="A" then op="nTitle" else op="nHtmlText" end if ThisPage=request.ServerVariables("URL") strQuery="" strTitle="最新发布" if GetVariable("class")<>"" then SourCode=conn.execute("Select c_code From web_news_class Where mn_id=" & strCurrMenu & " and id="&GetVariable("class"))(0) strQuery=strQuery & " And c_code Like '" & SourCode &"%'" strTitle=GetVariable("classname") end if if Trim(Request.Form("ti"))="A" then strQuery=strQuery & " And ( nTitle Like '%" & GetVariable("key") & "%' or nKey like '%" & GetVariable("key") & "%') " strTitle="搜索:" & GetVariable("key") else strQuery=strQuery & " And ( nHtmlText Like '%" & GetVariable("key") & "%' or nKey like '%" & GetVariable("key") & "%') " strTitle="搜索:" & GetVariable("key") end if '从这开始读数据 strSQL="Select * From web_news Where nAudit<>0 " & strQuery & " And mn_id=" & strCurrMenu & " Order by ID Desc" rs.open strSQL,conn,1,1 '分页显示初始化 page=GetVariable("page") if page="" then page=1 else page=Cint(page) end if Section=GetVariable("section") if Section="" then Section=1 else Section=Cint(Section) end if '变量赋值 intPageSize=15 '每页显示记录数 intSectionSize=5 '多少页为一段,像GOOGLE一样 PrevSectionText="7" '上一段的链接文字 NextSectionText="8" '下一段的链接文字 PrevPageText="3" '上页的链接文字 NextPageText="4" '下页的链接文字 strPageUrl="?class=" & GetVariable("class") & "&classname=" & GetVariable("classname") & "&key=" & GetVariable("key") & "&mnid=" & strCurrMenu rs.pagesize=intPageSize intCount=rs.RecordCount intPageCount=rs.pagecount intSectionCount=(intPageCount - 1) \ intSectionSize + 1 if intCount>0 then rs.AbsolutePage=page end if %>
 
 
   
标题 内容
 
您的位置 : 首页 最新动态
<% '开始输出最新新闻 for i=1 to intPageSize if rs.eof then exit For if i mod 2 =0 then strColor="#FFFFFF" else strColor="#F9F9F9" end if %> <% rs.movenext next %>
· &mnid=<%=strCurrMenu%>&classname=最新动态&uppage=<%=ThisPage%>" target="_blank"><%=trim(rs("nTitle"))%> (<%=Year(rs("nTime")) & "-" & Month(rs("nTime")) & "-" & Day(rs("nTime"))%>)
共有<%=intCount%>记录,分<%=intPageCount%>页,当前页<%=Page%>,每页显示<%=intPageSize%>条记录 <% '计算每一段的开始页 intStarPage=(Section-2) * intSectionSize + 1 '前一段 if Section<=1 then response.Write(PrevSectionText & " ") else response.Write("" & PrevSectionText & " ") end if '显示页码列表 response.Write("第") intStarPage=(Section-1) * intSectionSize + 1 for p=intStarPage to intStarPage + intSectionSize - 1 if p > intPageCount then exit for if p=page then response.Write("[" & p & "] ") else response.Write("[" & p & "] ") end if next response.Write("页") '后一段 intStarPage=(Section) * intSectionSize + 1 if Section>=intSectionCount then response.Write(" " & NextSectionText) else response.Write(" " & NextSectionText & " ") end if %>  
 

Copyright© 2006 年 Easen International Company, Ltd. 美国宜生国际有限公司版权所有
上海公司: 长宁区长宁路 988 号花园大厦 5F   
 电话:(86-21)5273 8396 传真:(86-21)5273 8395
更新于