Subversion Repositories eFlore/Archives.eflore-consultation-v2

Rev

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

Rev 125 Rev 163
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_latin_xhtml.php,v 1.4 2005-01-28 19:47:09 jpm Exp $
24
// CVS : $Id: recherche_nom_latin_xhtml.php,v 1.5 2005-03-15 13:45:42 tam Exp $
25
/**
25
/**
26
* Vue affichant la liste des noms latins correspondant à un radical recherché.
26
* Vue affichant la liste des noms latins correspondant à un radical recherché.
27
*
27
*
28
* Permet de retourner le html correspondant à la liste des noms latins correspondant à un radical recherché.
28
* Permet de retourner le html correspondant à la liste des noms latins correspondant à un radical recherché.
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.4 $ $Date: 2005-01-28 19:47:09 $
37
*@version       $Revision: 1.5 $ $Date: 2005-03-15 13:45:42 $
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_nom_latin_xhtml implements iVue {
49
class recherche_nom_latin_xhtml 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
        $retour = '<?xml version="1.0" encoding="iso-8859-15" ?>'."\n";
60
        $retour = '<?xml version="1.0" encoding="iso-8859-15" ?>'."\n";
61
        $retour .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "../../../commun/generique/dtd/xhtml1-strict.dtd">'."\n";
61
        $retour .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "../../../commun/generique/dtd/xhtml1-strict.dtd">'."\n";
62
        $retour .= '<html xmlns="http://w ww.w3.org/1999/xhtml" lang="fr" >'."\n";
62
        $retour .= '<html xmlns="http://w ww.w3.org/1999/xhtml" lang="fr" >'."\n";
63
        
63
        
64
        $retour .= '<head>'."\n";
64
        $retour .= '<head>'."\n";
65
        $retour .= '<!-- BEGIN entete -->'."\n";
65
        $retour .= '<!-- BEGIN entete -->'."\n";
66
        $retour .= '<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" />'."\n";
66
        $retour .= '<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" />'."\n";
67
        $retour .= '<meta http-equiv="Content-style-type" content="text/css" />'."\n";
67
        $retour .= '<meta http-equiv="Content-style-type" content="text/css" />'."\n";
68
        $retour .= '<meta http-equiv="Content-script-type" content="text/javascript />'."\n";
68
        $retour .= '<meta http-equiv="Content-script-type" content="text/javascript />'."\n";
69
        $retour .= '<meta http-equiv="Content-language" content="fr" />'."\n";
69
        $retour .= '<meta http-equiv="Content-language" content="fr" />'."\n";
70
        $retour .= '<title>Liste de noms latins</title>'."\n";
70
        $retour .= '<title>Liste de noms latins</title>'."\n";
71
        $retour .= '<!-- END entete -->'."\n";
71
        $retour .= '<!-- END entete -->'."\n";
72
        $retour .= '</head>'."\n";
72
        $retour .= '</head>'."\n";
73
        
73
        
74
        $retour .= '<body>'."\n";
74
        $retour .= '<body>'."\n";
75
        $retour .= '<!-- BEGIN corps -->'."\n";
75
        $retour .= '<!-- BEGIN corps -->'."\n";
76
        $retour .= '<h1>'.'Liste des noms'.'</h1>'."\n";
76
        $retour .= '<h1>'.'Liste des noms trouvés'.'</h1>'."\n";
77
        $retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS','afficherResumerRecherche');
77
        $retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS','afficherResumerRecherche');
78
        $retour .= '<ol>'."\n";
78
        $retour .= '<ol>'."\n";
79
        $retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS>NOM_RECHERCHE','afficherNom');
79
        $retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS>NOM_RECHERCHE','afficherNom');
80
        $retour .= '</ol>'."\n";
80
        $retour .= '</ol>'."\n";
81
        $retour .= '<!-- END corps -->'."\n";
81
        $retour .= '<!-- END corps -->'."\n";
82
        $retour .= '</body>'."\n";
82
        $retour .= '</body>'."\n";
83
        $retour .= '</html>'."\n";
83
        $retour .= '</html>'."\n";
84
        
84
        
85
        // Envoi au navigateur après encodage en entité des caractères posant problème
85
        // Envoi au navigateur après encodage en entité des caractères posant problème
86
        echo remplaceEntiteHTLM($retour);
86
        echo remplaceEntiteHTLM($retour);
87
    }
87
    }
88
}
88
}
89
 
89
 
90
// +------------------------------------------------------------------------------------------------------+
90
// +------------------------------------------------------------------------------------------------------+
91
// |                                            LISTE des FONCTIONS                                       |
91
// |                                            LISTE des FONCTIONS                                       |
92
// +------------------------------------------------------------------------------------------------------+
92
// +------------------------------------------------------------------------------------------------------+
93
function afficherResumerRecherche($donnees)
93
function afficherResumerRecherche($donnees)
94
{
94
{
95
    $retour .= '<h2>'.'Résumer de la recherche :'.'</h2>'."\n";
95
    $retour .= '<h2>'.'Résumé de la recherche :'.'</h2>'."\n";
96
    $retour .= '<p>'."\n";
96
    $retour .= '<p>'."\n";
97
    $retour .= 'Radical : '.$donnees['radical']."\n";
97
    $retour .= 'Radical : '.$donnees['radical']."\n";
98
    if ($donnees['rang'] != '' || $donnees['rang'] != 0) {
98
    if ($donnees['rang'] != '' || $donnees['rang'] != 0) {
99
        $retour .= ' - Rang : '.$donnees['rang']."\n";
99
        $retour .= ' - Rang : '.$donnees['rang']."\n";
100
    }
100
    }
101
    $retour .= '</p>'."\n";
101
    $retour .= '</p>'."\n";
102
    return $retour;
102
    return $retour;
103
}
103
}
104
 
104
 
105
function afficherNom($donnees)
105
function afficherNom($donnees)
106
{
106
{
107
    $retour .= '<li><a href="{UrlFicheNom}'.$donnees['en_id_nom'].'">'.$donnees['eni_intitule_nom'].'</a></li>'."\n";
107
    $retour .= '<li><a href="{UrlFicheNom}'.$donnees['en_id_nom'].'">'.$donnees['eni_intitule_nom'].'</a></li>'."\n";
108
    return $retour;
108
    return $retour;
109
}
109
}
110
 
110
 
111
// +------------------------------------------------------------------------------------------------------+
111
// +------------------------------------------------------------------------------------------------------+
112
// |                                            PIED du PROGRAMME                                         |
112
// |                                            PIED du PROGRAMME                                         |
113
// +------------------------------------------------------------------------------------------------------+
113
// +------------------------------------------------------------------------------------------------------+
114
 
114
 
115
 
115
 
116
/* +--Fin du code ----------------------------------------------------------------------------------------+
116
/* +--Fin du code ----------------------------------------------------------------------------------------+
117
*
117
*
118
* $Log: not supported by cvs2svn $
118
* $Log: not supported by cvs2svn $
-
 
119
* Revision 1.4  2005/01/28 19:47:09  jpm
-
 
120
* Amélioration du rendu par ajout d'entité à la place des caractères posant pb et changement de l'encodage.
-
 
121
*
119
* Revision 1.3  2005/01/26 10:45:13  jpm
122
* Revision 1.3  2005/01/26 10:45:13  jpm
120
* Ajout de commentaires d'entête.
123
* Ajout de commentaires d'entête.
121
*
124
*
122
*
125
*
123
* +-- Fin du code ----------------------------------------------------------------------------------------+
126
* +-- Fin du code ----------------------------------------------------------------------------------------+
124
*/
127
*/
125
?>
128
?>