Subversion Repositories eFlore/Archives.eflore-consultation-v2

Rev

Rev 78 | Rev 107 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 78 Rev 86
Line 1... Line 1...
1
<?php
1
<?php
-
 
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */ 
-
 
3
// +------------------------------------------------------------------------------------------------------+
-
 
4
// | PHP version 4.1                                                                                      |
-
 
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: fiche_synthese_xhtml.php,v 1.3 2005-01-19 12:58:19 jpm Exp $
-
 
25
/**
-
 
26
* Vue affichant la fiche de synthèse d'un nom dans le projet donné
-
 
27
*
-
 
28
* Permet de retourner le html correspondant à la fiche de synthèse d'un nom
-
 
29
* dans un projet donné.
-
 
30
*
-
 
31
*@package eFlore
2
global $gBlock;
32
*@subpackage Vues
-
 
33
//Auteur original :
-
 
34
*@author        Frédéric LEGNES <flegens@free.fr>
-
 
35
//Autres auteurs :
-
 
36
*@author        Jean-Pascal MILCENT <jpm@tela-botanica.org>
-
 
37
*@copyright     Tela-Botanica 2000-2004
-
 
38
*@version       $Revision: 1.3 $ $Date: 2005-01-19 12:58:19 $
-
 
39
// +------------------------------------------------------------------------------------------------------+
-
 
40
*/
Line -... Line 41...
-
 
41
 
-
 
42
// +------------------------------------------------------------------------------------------------------+
-
 
43
// |                                            ENTETE du PROGRAMME                                       |
-
 
44
// +------------------------------------------------------------------------------------------------------+
-
 
45
require_once EFSE_CHEMIN_FONCTION.'eribo_encodage.fonct.php';
-
 
46
 
-
 
47
// +------------------------------------------------------------------------------------------------------+
-
 
48
// |                                            CLASSE de la VUE                                          |
-
 
49
// +------------------------------------------------------------------------------------------------------+
-
 
