%@ language=VBScript %>
<%
' ///////////////////////////////////////////////////////
' // Dimac CMS
' // Copyright 2004-2008 Dimac Development AB, Sweden
' // www.Dimac.net
' //
' // NOTE:
' // You are not allowed to remove this
' // Copyright information without written
' // permission from Dimac Development.
' ///////////////////////////////////////////////////////
If NOT CBool(Session("ValidAdminUser")) Then
Response.Redirect("../LIO/loggin.asp")
End IF
' -------------------------------------------------------
Dim vSID
vSID = SiteRootID
ImageDir = "../System/Images/Icons/"
StartNode = 0
dIcon = "html"
' ------------------------------------------------------
Function Execute()
Dim s
's = " Site:" & vbCrLf & "
"
s = FindChildren(StartNode, 1)
Execute = s
End Function
' ------------------------------------------------------
Function FindChildren(ID, dpt)
Dim s
Dim str
Dim StrSql
Dim i, j, x
Dim Con, Rs1, SQL, tmpVar
Set Conn = Server.CreateObject("ADODB.Connection")
Set Rs1 = Server.CreateObject("ADODB.Recordset")
Conn.Open GetConStr ("..\..\SiteResources\Data\")
i = 1
StrSql = "SELECT * FROM Documents "
StrSql = StrSql & " WHERE (ParentID = " & ID & ")"
StrSql = StrSql & " ORDER BY SortOrder,DocName "
Rs1.Open StrSql , Conn
While Not rs1.EOF
x = 1
While x < dpt ' // ----------add space-----------------------
s = s & ""
x = x + 1
Wend
If HasChildren(rs1("DocumentID").Value) > 0 Then
s = s & "
"
s = s & "
"
' // s = s & "" & rs1("DocName").Value & "
" & vbCrLf
s = s & "" & rs1("DocName").Value & "
" & vbCrLf
s = s & "