Subversion Repositories eFlore/Archives.eflore-consultation-v2

Rev

Rev 27 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 27 Rev 36
Line 1... Line 1...
1
<?
1
<?php
Line 2... Line 2...
2
 
2
 
Line 3... Line 3...
3
class blockdedonnees{
3
class blockdedonnees {
4
    
4
    
Line 47... Line 47...
47
    function recupererBlockFils()
47
    function recupererBlockFils()
48
    {
48
    {
49
        return $this->blocksfils;
49
        return $this->blocksfils;
50
    }
50
    }
Line 51... Line 51...
51
    
51
    
52
    function ajouterCollectionBlockFils($collectionBlock)
52
    function ajouterCollectionBlockFils($collection_block)
53
    {
53
    {
54
        array_push($this->collectionBlocksfils,$collectionBlock);
54
        array_push($this->collectionBlocksfils, $collection_block);
Line 55... Line 55...
55
    }
55
    }
56
    
56
    
57
    function afficherPattern($chemin,$fonction)
57
    function afficherPattern($chemin, $fonction)
58
    {
-
 
59
        if($chemin==$this->identifiant)
58
    {
60
        {
59
        if ($chemin == $this->identifiant) {
61
        }
-
 
62
        else
60
        
63
        {
61
        } else {
64
            $etape_chemin = explode('>',$chemin);
-
 
65
            if($chemin==$etape_chemin[0])
62
            $etape_chemin = explode('>', $chemin);
66
            {
-
 
67
                for($i=0;$i<count($this->collectionBlocksfils);$i++)
63
            if($chemin == $etape_chemin[0]) {
68
                {
64
                for($i = 0; $i < count($this->collectionBlocksfils); $i++) {
69
                    $collection =$this->collectionBlocksfils[$i];
-
 
70
                    if ($collection->recupererIdentifiant()==$etape_chemin[1])
65
                    $collection = $this->collectionBlocksfils[$i];
71
                    {
66
                    if ($collection->recupererIdentifiant() == $etape_chemin[1]) {
72
                        array_shift($etape_chemin);
67
                        array_shift($etape_chemin);
73
                        afficherPattern(implode('>',$etape_chemin),$fonction);
68
                        afficherPattern(implode('>', $etape_chemin), $fonction);
74
                    }            
69
                    }
75
                }
70
                }
76
            }
71
            }
Line 77... Line 72...
77
        }    
72
        }
78
    }
73
    }
79
    
74
    
80
    function afficher()
75
    function afficher()
81
    {
76
    {
82
        echo "<OL>";
77
        echo '<ol>';
83
        foreach($this->donnees as $key => $value)
78
        foreach($this->donnees as $key => $value)
84
        {
79
        {
85
            echo "<li>$key:$value ";
80
            echo '<li>'.$key.' : '.$value;
86
        }
-
 
87
        echo "</OL>";
81
        }
88
        for($i=0;$i<count($this->collectionBlocksfils);$i++)
82
        echo '</ol>';
89
        {
83
        for($i = 0; $i < count($this->collectionBlocksfils); $i++) {
90
            $collection =$this->collectionBlocksfils[$i];
84
            $collection = $this->collectionBlocksfils[$i];
91
            echo "<OL>";
-
 
92
            $collection->afficher();
85
            echo '<ol>';
93
            echo "</OL>";
86
            $collection->afficher();
94
            
-
 
95
        }
87
            echo '</ol>';
96
    }
-
 
97
 
88
        }
98
}
89
    }