Subversion Repositories eFlore/Archives.eflore-consultation-v2

Rev

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

Rev 125 Rev 170
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: recherche_nom_vernaculaire_xhtml.php,v 1.2 2005-01-28 19:47:09 jpm Exp $
24
// CVS : $Id: recherche_nom_vernaculaire_xhtml.php,v 1.3 2005-06-09 18:09:52 jpm Exp $
25
/**
25
/**
26
* Vue affichant la liste des noms vernaculaire correspondant à un radical recherché.
26
* Vue affichant la liste des noms vernaculaire correspondant à un radical recherché.
27
*
27
*
28
* Permet de retourner le html correspondant à la liste des noms vernaculaires correspondant à un radical
28
* Permet de retourner le html correspondant à la liste des noms vernaculaires correspondant à un radical
29
* recherché.
29
* recherché.
30
*
30
*
31
*@package eFlore
31
*@package eFlore
32
*@subpackage Vues
32
*@subpackage Vues
33
//Auteur original :
33
//Auteur original :
34
*@author        Frédéric LEGENS <flegens@free.fr>
34
*@author        Frédéric LEGENS <flegens@free.fr>
35
//Autres auteurs :
35
//Autres auteurs :
36
*@author        Jean-Pascal MILCENT <jpm@tela-botanica.org>
36
*@author        Jean-Pascal MILCENT <jpm@tela-botanica.org>
37
*@copyright     Tela-Botanica 2000-2004
37
*@copyright     Tela-Botanica 2000-2004
38
*@version       $Revision: 1.2 $ $Date: 2005-01-28 19:47:09 $
38
*@version       $Revision: 1.3 $ $Date: 2005-06-09 18:09:52 $
39
// +------------------------------------------------------------------------------------------------------+
39
// +------------------------------------------------------------------------------------------------------+
40
*/
40
*/
41
 
41
 
42
// +------------------------------------------------------------------------------------------------------+
42
// +------------------------------------------------------------------------------------------------------+
43
// |                                            ENTETE du PROGRAMME                                       |
43
// |                                            ENTETE du PROGRAMME                                       |
44
// +------------------------------------------------------------------------------------------------------+
44
// +------------------------------------------------------------------------------------------------------+
45
require_once EFSE_CHEMIN_FONCTION.'eribo_encodage.fonct.php';
45
require_once EFSE_CHEMIN_FONCTION.'eribo_encodage.fonct.php';
46
$GLOBALS['num_nom_verna'] = 1;
46
$GLOBALS['num_nom_verna'] = 1;
47
 
47
 
