<% sortBy = Request.QueryString("SORT_BY") sortAsc = Request.QueryString("SORT_ASCENDING") filterStr = Request.QueryString("FILTER") queryUrl = Request.QueryString("URL") if not right(queryUrl, 1) = "/" then queryUrl = queryUrl + "/" if (filterStr = "") then filterStr = "*.htm*;*.asp;*.doc;*.xls;*.ppt;*.mdb;*.txt" %> <% On Error Resume Next set OfficeWebFolder = Server.CreateObject("OfficeWebServer.WebFolderItems.1") OfficeWebFolder.SortBy = sortBy if (sortAsc = "0") then OfficeWebFolder.SortAscending = FALSE OfficeWebFolder.Filter = filterStr OfficeWebFolder.Init Server, Request sortBy = OfficeWebFolder.SortBy sortAsc = OfficeWebFolder.SortAscending filterStr = OfficeWebFolder.Filter activeUrl = OfficeWebFolder.ActiveUrl set activeItem = OfficeWebFolder.ActiveItem if (filterStr = "*.*htm*;*.txt;*.do?;*.xl?;*.ppt;*.mdb;*.asp") then filterStrArg = "" else filterStrArg = "&FILTER="+filterStr if (sortBy = "name") then sortByArg = "" else sortByArg = "&SORT_BY="+sortBy if (sortAsc = "0") then sortAscArg = "&SORT_ASCENDING=0" else sortAscArg = "" urlArgs = filterStrArg+sortByArg+sortAscArg if (sortAsc = "0") then sortGif = "/msoffice/msodown.gif" else sortGif = "/msoffice/msoup.gif" %> Web listing for <%= Request.ServerVariables("SERVER_NAME")%> - <%= queryUrl %> folder: <% if Err.Number <> 0 then %> <%= Err.Number %>
<% select case Err.Number %> <% case 70 %>

<%= Err.Description%>

This Virtual Directory cannot be accessed. This error can be caused if directory browsing has not been enabled for the directory, or if read permissions have not been set.

<% case 76, 432 %>

<%= Err.Description%>

The file or script specified in the query was not found. Please check the query to ensure that the path is correct.

<% case else %>

<%= Err.Description%>

Unspecified Error.

<% end select %>

Please contact the Web server's administrator if the problem persists.

<% else %>

Web listing for <%= Request.ServerVariables("SERVER_NAME")%> - <%= queryUrl %> folder:

<%= queryUrl.size %>
<% on error resume next set QTest = Server.CreateObject("IXSSO.Query") if IsObject(QTest) = TRUE then %> <% end if %>
 Home
<% if (activeUrl = "/") then %>  Up <% else %> <% parentName = activeItem.ParentName if (parentName = "") then parentName = "Parent Directory" %>  Up <% end if %>
 Search

Filter on Name:
<% if (sortAsc = "0") then %> <% end if %>  
<% if (sortAsc = "1" And sortBy = "name") then sortAscStr = "&SORT_ASCENDING=0" else sortAscStr = "" %> <% if (sortBy = "name") then %> <% linkColor = "style=""color: rgb(255,255,255)""" %> <% if (sortAsc = "1" And sortBy = "size") then sortAscStr = "&SORT_ASCENDING=0" else sortAscStr = "" %> <% if (sortBy = "size") then %> <% linkColor = "style=""color: rgb(255,255,255)""" %> <% if (sortAsc = "1" And sortBy = "datelastwritten") then sortAscStr = "&SORT_ASCENDING=0" else sortAscStr = "" %> <% if (sortBy = "datelastwritten") then %> <% linkColor = "style=""color: rgb(255,255,255)""" %> <% if (sortAsc = "1" And sortBy = "datecreated") then sortAscStr = "&SORT_ASCENDING=0" else sortAscStr = "" %> <% if (sortBy = "datecreated") then %> <% linkColor = "style=""color: rgb(255,255,255)""" %>
<% else %> <% linkColor = "style=""color: rgb(0,0,0)""" %> <% end if %>    > Name <% if (sortBy = "name") then %> <% end if %> <% else %> <% linkColor = "style=""color: rgb(0,0,0)""" %> <% end if %> > <% if (sortBy = "size") then %> <% end if %> Size    <% else %> <% linkColor = "style=""color: rgb(0,0,0)""" %> <% end if %>    > Date Modified <% if (sortBy = "datelastwritten") then %> <% end if %> <% else %> <% linkColor = "style=""color: rgb(0,0,0)""" %> <% end if %>    > Date Created <% if (sortBy = "datecreated") then %> <% end if %>
<% for each item in OfficeWebFolder %> <% if (colorStr = "#FFFFFF") then colorStr = "#E9E9E9" else colorStr = "#FFFFFF" %> <% colorstr = "#E9E9E9" %> <% if (sortBy = "name") then %> <% if (sortBy = "size") then %> <% if (sortBy = "datelastwritten") then %> <% if (sortBy = "datecreated") then %>
<% else %> <% end if %>    <% if (item.IsDirectory = 1) then %>  <%= item.Name %> <% else %>  <%= item.Name %> <% end if %> <% else %> <% end if %>  <%= item.Size %>    <% else %> <% end if %>    <%= item.DateLastWritten %> <% else %> <% end if %>    <%= item.DateCreated %>
<% next %>
<%= OfficeWebFolder.Count %> Object(s) found
<% end if %> <% set activeItem = Nothing %> <% set OfficeWebFolder = Nothing %>