Subversion Repositories eFlore/Archives.eflore-consultation-v2

Rev

Rev 49 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 49 Rev 62
1
<?php
1
<?php
2
global $gBlock;
2
global $gBlock;
3
 
3
 
4
function pattern1($donnees)
4
function pattern1($donnees)
5
{
5
{
6
    $retour .= '<h2>'.'Test'.'</h2>'."\n";
6
    $retour .= '<h2>'.'RĂ©sumer de la recherche :'.'</h2>'."\n";
-
 
7
    $retour .= '<p>'."\n";
7
    $retour .= 'radical: '.$donnees['radical'].'<br />'."\n";
8
    $retour .= 'Radical : '.$donnees['radical']."\n";
-
 
9
    if ($donnees['rang'] != '' || $donnees['rang'] != 0) {
8
    $retour .= 'rang: '.$donnees['rang'].'<br />'."\n";
10
        $retour .= ' - Rang : '.$donnees['rang']."\n";
-
 
11
    }
9
    $retour .= '<br />'."\n";
12
    $retour .= '</p>'."\n";
10
    return $retour;
13
    return $retour;
11
}
14
}
12
 
15
 
13
function pattern2($donnees)
16
function pattern2($donnees)
14
{
17
{
15
    $retour .= '<li>'.'Nom : '.$donnees['eni_intitule_nom'].'</li>'."\n";
18
    $retour .= '<li><a href="{UrlFicheNom}'.$donnees['en_id_nom'].'">'.$donnees['eni_intitule_nom'].'</a></li>'."\n";
16
    return $retour;
19
    return $retour;
17
}
20
}
18
 
21
 
19
class liste_nom_latin_xhtml implements iVue {
22
class liste_nom_latin_xhtml implements iVue {
20
    
23
    
21
    protected $leBlock;
24
    protected $leBlock;
22
    
25
    
23
    function __construct($unBlock)
26
    function __construct($unBlock)
24
    {
27
    {
25
        $this->leBlock = $unBlock;
28
        $this->leBlock = $unBlock;
26
    }
29
    }
27
    
30
    
28
    function serialiser()
31
    function serialiser()
29
    {
32
    {
30
        $retour = '<?xml version="1.0" encoding="iso-8859-15" ?>'."\n";
33
        $retour = '<?xml version="1.0" encoding="utf-8" ?>'."\n";
31
        $retour .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "../../../commun/generique/dtd/xhtml1-strict.dtd">'."\n";
34
        $retour .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "../../../commun/generique/dtd/xhtml1-strict.dtd">'."\n";
32
        $retour .= '<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" >'."\n";
35
        $retour .= '<html xmlns="http://w ww.w3.org/1999/xhtml" lang="fr" >'."\n";
33
        
36
        
-
 
37
        $retour .= '<head>'."\n";
34
        $retour .= '<head>'."\n";
38
        $retour .= '<!-- BEGIN entete -->'."\n";
35
        $retour .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'."\n";
39
        $retour .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'."\n";
36
        $retour .= '<meta http-equiv="Content-style-type" content="text/css" />'."\n";
40
        $retour .= '<meta http-equiv="Content-style-type" content="text/css" />'."\n";
37
        $retour .= '<meta http-equiv="Content-script-type" content="text/javascript />'."\n";
41
        $retour .= '<meta http-equiv="Content-script-type" content="text/javascript />'."\n";
38
        $retour .= '<meta http-equiv="Content-language" content="fr" />'."\n";
42
        $retour .= '<meta http-equiv="Content-language" content="fr" />'."\n";
39
        $retour .= '<title>Cartographie des adh&eacute;rents</title>'."\n";
43
        $retour .= '<title>Liste de noms latins</title>'."\n";
-
 
44
        $retour .= '<!-- END entete -->'."\n";
40
        $retour .= '</head>'."\n";
45
        $retour .= '</head>'."\n";
41
        
46
        
42
        $retour .= '<body>'."\n";
47
        $retour .= '<body>'."\n";
-
 
48
        $retour .= '<!-- BEGIN corps -->'."\n";
43
        $retour .= '<h1>'.'Liste des noms'.'</h1>'."\n";
49
        $retour .= '<h1>'.'Liste des noms'.'</h1>'."\n";
44
        $retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS','pattern1');
50
        $retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS','pattern1');
45
        $retour .= '<ol>'."\n";
51
        $retour .= '<ol>'."\n";
46
        $retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS>NOM_SELECTION','pattern2');
52
        $retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS>NOM_SELECTION','pattern2');
47
        $retour .= '</ol>'."\n";
53
        $retour .= '</ol>'."\n";
-
 
54
        $retour .= '<!-- END corps -->'."\n";
48
        $retour .= '</body>'."\n";
55
        $retour .= '</body>'."\n";
49
        $retour .= '</html>'."\n";
56
        $retour .= '</html>'."\n";
50
        echo $retour;
57
        echo $retour;
51
    }
58
    }
52
    
59
    
53
    function serialiser2()
60
    function serialiser2()
54
    {
61
    {
55
        $gBlock = $this->leBlock;
62
        $gBlock = $this->leBlock;
56
        $retour = '';
63
        $retour = '';
57
        $retour .= '<h3>'.'Test'.'</h3>';
64
        $retour .= '<h3>'.'Test'.'</h3>';
58
        $retour .= '<ol>';
65
        $retour .= '<ol>';
59
        $donnees = $this->leBlock->recupererDonnees();
66
        $donnees = $this->leBlock->recupererDonnees();
60
        foreach ($donnees as $cle => $valeur) {
67
        foreach ($donnees as $cle => $valeur) {
61
            $retour .= '<li>'.$cle.' : '.$valeur;
68
            $retour .= '<li>'.$cle.' : '.$valeur;
62
        }
69
        }
63
        $retour .= '</ol>';
70
        $retour .= '</ol>';
64
        
71
        
65
        $block_fils = $this->leBlock->recupererCollectionBlockFils();
72
        $block_fils = $this->leBlock->recupererCollectionBlockFils();
66
        for($i = 0; $i < count($block_fils); $i++) {
73
        for($i = 0; $i < count($block_fils); $i++) {
67
            $collection = $block_fils[$i];
74
            $collection = $block_fils[$i];
68
            $blocks = $collection->recupererBlocksDeDonnees();
75
            $blocks = $collection->recupererBlocksDeDonnees();
69
            foreach ($blocks as $cle => $valeur) {
76
            foreach ($blocks as $cle => $valeur) {
70
                $donnees = $valeur->recupererDonnees();
77
                $donnees = $valeur->recupererDonnees();
71
                $retour .= '<ol>';
78
                $retour .= '<ol>';
72
                foreach ($donnees as $cle1 => $valeur1) {
79
                foreach ($donnees as $cle1 => $valeur1) {
73
                    $retour .= '<li>'.$cle1.' : '.$valeur1;
80
                    $retour .= '<li>'.$cle1.' : '.$valeur1;
74
                }
81
                }
75
                $retour .= '</ol>';
82
                $retour .= '</ol>';
76
            }
83
            }
77
        }
84
        }
78
        
85
        
79
        echo $retour;
86
        echo $retour;
80
    }
87
    }
81
}
88
}
82
?>
89
?>