48
// +------------------------------------------------------------------------------------------------------+
48
// +------------------------------------------------------------------------------------------------------+
49
// |                                            CLASSE de la VUE                                          |
49
// |                                            CLASSE de la VUE                                          |
50
// +------------------------------------------------------------------------------------------------------+
50
// +------------------------------------------------------------------------------------------------------+
51
class recherche_nom_vernaculaire_xhtml implements iVue {
51
class recherche_nom_vernaculaire_xhtml implements iVue {
52
    
52
    
53
    protected $leBlock;
53
    protected $leBlock;
54
    
54
    
55
    function __construct($unBlock)
55
    function __construct($unBlock)
56
    {
56
    {
57
        $this->leBlock = $unBlock;
57
        $this->leBlock = $unBlock;
58
    }
58
    }
59
    
59
    
60
    function serialiser()
60
    function serialiser()
61
    {
61
    {
62
        $retour = '<?xml version="1.0" encoding="iso-8859-15" ?>'."\n";
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";
63
        $retour .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "../../../commun/generique/dtd/xhtml1-strict.dtd">'."\n";
64
        $retour .= '<html xmlns="http://w ww.w3.org/1999/xhtml" lang="fr" >'."\n";
64
        $retour .= '<html xmlns="http://w ww.w3.org/1999/xhtml" lang="fr" >'."\n";
65
        
65
        
66
        $retour .= '<head>'."\n";
66
        $retour .= '<head>'."\n";
67
        $retour .= '<!-- BEGIN entete -->'."\n";
67
        $retour .= '<!-- BEGIN entete -->'."\n";
68
        $retour .= '<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" />'."\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";
69
        $retour .= '<meta http-equiv="Content-style-type" content="text/css" />'."\n";
70
        $retour .= '<meta http-equiv="Content-script-type" content="text/javascript />'."\n";
70
        $retour .= '<meta http-equiv="Content-script-type" content="text/javascript />'."\n";
71
        $retour .= '<meta http-equiv="Content-language" content="fr" />'."\n";
71
        $retour .= '<meta http-equiv="Content-language" content="fr" />'."\n";
72
        $retour .= '<title>Liste de noms latins</title>'."\n";
72
        $retour .= '<title>Liste de noms latins</title>'."\n";
73
        $retour .= '<!-- END entete -->'."\n";
73
        $retour .= '<!-- END entete -->'."\n";
74
        $retour .= '</head>'."\n";
74
        $retour .= '</head>'."\n";
75
        
75
        
76
        $retour .= '<body>'."\n";
76
        $retour .= '<body>'."\n";
77
        $retour .= '<!-- BEGIN corps -->'."\n";
77
        $retour .= '<!-- BEGIN corps -->'."\n";
78
        $retour .= '<h1>'.'Liste des noms vernaculaires'.'</h1>'."\n";
78
        $retour .= '<h1>'.'Liste des noms vernaculaires'.'</h1>'."\n";
79
        $retour .= '<table>'."\n";
79
        $retour .= '<table id="eflore_table_resultat_nv">'."\n";
80
        $retour .= '<caption>';
80
        $retour .= '<caption>';
81
        $retour .= 'Liste des noms vernaculaires correspondant au radical "';
81
        $retour .= 'Liste des noms vernaculaires correspondant au radical "';
82
        $retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS_VERNA','afficherRadical');
82
        $retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS_VERNA','afficherRadical');
83
        $retour .= '"</caption>'."\n";
83
        $retour .= '"</caption>'."\n";
84
        $retour .= '<thead>'."\n";
84
        $retour .= '<thead>'."\n";
85
        $retour .= '<tr><th>'.'N°'.'</th><th>'.'Langue'.'</th><th>'.'Pays'.'</th><th>'.'Nom vernaculaire'.'</th><th>'.'Nom latin correspondant'.'</th></tr>'."\n";
85
        $retour .= '<tr><th>'.'N°'.'</th><th>'.'Langue'.'</th><th>'.'Pays'.'</th><th>'.'Nom vernaculaire'.'</th><th>'.'Nom latin correspondant'.'</th></tr>'."\n";
86
        $retour .= '</thead>'."\n";
86
        $retour .= '</thead>'."\n";
87
        $retour .= '<tbody>'."\n";
87
        $retour .= '<tbody>'."\n";
88
        $retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS_VERNA>VERNACULAIRE_RECHERCHE','afficherNomVerna');
88
        $retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS_VERNA>VERNACULAIRE_RECHERCHE','afficherNomVerna');
89
        $retour .= '</tbody>'."\n";
89
        $retour .= '</tbody>'."\n";
90
        $retour .= '</table>'."\n";
90
        $retour .= '</table>'."\n";
91
        $retour .= '<!-- END corps -->'."\n";
91
        $retour .= '<!-- END corps -->'."\n";
92
        $retour .= '</body>'."\n";
92
        $retour .= '</body>'."\n";
93
        $retour .= '</html>'."\n";
93
        $retour .= '</html>'."\n";
94
        
94
        
95
        // Envoi au navigateur après encodage en entité des caractères posant problème
95
        // Envoi au navigateur après encodage en entité des caractères posant problème
96
        echo remplaceEntiteHTLM($retour);
96
        echo remplaceEntiteHTLM($retour);
97
    }
97
    }
98
}
98
}
99
 
99
 
100
// +------------------------------------------------------------------------------------------------------+
100
// +------------------------------------------------------------------------------------------------------+
101
// |                                            LISTE des FONCTIONS                                       |
101
// |                                            LISTE des FONCTIONS                                       |
102
// +------------------------------------------------------------------------------------------------------+
102
// +------------------------------------------------------------------------------------------------------+
103
function afficherRadical($donnees)
103
function afficherRadical($donnees)
104
{
104
{
105
    return $donnees['radical'];
105
    return $donnees['radical'];
106
}
106
}
107
 
