<% Dim iTr, objFSO, objFiles, objFolders, strPath, maxColumns, subFolder, containedFile, strPhysicalPath Dim subFoldersCount, subFilesCount Dim iFileCount strPath = request.queryString("d") strPath = replace(replace(strPath,"{",""),"}","") strPhysicalPath = server.mappath("avatars/"&strPath) set objFSO = Server.CreateObject("Scripting.FileSystemObject") set objFolders = objFSO.GetFolder(strPhysicalPath).subFolders set objFiles = objFSO.GetFolder(strPhysicalPath).files subFilesCount = objFiles.count subFoldersCount = objFolders.count set objFSO = nothing if strPath <>"" then strPath = strPath &"/" maxColumns = 5 iTr = 1 %> <% if strPath <> "" then %> <% Dim upStrPath, leftAmount upStrPath = strPath upStrPath = left(upStrPath,len(upStrPath)-1) leftAmount = instrRev(upStrPath,"/") if leftAmount <> 0 then leftAmount = leftAmount - 1 else leftAmount = 0 end if Dim doUpFolder:doUpFolder = 1 %> <% end if %> <%= Application(dbName&"forumtitle") %> <%= NoScript() %> <%= OutputCSS() %> >
<% iFileCount = 0 Dim subFilesAndFoldersCount:subFilesAndFoldersCount = subFilesCount+subFoldersCount for each subFolder in objFolders if left(subFolder.Name,1) <> "_" then if iTr = 1 then response.write ("") if doUpFolder = 1 then call upOneLevel(1) iTr = iTr + 1 doUpFolder = 0 end if response.write ("") if iTr < maxColumns then iTr = iTr +1 else iTr = 1 response.write (""&vbcrlf) end if iFileCount = iFileCount+1 else subFilesAndFoldersCount = subFilesAndFoldersCount - 1 end if next if subFilesAndFoldersCount = 0 and strPath <>"" then response.write ("") call upOneLevel(maxColumns) response.write ("") end if for each containedFile in objFiles if iTr = 1 then response.write ("") if doUpFolder = 1 then call upOneLevel(1) iTr = iTr + 1 doUpFolder = 0 end if response.write ("") if iTr < maxColumns then iTr = iTr +1 else iTr = 1 response.write (""&vbcrlf) end if iFileCount = iFileCount+1 next if iTr <> 1 then response.write ("") end if Set objFiles = nothing Set objFolders = nothing %>
<%= avatarChooseDesc %>
"&_ ""&_ "
"&subFolder.Name&"
"&_ ""&_ "


<%= javascriptCloseWindow %>