Rev 170 | 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: recherche_nom_latin_xhtml.php,v 1.7 2005-06-30 15:25:07 jpm Exp $/*** Vue affichant la liste des noms latins correspondant à un radical recherché.** Permet de retourner le html correspondant à la liste des noms latins correspondant à un radical recherché.**@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.7 $ $Date: 2005-06-30 15:25:07 $// +------------------------------------------------------------------------------------------------------+*/// +------------------------------------------------------------------------------------------------------+// | ENTETE du PROGRAMME |// +------------------------------------------------------------------------------------------------------+/* Inclusion du fichier permettant de gérer l'encodage des noms vernaculaires*/require_once EFSE_CHEMIN_FONCTION.'eribo_encodage.fonct.php';/* Variable stockant le nombre de noms latins actuellement affichés*/$GLOBALS['_NOM_LATIN_']['num'] = 0;/* Variable permettant de savoir si on a déjà afficher l'entête de la liste des noms latins*/$GLOBALS['_NOM_LATIN_']['tete'] = true;/* Variable permettant de savoir si on a déjà afficher le pied de la liste des noms latins*/$GLOBALS['_NOM_LATIN_']['pied'] = true;// +------------------------------------------------------------------------------------------------------+// | CLASSE de la VUE |// +------------------------------------------------------------------------------------------------------+class recherche_nom_latin_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>Liste de noms latins</title>'."\n";$retour .= '<!-- END entete -->'."\n";$retour .= '</head>'."\n";$retour .= '<body>'."\n";$retour .= '<!-- BEGIN corps -->'."\n";$retour .= '<h1>'.'Liste des noms trouvés'.'</h1>'."\n";$retour .= '<h2>'.'Résumé de la recherche :'.'</h2>'."\n";$retour .= '<dl>'."\n";$retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS','afficherRadicalRang');$retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS>PROJET_VERSION','afficherResumerRecherche');$retour .= '</dl>'."\n";$retour .= '<ol>'."\n";$retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS>NOM_RECHERCHE','afficherNom');$retour .= '</ol>'."\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 afficherRadicalRang($donnees){//$retour = '<pre>'.print_r($donnees, true).'</pre>';$retour = '<dt>'.'Radical : '.'</dt>'."\n";$retour .= '<dd>'.$donnees['radical'].'</dd>'."\n";if ($donnees['rang'] != '' || $donnees['rang'] != 0) {$retour .= '<dt>'.'Rang : '.'</dt>'."\n";$retour .= '<dd>'.$donnees['rang'].'</dd>'."\n";}return $retour;}function afficherResumerRecherche($donnees){//$retour .= '<pre>'.print_r($donnees, true).'</pre>';$retour = '';if (!empty($donnees['epr_intitule_projet'])) {$retour .= '<dt>'.'Référentiel : '.'</dt>'."\n";$retour .= '<dd>'.$donnees['epr_intitule_projet'].' - Version : '.$donnees['eprv_code_version'].'</dd>'."\n";}return $retour;}function afficherListeEntete($donnees){$retour = '';if ($GLOBALS['_NOM_LATIN_']['tete'] == true) {$GLOBALS['_NOM_LATIN_']['tete'] = false;$retour .= '<ol>'."\n";}return $retour;}function afficherNom($donnees){//$retour = '<pre>'.print_r($donnees, true).'</pre>';++$GLOBALS['_NOM_LATIN_']['num'];$retour = '<li>';if (isset($donnees['esn_ce_statut'])) {if ($donnees['esn_ce_statut'] == 3) {//Nom retenu$retour .= '<strong><a href="func_UrlFicheNom('.$donnees['en_id_nom'].', '.$donnees['esn_id_version_projet_taxon'].')">'.$donnees['eni_intitule_nom'].'</a></strong>';} else {$retour .= '<a href="func_UrlFicheNom('.$donnees['en_id_nom'].', '.$donnees['esn_id_version_projet_taxon'].')">'.$donnees['eni_intitule_nom'].'</a>';}} else {$retour .= '<a href="{UrlFicheNom}'.$donnees['en_id_nom'].'">'.$donnees['eni_intitule_nom'].'</a>';}$retour .= '</li>'."\n";return $retour;}function afficherListePied($donnees){$retour = '';if ($GLOBALS['_NOM_LATIN_']['pied'] == true) {$GLOBALS['_NOM_LATIN_']['pied'] = false;$retour .= '</ol>'."\n";}return $retour;}function afficherMessage($donnees = array()){$retour = '';if ($GLOBALS['_NOM_LATIN_']['num'] == 0) {$retour .= '<p class="information">'.'Aucun nom latin ne correspond à ce radical!'.'</p>'."\n";}return $retour;}// +------------------------------------------------------------------------------------------------------+// | PIED du PROGRAMME |// +------------------------------------------------------------------------------------------------------+/* +--Fin du code ----------------------------------------------------------------------------------------+** $Log: not supported by cvs2svn $* Revision 1.6 2005/06/09 18:09:52 jpm* Début gestion des référenciels dans la recherche nomenclaturale.** Revision 1.5 2005/03/15 13:45:42 tam* modifs labels** Revision 1.4 2005/01/28 19:47:09 jpm* Amélioration du rendu par ajout d'entité à la place des caractères posant pb et changement de l'encodage.** Revision 1.3 2005/01/26 10:45:13 jpm* Ajout de commentaires d'entête.*** +-- Fin du code ----------------------------------------------------------------------------------------+*/?>