%
Function GetMenuTree( inParentDocId, inConn, linkTarget )
Dim inRs, strSQL, strName, strID, strTemplate, bolFirst, strResult, mbl
Set inRs = Server.CreateObject("ADODB.Recordset")
mbl=Session("Member_Level")
If Not IsNumeric(mbl) Or mbl = "" Then
mbl=0
End If
If SiteUseFrames = True Then
vMenuTreeReadURL = Replace(LCase(vMenuTreeRoot), "dtree/", "read.asp?DocID=")
Else
vMenuTreeReadURL = Replace(LCase(vMenuTreeRoot), "dtree/", "default.asp?DocID=")
End If
vLangId=Request.QueryString("lang")
If vLangId = "" And Session("contentLanguage") <> "" Then
vLangId = CStr(Session("contentLanguage"))
End If
If inParentDocId = "-1" Then inParentDocId = vRoot
strSQL = " SELECT DocumentLanguages.DocID, DocumentLanguages.DocName, Documents.TemplateURL "
strSQL=strSQL & " FROM DocumentLanguages, Documents "
strSQL=strSQL & " WHERE ParentId = " & inParentDocId
strSQL=strSQL & " AND DocumentLanguages.DocId = Documents.DocumentId "
strSQL=strSQL & " AND DocumentLanguages.LangStatus = 5 "
strSQL=strSQL & " AND DocumentLanguages.LangId = " & vLangId
strSQL=strSQL & " AND SecLevel <= " & mbl
strSQL=strSQL & " ORDER BY SortOrder, DocumentLanguages.DocName "
inRs.Open strSQL, inConn
bolFirst = (Not inRs.BOF And Not inRs.EOF And inParentDocId = vRoot)
If bolFirst Then
strResult = strResult & vbTab & "" & vbNewLine
strResult = strResult & vbTab & "" & vbNewLine
strResult = strResult & vbTab & "" & vbNewLine
GetMenuTree = strResult
inRs.Close
Set inRs = Nothing
End Function
Function GetRoot( inConn )
Dim rootRS, SQL
Set rootRS = Server.CreateObject("ADODB.Recordset")
SQL = "SELECT SettingValue FROM cmsSettings WHERE SettingKey='SiteRootID'"
rootRS.Open SQL, inConn
If rootRS.EOF Then
GetRoot = ""
Else
GetRoot = rootRS("SettingValue").value
End If
rootRS.Close
Set rootRS = Nothing
End Function
Function DeFnutt( inStr )
DeFnutt=Replace(inStr, "'", "\'")
End Function
Sub PrintMenu()
Response.Write ""
End Sub
%>