Subversion Repositories eFlore/Archives.eflore-consultation-v2

Compare Revisions

Ignore whitespace Rev 117 → Rev 118

/trunk/serveur/eflore_mv/vues/recherche_nom_latin_xhtml.php
1,24 → 1,50
<?php
global $gBlock;
/*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.3 2005-01-26 10:45:13 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.3 $ $Date: 2005-01-26 10:45:13 $
// +------------------------------------------------------------------------------------------------------+
*/
 
function pattern1($donnees)
{
$retour .= '<h2>'.'Résumer de la recherche :'.'</h2>'."\n";
$retour .= '<p>'."\n";
$retour .= 'Radical : '.$donnees['radical']."\n";
if ($donnees['rang'] != '' || $donnees['rang'] != 0) {
$retour .= ' - Rang : '.$donnees['rang']."\n";
}
$retour .= '</p>'."\n";
return $retour;
}
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
function pattern2($donnees)
{
$retour .= '<li><a href="{UrlFicheNom}'.$donnees['en_id_nom'].'">'.$donnees['eni_intitule_nom'].'</a></li>'."\n";
return $retour;
}
 
// +------------------------------------------------------------------------------------------------------+
// | CLASSE de la VUE |
// +------------------------------------------------------------------------------------------------------+
class recherche_nom_latin_xhtml implements iVue {
protected $leBlock;
47,9 → 73,9
$retour .= '<body>'."\n";
$retour .= '<!-- BEGIN corps -->'."\n";
$retour .= '<h1>'.'Liste des noms'.'</h1>'."\n";
$retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS','pattern1');
$retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS','afficherResumerRecherche');
$retour .= '<ol>'."\n";
$retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS>NOM_RECHERCHE','pattern2');
$retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS>NOM_RECHERCHE','afficherNom');
$retour .= '</ol>'."\n";
$retour .= '<!-- END corps -->'."\n";
$retour .= '</body>'."\n";
56,34 → 82,38
$retour .= '</html>'."\n";
echo $retour;
}
function serialiser2()
{
$gBlock = $this->leBlock;
$retour = '';
$retour .= '<h3>'.'Test'.'</h3>';
$retour .= '<ol>';
$donnees = $this->leBlock->recupererDonnees();
foreach ($donnees as $cle => $valeur) {
$retour .= '<li>'.$cle.' : '.$valeur;
}
$retour .= '</ol>';
$block_fils = $this->leBlock->recupererCollectionBlockFils();
for($i = 0; $i < count($block_fils); $i++) {
$collection = $block_fils[$i];
$blocks = $collection->recupererBlocksDeDonnees();
foreach ($blocks as $cle => $valeur) {
$donnees = $valeur->recupererDonnees();
$retour .= '<ol>';
foreach ($donnees as $cle1 => $valeur1) {
$retour .= '<li>'.$cle1.' : '.$valeur1;
}
$retour .= '</ol>';
}
}
echo $retour;
}
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE des FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
function afficherResumerRecherche($donnees)
{
$retour .= '<h2>'.'Résumer de la recherche :'.'</h2>'."\n";
$retour .= '<p>'."\n";
$retour .= 'Radical : '.$donnees['radical']."\n";
if ($donnees['rang'] != '' || $donnees['rang'] != 0) {
$retour .= ' - Rang : '.$donnees['rang']."\n";
}
$retour .= '</p>'."\n";
return $retour;
}
 
function afficherNom($donnees)
{
$retour .= '<li><a href="{UrlFicheNom}'.$donnees['en_id_nom'].'">'.$donnees['eni_intitule_nom'].'</a></li>'."\n";
return $retour;
}
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>