Subversion Repositories eFlore/Archives.eflore-consultation-v2

Rev

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

Rev Author Line No. Line
170 jpm 1
<?php
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */
3
// +------------------------------------------------------------------------------------------------------+
4
// | PHP version 5.0.3                                                                                    |
5
// +------------------------------------------------------------------------------------------------------+
6
// | Copyright (C) 2005 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
// +------------------------------------------------------------------------------------------------------+
173 jpm 24
// CVS : $Id: formulaire_nomenclatural_xhtml.php,v 1.2 2005-06-30 15:25:07 jpm Exp $
170 jpm 25
/**
26
* Vue affichant le formulaire de recherche nomenclaturale.
27
*
28
* Permet de retourner le xhtml correspondant au formulaire de recherche nomenclaturale.
29
*
30
*@package eFlore
31
*@subpackage Vues
32
//Auteur original :
33
*@author        Frédéric LEGENS <flegens@free.fr>
34
//Autres auteurs :
35
*@author        Jean-Pascal MILCENT <jpm@tela-botanica.org>
36
*@copyright     Tela-Botanica 2000-2005
173 jpm 37
*@version       $Revision: 1.2 $ $Date: 2005-06-30 15:25:07 $
170 jpm 38
// +------------------------------------------------------------------------------------------------------+
39
*/
40
 
41
// +------------------------------------------------------------------------------------------------------+
42
// |                                            ENTETE du PROGRAMME                                       |
43
// +------------------------------------------------------------------------------------------------------+
44
require_once EFSE_CHEMIN_FONCTION.'eribo_encodage.fonct.php';
45
 
46
// +------------------------------------------------------------------------------------------------------+
47
// |                                            CLASSE de la VUE                                          |
48
// +------------------------------------------------------------------------------------------------------+
49
class formulaire_nomenclatural_xhtml implements iVue {
50
 
51
    protected $leBlock;
52
 
53
    function __construct($unBlock)
54
    {
55
        $this->leBlock = $unBlock;
56
    }
57
 
58
    function serialiser()
59
    {
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";
62
        $retour .= '<html xmlns="http://w ww.w3.org/1999/xhtml" lang="fr" >'."\n";
63
 
64
        $retour .= '<head>'."\n";
65
        $retour .= '<!-- BEGIN entete -->'."\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";
68
        $retour .= '<meta http-equiv="Content-script-type" content="text/javascript />'."\n";
69
        $retour .= '<meta http-equiv="Content-language" content="fr" />'."\n";
70
        $retour .= '<title>Formulaire de recherche nomenclaturale</title>'."\n";
71
        $retour .= '<!-- END entete -->'."\n";
72
        $retour .= '</head>'."\n";
73
 
74
        $retour .= '<body>'."\n";
75
        $retour .= '<!-- BEGIN corps -->'."\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";
78
        $retour .= '<fieldset>'."\n".'<legend>'.'Recherche par nom'.'</legend>'."\n";
79
        $retour .= '<ul>'."\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";
82
        $retour .= '<li><label for="eflore_referenciel">'.'Référenciel : '.'</label>'."\n";
83
        $retour .= '<select id="eflore_referenciel" name="eflore_referenciel" tabindex="1001">'."\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);
86
        $retour .= '</select></li>'."\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} />';
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} />';
91
        $retour .= '<label for="eflore_type_nom_vernaculaire">nom vernaculaire</label></li>'."\n";
92
        $retour .= '</ul>'."\n".'</li>'."\n";
93
        $retour .= '<li><input id="eflore_nomenclature_submit" type="submit" value="'.'OK'.'" /></li>'."\n";
94
        $retour .= '</ul>'."\n";
95
        $retour .= '</fieldset>'."\n";
96
        $retour .= '</form>'."\n";
97
        $retour .= '<!-- END corps -->'."\n";
98
        $retour .= '</body>'."\n";
99
        $retour .= '</html>'."\n";
100
 
101
        // Envoi au navigateur après encodage en entité des caractères posant problème
102
        echo remplaceEntiteHTLM($retour);
103
    }
104
}
105
 
106
// +------------------------------------------------------------------------------------------------------+
107
// |                                            LISTE des FONCTIONS                                       |
108
// +------------------------------------------------------------------------------------------------------+
109
function afficherReferenciels($donnees)
110
{
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'].')>';
173 jpm 113
    $retour .= $donnees['PROJET_VERSION_TOUS']['eprv_nom'].' ('.$donnees['PROJET_VERSION_TOUS']['eprv_code_version'].') - '.$donnees['PROJET_VERSION_TOUS']['epr_intitule_projet'];
170 jpm 114
    $retour .= '</option>'."\n";
115
    return $retour;
116
}
117
 
118
// +------------------------------------------------------------------------------------------------------+
119
// |                                            PIED du PROGRAMME                                         |
120
// +------------------------------------------------------------------------------------------------------+
121
 
122
 
123
/* +--Fin du code ----------------------------------------------------------------------------------------+
124
*
125
* $Log: not supported by cvs2svn $
173 jpm 126
* Revision 1.1  2005/06/09 18:09:52  jpm
127
* Début gestion des référenciels dans la recherche nomenclaturale.
128
*
170 jpm 129
* 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.
131
*
132
* Revision 1.5  2005/03/15 14:45:59  tam
133
* modifs labels
134
*
135
* Revision 1.2  2005/02/09 13:06:52  jpm
136
* Modification pour utiliser le macro-élément PROJET_VERSION_TOUS.
137
*
138
* Revision 1.1  2005/01/28 19:45:44  jpm
139
* Début recheche taxons.
140
*
141
* Revision 1.1  2005/01/26 10:45:33  jpm
142
* Ajout des résultats de recherche par noms vernaculaires.
143
*
144
*
145
* +-- Fin du code ----------------------------------------------------------------------------------------+
146
*/
147
?>