Subversion Repositories eFlore/Archives.eflore-consultation-v2

Rev

Rev 173 | Rev 184 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
64 jpm 1
<?php
86 jpm 2
/*vim: set expandtab tabstop=4 shiftwidth=4: */
3
// +------------------------------------------------------------------------------------------------------+
117 jpm 4
// | PHP version 5.0.3                                                                                    |
86 jpm 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
// +------------------------------------------------------------------------------------------------------+
180 jp_milcent 24
// CVS : $Id: fiche_synthese_xhtml.php,v 1.10 2005-08-26 13:43:24 jp_milcent Exp $
86 jpm 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
32
*@subpackage Vues
33
//Auteur original :
107 jpm 34
*@author        Frédéric LEGENS <flegens@free.fr>
86 jpm 35
//Autres auteurs :
36
*@author        Jean-Pascal MILCENT <jpm@tela-botanica.org>
37
*@copyright     Tela-Botanica 2000-2004
180 jp_milcent 38
*@version       $Revision: 1.10 $ $Date: 2005-08-26 13:43:24 $
86 jpm 39
// +------------------------------------------------------------------------------------------------------+
40
*/
64 jpm 41
 
86 jpm 42
// +------------------------------------------------------------------------------------------------------+
43
// |                                            ENTETE du PROGRAMME                                       |
44
// +------------------------------------------------------------------------------------------------------+
45
require_once EFSE_CHEMIN_FONCTION.'eribo_encodage.fonct.php';
124 jpm 46
$GLOBALS['nbre_projet'] = 0;
86 jpm 47
 