50
class fiche_synthese_xhtml implements iVue {
-
 
51
    
-
 
52
    protected $leBlock;
-
 
53
    
-
 
54
    function __construct($unBlock)
-
 
55
    {
-
 
56
        $this->leBlock = $unBlock;
-
 
57
    }
-
 
58
    
-
 
59
    function serialiser()
-
 
60
    {
-
 
61
        // La page xhtml :
-
 
62
        $retour = '<?xml version="1.0" encoding="iso-8859-15" ?>'."\n";
-
 
63
        $retour .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "../../../commun/generique/dtd/xhtml1-strict.dtd">'."\n";
-
 
64
        $retour .= '<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" >'."\n";
-
 
65
        
-
 
66
        $retour .= '<head>'."\n";
-
 
67
        $retour .= '<!-- BEGIN entete -->'."\n";
-
 
68
        $retour .= '<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" />'."\n";
-
 
69
        $retour .= '<meta http-equiv="Content-style-type" content="text/css" />'."\n";
-
 
70
        $retour .= '<meta http-equiv="Content-script-type" content="text/javascript" />'."\n";
-
 
71
        $retour .= '<meta http-equiv="Content-language" content="fr" />'."\n";
-
 
72
        $retour .= '<title>Synthèse d\'un nom latin</title>'."\n";
-
 
73
        $retour .= '<!-- END entete -->'."\n";
-
 
74
        $retour .= '</head>'."\n";
-
 
75
        
-
 
76
        $retour .= '<body>'."\n";
-
 
77
        $retour .= '<!-- BEGIN corps -->'."\n";
-
 
78
        $retour .= '<h1>'.'Synthèse d\'un nom latin'.'</h1>'."\n";
-
 
79
        $retour .= '<h2>'.'Informations sur le nom :'.'</h2>'."\n";
-
 
80
        $retour .= '<p>'."\n";
-
 
81
        $retour .= $this->leBlock->afficherPattern('FICHE_SYNTHESE>NOM_LATIN','afficherNomInfos');
-
 
82
        $retour .= '</p>'."\n";
-
 
83
        $retour .= '<h2>'.'Présent dans : '.'</h2>'."\n";
-
 
84
        $retour .= '<form id="eflore_form_projet" action="http://eflore-test.tela-botanica.org/serveurXML/eflore_serveur.php" method="get">'."\n";//{UrlProjetChangement}
-
 
85
        $retour .= '<p>'."\n";
-
 
86
        $retour .= $this->leBlock->afficherPattern('FICHE_SYNTHESE>NOM_LATIN','afficherChampNom');
-
 
87
        $retour .= '<select id="nvp" name="nvp">'."\n";
-
 
88
        $retour .= $this->leBlock->afficherPattern('FICHE_SYNTHESE>NOM_SELECTION','afficherListeProjets');
-
 
89
        $retour .= '</select>'."\n";
-
 
90
        $retour .= '<input type="submit" value="ok" />'."\n";
-
 
91
        $retour .= '</p>'."\n";
-
 
92
        $retour .= '</form>'."\n";
-
 
93
        
-
 
94
        // Gestion du nom correct
-
 
95
        $retour .= $this->leBlock->afficherPattern('FICHE_SYNTHESE>PROJET_VERSION','afficherNomProjetVersion');
-
 
96
        $aso_param['statut_id'] = 3;
-
 
97
        $retour .= $this->leBlock->afficherPattern('FICHE_SYNTHESE>TAXON_NOMS','afficherNomCorrect', TRUE, $aso_param);
-
 
98
        
-
 
99
        // Gestion de la recherche Google
-
 
100
        $retour .= '<h2>'.'Rechercher des illustrations avec Google : '.'</h2>'."\n";
-
 
101
        $aso_param['statut_id'] = 3;
-
 
102
        $retour .= $this->leBlock->afficherPattern('FICHE_SYNTHESE>TAXON_NOMS','afficherRechercheGoogle', TRUE, $aso_param);
-
 
103
        
-
 
104
        // Gestion de la synonymie
-
 
105
        $retour .= '<h2>'.'Synonymie : '.'</h2>'."\n";
-
 
106
        
-
 
107
        // Gestion des noms dont le statut n'est pas renseigné
-
 
108
        $aso_param['statut_id'] = 0;
-
 
109
        $retour_syno = $this->leBlock->afficherPattern('FICHE_SYNTHESE>TAXON_NOMS','afficherSynonyme', TRUE, $aso_param);
-
 
110
        if (!empty($retour_syno)) {
-
 
111
            $synonymie = '<h3>'.'Statut non renseigné : '.'</h3>'."\n";
-
 
112
            $synonymie .= '<ol>'."\n";
-
 
113
            $synonymie .= $retour_syno;
-
 
114
            $synonymie .= '</ol>'."\n";
-
 
115
            $retour .= $synonymie;
-
 
116
        }
-
 
117
        
-
 
118
        // Gestion des noms dont le statut est inconnu
-
 
119
        $aso_param['statut_id'] = 1;
-
 
120
        $retour_syno = $this->leBlock->afficherPattern('FICHE_SYNTHESE>TAXON_NOMS','afficherSynonyme', TRUE, $aso_param);
-
 
121
        if (!empty($retour_syno)) {
-
 
122
            $synonymie = '<h3>'.'Statut inconnu : '.'</h3>'."\n";
-
 
123
            $synonymie .= '<ol>'."\n";
-
 
124
            $synonymie .= $retour_syno;
-
 
125
            $synonymie .= '</ol>'."\n";
-
 
126
            $retour .= $synonymie;
-
 
127
        }
-
 
128
        
-
 
129
        // Gestion des noms dont le statut pose problème
-
 
130
        $aso_param['statut_id'] = 2;
-
 
131
        $retour_syno = $this->leBlock->afficherPattern('FICHE_SYNTHESE>TAXON_NOMS','afficherSynonyme', TRUE, $aso_param);
-
 
132
        if (!empty($retour_syno)) {
-
 
133
            $synonymie = '<h3>'.'Statut posant problème : '.'</h3>'."\n";
-
 
134
            $synonymie .= '<ol>'."\n";
-
 
135
            $synonymie .= $retour_syno;
-
 
136
            $synonymie .= '</ol>'."\n";
-
 
137
            $retour .= $synonymie;
-
 
138
        }
-
 
139
        // Gestion des synonymes taxonomiques
-
 
140
        $aso_param['statut_id'] = 4;
-
 
141
        $retour_syno = $this->leBlock->afficherPattern('FICHE_SYNTHESE>TAXON_NOMS','afficherSynonyme', TRUE, $aso_param);
-
 
142
        if (!empty($retour_syno)) {
-
 
143
            $synonymie = '<h3>'.'Synonymes taxonomiques : '.'</h3>'."\n";
-
 
144
            $synonymie .= '<ol>'."\n";
-
 
145
            $synonymie .= $retour_syno;
-
 
146
            $synonymie .= '</ol>'."\n";
-
 
147
            $retour .= $synonymie;
-
 
148
        }
-
 
149
        
-
 
150
        // Gestion des synonymes nomenclaturaux
-
 
151
        $aso_param['statut_id'] = 5;
-
 
152
        $retour_syno = $this->leBlock->afficherPattern('FICHE_SYNTHESE>TAXON_NOMS','afficherSynonyme', TRUE, $aso_param);
-
 
153
        if (!empty($retour_syno)) {
-
 
154
            $synonymie = '<h3>'.'Synonymes nomenclaturaux : '.'</h3>'."\n";
-
 
155
            $synonymie .= '<ol>'."\n";
-
 
156
            $synonymie .= $retour_syno;
-
 
157
            $synonymie .= '</ol>'."\n";
-
 
158
            $retour .= $synonymie;
-
 
159
        }
-
 
160
        
-
 
161
        // Gestion des synonymes indéterminés
-
 
162
        $aso_param['statut_id'] = 6;
-
 
163
        $retour_syno = $this->leBlock->afficherPattern('FICHE_SYNTHESE>TAXON_NOMS','afficherSynonyme', TRUE, $aso_param);
-
 
164
        if (!empty($retour_syno)) {
-
 
165
            $synonymie = '<h3>'.'Synonymes indéterminés : '.'</h3>'."\n";
-
 
166
            $synonymie .= '<ol>'."\n";
-
 
167
            $synonymie .= $retour_syno;
-
 
168
            $synonymie .= '</ol>'."\n";
-
 
169
            $retour .= $synonymie;
-
 
170
        }
-
 
171
        
-
 
172
        // Gestion des synonymes "inclu dans"
-
 
173
        $aso_param['statut_id'] = 7;
-
 
174
        $retour_syno = $this->leBlock->afficherPattern('FICHE_SYNTHESE>TAXON_NOMS','afficherSynonyme', TRUE, $aso_param);
-
 
175
        if (!empty($retour_syno)) {
-
 
176
            $synonymie = '<h3>'.'Synonymes "inclu dans": '.'</h3>'."\n";
-
 
177
            $synonymie .= '<ol>'."\n";
-
 
178
            $synonymie .= $retour_syno;
-
 
179
            $synonymie .= '</ol>'."\n";
-
 
180
            $retour .= $synonymie;
-
 
181
        }
-
 
182
        
-
 
183
        // Gestion des synonymes au sens de
-
 
184
        $aso_param['statut_id'] = 8;
-
 
185
        $retour_syno = $this->leBlock->afficherPattern('FICHE_SYNTHESE>TAXON_NOMS','afficherSynonyme', TRUE, $aso_param);
-
 
186
        if (!empty($retour_syno)) {
-
 
187
            $synonymie = '<h3>'.'Synonymes "au sens de (<i>sensu</i>)": '.'</h3>'."\n";
-
 
188
            $synonymie .= '<ol>'."\n";
-
 
189
            $synonymie .= $retour_syno;
-
 
190
            $synonymie .= '</ol>'."\n";
-
 
191
            $retour .= $synonymie;
-
 
192
        }
-
 
193
        
-
 
194
        // Gestion des noms vernaculaires
-
 
195
        $retour .= '<h2>'.'Noms vernaculaires : '.'</h2>'."\n";
-
 
196
        $retour .= '<table id="tableau_nom_verna">'."\n";
-
 
197
        $retour .= '  <thead>'."\n";
-
 
198
        $retour .= '    <tr><th>'.'Langue'.'</th><th>'.'Pays'.'</th><th>'.'Nom'.'</th><th>'.'Emploi'.'</th><th>'.'Genre et nombre'.'</th></tr>'."\n";
-
 
199
        $retour .= '  </thead>'."\n";
-
 
200
        $retour .= '  <tbody>'."\n";
-
 
201
        $retour .= $this->leBlock->afficherPattern('FICHE_SYNTHESE>VERNACULAIRE_NOMS','afficherNomVernaculaire');
-
 
202
        $retour .= '  </tbody>'."\n";
-
 
203
        $retour .= '</table>'."\n";
-
 
204
        
-
 
205
        $retour .= '<!-- END corps -->'."\n";
-
 
206
        
-
 
207
        $retour .= '<!-- BEGIN pied -->'."\n";
-
 
208
        $retour .= '<p>'.'Si vous constatez des erreurs ou des insuffisances en consultant cet index, veuillez contacter :'."\n";
-
 
209
        $retour .= '  <a href="mailto:eflore_remarques@tela-botanica.org">l\'équipe d\'eFlore</a>'."\n";
-
 
210
        $retour .= '</p>'."\n";
-
 
211
        $retour .= '<p>'."\n";
-
 
212
        $retour .= '  <a href="http://jigsaw.w3.org/css-validator/check/referer">'."\n";
-
 
213
        $retour .= '    <img class="reference" src="/accueil/images/references/css.png" alt="CSS valide!" />'."\n";
-
 
214
        $retour .= '  </a>'."\n";
-
 
215
        $retour .= '  <a href="http://validator.w3.org/check?uri=referer">'."\n";
-
 
216
        $retour .= '    <img class="reference" src="/accueil/images/references/xhtml11.png" alt="XHTML 1.1 valide!" />'."\n";
-
 
217
        $retour .= '  </a>'."\n";
-
 
218
        $retour .= '  <a href="http://frenchmozilla.org">'."\n";
-
 
219
        $retour .= '    <img class="reference" src="/accueil/images/references/firefox.png" alt="Télécharger un très bon navigateur!" />'."\n";
-
 
220
        $retour .= '  </a>'."\n";
-
 
221
        $retour .= '</p>'."\n";
-
 
222
        
-
 
223
        $retour .= '<!-- END pied -->'."\n";
-
 
224
        
-
 
225
        $retour .= '</body>'."\n";
-
 
226
        $retour .= '</html>'."\n";
-
 
227
        
-
 
228
        // Envoi au navigateur après décodage de l'utf8
-
 
229
        echo remplaceEntiteHTLM($retour);
-
 
230
    }
-
 
231
}
-
 
