%@ 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.
' ///////////////////////////////////////////////////////
ImageDir = "../Img/"
Url2 = "javascript:ViewNode("
Url3 = "javascript:ViewModule("
Dim mbl:mbl=Session("Member_Level")
if Not IsNumeric(mbl) Or mbl="" Then mbl="0"
strActiveLanguage=Session("contentLanguage")
StartNode = 2
dIcon = "i2"
' ------------------------------------------------------
Function Execute()
Dim s
s = FindChildren(StartNode, 1)
Execute = s
End Function
' ------------------------------------------------------
Function GetDStatus(dID,dStatus)
' GetDStatus = " (" & dID & ":" & dStatus & ")"
GetDStatus = ""
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 & " AND ((DocumentStatus = 5) OR (ModuleID > 0))"
'StrSql = StrSql & " ORDER BY SortOrder,DocName "
StrSql = "SELECT *, DocumentLanguages.DocName AS DocName FROM Documents "
StrSql = StrSql & " INNER JOIN DocumentLanguages ON Documents.DocumentID = DocumentLanguages.DocId"
StrSql = StrSql & " WHERE (ParentID = " & ID & ")"
StrSql = StrSql & " AND (secLevel <= " &mbl& ") "
StrSql = StrSql & " AND ((DocumentLanguages.LangId = " & strActiveLanguage & ") AND (DocumentLanguages.LangStatus=5) )"
If dbType = "Access" Then
' StrSql = StrSql & " AND (PublishDate <= #" & dtmSQLDate & "#) "
' StrSql = StrSql & " AND (ExpiresDate >= #" & dtmSQLDate & "#) "
Else
' StrSql = StrSql & " AND (PublishDate <= " & dtmSQLDate & ") "
' StrSql = StrSql & " AND (ExpiresDate >= " & dtmSQLDate & ") "
End If
StrSql = StrSql & " ORDER BY SortOrder,DocumentLanguages.DocName "
Rs1.Open StrSql , Conn
While Not rs1.EOF
x = 1
While x < dpt ' // ----------Lägg till tomrum-----------------------
s = s & ""
x = x + 1
Wend
If rs1("isFolder").Value = 0 Then '// Node = dokument , J=last
s = s & "
"
s = s & "
"
If Rs1("ModuleID").value > 0 Then
s = s & "" & rs1("DocName").Value & GetDStatus(rs1("DocumentID").value,rs1("DocumentStatus").value) & "
" & vbCrLf
Else
s = s & "" & rs1("DocName").Value & GetDStatus(rs1("DocumentID").value,rs1("DocumentStatus").value) & "
" & vbCrLf
End If
Else
If HasChildren(rs1("DocumentID").Value) > 0 Then
' s = s & ""
s = s & "
"
s = s & "
"
s = s & "" & rs1("DocName").Value & GetDStatus(rs1("DocumentID").value,rs1("DocumentStatus").value) & "
" & vbCrLf
s = s & "
| <%=LangLabelSiteMap%> |
|
<% Response.Write(" |