48
// +------------------------------------------------------------------------------------------------------+
49
// |                                            CLASSE de la VUE                                          |
50
// +------------------------------------------------------------------------------------------------------+
51
class fiche_synthese_xhtml implements iVue {
52
 
53
    protected $leBlock;
54
 
55
    function __construct($unBlock)
56
    {
57
        $this->leBlock = $unBlock;
58
    }
59
 
60
    function serialiser()
61
    {
180 jp_milcent 62
    		$referentiel_nom = $this->leBlock->afficherPattern('FICHE_SYNTHESE>PROJET_VERSION','afficherNomProjetVersion');
63
    		$nt = $this->leBlock->afficherPattern('FICHE_SYNTHESE','afficherNomInfosNt');
86 jpm 64
        // La page xhtml :
65
        $retour = '<?xml version="1.0" encoding="iso-8859-15" ?>'."\n";
66
        $retour .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "../../../commun/generique/dtd/xhtml1-strict.dtd">'."\n";
67
        $retour .= '<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" >'."\n";
68
 
69
        $retour .= '<head>'."\n";
70
        $retour .= '<!-- BEGIN entete -->'."\n";
71
        $retour .= '<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" />'."\n";
72
        $retour .= '<meta http-equiv="Content-style-type" content="text/css" />'."\n";
73
        $retour .= '<meta http-equiv="Content-script-type" content="text/javascript" />'."\n";
74
        $retour .= '<meta http-equiv="Content-language" content="fr" />'."\n";
75
        $retour .= '<title>Synthèse d\'un nom latin</title>'."\n";
76
        $retour .= '<!-- END entete -->'."\n";
77
        $retour .= '</head>'."\n";
78
 
79
        $retour .= '<body>'."\n";
80
        $retour .= '<!-- BEGIN corps -->'."\n";
81
        $retour .= '<h1>'.'Synthèse d\'un nom latin'.'</h1>'."\n";
82
        $retour .= '<h2>'.'Informations sur le nom :'.'</h2>'."\n";
83
        $retour .= '<p>'."\n";
84
        $retour .= $this->leBlock->afficherPattern('FICHE_SYNTHESE>NOM_LATIN','afficherNomInfos');
180 jp_milcent 85
        $retour .= 'Numéro taxonomique pour le référentiel "'.$referentiel_nom.'" : '.$nt;
86 jpm 86
        $retour .= '</p>'."\n";
180 jp_milcent 87
        $retour .= '<h2>'.'Référentiel courant: '.'</h2>';
86 jpm 88
        $retour .= '<p>'."\n";
180 jp_milcent 89
        $retour .= $referentiel_nom;
86 jpm 90
        $retour .= '</p>'."\n";
91
 
124 jpm 92
        $retour .= $this->leBlock->afficherPattern('FICHE_SYNTHESE>NOM_SELECTION_PROJETS','compterProjets');
93
        if ($GLOBALS['nbre_projet'] == 1) {
180 jp_milcent 94
            $retour .= '<h2>'.'Présent uniquement dans le référentiel : '.'</h2>'."\n";
124 jpm 95
            $retour .= '<p>'."\n";
96
            $retour .= $this->leBlock->afficherPattern('FICHE_SYNTHESE>PROJET_VERSION','afficherNomProjetVersion');
97
            $retour .= '</p>'."\n";
98
        } else if ($GLOBALS['nbre_projet'] > 1 AND $GLOBALS['nbre_projet'] < 6) {
180 jp_milcent 99
            $retour .= '<h2>'.'Présent dans les référentiels: '.'</h2>'."\n";
124 jpm 100
            $retour .= '<ul>'."\n";
101
            $retour .= $this->leBlock->afficherPattern('FICHE_SYNTHESE>NOM_SELECTION_PROJETS','afficherListeProjets', null, TRUE);
102
            $retour .= '</ul>'."\n";
103
        } else {
180 jp_milcent 104
            $retour .= '<h2>'.'Présent dans les référentiels: '.'</h2>'."\n";
124 jpm 105
            $retour .= '<form id="eflore_form_projet" action="{FormUrlProjetChangement}" method="post">'."\n";
106
            $retour .= '<p>'."\n";
107
            $retour .= $this->leBlock->afficherPattern('FICHE_SYNTHESE>NOM_LATIN','afficherChampNom');
108
            $retour .= '<select id="nvp" name="nvp">'."\n";
109
            $retour .= $this->leBlock->afficherPattern('FICHE_SYNTHESE>NOM_SELECTION_PROJETS','afficherOptionProjets', null, TRUE);
110
            $retour .= '</select>'."\n";
111
            $retour .= '<input type="submit" value="ok" />'."\n";
112
            $retour .= '</p>'."\n";
113
            $retour .= '</form>'."\n";
114
        }
115
 
86 jpm 116
        // Gestion du nom correct
180 jp_milcent 117
        $retour .= '<h2>'.'Nom correct dans le référentiel courant: '.'</h2>'."\n";
86 jpm 118
        $aso_param['statut_id'] = 3;
107 jpm 119
        $retour .= $this->leBlock->afficherPattern('FICHE_SYNTHESE>TAXON_NOMS>NOM_LATIN','afficherNomCorrect', $aso_param, TRUE);
86 jpm 120
 
121
        // Gestion de la recherche Google
122
        $retour .= '<h2>'.'Rechercher des illustrations avec Google : '.'</h2>'."\n";
123
        $aso_param['statut_id'] = 3;
107 jpm 124
        $retour .= $this->leBlock->afficherPattern('FICHE_SYNTHESE>TAXON_NOMS>NOM_LATIN','afficherRechercheGoogle', $aso_param, TRUE);
86 jpm 125
 
173 jpm 126
        // Gestion des taxons supérieurs
127
        $retour .= '<h2>'.'Niveaux taxinomiques supérieurs : '.'</h2>'."\n";
128
        $retour .= $this->leBlock->afficherPattern('FICHE_SYNTHESE','afficherNiveauTaxoSuperieur');
129
 
86 jpm 130
        // Gestion de la synonymie
131
        // Gestion des noms dont le statut n'est pas renseigné
132
        $aso_param['statut_id'] = 0;
107 jpm 133
        $retour_syno = $this->leBlock->afficherPattern('FICHE_SYNTHESE>TAXON_NOMS>NOM_LATIN','afficherSynonyme', $aso_param, TRUE);
86 jpm 134
        if (!empty($retour_syno)) {
135
            $synonymie = '<h3>'.'Statut non renseigné : '.'</h3>'."\n";
136
            $synonymie .= '<ol>'."\n";
137
            $synonymie .= $retour_syno;
138
            $synonymie .= '</ol>'."\n";
107 jpm 139
            $retour_syno_final .= $synonymie;
86 jpm 140
        }
141
 
142
        // Gestion des noms dont le statut est inconnu
143
        $aso_param['statut_id'] = 1;
107 jpm 144
        $retour_syno = $this->leBlock->afficherPattern('FICHE_SYNTHESE>TAXON_NOMS>NOM_LATIN','afficherSynonyme', $aso_param, TRUE);
86 jpm 145
        if (!empty($retour_syno)) {
146
            $synonymie = '<h3>'.'Statut inconnu : '.'</h3>'."\n";
147
            $synonymie .= '<ol>'."\n";
148
            $synonymie .= $retour_syno;
149
            $synonymie .= '</ol>'."\n";
107 jpm 150
            $retour_syno_final .= $synonymie;
86 jpm 151
        }
152
 
153
        // Gestion des noms dont le statut pose problème
154
        $aso_param['statut_id'] = 2;
107 jpm 155
        $retour_syno = $this->leBlock->afficherPattern('FICHE_SYNTHESE>TAXON_NOMS>NOM_LATIN','afficherSynonyme', $aso_param, TRUE);
86 jpm 156
        if (!empty($retour_syno)) {
157
            $synonymie = '<h3>'.'Statut posant problème : '.'</h3>'."\n";
158
            $synonymie .= '<ol>'."\n";
159
            $synonymie .= $retour_syno;
160
            $synonymie .= '</ol>'."\n";
107 jpm 161
            $retour_syno_final .= $synonymie;
86 jpm 162
        }
163
        // Gestion des synonymes taxonomiques
164
        $aso_param['statut_id'] = 4;
107 jpm 165
        $retour_syno = $this->leBlock->afficherPattern('FICHE_SYNTHESE>TAXON_NOMS>NOM_LATIN','afficherSynonyme', $aso_param, TRUE);
86 jpm 166
        if (!empty($retour_syno)) {
167
            $synonymie = '<h3>'.'Synonymes taxonomiques : '.'</h3>'."\n";
168
            $synonymie .= '<ol>'."\n";
169
            $synonymie .= $retour_syno;
170
            $synonymie .= '</ol>'."\n";
107 jpm 171
            $retour_syno_final .= $synonymie;
86 jpm 172
        }
173
 
174
        // Gestion des synonymes nomenclaturaux
175
        $aso_param['statut_id'] = 5;
107 jpm 176
        $retour_syno = $this->leBlock->afficherPattern('FICHE_SYNTHESE>TAXON_NOMS>NOM_LATIN','afficherSynonyme', $aso_param, TRUE);
86 jpm 177
        if (!empty($retour_syno)) {
178
            $synonymie = '<h3>'.'Synonymes nomenclaturaux : '.'</h3>'."\n";
179
            $synonymie .= '<ol>'."\n";
180
            $synonymie .= $retour_syno;
181
            $synonymie .= '</ol>'."\n";
107 jpm 182
            $retour_syno_final .= $synonymie;
86 jpm 183
        }
184
 
185
        // Gestion des synonymes indéterminés
186
        $aso_param['statut_id'] = 6;
107 jpm 187
        $retour_syno = $this->leBlock->afficherPattern('FICHE_SYNTHESE>TAXON_NOMS>NOM_LATIN','afficherSynonyme', $aso_param, TRUE);
86 jpm 188
        if (!empty($retour_syno)) {
189
            $synonymie = '<h3>'.'Synonymes indéterminés : '.'</h3>'."\n";
190
            $synonymie .= '<ol>'."\n";
191
            $synonymie .= $retour_syno;
192
            $synonymie .= '</ol>'."\n";
107 jpm 193
            $retour_syno_final .= $synonymie;
86 jpm 194
        }
195
 
196
        // Gestion des synonymes "inclu dans"
197
        $aso_param['statut_id'] = 7;
107 jpm 198
        $retour_syno = $this->leBlock->afficherPattern('FICHE_SYNTHESE>TAXON_NOMS>NOM_LATIN','afficherSynonyme', $aso_param, TRUE);
86 jpm 199
        if (!empty($retour_syno)) {
200
            $synonymie = '<h3>'.'Synonymes "inclu dans": '.'</h3>'."\n";
201
            $synonymie .= '<ol>'."\n";
202
            $synonymie .= $retour_syno;
203
            $synonymie .= '</ol>'."\n";
107 jpm 204
            $retour_syno_final .= $synonymie;
86 jpm 205
        }
206
 
207
        // Gestion des synonymes au sens de
208
        $aso_param['statut_id'] = 8;
107 jpm 209
        $retour_syno = $this->leBlock->afficherPattern('FICHE_SYNTHESE>TAXON_NOMS>NOM_LATIN','afficherSynonyme', $aso_param, TRUE);
86 jpm 210
        if (!empty($retour_syno)) {
211
            $synonymie = '<h3>'.'Synonymes "au sens de (<i>sensu</i>)": '.'</h3>'."\n";
212
            $synonymie .= '<ol>'."\n";
213
            $synonymie .= $retour_syno;
214
            $synonymie .= '</ol>'."\n";
107 jpm 215
            $retour_syno_final .= $synonymie;
86 jpm 216
        }
107 jpm 217
        if (empty($retour_syno_final)) {
218
            $retour .= '<h2>'.'Synonymie : '.'</h2>'."\n";
180 jp_milcent 219
            $retour .= '<p>'.'Aucune synonymie pour ce nom dans ce référentiel.'.'</p>'."\n";
107 jpm 220
        } else {
221
            $retour .= '<h2>'.'Synonymie : '.'</h2>'."\n";
222
            $retour .= $retour_syno_final;
223
        }
86 jpm 224
 
225
        // Gestion des noms vernaculaires
107 jpm 226
        $nom_verna_lignes = $this->leBlock->afficherPattern('FICHE_SYNTHESE>VERNACULAIRE_NOMS','afficherNomVernaculaire');
227
        if (empty($nom_verna_lignes)) {
228
            $retour .= '<h2>'.'Noms vernaculaires :'.'</h2>'."\n";
180 jp_milcent 229
            $retour .= '<p>'.'Aucun nom vernaculaire pour ce taxon dans ce référentiel.'.'</p>'."\n";
107 jpm 230
        } else {
231
            $retour .= '<h2>'.'Noms vernaculaires : '.'</h2>'."\n";
232
            $retour .= '<table id="tableau_nom_verna">'."\n";
233
            $retour .= '  <thead>'."\n";
234
            $retour .= '    <tr><th>'.'Langue'.'</th><th>'.'Pays'.'</th><th>'.'Nom'.'</th><th>'.'Emploi'.'</th><th>'.'Genre et nombre'.'</th></tr>'."\n";
235
            $retour .= '  </thead>'."\n";
236
            $retour .= '  <tbody>'."\n";
237
            $retour .= $nom_verna_lignes;
238
            $retour .= '  </tbody>'."\n";
239
            $retour .= '</table>'."\n";
240
        }
86 jpm 241
 
242
        $retour .= '<!-- END corps -->'."\n";
243
 
244
        $retour .= '<!-- BEGIN pied -->'."\n";
107 jpm 245
        $retour .= '<p>'.'Si vous constatez des erreurs ou des insuffisances en consultant cet index, veuillez contacter '."\n";
246
        $retour .= '  <a href="mailto:eflore_remarques@tela-botanica.org">l\'équipe d\'eFlore</a>.'."\n";
86 jpm 247
        $retour .= '</p>'."\n";
248
        $retour .= '<p>'."\n";
249
        $retour .= '  <a href="http://jigsaw.w3.org/css-validator/check/referer">'."\n";
250
        $retour .= '    <img class="reference" src="/accueil/images/references/css.png" alt="CSS valide!" />'."\n";
251
        $retour .= '  </a>'."\n";
252
        $retour .= '  <a href="http://validator.w3.org/check?uri=referer">'."\n";
253
        $retour .= '    <img class="reference" src="/accueil/images/references/xhtml11.png" alt="XHTML 1.1 valide!" />'."\n";
254
        $retour .= '  </a>'."\n";
255
        $retour .= '  <a href="http://frenchmozilla.org">'."\n";
256
        $retour .= '    <img class="reference" src="/accueil/images/references/firefox.png" alt="Télécharger un très bon navigateur!" />'."\n";
257
        $retour .= '  </a>'."\n";
258
        $retour .= '</p>'."\n";
259
 
260
        $retour .= '<!-- END pied -->'."\n";
261
 
262
        $retour .= '</body>'."\n";
263
        $retour .= '</html>'."\n";
264
 
117 jpm 265
        // Envoi au navigateur après encodage en entité des caractères posant problème
86 jpm 266
        echo remplaceEntiteHTLM($retour);
267
    }
268
}
269
 