232
 
-
 
233
// +------------------------------------------------------------------------------------------------------+
-
 
234
// |                                            LISTE des FONCTIONS                                       |
3
 
235
// +------------------------------------------------------------------------------------------------------+
4
function construireNomLatin($donnees)
236
function construireNomLatin($donnees, $bool_nom_court = FALSE)
5
{
237
{
6
// Constitution du nom:
238
// Constitution du nom:
7
    $nom = '';
-
 
8
    $auteur_basio = '';
-
 
-
 
239
    $nom = '';
9
    $auteur_modif = '';
240
    
10
    if (!empty($donnees['en_nom_supra_generique'])) {
241
    if (!empty($donnees['en_nom_supra_generique'])) {
11
        $nom .= $donnees['en_nom_supra_generique'];
242
        $nom .= $donnees['en_nom_supra_generique'];
12
    } else if (!empty($donnees['en_epithete_infra_generique'])){
243
    } else if (!empty($donnees['en_epithete_infra_generique'])){
13
        $nom .= $donnees['en_epithete_infra_generique'];
244
        $nom .= $donnees['en_epithete_infra_generique'];
Line 18... Line 249...
18
        if (!empty($donnees['en_epithete_espece'])) {
249
        if (!empty($donnees['en_epithete_espece'])) {
19
            $nom .= ' '.$donnees['en_epithete_espece'];
250
            $nom .= ' '.$donnees['en_epithete_espece'];
20
        }
251
        }
21
        if (!empty($donnees['en_epithete_infra_specifique'])) {
252
        if (!empty($donnees['en_epithete_infra_specifique'])) {
22
            if (!empty($donnees['enrg_abreviation_rang'])) {
253
            if (!empty($donnees['enrg_abreviation_rang'])) {
23
                $nom .= ' '.$donnees['enrg_abreviation_rang'];
254
                $nom .= ' '.$donnees['enrg_abreviation_rang'].'';
24
            }
255
            }
25
            $nom .= ' '.$donnees['en_epithete_infra_specifique'];
256
            $nom .= ' '.$donnees['en_epithete_infra_specifique'];
26
        }
257
        }
27
    }
258
    }
28
    
-
 
-
 
259
    if (!$bool_nom_court) {
-
 
260
        $auteur_basio = '';
-
 
261
        $auteur_modif = '';
29
    if (!empty($donnees['intitule_abrege_auteur_basio_ex']) && $donnees['en_ce_auteur_basio_ex'] != 0) {
262
        if (!empty($donnees['intitule_abrege_auteur_basio_ex']) && $donnees['en_ce_auteur_basio_ex'] != 0) {
30
        $auteur_basio .= $donnees['intitule_abrege_auteur_basio_ex'];
263
            $auteur_basio .= $donnees['intitule_abrege_auteur_basio_ex'];
31
        if (!empty($donnees['intitule_abrege_auteur_basio'])) {
264
            if (!empty($donnees['intitule_abrege_auteur_basio'])) {
32
            $auteur_basio .= ' ex '.$donnees['intitule_abrege_auteur_basio'];
265
                $auteur_basio .= ' ex '.$donnees['intitule_abrege_auteur_basio'];
-
 
266
            }
-
 
267
        } else if (!empty($donnees['intitule_abrege_auteur_basio']) && $donnees['en_ce_auteur_basio'] != 0) {
-
 
268
            
-
 
269
            $auteur_basio .= $donnees['intitule_abrege_auteur_basio'];
33
        }
270
        }
34
    } else if (!empty($donnees['intitule_abrege_auteur_basio']) && $donnees['en_ce_auteur_basio'] != 0) {
271
        if (!empty($donnees['intitule_abrege_auteur_modif_ex']) && $donnees['en_ce_auteur_modif_ex'] != 0) {
35
        
-
 
36
        $auteur_basio .= $donnees['intitule_abrege_auteur_basio'];
272
            $auteur_modif .= $donnees['intitule_abrege_auteur_modif_ex'];
-
 
273
            if (!empty($donnees['intitule_abrege_auteur_modif'])) {
-
 
274
                $auteur_modif .= ' ex '.$donnees['intitule_abrege_auteur_modif'];
37
    }
275
            }
38
    if (!empty($donnees['intitule_abrege_auteur_modif_ex']) && $donnees['en_ce_auteur_modif_ex'] != 0) {
276
        } else if (!empty($donnees['intitule_abrege_auteur_modif']) && $donnees['en_ce_auteur_modif'] != 0) {
39
        $auteur_modif .= $donnees['intitule_abrege_auteur_modif_ex'];
277
            $auteur_modif .= $donnees['intitule_abrege_auteur_modif'];
-
 
278
        }
40
        if (!empty($donnees['intitule_abrege_auteur_modif'])) {
279
        if (!empty($auteur_modif)) {
41
            $auteur_modif .= ' ex '.$donnees['intitule_abrege_auteur_modif'];
280
            $nom .= ' ('.$auteur_basio.') ex '.$auteur_modif;
-
 
281
        } else {
-
 
282
            $nom .= ' '.$auteur_basio;
42
        }
283
        }
43
    } else if (!empty($donnees['intitule_abrege_auteur_modif']) && $donnees['en_ce_auteur_modif'] != 0) {
-
 
44
        $auteur_modif .= $donnees['intitule_abrege_auteur_modif'];
-
 
45
    }
-
 
46
    if (!empty($auteur_modif)) {
-
 
47
        $nom .= ' ('.$auteur_basio.') ex '.$auteur_modif;
-
 
48
    } else {
-
 
49
        $nom .= ' '.$auteur_basio;
-
 
50
    }
284
    }
Line 51... Line 285...
51
    
285
    
52
    return $nom;
286
    return $nom;
Line -... Line 287...
-
 
287
}
-
 
288
 
-
 
289
function afficherChampNom($donnees)
-
 
290
{
-
 
291
    $retour = '';
-
 
292
    $retour .= '<input type="hidden" id="nn" name="nn" value="'.$donnees['en_id_nom'].'" />'."\n";
-
 
293
    $retour .= '<input type="hidden" id="key" name="key" value="synthese" />'."\n";
-
 
294
    return $retour;
53
}
295
}
54
 
