%
' Fruibile - L'elemento CMS Open Source che mancava
' Copyright (C) 2002-2006 Roberto Scano
'
' Licensed under the terms of the GNU Lesser General Public License:
' http://www.opensource.org/licenses/lgpl-license.php
'
' For further information visit:
' http://www.fruibile.it/
'
' File Author:
' Roberto Scano (mail@robertoscano.info)
%>
<%
'controllo sicurezza --------------
if Session("WEBGODLogin") <> "W3C_VALIDATOR" then
If session("strutture")<> 1 Then
response.Redirect "/backoffice/noentry.asp"
end if
end if
'----------------------------------
'Prevent your website from cross website attacks ---------
refererUrl = Cstr(Request.ServerVariables("HTTP_REFERER"))
serverName = Cstr(Request.ServerVariables("SERVER_NAME"))
refererName = mid(refererUrl,8,len(serverName))
if refererName <> serverName then
response.Redirect "/backoffice/noentry.asp"
response.end
end if
'---------------------------------------------------------
%>
<%
percorso = " " & DICLanguage(142) & ""
percorso = percorso & " / " & DICLanguage(154)
lastpage = Request.ServerVariables("HTTP_REFERER")
%>
<%=DICLanguage(142)%>
<%
if Session("supervisor") = true then
aggiunta_sql = ""
aggiunta_where_sql = ""
else
aggiunta_sql = " and office_id=" & Session("Office_ID")
aggiunta_where_sql = " where office_id=" & Session("Office_ID")
end if
Function getChildPath(intID)
sql = "Select * from " & application("prefix") & "strutture where parentid =" & intID & " and area=" & testoID & " and visibile=1" & aggiunta_sql & " order by title_it"
Set objRS2 = conn.execute(sql)
if not objRS2.eof and not objrs2.bof then
strCategory2 = ""
while not objRS2.eof
If CMS_DB = "MYSQL" Then
Set ws = Conn.Execute("SELECT COUNT(*) AS records FROM " & application("prefix") & "strutture where parentid =" & objrs2("id") & " and visibile=1" & aggiunta_sql & " order by title_it")
conta = int(ws("records"))
ws.Close
Set ws = Nothing
else
Set ws = Server.CreateObject("ADODB.Recordset")
sql = "Select * from " & application("prefix") & "strutture where parentid =" & objrs2("id") & " and visibile=1" & aggiunta_sql & " order by title_it"
ws.Open sql,Conn,3,3
conta = ws.recordcount
ws.Close
set ws=nothing
end if
strCategory2 = strCategory2 & "- " & FixString(objrs("title_" & Session("Language")),"d") & ""
if conta <> 0 then
if conta > 1 then
strCategory2 = strCategory2 & " (" & replace(DICLanguage(174),"[N]",conta) & ")"
else
strCategory2 = strCategory2 & " (" & DICLanguage(173) & ")"
end if
end if
strCategory2 = strCategory2 & getChildPath(objRS2("id"))
strCategory2 = strCategory2 & "
" & vbcrlf
objRS2.movenext
Wend
strCategory2 = strCategory2 & "
" & vbcrlf
getChildPath = strCategory2
end if
Set objRS2 = nothing
End Function
Function getMap(intCatID)
sql = "Select * from " & application("prefix") & "strutture where parentid =" & intCatID & " and visibile=1" & aggiunta_sql & " order by title_" & Session("Language")
Set objRS = conn.execute(sql)
if not objRS.eof and not objrs.bof then
strCategory = ""
while not objRS.eof
If CMS_DB = "MYSQL" Then
Set ws = Conn.Execute("SELECT COUNT(*) AS records FROM " & application("prefix") & "strutture where parentid =" & objrs("id") & " and visibile=1" & aggiunta_sql & " order by title_" & Session("Language"))
conta = int(ws("records"))
ws.Close
Set ws = Nothing
else
Set ws = Server.CreateObject("ADODB.Recordset")
sql = "Select * from " & application("prefix") & "strutture where parentid=" & objrs("id") & " and visibile=1" & aggiunta_sql & " order by title_" & Session("Language")
ws.Open sql,Conn,3,3
conta = ws.recordcount
ws.Close
set ws=nothing
end if
strCategory = strCategory & "- " & FixString(objrs("title_" & Session("Language")),"d") & ""
if conta <> 0 then
if conta > 1 then
strCategory = strCategory & " (" & replace(DICLanguage(174),"[N]",conta) & ")"
else
strCategory = strCategory & " (" & DICLanguage(173) & ")"
end if
end if
strCategory = strCategory & getmap(objRS("id"))
strCategory = strCategory & "
" & vbcrlf
objRS.movenext
Wend
strCategory = strCategory & "
" & vbcrlf
getMap = strCategory
end if
Set objRS = nothing
End Function
stringa =getMap(0)
%>
<%if len(stringa) > 1 then%>
<%=DICLanguage(175)%><%=DICLanguage(0)%>
<%=stringa%>
<%end if%>