Subversion Repositories eFlore/Archives.eflore-consultation-v2

Rev

Rev 174 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 174 Rev 177
1
<?php
1
<?php
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */ 
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */ 
3
// +------------------------------------------------------------------------------------------------------+
3
// +------------------------------------------------------------------------------------------------------+
4
// | PHP version 5.0.3                                                                                    |
4
// | PHP version 5.0.3                                                                                    |
5
// +------------------------------------------------------------------------------------------------------+
5
// +------------------------------------------------------------------------------------------------------+
6
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
6
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
7
// +------------------------------------------------------------------------------------------------------+
7
// +------------------------------------------------------------------------------------------------------+
8
// | This file is part of eRibo.                                                                          |
8
// | This file is part of eRibo.                                                                          |
9
// |                                                                                                      |
9
// |                                                                                                      |
10
// | Foobar is free software; you can redistribute it and/or modify                                       |
10
// | Foobar is free software; you can redistribute it and/or modify                                       |
11
// | it under the terms of the GNU General Public License as published by                                 |
11
// | it under the terms of the GNU General Public License as published by                                 |
12
// | the Free Software Foundation; either version 2 of the License, or                                    |
12
// | the Free Software Foundation; either version 2 of the License, or                                    |
13
// | (at your option) any later version.                                                                  |
13
// | (at your option) any later version.                                                                  |
14
// |                                                                                                      |
14
// |                                                                                                      |
15
// | Foobar is distributed in the hope that it will be useful,                                            |
15
// | Foobar is distributed in the hope that it will be useful,                                            |
16
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
16
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
17
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                        |
17
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                        |
18
// | GNU General Public License for more details.                                                         |
18
// | GNU General Public License for more details.                                                         |
19
// |                                                                                                      |
19
// |                                                                                                      |
20
// | You should have received a copy of the GNU General Public License                                    |
20
// | You should have received a copy of the GNU General Public License                                    |
21
// | along with Foobar; if not, write to the Free Software                                                |
21
// | along with Foobar; if not, write to the Free Software                                                |
22
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
22
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
23
// +------------------------------------------------------------------------------------------------------+
23
// +------------------------------------------------------------------------------------------------------+
24
// CVS : $Id: info_taxon_sup_xml.php,v 1.1 2005-07-01 18:31:30 jp_milcent Exp $
24
// CVS : $Id: info_taxon_sup_xml.php,v 1.2 2005-07-01 19:06:59 jp_milcent Exp $
25
/**
25
/**
26
* Vue affichant la liste des taxons d'un projet.
26
* Vue affichant la liste des taxons d'un projet.
27
*
27
*
28
* Permet de retourner le xhtml correspondant à une liste hiérarchisées des taxons d'un projet.
28
* Permet de retourner le xhtml correspondant à une liste hiérarchisées des taxons d'un projet.
29
*
29
*
30
*@package eFlore
30
*@package eFlore
31
*@subpackage Vues
31
*@subpackage Vues
32
//Auteur original :
32
//Auteur original :
33
*@author        Frédéric LEGENS <flegens@free.fr>
33
*@author        Frédéric LEGENS <flegens@free.fr>
34
//Autres auteurs :
34
//Autres auteurs :
35
*@author        Jean-Pascal MILCENT <jpm@tela-botanica.org>
35
*@author        Jean-Pascal MILCENT <jpm@tela-botanica.org>
36
*@copyright     Tela-Botanica 2000-2004
36
*@copyright     Tela-Botanica 2000-2004
37
*@version       $Revision: 1.1 $ $Date: 2005-07-01 18:31:30 $
37
*@version       $Revision: 1.2 $ $Date: 2005-07-01 19:06:59 $
38
// +------------------------------------------------------------------------------------------------------+
38
// +------------------------------------------------------------------------------------------------------+
39
*/
39
*/
40
 
40
 
41
// +------------------------------------------------------------------------------------------------------+
41
// +------------------------------------------------------------------------------------------------------+
42
// |                                            ENTETE du PROGRAMME                                       |
42
// |                                            ENTETE du PROGRAMME                                       |
43
// +------------------------------------------------------------------------------------------------------+
43
// +------------------------------------------------------------------------------------------------------+
44
require_once EFSE_CHEMIN_FONCTION.'eribo_encodage.fonct.php';
44
require_once EFSE_CHEMIN_FONCTION.'eribo_encodage.fonct.php';
45
 
45
 