270
// +------------------------------------------------------------------------------------------------------+
271
// |                                            LISTE des FONCTIONS                                       |
272
// +------------------------------------------------------------------------------------------------------+
273
function construireNomLatin($donnees, $bool_nom_court = FALSE)
64 jpm 274
{
78 jpm 275
// Constitution du nom:
64 jpm 276
    $nom = '';
86 jpm 277
 
64 jpm 278
    if (!empty($donnees['en_nom_supra_generique'])) {
279
        $nom .= $donnees['en_nom_supra_generique'];
280
    } else if (!empty($donnees['en_epithete_infra_generique'])){
281
        $nom .= $donnees['en_epithete_infra_generique'];
282
    } else {
283
        if (!empty($donnees['en_nom_genre'])) {
284
            $nom .= $donnees['en_nom_genre'];
285
        }
286
        if (!empty($donnees['en_epithete_espece'])) {
287
            $nom .= ' '.$donnees['en_epithete_espece'];
288
        }
289
        if (!empty($donnees['en_epithete_infra_specifique'])) {
290
            if (!empty($donnees['enrg_abreviation_rang'])) {
86 jpm 291
                $nom .= ' '.$donnees['enrg_abreviation_rang'].'';
64 jpm 292
            }
293
            $nom .= ' '.$donnees['en_epithete_infra_specifique'];
294
        }
295
    }
86 jpm 296
    if (!$bool_nom_court) {
297
        $auteur_basio = '';
298
        $auteur_modif = '';
299
        if (!empty($donnees['intitule_abrege_auteur_basio_ex']) && $donnees['en_ce_auteur_basio_ex'] != 0) {
300
            $auteur_basio .= $donnees['intitule_abrege_auteur_basio_ex'];
301
            if (!empty($donnees['intitule_abrege_auteur_basio'])) {
302
                $auteur_basio .= ' ex '.$donnees['intitule_abrege_auteur_basio'];
303
            }
304
        } else if (!empty($donnees['intitule_abrege_auteur_basio']) && $donnees['en_ce_auteur_basio'] != 0) {
305
 
306
            $auteur_basio .= $donnees['intitule_abrege_auteur_basio'];
64 jpm 307
        }
86 jpm 308
        if (!empty($donnees['intitule_abrege_auteur_modif_ex']) && $donnees['en_ce_auteur_modif_ex'] != 0) {
309
            $auteur_modif .= $donnees['intitule_abrege_auteur_modif_ex'];
310
            if (!empty($donnees['intitule_abrege_auteur_modif'])) {
311
                $auteur_modif .= ' ex '.$donnees['intitule_abrege_auteur_modif'];
312
            }
313
        } else if (!empty($donnees['intitule_abrege_auteur_modif']) && $donnees['en_ce_auteur_modif'] != 0) {
314
            $auteur_modif .= $donnees['intitule_abrege_auteur_modif'];
64 jpm 315
        }
86 jpm 316
        if (!empty($auteur_modif)) {
317
            $nom .= ' ('.$auteur_basio.') ex '.$auteur_modif;
318
        } else {
319
            $nom .= ' '.$auteur_basio;
320
        }
64 jpm 321
    }
322
 
78 jpm 323
    return $nom;
324
}
325
 
