%
response.Expires=0
sBaseFolder = "../../../../images/" 'Locate your assets folder here (Relative to Root)
dim sOptions
%><%
function writeFolderSelections()
Response.Write "Folders "
response.Write ""
end function
function recursive(oFolder)
set oSubFolders = oFolder.SubFolders
if not(oFolder.attributes and 2) then 'not hidden folder
sDisplayed = Replace(Replace(oFolder.path,oFolder_base.path,""),"\","/")'display hanya bagian di dalam base folder, ex: "", "/gallery01", "/gallery02"
if CStr(currFolder)=CStr(oFolder.path) then
sOptions = sOptions & "" & vbCrLf
else
sOptions = sOptions & "" & vbCrLf
end if
end if
for each item in oSubFolders
recursive item
next
sOptions = sOptions & vbCrLf
recursive = sOptions
end function
function writeFileSelections()
set oFolder = oFSO.GetFolder(currFolder)
set oFiles = oFolder.files
nIndex=0
sHTML = sHTML & "
"
sHTML = sHTML & "
"
sHTML = sHTML & "
Files
"
sColor = "#e7e7e7"
for each oFile in oFiles
nIndex=nIndex+1
sBaseFolder_PhysicalPath = oFolder_base.path 'folder terakhir tdk diikuti dgn / shg sFile_VirtualPath_UnderBaseFolder diawali dgn /
sFile_PhysicalPath = oFile.path
sFile_VirtualPath_UnderBaseFolder = replace(replace(sFile_PhysicalPath,sBaseFolder_PhysicalPath,""),"\","/") 'physical to virtual, ex: "", "/gallery01", "/gallery02"
if mid(sFile_VirtualPath_UnderBaseFolder,1,1)="/" then
sFile_VirtualPath_UnderBaseFolder=mid(sFile_VirtualPath_UnderBaseFolder,2)
end if
'response.write(sFile_VirtualPath_UnderBaseFolder &" ")
sFile_VirtualPath = CStr(sBaseFolder & sFile_VirtualPath_UnderBaseFolder)
'response.write(sFile_VirtualPath &" ")
if sColor = "#e7e7e7" then
sColor = ""
else
sColor = "#e7e7e7"
end if
sHTML = sHTML & "
" & _
"
view
" & _
"
" & oFile.name & "
" & _
"" & _
"
" & FormatNumber(oFile.size/1000,1) & " kb
" & _
"
del
" & _
"
"
next
sHTML = sHTML & "
"
sHTML = sHTML & "
"
sHTML = sHTML & "
"
response.Write sHTML
end function
%>
Asset Manager
<%Response.Write ""%>
Asset Manager
<%writeFolderSelections()%> New Folder | Del Folder
<%writeFileSelections()%>