46
// +------------------------------------------------------------------------------------------------------+
46
// +------------------------------------------------------------------------------------------------------+
47
// |                                            CLASSE de la VUE                                          |
47
// |                                            CLASSE de la VUE                                          |
48
// +------------------------------------------------------------------------------------------------------+
48
// +------------------------------------------------------------------------------------------------------+
49
class recherche_taxon_sup_xml implements iVue {
49
class info_taxon_sup_xml implements iVue {
50
    
50
    
51
    protected $leBlock;
51
    protected $leBlock;
52
    
52
    
53
    function __construct($unBlock)
53
    function __construct($unBlock)
54
    {
54
    {
55
        $this->leBlock = $unBlock;
55
        $this->leBlock = $unBlock;
56
    }
56
    }
57
    
57
    
58
    function serialiser()
58
    function serialiser()
59
    {
59
    {
60
        
60
        
61
        $retour = '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>'."\n";
61
        $retour = '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>'."\n";
62
        $retour .= '<!DOCTYPE taxon ['."\n";
-
 
63
        $retour .= '  <!ELEMENT taxon (#PCDATA)>'."\n";
-
 
64
        $retour .= ']>'."\n";
-
 
65
        $retour .= $this->leBlock->afficherPattern('FICHE_TAXON_SUPERIEUR>TAXON_SUPERIEUR','afficherInfoTaxon');
62
        $retour .= $this->leBlock->afficherPattern('FICHE_TAXON_SUPERIEUR>TAXON_SUPERIEUR','afficherInfoTaxon');
66
        
63
        
67
        // Envoi au navigateur après encodage en entité des caractères posant problème
64
        // Envoi au navigateur après encodage en entité des caractères posant problème
68
        header('Content-Type: text/xml');
65
        header('Content-Type: text/xml');
69
        echo utf8_encode($retour);
66
        echo utf8_encode($retour);
70
    }
67
    }
71
}
68
}
72
 
69
 
73
// +------------------------------------------------------------------------------------------------------+
70
// +------------------------------------------------------------------------------------------------------+
74
// |                                            LISTE des FONCTIONS                                       |
71
// |                                            LISTE des FONCTIONS                                       |
75
// +------------------------------------------------------------------------------------------------------+
72
// +------------------------------------------------------------------------------------------------------+
76
function afficherInfoTaxon($donnees)
73
function afficherInfoTaxon($donnees)
77
{
74
{
78
    $retour = '';
75
    $retour = '';
79
    $retour .= '<taxon>'."\n";
76
    $retour .= '<taxon>'."\n";
80
    $retour .= '  <etr_id_t2>'.$donnees['etr_id_taxon_2'].'</etr_id_t2>'."\n";
77
    $retour .= '  <etr_id_t2>'.$donnees['etr_id_taxon_2'].'</etr_id_t2>'."\n";
81
    $retour .= '  <etr_id_vpt2>'.$donnees['etr_id_version_projet_taxon_2'].'</etr_id_vpt2>'."\n";
78
    $retour .= '  <etr_id_vpt2>'.$donnees['etr_id_version_projet_taxon_2'].'</etr_id_vpt2>'."\n";
82
    $retour .= '  <en_ce_r>'.$donnees['en_ce_rang'].'</en_ce_r>'."\n";
79
    $retour .= '  <en_ce_r>'.$donnees['en_ce_rang'].'</en_ce_r>'."\n";
83
    $retour .= '  <en_id_n>'.$donnees['en_id_nom'].'</en_id_n>'."\n";
80
    $retour .= '  <en_id_n>'.$donnees['en_id_nom'].'</en_id_n>'."\n";
84
    $retour .= '</taxon>'."\n";
81
    $retour .= '</taxon>'."\n";
85
    return $retour;
82
    return $retour;
86
}
83
}
87
 
84
 
88
 
85
 
89
// +------------------------------------------------------------------------------------------------------+
86
// +------------------------------------------------------------------------------------------------------+
90
// |                                            PIED du PROGRAMME                                         |
87
// |                                            PIED du PROGRAMME                                         |
91
// +------------------------------------------------------------------------------------------------------+
88
// +------------------------------------------------------------------------------------------------------+
92
 
89
 
93
 
90
 
94
/* +--Fin du code ----------------------------------------------------------------------------------------+
91
/* +--Fin du code ----------------------------------------------------------------------------------------+
95
*
92
*
96
* $Log: not supported by cvs2svn $
93
* $Log: not supported by cvs2svn $
-
 
94
* Revision 1.1  2005/07/01 18:31:30  jp_milcent
-
 
95
* changement de nom
-
 
96
*
97
* Revision 1.1  2005/06/30 15:25:07  jpm
97
* Revision 1.1  2005/06/30 15:25:07  jpm
98
* Début des modifications pour ajout de l'arborescence de la classif.
98
* Début des modifications pour ajout de l'arborescence de la classif.
99
*
99
*
100
*
100
*
101
* +-- Fin du code ----------------------------------------------------------------------------------------+
101
* +-- Fin du code ----------------------------------------------------------------------------------------+
102
*/
102
*/
103
?>
103
?>