' Parameter: Directory name (relative path), object
Public Function showfolderlist (folderurl,tag,listtype)
Dim F,F1,FC,I,TEMP,DISABLEDTF
On Error Resume Next
temp = Server.MapPath (FolderUrl)
If ofso.folderexists (temp) Then
Set f = ofso.getfolder (temp)
Set FC = F.subfolders
If listtype = "List" Then
DISABLEDTF = "Disabled"
Else
DISABLEDTF = ""
End If
Showfolderlist = "<table width=" "100%" "border=" "0" "cellspacing=" "1" "cellpadding=" "1" ">" & Chr (13)
Showfolderlist = showfolderlist & "<tr class=" "defaulttitletd" ">" & Chr (13)
Showfolderlist = showfolderlist & "<td width=" "3%" "><input type=" "checkbox" "Name=" "Chkall" "id=" "Chkall" "Value=" "" title= "" Select All "onclick=" JavaScript Tutorials: Selectallcheckbox (' path ', this.id); checkdisabled (' button ', Getvaluelist (' input ')); " "& DISABLEDTF &"/></td> "& Chr (13)
Showfolderlist = showfolderlist & "<td> directory name/filename </td>" & CHR (13)
Showfolderlist = showfolderlist & "<td width=" "20%" "align=" "right" "> Size </td>" & CHR (13)
Showfolderlist = showfolderlist & "</tr>" & Chr (13)
i = 0
For each F1 in FC
Showfolderlist = showfolderlist & "<tr" & Lib.defaulttrstyle (i, "defaulttr", "Defaultmod", "Defaulttdover") & ">" & Chr (13)
Showfolderlist = showfolderlist & "<td><input name=" "Path" "id=" "Path" "Type=" "checkbox" "Value=" "" & FolderUrl & "/" & F1.name & "" onclick= "" javascript:checkdisabled (' button ', getvaluelist (' input ')); "" "& DISABLEDTF &"/></td> "& Chr (13)
Showfolderlist = showfolderlist & "<td><span style=" "Cursor:pointer" "onmouseover=" javascript: Xmlhttppost ('.. /inc/xmlhttp.asp ', ' action=preview&showtype=folder&filepath= ' & FolderUrl & '/' & F1.name & ', 0,0, ' preview ') "" onclick= "" javascript:location.href= "tag=" & Tag & "&listtype=" & ListType & " &folderurl= ' + Escape (' & FolderUrl & '/& F1.name & ') ' "> "& F1.name & "</span></td>" & Chr (13)
Showfolderlist = showfolderlist & "<td align=" "Right" ">" & Getfolderinfo (FolderUrl & "/" & F1.name) (0) & "</td>" & Chr (13)
Showfolderlist = showfolderlist & "</tr>" & Chr (13)
i = i + 1
Next
Showfolderlist = showfolderlist & "</table>" & Chr (13)
Else
Showfolderlist = "-"
End If
If Err <> 0 Then Err.Clear
Set F = Nothing
Set FC = Nothing
End Function