<%
On Error Resume Next
Dim fcount, tPages, PerPage, Remain, adsPath
PerPage = 100
adsPath = Server.Mappath(ad_cache)
set oFldr = objFile.GetFolder(adsPath)
set re = new RegExp
re.global=false
re.ignoreCase=true
I = 1
fc = 1
For df = 2 to 300
objFile.DeleteFile(oFldr & "\" & df & ".asp")
Next
fcount = oFldr.files.count
endCount = PerPage + 1
If endCount > fcount then endCount = fcount
For each file in oFldr.files
If I > endCount then Exit For
cont = ReadFile(file, false)
re.pattern = "()(.+)(\s-)"
If Not re.test(cont) then re.pattern = "()(.+)()"
set matches = re.execute(cont)
set match = matches(0)
match = match.SubMatches(1)
If len(match) > 35 then match = Left(match, 35) & " ..."
If I mod 3 = 1 then
If I mod 6 = 1 then color = "class='evencell'": Else: color = "class='oddcell'"
Response.Write ""
End If
Response.Write "| " & match & " | "
cont = Empty
match = Empty
If I mod 3 = 0 then Response.Write " "
I = I + 1
Next
Set re = Nothing
tPages = fcount \ PerPage
Remain = fcount Mod PerPage
If tPages > 1 And Remain > 0 then
tPages = tPages + 1
For J = 1 to tPages
If J > 1 then
Pages = Pages & "" & J & " "
Call BuildAdsPages(J)
End If
Next
End If
%>
<%= pages %>
|