<% mysearch=Left(Replace(form("q"),"""",""),50) mypage=1 %> document.write('
'); document.write(''); <% Dim colcount, begininc, endinc, resultinc hFilePath = Server.MapPath("/cache/top10-" & mypage & ".txt") isCached = False CacheExist=False Set objFSO = Server.CreateObject("Scripting.FileSystemObject") if objFSO.FileExists(hFilePath) then CacheExist=True Set objFile = objFSO.GetFile(hFilePath) DLastMod = objFile.DateLastModified Set objFile = nothing if (DateDiff("h",DLastMod,Now)<1) then isCached=True end if end if Set objStream = Server.CreateObject("ADODB.Stream") objStream.Type = adTypeText objStream.Charset = "ascii" objStream.Open cachetext="" if isCached=True then objStream.LoadFromFile hFilePath cachetext = objStream.ReadText else colcount=0 begininc = (mypage*10)-10 endinc = mypage*10 resultinc = 1 SET rs = Server.CreateObject("ADODB.Recordset") command = "SELECT TOP " & mypage*10 & " * FROM GWWNews WHERE ACTIVE = '1' ORDER BY TimeStamp DESC" rs.Open command, conn, adOpenForwardOnly, adLockReadOnly if rs.EOF then response.write("document.write('');") end if do while not rs.EOF if (begininc<=resultinc) and (endinc=>resultinc) then Select Case ParseURL(rs("url"),"server") case "myrss.com" thissite="dmusic.com" case "www.boycott-riaa.com" thissite="mp3" case "www.zeropaid.com" thissite="mp3" case "www.theregister.co.uk" thissite="mp3" case "yro.slashdot.org" thissite="mp3" case "www.eff.org" thissite="mp3" case "www.chillingeffects.org" thissite="mp3" case "slashdot.org" thissite="mp3" case "www.freedom-to-tinker.com" thissite="mp3" case "www.slyck.com" thissite="mp3" case else thissite=ParseURL(rs("url"),"server") end select if colcount=1 then cachetext=cachetext&"document.write('');" & vbcrlf colcount=0 else cachetext=cachetext&"document.write('');" & vbcrlf colcount=1 end if end if resultinc=resultinc+1 rs.MoveNext loop rs.close set rs = nothing objStream.WriteText cachetext if CacheExist then objStream.SaveToFile hFilePath, adSaveCreateOverWrite else objStream.SaveToFile hFilePath, adSaveCreateNotExist end if end if objStream.Close Set objStream = Nothing Set objFSO = nothing response.write(cachetext) %> document.write('
No matches were found for your query.
" & thissite & "" & rs("Title") & "" & rs("comments") & "" & FormatDateTime(rs("timestamp"),2) & "
" & thissite & "" & rs("Title") & "" & rs("comments") & "" & FormatDateTime(rs("timestamp"),2) & "
'); document.write('
Provided by GlobalWarmingWatch.net
');