296
 
55
function pattern1($donnees)
297
function afficherNomInfos($donnees)
56
{
298
{
57
    $retour = '';
299
    $retour = '';
58
    //$retour .= '<pre>'.print_r($donnees, true).'</pre>';
300
    //$retour .= '<pre>'.print_r($donnees, true).'</pre>';
59
    //$retour .= '<br>';
301
    //$retour .= '<br>';
60
    $retour .= 'Numéro nomenclatural absolu : '.$donnees['en_id_nom']."\n";
302
    $retour .= 'Numéro nomenclatural absolu : '.$donnees['en_id_nom']."\n";
61
    $retour .= '<br />';
303
    $retour .= '<br />';
62
    $retour .= 'Nom sélectionné précédemment : '.construireNomLatin($donnees).'<br />'."\n";
304
    $retour .= 'Nom sélectionné précédemment : '.construireNomLatin($donnees).'<br />'."\n";
Line 63... Line 305...
63
    return $retour;
305
    return $retour;
64
}
306
}
65
 
307
 
66
function pattern2($donnees)
308
function afficherNomProjetVersion($donnees)
67
{
-
 
68
    $retour = '';
-
 
69
    //$retour .= '<pre>'.print_r($donnees, true).'</pre>';
309
{
70
    //$retour .= '<br>';
310
    $retour = '';
Line 71... Line 311...
71
    $retour .= '<option value="'.$donnees['eprv_id_version'].'">'.$donnees['eprv_nom'].' '.$donnees['epr_intitule_projet'].'</option>';
311
    $retour .= '<h2>'.'Nom correct dans le projet : '.$donnees['eprv_nom'].'</h2>'."\n";
72
    return $retour;
312
    return $retour;
73
}
313
}
74
 
