<% Function affaire(categorie, page)
dim aff()
dim ligne
dim ligneSplit
Set FSO = _
Server.CreateObject("Scripting.FileSystemObject")
dir = Server.MapPath("data/")
Fnm = dir & "\affaires.txt"
if FSO.FileExists(Fnm) then
set inF = FSO.OpenTextFile(Fnm,1,false)
end if
While not inF.atEndOfStream
ligne = inF.readLine
ligneSplit = Split(ligne,vbtab)
if len (ligne)>2 then
if ligneSplit(3)= categorie then
for j=0 to UBound(ligneSplit)
Redim preserve aff(5,i+1)
aff(j,i) = ligneSplit(j)
next
i=i+1
end if
end if
Wend
inF.close
affaire = aff
end function
%>