59 |
jpm |
1 |
<?php
|
|
|
2 |
/*vim: set expandtab tabstop=4 shiftwidth=4: */
|
|
|
3 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
4 |
// | PHP version 4.3 |
|
|
|
5 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
6 |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
|
|
|
7 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
8 |
// | This file is part of eFlore-consultation. |
|
|
|
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 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
24 |
// CVS : $Id: eflore_recherche_nomenclature.inc.php,v 1.1 2004-12-23 20:05:17 jpm Exp $
|
|
|
25 |
/**
|
|
|
26 |
* Affichage du moteur de recherche nomenclatural et de ses résultats.
|
|
|
27 |
*
|
|
|
28 |
* Ce script fournit le code html correspondant aux moteurs de recherche nomenclatural et ses résultats.
|
|
|
29 |
*
|
|
|
30 |
*@package eFlore
|
|
|
31 |
//Auteur original :
|
|
|
32 |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
|
|
33 |
//Autres auteurs :
|
|
|
34 |
*@author Aucun
|
|
|
35 |
*@copyright Tela-Botanica 2000-2004
|
|
|
36 |
*@version $Revision: 1.1 $ $Date: 2004-12-23 20:05:17 $
|
|
|
37 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
38 |
*/
|
|
|
39 |
|
|
|
40 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
41 |
// | ENTÊTE du PROGRAMME |
|
|
|
42 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
43 |
|
|
|
44 |
|
|
|
45 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
46 |
// | CORPS du PROGRAMME |
|
|
|
47 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
48 |
$sortie .= '<h2>'.EFLORE_LG_RECH_NOM_TITRE.'</h2>';
|
|
|
49 |
|
|
|
50 |
// --------------------------------------------------------------------------------------------------------
|
|
|
51 |
// Création du formulaire
|
|
|
52 |
$sortie .= '<ul>';
|
|
|
53 |
// Notes : Quickform semble remplacer les & des & à nouveau par des & solution utiliser str_replace()...
|
|
|
54 |
$form =& new HTML_QuickForm('eflore_form_nomenclature', 'post', str_replace('&', '&', $GLOBALS['_EFLORE_']['objet_pear_url']->getUrl()));
|
|
|
55 |
$tab_index = MORE_FORM_MOTIF_TAB;
|
|
|
56 |
$squelette =& $form->defaultRenderer();
|
|
|
57 |
$squelette->setFormTemplate("\n".'<form{attributes}>'."\n".'{content}'."\n".'</form>');
|
|
|
58 |
$squelette->setElementTemplate( '<li>'."\n".
|
|
|
59 |
'{label}'."\n".
|
|
|
60 |
'{element}'."\n".
|
|
|
61 |
'<!-- BEGIN required --><span class="symbole_obligatoire">'.MORE_LG_FORM_SYMBOLE_OBLIGATOIRE.'</span><!-- END required -->'."\n".
|
|
|
62 |
'<!-- BEGIN error --><span class="erreur">{error}</span><!-- END error -->'.
|
|
|
63 |
'</li>'."\n");
|
|
|
64 |
//$squelette->setRequiredNoteTemplate("\n".'<p><span class="symbole_obligatoire">'.MORE_LG_FORM_SYMBOLE_OBLIGATOIRE.'</span> {requiredNote}</p>'."\n");
|
|
|
65 |
|
|
|
66 |
$partie_menu_debut = '<fieldset>'."\n".'<legend>'.EFLORE_LG_RECH_NOM_FORM_TITRE.'</legend>'."\n";
|
|
|
67 |
$form->addElement('html', $partie_menu_debut);
|
|
|
68 |
|
|
|
69 |
$id = 'eflore_nom';
|
|
|
70 |
$aso_attributs = array( 'id'=>$id, 'class' => 'champ', 'tabindex' => $tab_index++,
|
|
|
71 |
'size' => EFLORE_RECH_NOM_FORM_NOM_SIZE,
|
|
|
72 |
'maxlength' => EFLORE_RECH_NOM_FORM_NOM_MAXLENGTH,
|
|
|
73 |
'onclick' => "javascript: this.value='';");
|
|
|
74 |
$label = '<label for="'.$id.'">'.EFLORE_LG_RECH_NOM_FORM_NOM.'</label>';
|
|
|
75 |
$form->addElement('text', $id, $label, $aso_attributs);
|
|
|
76 |
|
|
|
77 |
$liste_type_nom_debut = '<ul>'."\n";
|
|
|
78 |
$form->addElement('html', $$liste_type_nom_debut);
|
|
|
79 |
|
|
|
80 |
$id = 'eflore_type_nom';
|
|
|
81 |
$valeur = 'nom_scientifique';
|
|
|
82 |
$aso_attributs = array( 'id'=> $id, 'tabindex' => $tab_index++);
|
|
|
83 |
$label = '';//<label for="'.$id.'">'.EFLORE_LG_RECH_NOM_FORM_.'</label>';
|
|
|
84 |
$form->addElement('radio', $id, $label, EFLORE_LG_RECH_NOM_FORM_TYPE_NOM_SCI, $valeur, $aso_attributs);
|
|
|
85 |
|
|
|
86 |
$id = 'eflore_type_nom';
|
|
|
87 |
$valeur = 'nom_vernaculaire';
|
|
|
88 |
$aso_attributs = array( 'id'=> $id, 'tabindex' => $tab_index++);
|
|
|
89 |
$label = '';//<label for="'.$id.'">'.EFLORE_LG_RECH_NOM_FORM_.'</label>';
|
|
|
90 |
$form->addElement('radio', $id, $label, EFLORE_LG_RECH_NOM_FORM_TYPE_NOM_VER, $valeur, $aso_attributs);
|
|
|
91 |
|
|
|
92 |
$liste_type_nom_fin = '</ul>'."\n";
|
|
|
93 |
$form->addElement('html', $$liste_type_nom_fin);
|
|
|
94 |
|
|
|
95 |
$id = 'eflore_valider';
|
|
|
96 |
$aso_attributs = array('id'=> $id, 'class' => 'champ', 'tabindex' => $tab_index++);
|
|
|
97 |
$form->addElement('submit', $id, EFLORE_LG_RECH_NOM_FORM_VALIDER, $aso_attributs);
|
|
|
98 |
|
|
|
99 |
$partie_entete_fin = "\n".'</fieldset>';
|
|
|
100 |
$form->addElement('html', $partie_entete_fin);
|
|
|
101 |
|
|
|
102 |
// Instanciation avec les valeur par défaut
|
|
|
103 |
$form->setDefaults($_SESSION['_MOTEUR_RECHERCHE_']['rechercher']);
|
|
|
104 |
|
|
|
105 |
// Transformation en XHTML du formulaire
|
|
|
106 |
$sortie .= $form->toHTML()."\n";
|
|
|
107 |
$sortie .= '</ul>';
|
|
|
108 |
|
|
|
109 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
|
|
110 |
*
|
|
|
111 |
* $Log: not supported by cvs2svn $
|
|
|
112 |
*
|
|
|
113 |
* +-- Fin du code ----------------------------------------------------------------------------------------+
|
|
|
114 |
*/
|
|
|
115 |
?>
|