107
 
108
function afficherNomVerna($donnees)
108
function afficherNomVerna($donnees)
109
{
109
{
110
    $retour .= '<tr>'."\n";
110
    $retour .= '<tr>'."\n";
111
    $retour .= '<td>'.$GLOBALS['num_nom_verna']++.'</td>'."\n";
111
    $retour .= '<td>'.$GLOBALS['num_nom_verna']++.'</td>'."\n";
112
    $retour .= '<td title="'.$donnees['ezg_intitule_principal_zg'].'">'.$donnees['ezg_code_zg'].'</td>'."\n";
112
    $retour .= '<td><abbr title="'.$donnees['ezg_intitule_principal_zg'].'">'.$donnees['ezg_code_zg'].'</abbr></td>'."\n";
113
    $retour .= '<td title="'.$donnees['el_nom_langue_principal'].'">'.$donnees['el_code_langue'].'</td>'."\n";
113
    $retour .= '<td><abbr title="'.$donnees['el_nom_langue_principal'].'">'.$donnees['el_code_langue'].'</abbr></td>'."\n";
114
    $retour .= '<td>'.$donnees['ev_intitule_nom_vernaculaire'].'</td>'."\n";
114
    $retour .= '<td>'.$donnees['ev_intitule_nom_vernaculaire'].'</td>'."\n";
-
 
115
    if (isset($donnees['esn_ce_statut'])) {
-
 
116
        if ($donnees['esn_ce_statut'] == 3) {//Nom retenu
-
 
117
            $retour .= '<td><strong><a href="func_UrlFicheNom('.$donnees['en_id_nom'].', '.$donnees['et_id_version_projet_taxon'].')">'.$donnees['eni_intitule_nom'].'</a></strong></td>';
-
 
118
        } else {
115
    $retour .= '<td>'.'<a href="func_UrlFicheNom('.$donnees['en_id_nom'].', '.$donnees['et_id_version_projet_taxon'].')">'.$donnees['eni_intitule_nom'].'</a></td>'."\n";
119
            $retour .= '<td><a href="func_UrlFicheNom('.$donnees['en_id_nom'].', '.$donnees['esn_id_version_projet_taxon'].')">'.$donnees['eni_intitule_nom'].'</a></td>';
-
 
120
        }
-
 
121
    }
116
    $retour .= '</tr>'."\n";
122
    $retour .= '</tr>'."\n";
117
    return $retour;
123
    return $retour;
118
}
124
}
119
 
125
 
120
// +------------------------------------------------------------------------------------------------------+
126
// +------------------------------------------------------------------------------------------------------+
121
// |                                            PIED du PROGRAMME                                         |
127
// |                                            PIED du PROGRAMME                                         |
122
// +------------------------------------------------------------------------------------------------------+
128
// +------------------------------------------------------------------------------------------------------+
123
 
129
 
124
 
130
 
125
/* +--Fin du code ----------------------------------------------------------------------------------------+
131
/* +--Fin du code ----------------------------------------------------------------------------------------+
126
*
132
*
127
* $Log: not supported by cvs2svn $
133
* $Log: not supported by cvs2svn $
-
 
134
* Revision 1.2  2005/01/28 19:47:09  jpm
-
 
135
* Amélioration du rendu par ajout d'entité à la place des caractères posant pb et changement de l'encodage.
-
 
136
*
128
* Revision 1.1  2005/01/26 10:45:33  jpm
137
* Revision 1.1  2005/01/26 10:45:33  jpm
129
* Ajout des résultats de recherche par noms vernaculaires.
138
* Ajout des résultats de recherche par noms vernaculaires.
130
*
139
*
131
*
140
*
132
* +-- Fin du code ----------------------------------------------------------------------------------------+
141
* +-- Fin du code ----------------------------------------------------------------------------------------+
133
*/
142
*/
134
?>
143
?>