314
 
-
 
315
function afficherListeProjets($donnees)
75
function pattern3($donnees)
316
{
76
{
317
    $retour = '';
-
 
318
    if ($donnees['nvp'] == $donnees['eprv_id_version']) {
77
    $retour = '';
319
        $retour .= '  <option value="'.$donnees['eprv_id_version'].'" checked="checked">'.$donnees['eprv_nom'].' - '.$donnees['epr_intitule_projet'].'</option>'."\n";
78
    //$retour .= '<pre>'.print_r($donnees, true).'</pre>';
320
    } else {
Line -... Line 321...
-
 
321
        $retour .= '  <option value="'.$donnees['eprv_id_version'].'">'.$donnees['eprv_nom'].' - '.$donnees['epr_intitule_projet'].'</option>'."\n";
-
 
322
    }
-
 
323
    return $retour;
-
 
324
}
-
 
325
 
-
 
326
function afficherNomCorrect($donnees, $aso_param)
-
 
327
{
-
 
328
    $retour = '';
-
 
329
    //$retour .= '<pre>'.print_r($aso_param, true).'</pre>';
Line 79... Line 330...
79
    //$retour .= '<br>';
330
    if ($donnees['TAXON_NOMS']['esns_id_statut'] == $aso_param['statut_id']) {
80
    $retour .= '<li>'.$donnees['en_id_nom'].'</li>'."\n";
331
        $retour .= '<p><strong>'.$donnees['TAXON_NOMS']['NOM_LATIN']['eni_intitule_nom'].'</strong></p>'."\n";
81
    return $retour;
332
    }
82
}
-
 
-
 
333
    return $retour;
-
 
334
}
-
 
