<%@ Language=VBScript %> <% Dim strPath Dim fsObj Dim xmlObj Dim xmlObj2 Dim docXml Dim docXml2 Dim nCnt Dim nCnt2 strPath = Server.MapPath("./") set xmlObj = Server.CreateObject("Msxml2.DOMDocument.3.0") set xmlObj2 = Server.CreateObject("Msxml2.DOMDocument.3.0") Set fsObj = Server.CreateObject("PhotoAlbumHelper.FileSys") docXml = fsObj.GetAlbumList(strPath) docXml2 = fsObj.GetAlbumPics(strPath) xmlObj.loadXML docXml nCnt = xmlObj.documentElement.childNodes.length xmlObj2.loadXML docXml2 nCnt2 = xmlObj2.documentElement.childNodes.length ' set xmlObj = nothing Set fsObj = nothing %>

Album List

<% for i = 1 to nCnt strPath = "./" strPathFragment = xmlObj.documentElement.childNodes.item(i - 1).attributes.getNamedItem("title").nodeValue strPath = strPath & strPathFragment %> <% Next %> <% if nCnt2 > 0 then Response.Write("
go to parent Parent Directory
go to parent <%=strPathFragment%>

Picture List

") end if %> <% for i = 1 to nCnt2 strPath = "./" strTitle = xmlObj2.documentElement.childNodes.item(i - 1).attributes.getNamedItem("title").nodeValue ' strPathFragment = xmlObj2.documentElement.childNodes.item(i - 1).attributes.getNamedItem("path").nodeValue strFileName = xmlObj2.documentElement.childNodes.item(i - 1).attributes.getNamedItem("fullname").nodeValue strPath = strPath & strFileName %> <% Next %> <% if nCnt2 > 0 then Response.Write("
Picture Preview <%=strTitle%>
") end if %>