86 jpm 326
function afficherChampNom($donnees)
78 jpm 327
{
328
    $retour = '';
86 jpm 329
    $retour .= '<input type="hidden" id="nn" name="nn" value="'.$donnees['en_id_nom'].'" />'."\n";
110 jpm 330
    $retour .= '<input type="hidden" id="cle" name="cle" value="synthese" />'."\n";
86 jpm 331
    return $retour;
332
}
333
 
334
function afficherNomInfos($donnees)
335
{
336
    $retour = '';
78 jpm 337
    //$retour .= '<pre>'.print_r($donnees, true).'</pre>';
338
    $retour .= '<br />';
339
    $retour .= 'Nom sélectionné précédemment : '.construireNomLatin($donnees).'<br />'."\n";
180 jp_milcent 340
    $retour .= 'Numéro nomenclatural absolu : '.$donnees['en_id_nom'].'<br />'."\n";
64 jpm 341
    return $retour;
342
}
180 jp_milcent 343
function afficherNomInfosNt($donnees)
344
{
345
    return $donnees['nt'];
346
}
64 jpm 347
 
86 jpm 348
function afficherNomProjetVersion($donnees)
78 jpm 349
{
124 jpm 350
    return $donnees['eprv_nom'];
351
}
352
 
353
function compterProjets($donnees)
354
{
355
    $GLOBALS['nbre_projet']++;
356
}
357
 
