<%@ 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) %>


<% if GetResult("SELECT COUNT(ID_Link) FROM tbl_Link WHERE Status = 'D' AND Parent = " & vSection) > 0 then %>
<% if vSection <> 0 then %> <% end if %>
Catégories Retour vers le dossier parent

<% end if %> <%if not RSD.EOF then%> <% dim vCountSub, IFold vCountSub = getResult("SELECT COUNT(ID_Link) FROM tbl_Link WHERE Parent = " & vSection & " AND Status = 'D'") %>
<% For IFold = 1 to vCountSub %>
  • "><%=RSD.Fields("Nom")%> (<%=CountChild(RSD.Fields("ID_Link"))%>)
  • <% if cInt(vCountSub / 2) = IFold then %>
    <% end if RSD.MoveNext next %>
    <% if GetResult("SELECT COUNT(ID_Link) FROM tbl_Link WHERE Status = 'F' AND Parent = " & vSection) > 0 then %>
    <% if vSection <> 0 and GetResult("SELECT COUNT(ID_Link) FROM tbl_Link WHERE Status = 'D' AND Parent = " & vSection) <= 0 then %> <% end if %>
    Liens Retour vers le dossier parent

    <% end if %> <% do while Not RSD.EOF %>
    <% RSD.MoveNext loop %> <% if GetResult("SELECT COUNT(ID_Link) FROM tbl_Link WHERE Status = 'F' AND Parent = " & vSection) > 0 then %>
    <% if vSection <> 0 then %> Retour vers le dossier parent <% end if %>

    <% end if %> <% else %>
    Retour vers le dossier parent

    Aucun élément à afficher
    <% end if %>
    <% RSD.Close set RSD = nothing %>