<% dim x(1000), objFSO, folder, filecollection, idx, whichNo, textpath dim contentFile, chosenPage, chosenPageTemp textpath="/nyc/pages/" Set objFSO = CreateObject("Scripting.FileSystemObject") chosenPageTemp = Request("p") if chosenPageTemp <> "" then chosenPage = chosenPageTemp & ".html" else Set folder = objFSO.GetFolder(server.mappath(textpath)) Set filecollection = folder.Files idx=0 For Each file in filecollection idx=idx+1 x(idx)=file.name Next randomize timer whichNo=int(rnd()*idx)+1 chosenPage = x(whichNo) end if Set contentFile = objFSO.OpenTextFile(Server.MapPath(textpath & chosenPage)) dim y(1000), objFSO2, folder2, filecollection2, idy, whichNo2, imgCodePath dim imgCodeFile, chosenImgCode imgCodePath="/nyc/imagecode/" Set objFSO2 = CreateObject("Scripting.FileSystemObject") Set folder2 = objFSO2.Getfolder(server.mappath(imgCodePath)) Set filecollection2 = folder2.Files idy=0 For Each file in filecollection2 idy=idy+1 y(idy)=file.name Next randomize timer whichNo2=int(rnd()*idy)+1 chosenImgCode = y(whichNo2) Set imgCodeFile = objFSO2.OpenTextFile(Server.MapPath(imgCodePath & chosenImgCode)) %> silicon dominion - new york city <% Response.Write "" & imgCodeFile.ReadAll & "" %> <% Response.Write "" & contentFile.ReadAll & "" %>

 

silicon dominion

<% contentFile.close Set contentFile = Nothing Set objFSO = Nothing set folder=nothing set filecollection=nothing imgCodeFile.close Set imgCodeFile = Nothing Set objFSO2 = Nothing set folder2=nothing set filecollection2=nothing %>