 |
<% dim fs, folder, url,path,concat,check
concat=0
dim altarry(30)
altarry(0)="Web"
path=Server.MapPath(".")&"/websites/thumb"
set fs = CreateObject("Scripting.FileSystemObject")
set folder = fs.GetFolder(path)
for each item in folder.Files
concat=concat+1
check=concat Mod 3
url = MapURL(item.path)
Response.Write("")
if concat < 10 Then
Response.Write("0"&concat)
else
Response.Write(" | ")
else
Response.Write("")
Response.Write(" ")
Response.Write("")
End If
if check = 0 Then
Response.Write(" ")
End if
next
%>
<% function MapURL(path)
dim rootPath, url
'Convert a physical file path to a URL for hypertext links.
rootPath = Server.MapPath("/")
url = Right(path, Len(path) - Len(rootPath))
MapURL = Replace(url, "\", "/")
end function %>
|