335
 
83
 
336
function afficherRechercheGoogle($donnees, $aso_param)
-
 
337
{
-
 
338
    $retour = '';
-
 
339
    //$retour .= '<pre>'.print_r($aso_param, true).'</pre>';
-
 
340
    if ($donnees['TAXON_NOMS']['esns_id_statut'] == $aso_param['statut_id']) {
-
 
341
        $retour .= '<form method="get" action="http://images.google.fr/images">'."\n";
-
 
342
        $retour .= '<p>'."\n";
-
 
343
        $retour .= '<a href="http://www.google.com/" title="Aller sur Google France">'."\n";
-
 
344
        $retour .= '    <img src="http://www.google.com/logos/Logo_25wht.gif" alt="Google" />'."\n";
84
 
345
        $retour .= '</a>'."\n";
85
class fiche_synthese_xhtml implements iVue {
346
        $retour .= '<input type="text" name="q" size="25" maxlength="255" value="'.construireNomLatin($donnees['TAXON_NOMS']['NOM_LATIN'], TRUE).'" />'."\n";
86
    
347
        $retour .= '<input type="hidden" name="ie" value="ISO-8859-1" />'."\n";
87
    protected $leBlock;
-
 
88
    
348
        $retour .= '<input type="hidden" name="oe" value="ISO-8859-1" />'."\n";
89
    function __construct($unBlock)
-
 
90
    {
-
 
91
        $this->leBlock = $unBlock;
-
 
92
    }
-
 
93
    
-
 
94
    function serialiser()
349
        $retour .= '<input type="hidden" name="hl" value="fr" />'."\n";
95
    {
-
 
96
        // La page xhtml :
-
 
97
        $html_tete = '<?xml version="1.0" encoding="utf-8" ?>'."\n";
-
 
98
        $html_tete .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "../../../commun/generique/dtd/xhtml1-strict.dtd">'."\n";
-
 
99
        $html_tete .= '<html xmlns="http://w ww.w3.org/1999/xhtml" lang="fr" >'."\n";
-
 
100
        
-
 
101
        $entete = '<head>'."\n";
-
 
102
        $entete .= '<!-- BEGIN entete -->'."\n";
-
 
103
        $entete .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'."\n";
-
 
104
        $entete .= '<meta http-equiv="Content-style-type" content="text/css" />'."\n";
350
        $retour .= '<input type="submit" name="btnG" value="Recherche Google" />'."\n";
105
        $entete .= '<meta http-equiv="Content-script-type" content="text/javascript />'."\n";
-
 
106
        $entete .= '<meta http-equiv="Content-language" content="fr" />'."\n";
-
 
107
        $entete .= '<title>Synthèse d\'un nom latin</title>'."\n";
-
 
108
        $entete .= '<!-- END entete -->'."\n";
-
 
109
        $entete .= '</head>'."\n";
-
 
110
        
-
 
111
        $tab_corps[1] = '<body>'."\n";
-
 
112
        $tab_corps[1] .= '<!-- BEGIN corps -->'."\n";
-
 
113
        $tab_corps[1] .= '<h1>'.'Synthèse d\'un nom latin'.'</h1>'."\n";
-
 
114
        $tab_corps[1] .= '<h2>'.'Informations sur le nom :'.'</h2>'."\n";
-
 
115
        $tab_corps[1] .= '<p>'."\n";
-
 
116
        $tab_block[1] = $this->leBlock->afficherPattern('FICHE_SYNTHESE>NOM_LATIN','pattern1');
-
 
117
        $tab_corps[2] = '</p>'."\n";
-
 
118
        $tab_corps[2] .= '<h2>'.'Présent dans : '.'</h2>'."\n";
-
 
119
        $tab_corps[2] .= '<form id="eflore_form_projet" action="{UrlProjetChangement}" method="post">'."\n";
351
        $retour .= '</p>'."\n";
120
        $tab_corps[2] .= '<select id="eflore_projet_version">';
-
 
121
        $tab_block[2] = $this->leBlock->afficherPattern('FICHE_SYNTHESE>NOM_SELECTION','pattern2');
-
 
122
        $tab_corps[3] .= '</select>';
-
 
123
        $tab_corps[3] .= '<input type="submit" value="ok" />';
-
 
124
        $tab_corps[3] .= '</form>'."\n";
-
 
125
        $tab_corps[3] .= '<h2>'.'Synonymie : '.'</h2>'."\n";
-
 
126
        $tab_corps[3] .= '<ol>'."\n";
352
        $retour .= '</form>'."\n";
127
        $tab_block[3] = $this->leBlock->afficherPattern('FICHE_SYNTHESE>TAXON_NOMS','pattern3');
-
 
128
        $tab_corps[4] .= '</ol>'."\n";
353
    }
129
        $tab_corps[4] .= '<!-- END corps -->'."\n";
354
    return $retour;
130
        $tab_corps[4] .= '</body>'."\n";
355
}
131
        $html_pied = '</html>'."\n";
-
 
132
        
-
 
133
        // Passage en utf8 du code xhtml
356
 
134
        $retour = utf8_encode($html_tete);
-
 
135
        $retour .= utf8_encode($entete);
-
 
136
        foreach ($tab_corps as $cle => $val) {
-
 
137
            $retour .= utf8_encode($val);
-
 
138
            if (isset($tab_block[$cle])) {
-
 
139
                $retour .= utf8_encode($tab_block[$cle]);
-
 
140
            }
357
function afficherSynonyme($donnees, $aso_param)
-
 
358
{
141
        }
359
    $retour = '';
-
 
360
    //$retour .= '<pre>'.print_r($aso_param, true).'</pre>';
-
 
361
    if ($donnees['TAXON_NOMS']['esns_id_statut'] == $aso_param['statut_id']) {
-
 
362
        $retour .= '  <li>'.$donnees['TAXON_NOMS']['NOM_LATIN']['eni_intitule_nom'].'</li>'."\n";
-
 
363
    }
-
 
364
    return $retour;
-
 
365
}
-
 
366
 
-
 
367
function afficherNomVernaculaire($donnees)
-
 
368
{
-
 
369
    $retour = '';
-
 
370
    $retour .= '    <tr>';
-
 
371
    $retour .= '<td title="'.$donnees['el_nom_langue_principal'].'">'.$donnees['el_code_langue'].'</td>';
-
 
372
    $retour .= '<td title="'.$donnees['ezg_intitule_principal_zg'].'">'.$donnees['ezg_code_zg'].'</td>';
-
 
373
    if ($donnees['evce_id_emploi'] == 0) {// Non renseigné
-
 
374
        $retour .= '<td>'.$donnees['ev_intitule_nom_vernaculaire'].'</td>';
-
 
375
        $retour .= '<td>&nbsp;</td>';
-
 
376
    } else if ($donnees['evce_id_emploi'] == 3) {// Recommandé ou typique
-
 
377
        $retour .= '<td><strong>'.$donnees['ev_intitule_nom_vernaculaire'].'</strong></td>';
-
 
378
        $retour .= '<td><strong>'.$donnees['evce_intitule_conseil_emlploi'].'</strong></td>';
-
 
379
    } else if ($donnees['evce_id_emploi'] == 2) {// Secondaire ou régional
-
 
380
        $retour .= '<td><emphasis>'.$donnees['ev_intitule_nom_vernaculaire'].'</emphasis></td>';
-
 
381
        $retour .= '<td><emphasis>'.$donnees['evce_intitule_conseil_emlploi'].'</emphasis></td>';
-
 
382
    } else {
-
 
383
        $retour .= '<td>'.$donnees['ev_intitule_nom_vernaculaire'].'</td>';
-
 
384
        $retour .= '<td>'.$donnees['evce_intitule_conseil_emlploi'].'</td>';
-
 
385
    }
-
 
386
    if ($donnees['egn_id_genre_nombre'] == 0) {
-
 
387
        $retour .= '<td>&nbsp;</td>';
-
 
388
    } else {
-
 
389
        $retour .= '<td>'.$donnees['egn_intitule'].'</td>';
-
 
390
    }
-
 
391
    $retour .= '</tr>'."\n";
-
 
392
    return $retour;
-
 
393
}
-
 
394
 
-
 
395
// +------------------------------------------------------------------------------------------------------+
-
 
396
// |                                            PIED du PROGRAMME                                         |
-
 
397
// +------------------------------------------------------------------------------------------------------+
-
 
398
 
-
 
399
 
-
 
400
 
142
        $retour .= utf8_encode($html_pied);
401
/* +--Fin du code ----------------------------------------------------------------------------------------+
143
        
402
*