358
function afficherListeProjets($donnees)
359
{
78 jpm 360
    $retour = '';
124 jpm 361
    if ($donnees['FICHE_SYNTHESE']['nvp'] != $donnees['NOM_SELECTION_PROJETS']['eprv_id_version']) {
362
        $retour .= '  <li>';
363
        $retour .= '<a href="{LienUrlProjetChangement}'.$donnees['NOM_SELECTION_PROJETS']['eprv_id_version'].'" title="Consulter la fiche de ce projet.">';
364
        $retour .= $donnees['NOM_SELECTION_PROJETS']['eprv_nom'].' - '.$donnees['NOM_SELECTION_PROJETS']['epr_intitule_projet'];
365
        $retour .= '</a>';
366
        $retour .= '</li>'."\n";
367
    }
78 jpm 368
    return $retour;
369
}
370
 
124 jpm 371
function afficherOptionProjets($donnees)
78 jpm 372
{
373
    $retour = '';
124 jpm 374
    if ($donnees['FICHE_SYNTHESE']['nvp'] != $donnees['NOM_SELECTION_PROJETS']['eprv_id_version']) {
107 jpm 375
        $retour .= '  <option value="'.$donnees['NOM_SELECTION_PROJETS']['eprv_id_version'].'">';
376
        $retour .= $donnees['NOM_SELECTION_PROJETS']['eprv_nom'].' - '.$donnees['NOM_SELECTION_PROJETS']['epr_intitule_projet'];
377
        $retour .= '</option>'."\n";
86 jpm 378
    }
78 jpm 379
    return $retour;
380
}
381
 
