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) 2005 Tela Botanica (accueil@tela-botanica.org) |
|
6 |
// | Copyright (C) 2005 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: formulaire_nomenclatural_xhtml.php,v 1.2 2005-06-30 15:25:07 jpm Exp $
|
24 |
// CVS : $Id: formulaire_nomenclatural_xhtml.php,v 1.3 2005-08-25 14:35:59 ddelon Exp $
|
25 |
/**
|
25 |
/**
|
26 |
* Vue affichant le formulaire de recherche nomenclaturale.
|
26 |
* Vue affichant le formulaire de recherche nomenclaturale.
|
27 |
*
|
27 |
*
|
28 |
* Permet de retourner le xhtml correspondant au formulaire de recherche nomenclaturale.
|
28 |
* Permet de retourner le xhtml correspondant au formulaire de recherche nomenclaturale.
|
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-2005
|
36 |
*@copyright Tela-Botanica 2000-2005
|
37 |
*@version $Revision: 1.2 $ $Date: 2005-06-30 15:25:07 $
|
37 |
*@version $Revision: 1.3 $ $Date: 2005-08-25 14:35:59 $
|
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 formulaire_nomenclatural_xhtml implements iVue {
|
49 |
class formulaire_nomenclatural_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>Formulaire de recherche nomenclaturale</title>'."\n";
|
70 |
$retour .= '<title>Formulaire de recherche nomenclaturale</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 .= '<h2>'.'Rechercher une plante par son nom'.'</h2>'."\n";
|
76 |
$retour .= '<h2>'.'Rechercher une plante par son nom'.'</h2>'."\n";
|
77 |
$retour .= '<form id="eflore_form_nomenclature" name="eflore_form_nomenclature" action="{UrlProjetNom}" method="post">'."\n";
|
77 |
$retour .= '<form id="eflore_form_nomenclature" name="eflore_form_nomenclature" action="{UrlProjetNom}" method="post">'."\n";
|
78 |
$retour .= '<fieldset>'."\n".'<legend>'.'Recherche par nom'.'</legend>'."\n";
|
78 |
$retour .= '<fieldset>'."\n".'<legend>'.'Recherche par nom'.'</legend>'."\n";
|
79 |
$retour .= '<ul>'."\n";
|
79 |
$retour .= '<ul>'."\n";
|
80 |
$retour .= '<li><label for="eflore_nom">'.'Nom : '.'</label>'."\n";
|
80 |
$retour .= '<li><label for="eflore_nom">'.'Nom : '.'</label>'."\n";
|
81 |
$retour .= '<input id="eflore_nom" name="eflore_nom" class="champ" tabindex="1000" size="45" maxlength="255" onclick="javascript: this.value=\'\';" type="text" value="{eflore_nom}" /></li>'."\n";
|
81 |
$retour .= '<input id="eflore_nom" name="eflore_nom" class="champ" tabindex="1000" size="45" maxlength="255" onclick="javascript: this.value=\'\';" type="text" value="{eflore_nom}" /></li>'."\n";
|
82 |
$retour .= '<li><label for="eflore_referenciel">'.'Référenciel : '.'</label>'."\n";
|
82 |
$retour .= '<li><label for="eflore_referenciel">'.'Référentiel : '.'</label>'."\n";
|
83 |
$retour .= '<select id="eflore_referenciel" name="eflore_referenciel" tabindex="1001">'."\n";
|
83 |
$retour .= '<select id="eflore_referenciel" name="eflore_referenciel" tabindex="1001">'."\n";
|
84 |
$retour .= ' <option value="0" func_selectionnerEfloreRef(0)>'.'Tous'.'</option>'."\n";
|
84 |
$retour .= ' <option value="0" func_selectionnerEfloreRef(0)>'.'Tous'.'</option>'."\n";
|
85 |
$retour .= $this->leBlock->afficherPattern('FORMULAIRE_NOMENCLATURAL>PROJET_VERSION_TOUS','afficherReferenciels', null, TRUE);
|
85 |
$retour .= $this->leBlock->afficherPattern('FORMULAIRE_NOMENCLATURAL>PROJET_VERSION_TOUS','afficherReferenciels', null, TRUE);
|
86 |
$retour .= '</select></li>'."\n";
|
86 |
$retour .= '</select></li>'."\n";
|
87 |
$retour .= '<li>'."\n".'<ul>'."\n";
|
87 |
$retour .= '<li>'."\n".'<ul>'."\n";
|
88 |
$retour .= '<li><input id="eflore_type_nom_scientifique" tabindex="1002" name="eflore_type_nom" value="nom_scientifique" type="radio" {eflore_type_nom_scientifique} />';
|
88 |
$retour .= '<li><input id="eflore_type_nom_scientifique" tabindex="1002" name="eflore_type_nom" value="nom_scientifique" type="radio" {eflore_type_nom_scientifique} />';
|
89 |
$retour .= '<label for="eflore_type_nom_scientifique">nom scientifique</label></li>'."\n";
|
89 |
$retour .= '<label for="eflore_type_nom_scientifique">nom scientifique</label></li>'."\n";
|
90 |
$retour .= '<li><input id="eflore_type_nom_vernaculaire" tabindex="1003" name="eflore_type_nom" value="nom_vernaculaire" type="radio" {eflore_type_nom_vernaculaire} />';
|
90 |
$retour .= '<li><input id="eflore_type_nom_vernaculaire" tabindex="1003" name="eflore_type_nom" value="nom_vernaculaire" type="radio" {eflore_type_nom_vernaculaire} />';
|
91 |
$retour .= '<label for="eflore_type_nom_vernaculaire">nom vernaculaire</label></li>'."\n";
|
91 |
$retour .= '<label for="eflore_type_nom_vernaculaire">nom vernaculaire</label></li>'."\n";
|
92 |
$retour .= '</ul>'."\n".'</li>'."\n";
|
92 |
$retour .= '</ul>'."\n".'</li>'."\n";
|
93 |
$retour .= '<li><input id="eflore_nomenclature_submit" type="submit" value="'.'OK'.'" /></li>'."\n";
|
93 |
$retour .= '<li><input id="eflore_nomenclature_submit" type="submit" value="'.'OK'.'" /></li>'."\n";
|
94 |
$retour .= '</ul>'."\n";
|
94 |
$retour .= '</ul>'."\n";
|
95 |
$retour .= '</fieldset>'."\n";
|
95 |
$retour .= '</fieldset>'."\n";
|
96 |
$retour .= '</form>'."\n";
|
96 |
$retour .= '</form>'."\n";
|
97 |
$retour .= '<!-- END corps -->'."\n";
|
97 |
$retour .= '<!-- END corps -->'."\n";
|
98 |
$retour .= '</body>'."\n";
|
98 |
$retour .= '</body>'."\n";
|
99 |
$retour .= '</html>'."\n";
|
99 |
$retour .= '</html>'."\n";
|
100 |
|
100 |
|
101 |
// Envoi au navigateur après encodage en entité des caractères posant problème
|
101 |
// Envoi au navigateur après encodage en entité des caractères posant problème
|
102 |
echo remplaceEntiteHTLM($retour);
|
102 |
echo remplaceEntiteHTLM($retour);
|
103 |
}
|
103 |
}
|
104 |
}
|
104 |
}
|
105 |
|
105 |
|
106 |
// +------------------------------------------------------------------------------------------------------+
|
106 |
// +------------------------------------------------------------------------------------------------------+
|
107 |
// | LISTE des FONCTIONS |
|
107 |
// | LISTE des FONCTIONS |
|
108 |
// +------------------------------------------------------------------------------------------------------+
|
108 |
// +------------------------------------------------------------------------------------------------------+
|
109 |
function afficherReferenciels($donnees)
|
109 |
function afficherReferenciels($donnees)
|
110 |
{
|
110 |
{
|
111 |
//$retour .= '<pre>'.print_r($donnees, true).'</pre>';
|
111 |
//$retour .= '<pre>'.print_r($donnees, true).'</pre>';
|
112 |
$retour .= ' <option value="'.$donnees['PROJET_VERSION_TOUS']['eprv_id_version'].'" func_selectionnerEfloreRef('.$donnees['PROJET_VERSION_TOUS']['eprv_id_version'].')>';
|
112 |
$retour .= ' <option value="'.$donnees['PROJET_VERSION_TOUS']['eprv_id_version'].'" func_selectionnerEfloreRef('.$donnees['PROJET_VERSION_TOUS']['eprv_id_version'].')>';
|
113 |
$retour .= $donnees['PROJET_VERSION_TOUS']['eprv_nom'].' ('.$donnees['PROJET_VERSION_TOUS']['eprv_code_version'].') - '.$donnees['PROJET_VERSION_TOUS']['epr_intitule_projet'];
|
113 |
$retour .= $donnees['PROJET_VERSION_TOUS']['eprv_nom'].' ('.$donnees['PROJET_VERSION_TOUS']['eprv_code_version'].') - '.$donnees['PROJET_VERSION_TOUS']['epr_intitule_projet'];
|
114 |
$retour .= '</option>'."\n";
|
114 |
$retour .= '</option>'."\n";
|
115 |
return $retour;
|
115 |
return $retour;
|
116 |
}
|
116 |
}
|
117 |
|
117 |
|
118 |
// +------------------------------------------------------------------------------------------------------+
|
118 |
// +------------------------------------------------------------------------------------------------------+
|
119 |
// | PIED du PROGRAMME |
|
119 |
// | PIED du PROGRAMME |
|
120 |
// +------------------------------------------------------------------------------------------------------+
|
120 |
// +------------------------------------------------------------------------------------------------------+
|
121 |
|
121 |
|
122 |
|
122 |
|
123 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
123 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
124 |
*
|
124 |
*
|
125 |
* $Log: not supported by cvs2svn $
|
125 |
* $Log: not supported by cvs2svn $
|
- |
|
126 |
* Revision 1.2 2005/06/30 15:25:07 jpm
|
- |
|
127 |
* Début des modifications pour ajout de l'arborescence de la classif.
|
- |
|
128 |
*
|
126 |
* Revision 1.1 2005/06/09 18:09:52 jpm
|
129 |
* Revision 1.1 2005/06/09 18:09:52 jpm
|
127 |
* Début gestion des référenciels dans la recherche nomenclaturale.
|
130 |
* Début gestion des référenciels dans la recherche nomenclaturale.
|
128 |
*
|
131 |
*
|
129 |
* Revision 1.6 2005/03/15 15:11:07 jpm
|
132 |
* Revision 1.6 2005/03/15 15:11:07 jpm
|
130 |
* Ajout d'une sélection par défaut pour le choix de l'ordre.
|
133 |
* Ajout d'une sélection par défaut pour le choix de l'ordre.
|
131 |
*
|
134 |
*
|
132 |
* Revision 1.5 2005/03/15 14:45:59 tam
|
135 |
* Revision 1.5 2005/03/15 14:45:59 tam
|
133 |
* modifs labels
|
136 |
* modifs labels
|
134 |
*
|
137 |
*
|
135 |
* Revision 1.2 2005/02/09 13:06:52 jpm
|
138 |
* Revision 1.2 2005/02/09 13:06:52 jpm
|
136 |
* Modification pour utiliser le macro-élément PROJET_VERSION_TOUS.
|
139 |
* Modification pour utiliser le macro-élément PROJET_VERSION_TOUS.
|
137 |
*
|
140 |
*
|
138 |
* Revision 1.1 2005/01/28 19:45:44 jpm
|
141 |
* Revision 1.1 2005/01/28 19:45:44 jpm
|
139 |
* Début recheche taxons.
|
142 |
* Début recheche taxons.
|
140 |
*
|
143 |
*
|
141 |
* Revision 1.1 2005/01/26 10:45:33 jpm
|
144 |
* Revision 1.1 2005/01/26 10:45:33 jpm
|
142 |
* Ajout des résultats de recherche par noms vernaculaires.
|
145 |
* Ajout des résultats de recherche par noms vernaculaires.
|
143 |
*
|
146 |
*
|
144 |
*
|
147 |
*
|
145 |
* +-- Fin du code ----------------------------------------------------------------------------------------+
|
148 |
* +-- Fin du code ----------------------------------------------------------------------------------------+
|
146 |
*/
|
149 |
*/
|
147 |
?>
|
150 |
?>
|