%@ Language=VBScript %>
<% Option Explicit %>
<% ConnectToDB(".") %>
<%
dim NavString, vParent
dim RightBar
RightBar = true
NavString = ""
'***fonctions
sub WriteParent(vID)
dim RSW
set RSW = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT ID_Link, Nom, Parent FROM tbl_Link WHERE ID_Link = " & vID
RSW.Open strSQL, CN
if not RSW.EOF then
NavString = "" & Ucase(RSW.Fields("Nom")) & " / " & NavString
WriteParent RSW.Fields("Parent")
else
NavString = "LIENS / " & NavString
end if
RSW.Close
set RSW = nothing
end sub
function CountChild(vID)
dim vRet, RSC
set RSC = server.CreateObject("ADODB.Recordset")
vRet = 0
strSQL = "SELECT ID_Link FROM tbl_Link WHERE Status = 'D' AND Parent = " & vID
RSC.Open strSQL, CN
do while not RSC.EOF
vRet = vRet + CountChild(RSC.Fields("ID_Link"))
RSC.MoveNext
loop
RSC.Close
strSQL = "SELECT COUNT(ID_Link) FROM tbl_Link WHERE Status = 'F' AND Parent = " & vID
RSC.Open strSQL, CN
if not RSC.EOF then
vRet = vRet + RSC(0)
end if
RSC.Close
set RSC = nothing
CountChild = vRet
end function
dim vSection, NomSection
vSection = Request.QueryString("p")
if vSection = "" or vSection = 0 then
vSection = 0
NomSection = "Liens"
else
NomSection = GetResult("SELECT Nom FROM tbl_Link WHERE ID_Link = " & vSection)
end if
strSQl = "SELECT * from tbl_Link WHERE Parent = " & vSection & " ORDER BY Status ASC, Nom ASC"
dim RSD
set RSD = Server.CreateObject("ADODB.Recordset")
RSD.Open strSQL, CN
%>
Aînés Hébergement - <%=NomSection%>

<%
WriteParent vSection
Response.Write left(NavString, len(NavString) - 20)
%>
|
<%
RSD.Close
set RSD = nothing
%>
|