<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <% response.charset="utf-8" %> <% if request.QueryString("ID")="" then SeoTitle="新闻中心" elseif not IsNumeric(request.QueryString("ID")) then SeoTitle="参数错误" elseif conn.execute("select * from Ameav_News Where ViewFlag and ID="&request.QueryString("ID")).eof then SeoTitle="参数错误" else set rs = server.createobject("adodb.recordset") sql="select * from Ameav_News where ViewFlag and ID="&request.QueryString("ID") rs.open sql,conn,1,1 SeoTitle=rs("NewsName") rs.close set rs=nothing end if %> <%=SiteTitle %>-新闻中心-<%=SeoTitle %>
新闻中心
<% Datafrom="ameav_NewsSort" ListView="News" ListSort(0) %>
信息搜索
 
  <%=SearchForm()%>
山东利通化工新闻中心 <% if not request.QueryString("SortID")="" then WebLocation(request.QueryString("SortID")) %>
  <%=WebContent()%>  
<% Function WebLocation(ID) Dim rs,sql,LocationText Set rs=server.CreateObject("adodb.recordset") sql="Select * From Ameav_NewsSort where ViewFlag and ID="&ID rs.open sql,conn,1,1 if rs.bof and rs.eof then response.write "错误" exit function end if LocationText=""&rs("SortName")&"" if rs("ParentID")<>0 then WebLocation rs("ParentID") response.write LocationText End Function function WebContent() dim ID,content,numbers,pagenum,maxpage,requestpage,thispage ID=Request("ID") if ID="" or (not isnumeric(ID)) then response.write "
数据读取异常错误
" exit function end if dim rs,sql set rs = server.createobject("adodb.recordset") sql="select * from Ameav_News where ViewFlag and ID="&ID rs.open sql,conn,1,3 if not rs.eof then numbers=len(rs("content")) '总字节数 pagenum=Sitenum '每页显示的数量 maxpage=-int(-numbers/pagenum)'总页数 requestpage=clng(request("p"))'接收页码 if requestpage="" or requestpage=0 then'获取默认页码 requestpage=1 end if if requestpage>maxpage then '当前页的页码大于最大页码时,使当前页码等于最大页码 requestpage=maxpage end if if not requestpage=1 then '当前页码不等于1时,向下移动相应的字节数 content=mid(rs("content"),(requestpage-1)*pagenum+1,Sitenum) else content=left(rs("content"),Sitenum) '当页码等于1时,截取相应文本 end if if isempty(requestpage) then thispage=1 else thispage=cint(requestpage) end if response.write"" response.write "" response.write "" response.write "" if ViewNoRight(rs("GroupID"),rs("Exclusive")) then response.write "" rs("ClickNumber")=rs("ClickNumber")+1 else response.write "" end if response.write "" rs.update else response.write "" end if response.write "" response.write"
"&rs("NewsName")&"
新闻来源:"&rs("Source")&"    点击数:"&rs("ClickNumber")&"    更新时间:"&rs("AddTime")&"    收藏此页

" %> <%=Replace(content,chr(13),"
")%> <% response.write "
" response.write "总页数:"&maxpage&"  第 " for i=1 to maxpage if thispage=i then response.write ""&i&"" else response.write ""&i&" " end if next response.write " 页 
暂无相关信息

" rs.close Dim IDmax,IDmin IDmax=ID+1 set rs = server.createobject("adodb.recordset") sql="select * from Ameav_News where ViewFlag and ID="&IDmax rs.open sql,conn,1,1 if not rs.eof then Response.Write "上一篇:"&rs("NewsName")&"
" else Response.Write "上一篇:暂无新闻
" end if rs.close IDmin=ID-1 set rs = server.createobject("adodb.recordset") sql="select * from Ameav_News where ViewFlag and ID="&IDmin rs.open sql,conn,1,1 if not rs.eof then Response.Write "下一篇:"&rs("NewsName")&"" else Response.Write "下一篇:暂无新闻" end if rs.close response.write "
【刷新页面】【加入收藏】【打印此文】 【关闭窗口】
" set rs=nothing end function %>