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