Rev 170 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?php/*vim: set expandtab tabstop=4 shiftwidth=4: */// +------------------------------------------------------------------------------------------------------+// | PHP version 5.0.3 |// +------------------------------------------------------------------------------------------------------+// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |// +------------------------------------------------------------------------------------------------------+// | This file is part of eRibo. |// | |// | Foobar is free software; you can redistribute it and/or modify |// | it under the terms of the GNU General Public License as published by |// | the Free Software Foundation; either version 2 of the License, or |// | (at your option) any later version. |// | |// | Foobar is distributed in the hope that it will be useful, |// | but WITHOUT ANY WARRANTY; without even the implied warranty of |// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |// | GNU General Public License for more details. |// | |// | You should have received a copy of the GNU General Public License |// | along with Foobar; if not, write to the Free Software |// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |// +------------------------------------------------------------------------------------------------------+// CVS : $Id: formulaire_taxonomique_xhtml.php,v 1.8 2005-06-30 15:25:07 jpm Exp $/*** Vue affichant le formulaire de recherche taxonomique.** Permet de retourner le xhtml correspondant au formulaire de recherche taxonomique.**@package eFlore*@subpackage Vues//Auteur original :*@author Frédéric LEGENS <flegens@free.fr>//Autres auteurs :*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>*@copyright Tela-Botanica 2000-2004*@version $Revision: 1.8 $ $Date: 2005-06-30 15:25:07 $// +------------------------------------------------------------------------------------------------------+*/// +------------------------------------------------------------------------------------------------------+// | ENTETE du PROGRAMME |// +------------------------------------------------------------------------------------------------------+require_once EFSE_CHEMIN_FONCTION.'eribo_encodage.fonct.php';$GLOBALS['alphabet'] = array();// +------------------------------------------------------------------------------------------------------+// | CLASSE de la VUE |// +------------------------------------------------------------------------------------------------------+class formulaire_taxonomique_xhtml implements iVue {protected $leBlock;function __construct($unBlock){$this->leBlock = $unBlock;}function serialiser(){$retour = '<?xml version="1.0" encoding="iso-8859-15" ?>'."\n";$retour .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "../../../commun/generique/dtd/xhtml1-strict.dtd">'."\n";$retour .= '<html xmlns="http://w ww.w3.org/1999/xhtml" lang="fr" >'."\n";$retour .= '<head>'."\n";$retour .= '<!-- BEGIN entete -->'."\n";$retour .= '<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" />'."\n";$retour .= '<meta http-equiv="Content-style-type" content="text/css" />'."\n";$retour .= '<meta http-equiv="Content-script-type" content="text/javascript />'."\n";$retour .= '<meta http-equiv="Content-language" content="fr" />'."\n";$retour .= '<title>Formulaire de recherche taxonomique</title>'."\n";$retour .= '<!-- END entete -->'."\n";$retour .= '</head>'."\n";$retour .= '<body>'."\n";$retour .= '<!-- BEGIN corps -->'."\n";$retour .= '<h2>'.'Consultation taxonomique'.'</h2>'."\n";$retour .= '<form id="eflore_form_taxonomie" name="eflore_form_taxonomie" action="{UrlProjetTaxon}" method="post">'."\n";$retour .= '<fieldset>'."\n".'<legend>'.'Consultation taxonomique'.'</legend>'."\n";$retour .= '<ul>'."\n";$retour .= '<li><label for="eflore_projet">'.'Référenciel : '.'</label>'."\n";$retour .= '<select id="eflore_projet" name="eflore_projet">'."\n";$retour .= $this->leBlock->afficherPattern('FORMULAIRE_TAXONOMIQUE>PROJET_VERSION_TOUS','afficherProjets', null, TRUE);$retour .= '</select></li>'."\n";$retour .= '<li id="eflore_rang_li"><label for="eflore_rang">'.'Rang : '.'</label>'."\n";$retour .= '<select id="eflore_rang" name="eflore_rang">'."\n";$retour .= $this->leBlock->afficherPattern('FORMULAIRE_TAXONOMIQUE','afficherRang');$retour .= '</select></li>'."\n";$retour .= '<li><input id="eflore_taxonomie_submit" type="submit" value="'.'OK'.'" /></li>'."\n";$retour .= $this->leBlock->afficherPattern('FORMULAIRE_TAXONOMIQUE>TAXON_RECHERCHE','creerAlphabetTaxon');$retour .= afficherAlphabetTaxon();$retour .= '</ul>'."\n";$retour .= '<input id="eflore_ordre" name="eflore_ordre" type="hidden" value="ega" />'."\n";$retour .= '</fieldset>'."\n";$retour .= '</form>'."\n";$retour .= '<!-- END corps -->'."\n";$retour .= '</body>'."\n";$retour .= '</html>'."\n";// Envoi au navigateur après encodage en entité des caractères posant problèmeecho remplaceEntiteHTLM($retour);}}// +------------------------------------------------------------------------------------------------------+// | LISTE des FONCTIONS |// +------------------------------------------------------------------------------------------------------+function afficherProjets($donnees){//$retour .= '<pre>'.print_r($donnees, true).'</pre>';if ($donnees['PROJET_VERSION_TOUS']['eprv_id_version'] == $donnees['FORMULAIRE_TAXONOMIQUE']['nvp']) {$retour .= ' <option value="'.$donnees['PROJET_VERSION_TOUS']['eprv_id_version'].'" selected="selected">';} else {$retour .= ' <option value="'.$donnees['PROJET_VERSION_TOUS']['eprv_id_version'].'">';}$retour .= $donnees['PROJET_VERSION_TOUS']['eprv_nom'].' ('.$donnees['PROJET_VERSION_TOUS']['eprv_code_version'].') - '.$donnees['PROJET_VERSION_TOUS']['epr_intitule_projet'];$retour .= '</option>'."\n";return $retour;}function creerAlphabetTaxon($donnees){$chaine = '';if (!empty($donnees['eni_intitule_nom'])) {$chaine = $donnees['eni_intitule_nom'];}if (isset($chaine{0}) AND !isset($GLOBALS['alphabet'][$chaine{0}])) {$GLOBALS['alphabet'][$chaine{0}] = $chaine{0};}}function afficherAlphabetTaxon(){$retour = '';if (count($GLOBALS['alphabet']) != 0) {$retour .= '</p>'."\n";$retour .= '<p>'."\n";foreach ($GLOBALS['alphabet'] as $cle) {$retour .= '<input id="eflore_lettre" name="eflore_lettre" type="submit" value="'.ucfirst($cle).'" />'."\n";}$retour .= '<input id="eflore_lettre" name="eflore_lettre" type="submit" value="'.'TOUS'.'" />'."\n";}return $retour;}// Fonction afficherOrdre($donnees) inutilisé en mode d'affichage par défautfunction afficherOrdre($donnees){$retour = '';$selected_sup = '';$selected_ega = '';$selected_inf = '';$selected = 'selected="selected"';switch ($donnees['od']) {case 'sup':$selected_sup = $selected;break;case 'ega':$selected_ega = $selected;break;case 'inf':$selected_inf = $selected;break;default:$selected_ega = $selected;break;}$retour .= '<option value="sup" '.$selected_sup.'>'.'Supérieur'.'</option>'."\n";$retour .= '<option value="ega" '.$selected_ega.'>'.'Égal'.'</option>'."\n";$retour .= '<option value="inf" '.$selected_inf.'>'.'Inférieur'.'</option>'."\n";return $retour;}function afficherRang($donnees){$retour = '';$selected_120 = '';$selected_160 = '';$selected_250 = '';$selected_280 = '';$selected = 'selected="selected"';switch ($donnees['rg']) {case 120:$selected_120 = $selected;break;case 160:$selected_160 = $selected;break;case 250:$selected_250 = $selected;break;case 280:$selected_280 = $selected;break;}$retour .= '<option value="120" '.$selected_120.'>'.'Famille'.'</option>'."\n";$retour .= '<option value="160" '.$selected_160.'>'.'Genre'.'</option>'."\n";$retour .= '<option value="250" '.$selected_250.'>'.'Espèce'.'</option>'."\n";$retour .= '<option value="280" '.$selected_280.'>'.'Sous-Espèce'.'</option>'."\n";return $retour;}// +------------------------------------------------------------------------------------------------------+// | PIED du PROGRAMME |// +------------------------------------------------------------------------------------------------------+/* +--Fin du code ----------------------------------------------------------------------------------------+** $Log: not supported by cvs2svn $* Revision 1.7 2005/06/09 18:09:52 jpm* Début gestion des référenciels dans la recherche nomenclaturale.** Revision 1.6 2005/03/15 15:11:07 jpm* Ajout d'une sélection par défaut pour le choix de l'ordre.** Revision 1.5 2005/03/15 14:45:59 tam* modifs labels** Revision 1.2 2005/02/09 13:06:52 jpm* Modification pour utiliser le macro-élément PROJET_VERSION_TOUS.** Revision 1.1 2005/01/28 19:45:44 jpm* Début recheche taxons.** Revision 1.1 2005/01/26 10:45:33 jpm* Ajout des résultats de recherche par noms vernaculaires.*** +-- Fin du code ----------------------------------------------------------------------------------------+*/?>