86 jpm 382
function afficherNomCorrect($donnees, $aso_param)
383
{
384
    $retour = '';
144 jpm 385
    //$retour .= '<pre>'.print_r($donnees, true).'</pre>';
86 jpm 386
    if ($donnees['TAXON_NOMS']['esns_id_statut'] == $aso_param['statut_id']) {
107 jpm 387
        $retour .= '<p><strong>'.$donnees['NOM_LATIN']['eni_intitule_nom'].'</strong></p>'."\n";
86 jpm 388
    }
389
    return $retour;
390
}
78 jpm 391
 
86 jpm 392
function afficherRechercheGoogle($donnees, $aso_param)
393
{
394
    $retour = '';
144 jpm 395
    //$retour .= '<pre>'.print_r($donnees, true).'</pre>';
86 jpm 396
    if ($donnees['TAXON_NOMS']['esns_id_statut'] == $aso_param['statut_id']) {
173 jpm 397
        $retour .= '<form method="get" action="http://images.google.fr/images" target="_blank">'."\n";
86 jpm 398
        $retour .= '<p>'."\n";
399
        $retour .= '<a href="http://www.google.com/" title="Aller sur Google France">'."\n";
400
        $retour .= '    <img src="http://www.google.com/logos/Logo_25wht.gif" alt="Google" />'."\n";
401
        $retour .= '</a>'."\n";
107 jpm 402
        $retour .= '<input type="text" name="q" size="25" maxlength="255" value="'.construireNomLatin($donnees['NOM_LATIN'], TRUE).'" />'."\n";
86 jpm 403
        $retour .= '<input type="hidden" name="ie" value="ISO-8859-1" />'."\n";
404
        $retour .= '<input type="hidden" name="oe" value="ISO-8859-1" />'."\n";
405
        $retour .= '<input type="hidden" name="hl" value="fr" />'."\n";
406
        $retour .= '<input type="submit" name="btnG" value="Recherche Google" />'."\n";
407
        $retour .= '</p>'."\n";
408
        $retour .= '</form>'."\n";
64 jpm 409
    }
86 jpm 410
    return $retour;
411
}
173 jpm 412
function afficherNiveauTaxoSuperieur($donnees)
413
{
414
    $retour = '';
415
    //$retour .= '<pre>'.print_r($donnees, true).'</pre>';
416
    $retour .= 'func_NiveauTaxo('.$donnees['nt'].', '.$donnees['nvp'].')';
417
    return $retour;
418
}
86 jpm 419
function afficherSynonyme($donnees, $aso_param)
420
{
421
    $retour = '';
107 jpm 422
    //$retour .= '<pre>'.print_r($donnees, true).'</pre>';
86 jpm 423
    if ($donnees['TAXON_NOMS']['esns_id_statut'] == $aso_param['statut_id']) {
107 jpm 424
        $retour .= '  <li>'.$donnees['NOM_LATIN']['eni_intitule_nom'].'</li>'."\n";
64 jpm 425
    }
86 jpm 426
    return $retour;
64 jpm 427
}
86 jpm 428
 
