Subversion Repositories eFlore/Archives.eflore-consultation-v2

Compare Revisions

Ignore whitespace Rev 122 → Rev 123

/trunk/serveur/eflore_mv/vues/formulaire_taxonomique_xhtml.php
New file
0,0 → 1,215
<?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.1 2005-01-28 19:45:44 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.1 $ $Date: 2005-01-28 19:45:44 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | 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>Liste de noms latins</title>'."\n";
$retour .= '<!-- END entete -->'."\n";
$retour .= '</head>'."\n";
$retour .= '<body>'."\n";
$retour .= '<!-- BEGIN corps -->'."\n";
$retour .= '<h2>'.'Rechercher par taxon'.'</h2>'."\n";
$retour .= '<form id="eflore_form_taxonomie" name="eflore_form_taxonomie" action="{UrlProjetTaxon}" method="post">'."\n";
$retour .= '<fieldset>'."\n".'<legend>'.'Recherche par taxon'.'</legend>'."\n";
$retour .= '<p>'."\n";
$retour .= '<label for="eflore_projet">'.'Projet : '.'</label>'."\n";
$retour .= '<select id="eflore_projet" name="eflore_projet">'."\n";
$retour .= $this->leBlock->afficherPattern('FORMULAIRE_TAXONOMIQUE>PROJET_VERSION','afficherProjets');
$retour .= '</select>'."\n";
$retour .= '<label for="eflore_ordre">'.'afficher les taxons '.'</label>'."\n";
$retour .= '<select id="eflore_ordre" name="eflore_ordre">'."\n";
$retour .= $this->leBlock->afficherPattern('FORMULAIRE_TAXONOMIQUE','afficherOrdre');
$retour .= '</select>'."\n";
$retour .= '<label for="eflore_rang">'.'au rang :'.'</label>'."\n";
$retour .= '<select id="eflore_rang" name="eflore_rang">'."\n";
$retour .= $this->leBlock->afficherPattern('FORMULAIRE_TAXONOMIQUE','afficherRang');
$retour .= '</select>'."\n";
$retour .= '<input type="submit" value="'.'OK'.'" />'."\n";
$retour .= $this->leBlock->afficherPattern('FORMULAIRE_TAXONOMIQUE>TAXON_RECHERCHE','creerAlphabetTaxon');
$retour .= afficherAlphabetTaxon();
$retour .= '</p>'."\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ème
echo remplaceEntiteHTLM($retour);
}
}
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE des FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
function afficherProjets($donnees)
{
if ($donnees['eprv_id_version'] == $donnees['evp']) {
$retour .= ' <option value="'.$donnees['eprv_id_version'].'" selected="selected">';
} else {
$retour .= ' <option value="'.$donnees['eprv_id_version'].'">';
}
$retour .= $donnees['eprv_nom'].' - '.$donnees['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;
}
 
function 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;
}
$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.1 2005/01/26 10:45:33 jpm
* Ajout des résultats de recherche par noms vernaculaires.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/serveur/eflore_mv/vues/recherche_taxon_xhtml.php
New file
0,0 → 1,114
<?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_taxon_xhtml.php,v 1.1 2005-01-28 19:45:44 jpm Exp $
/**
* Vue affichant la liste des taxons d'un projet.
*
* Permet de retourner le xhtml correspondant à une liste hiérarchisées des taxons d'un projet.
*
*@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.1 $ $Date: 2005-01-28 19:45:44 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
require_once EFSE_CHEMIN_FONCTION.'eribo_encodage.fonct.php';
 
// +------------------------------------------------------------------------------------------------------+
// | CLASSE de la VUE |
// +------------------------------------------------------------------------------------------------------+
class recherche_taxon_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 taxons</title>'."\n";
$retour .= '<!-- END entete -->'."\n";
$retour .= '</head>'."\n";
$retour .= '<body>'."\n";
$retour .= '<!-- BEGIN corps -->'."\n";
$retour .= '<h1>'.'Liste des taxons'.'</h1>'."\n";
$retour .= '<ol>'."\n";
$retour .= $this->leBlock->afficherPattern('FICHE_LISTE_TAXONS>TAXON_RECHERCHE_ALPHABET','afficherTaxon');
$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ème
echo remplaceEntiteHTLM($retour);
}
}
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE des FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
 
function afficherTaxon($donnees)
{
$retour = '<li><a href="{UrlFicheNom}'.$donnees['en_id_nom'].'">';
if (!empty($donnees['eni_intitule_nom'])) {
$retour .= $donnees['eni_intitule_nom'];
}
$retour .= '</a></li>'."\n";
return $retour;
}
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>