429
function afficherNomVernaculaire($donnees)
430
{
431
    $retour = '';
432
    $retour .= '    <tr>';
433
    $retour .= '<td title="'.$donnees['el_nom_langue_principal'].'">'.$donnees['el_code_langue'].'</td>';
434
    $retour .= '<td title="'.$donnees['ezg_intitule_principal_zg'].'">'.$donnees['ezg_code_zg'].'</td>';
435
    if ($donnees['evce_id_emploi'] == 0) {// Non renseigné
436
        $retour .= '<td>'.$donnees['ev_intitule_nom_vernaculaire'].'</td>';
437
        $retour .= '<td>&nbsp;</td>';
438
    } else if ($donnees['evce_id_emploi'] == 3) {// Recommandé ou typique
439
        $retour .= '<td><strong>'.$donnees['ev_intitule_nom_vernaculaire'].'</strong></td>';
440
        $retour .= '<td><strong>'.$donnees['evce_intitule_conseil_emlploi'].'</strong></td>';
441
    } else if ($donnees['evce_id_emploi'] == 2) {// Secondaire ou régional
442
        $retour .= '<td><emphasis>'.$donnees['ev_intitule_nom_vernaculaire'].'</emphasis></td>';
443
        $retour .= '<td><emphasis>'.$donnees['evce_intitule_conseil_emlploi'].'</emphasis></td>';
444
    } else {
445
        $retour .= '<td>'.$donnees['ev_intitule_nom_vernaculaire'].'</td>';
446
        $retour .= '<td>'.$donnees['evce_intitule_conseil_emlploi'].'</td>';
447
    }
448
    if ($donnees['egn_id_genre_nombre'] == 0) {
449
        $retour .= '<td>&nbsp;</td>';
450
    } else {
451
        $retour .= '<td>'.$donnees['egn_intitule'].'</td>';
452
    }
453
    $retour .= '</tr>'."\n";
454
    return $retour;
455
}
456
 
457
// +------------------------------------------------------------------------------------------------------+
458
// |                                            PIED du PROGRAMME                                         |
459
// +------------------------------------------------------------------------------------------------------+
460
 
461
 
462
 
463
/* +--Fin du code ----------------------------------------------------------------------------------------+
464
*
465
* $Log: not supported by cvs2svn $
180 jp_milcent 466
* Revision 1.9  2005/06/30 15:25:07  jpm
467
* Début des modifications pour ajout de l'arborescence de la classif.
468
*
173 jpm 469
* Revision 1.8  2005/02/14 18:11:43  jpm
470
* Amélioration.
471
*
144 jpm 472
* Revision 1.7  2005/01/28 19:46:18  jpm
473
* Amélioration de l'affichage des projets utilisant le noms sélectionné.
474
*
124 jpm 475
* Revision 1.6  2005/01/26 10:44:57  jpm
476
* Correction de la version de PHP.
477
*
117 jpm 478
* Revision 1.5  2005/01/25 12:26:19  jpm
479
* Utilisation de mot clé pour le template à la place des urls.
480
*
110 jpm 481
* Revision 1.4  2005/01/24 16:53:25  jpm
482
* Modification des méthodes permettant la récupération des données de la hiérarchie.
483
*
107 jpm 484
* Revision 1.3  2005/01/19 12:58:19  jpm
485
* Début des tests pour gérer le formulaire de changement de projet.
86 jpm 486
*
107 jpm 487
*
86 jpm 488
* +-- Fin du code ----------------------------------------------------------------------------------------+
489
*/
64 jpm 490
?>