Subversion Repositories eFlore/Archives.eflore-consultation-v2

Compare Revisions

No changes between revisions

Ignore whitespace Rev 1 → Rev HEAD

/trunk/eflore_photo_modif.inc.php
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/eflore_photo_modif.inc.php
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/eflore.php
New file
0,0 → 1,183
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.3 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of eFlore-consultation. |
// | |
// | 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: eflore.php,v 1.9 2005-06-30 15:24:26 jpm Exp $
/**
* Application de consultation des données d'eFlore.
*
* Moteur de recherche aboutissant à une page contenant la fiche d'un nom.
* Plusieurs onglets sont alors disponiblent, chacun affichant des infos spécifiques
* - nomenclature et taxinomie
* - chorologie
* - illustration
* - ...
*
*@package eFlore
//Auteur original :
*@author Linda ANGAMA <linda_angama@yahoo.fr>
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.9 $ $Date: 2005-06-30 15:24:26 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTÊTE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/** Inclusion du fichier config de l'application eflore. */
require_once GEN_CHEMIN_CLIENT.'eflore/configuration/eflore_config.inc.php';
/** Inclusion du fichier de langue de l'application eflore. */
require_once GEN_CHEMIN_CLIENT.'eflore/langues/eflore_langue_'.EFLORE_LANGUE.'.inc.php';
 
/** Inclusion de la classe PEAR d'abstraction de base de donnée. */
require_once 'DB.php';
/** Inclusion de la bibliothèque PEAR de conception de formulaire.*/
require_once 'HTML/QuickForm.php';
/** Inclusion de la bibliothèque PEAR de gestion des URL.*/
require_once 'Net/URL.php';
 
// Ajout d'une feuille de style propre à eFlore.
GEN_stockerStyleExterne('eflore', EFLORE_CHEMIN_STYLE.'eflore.css');
 
// Attribution à la variable de session des recherches effectuées
if (isset($_REQUEST['eflore_form_nomenclature']) || isset($_REQUEST['eflore_form_taxonomie'])) {
$_SESSION['_EFLORE_']['rechercher'] = $_REQUEST;
}
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
function afficherContenuNavigation()
{
$sortie = '';
return $sortie;
}
 
function afficherContenuTete()
{
// Transférer tout ceci dans la fonction afficherContenuNavigation().
$sortie = '';
if (isset($_GET[EFLORE_LG_URL_NN])) {
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_NN, $_GET[EFLORE_LG_URL_NN]);
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_ACTION, $_GET[EFLORE_LG_URL_ACTION]);
$sortie .= '<ul class="menu_n3">';
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_ONGLET, EFLORE_LG_URL_ONGLET_SYNTHESE);
$sortie .= '<li><a href="'.$GLOBALS['_EFLORE_']['url']->getURL().'">'.EFLORE_LG_ONGLET_PRINCIPAL.'</a></li>';
$GLOBALS['_EFLORE_']['url']->removeQueryString(EFLORE_LG_URL_ONGLET);
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_ONGLET, EFLORE_LG_URL_ONGLET_ILLUSTRATION);
$sortie .= '<li><a href="'.$GLOBALS['_EFLORE_']['url']->getURL().'">'.EFLORE_LG_ONGLET_ILLUSTRATION.'</a></li>';
$GLOBALS['_EFLORE_']['url']->removeQueryString(EFLORE_LG_URL_ONGLET);
$sortie .= '</ul>';
}
return $sortie;
}
 
function afficherContenuCorps()
{
// +--------------------------------------------------------------------------------------------------+
// Initialisation
/** Definition de la variable globale d'eFlore contenant la connexion à la base de données.*/
//$GLOBALS['_EFLORE_']['bdd']= DB::connect(EFLORE_DSN);
// Allias temporaire
//$GLOBALS['db_eflore']= $GLOBALS['_EFLORE_']['bdd'];
$sortie = '';
// +--------------------------------------------------------------------------------------------------+
// Gestion des actions
if (isset($_REQUEST[EFLORE_LG_URL_ACTION])) {
switch ($_REQUEST[EFLORE_LG_URL_ACTION]) {
case EFLORE_LG_URL_ACTION_RECH_NOM :
include_once EFLORE_CHEMIN_APPLI.'eflore_recherche_nomenclature.inc.php';
break;
case EFLORE_LG_URL_ACTION_RECH_TAX :
include_once EFLORE_CHEMIN_APPLI.'eflore_recherche_taxonomie.inc.php';
break;
case EFLORE_LG_URL_ACTION_FICHE :
include_once EFLORE_CHEMIN_APPLI.'eflore_fiche.inc.php';
break;
default:
include_once EFLORE_CHEMIN_APPLI.'eflore_recherche.inc.php';
}
} else {
include_once EFLORE_CHEMIN_APPLI.'eflore_recherche.inc.php';
}
// +--------------------------------------------------------------------------------------------------+
// Gestion des statistiques
// A faire...
// +--------------------------------------------------------------------------------------------------+
// Gestion des onglets à transférer dans le fichier fiche!
/** Inclusion des fonctions de l'application eflore. */
/*
require_once EFLORE_CHEMIN_BIBLIO.'eflore.fonct.php';
if (!isset($_GET[EFLORE_LG_URL_ONGLET])) {
$sortie = '';
} else if ($_GET[EFLORE_LG_URL_ONGLET] == EFLORE_LG_URL_ONGLET_PHOTO) {
if(!isset($_GET['soum'])) {
if (isset($_GET['modif'])) {
include_once EFLORE_CHEMIN_APPLI.'eflore_photo_modif.inc.php';
} else {
include_once EFLORE_CHEMIN_APPLI.'eflore_photo.inc.php';
}
} else {
include_once EFLORE_CHEMIN_APPLI.'eflore_photo_soum.inc.php';
}
$GLOBALS['_EFLORE_']['bdd']->disconnect();
$sortie = $res;
}
*/
return $sortie;
}
 
function afficherContenuPied()
{
$sortie = '<p id="eflore_pied_page">'.EFLORE_LG_PIED.'<a href="mailto:'.EFLORE_LG_PIED_MAIL.'">'.EFLORE_LG_PIED_MAIL.'</a>'.EFLORE_LG_POINT.'</p>';
return $sortie;
}
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.8 2005/02/15 12:59:58 jpm
* Récupération d'info depuis _REQUEST au lieu de _POST.
*
* Revision 1.7 2005/01/28 19:47:55 jpm
* Ajout de la recherche pour les taxons.
*
* Revision 1.6 2005/01/03 19:44:40 jpm
* Ajout de la gestion de l'action "fiche".
*
* Revision 1.5 2004/12/23 20:05:17 jpm
* Début prise en maine eflore-consultation.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/eflore_recherche.inc.php
New file
0,0 → 1,102
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.3 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of eFlore-consultation. |
// | |
// | 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: eflore_recherche.inc.php,v 1.4 2005-06-30 15:24:26 jpm Exp $
/**
* Affichage des moteurs de recherches d'eFlore.
*
* Ce script fournit le code html correspondant aux moteurs de recherches permettant d'accéder aux données
* de la base de données eFlore.
*
*@package eFlore
//Auteur original :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.4 $ $Date: 2005-06-30 15:24:26 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTÊTE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/** Inclusion des fonctions pour les moteurs de recherche. */
require_once EFLORE_CHEMIN_BIBLIO.'eflore_recherche.fonct.php';
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
// Recherche nomenclaturale ou taxonomique
$sortie .= '<h1>'.EFLORE_LG_RECH_TITRE.'</h1>'."\n";
include_once EFLORE_CHEMIN_APPLI.'eflore_recherche_nomenclature.inc.php';
//include_once EFLORE_CHEMIN_APPLI.'eflore_recherche_taxonomie.inc.php';
 
$sortie .= '<div id="eflore_exemples">'."\n";
$sortie .= '<h2>'.EFLORE_LG_EXPLE_TITRE.'</h2>'."\n";
 
$sortie .= '<div id="eflore_exemple_nomenc">'."\n";
$sortie .= '<h3>'.EFLORE_LG_EXPLE_TITRE_NOMENC.'</h3>'."\n";
$sortie .= '<p>'.EFLORE_LG_EXPLE_NOMENC.'</p>'."\n";
$sortie .= '<p>'.EFLORE_LG_EXPLE_ASTUCE.'</p>'."\n";
$sortie .= '<ul id="eflore_liste_astuces">'."\n";
$sortie .= ' <li>'.sprintf(EFLORE_LG_EXPLE_ASTUCE_DEMO_01, '<tt>', '</tt>', '<tt>', '</tt>').'</li>'."\n";
$sortie .= ' <li>'.sprintf(EFLORE_LG_EXPLE_ASTUCE_DEMO_02, '<tt>', '</tt>').'</li>'."\n";
$sortie .= '</ul>'."\n";
$sortie .= '<p>'.EFLORE_LG_EXPLE_LANGUE.'</p>'."\n";
$sortie .= '<ul id="eflore_liste_langues">'."\n";
$sortie .= ' <li>'.EFLORE_LG_EXPLE_FR.'</li>'."\n";
$sortie .= ' <li>'.EFLORE_LG_EXPLE_ES.'</li>'."\n";
$sortie .= ' <li>'.EFLORE_LG_EXPLE_CA.'</li>'."\n";
$sortie .= ' <li>'.EFLORE_LG_EXPLE_DE.'</li>'."\n";
$sortie .= ' <li>'.EFLORE_LG_EXPLE_EN.'</li>'."\n";
$sortie .= ' <li>'.EFLORE_LG_EXPLE_NL.'</li>'."\n";
$sortie .= ' <li>'.EFLORE_LG_EXPLE_IT.'</li>'."\n";
$sortie .= ' <li>'.EFLORE_LG_ETC.'</li>'."\n";
$sortie .= '</ul>'."\n";
$sortie .= '</div>'."\n";
/*
$sortie .= '<div id="eflore_exemple_taxo">'."\n";
$sortie .= '<h3>'.EFLORE_LG_EXPLE_TITRE_TAXO.'</h3>'."\n";
$sortie .= '<p>'.EFLORE_LG_EXPLE_TAXO.'</p>'."\n";
$sortie .= '</div>'."\n";
*/
$sortie .= '</div>'."\n";
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.3 2005/01/28 19:47:55 jpm
* Ajout de la recherche pour les taxons.
*
* Revision 1.2 2005/01/03 19:44:40 jpm
* Ajout de la gestion de l'action "fiche".
*
* Revision 1.1 2004/12/23 20:05:17 jpm
* Début prise en maine eflore-consultation.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/eflore_photo.inc.php
New file
0,0 → 1,311
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This library is free software; you can redistribute it and/or |
// | modify it under the terms of the GNU Lesser General Public |
// | License as published by the Free Software Foundation; either |
// | version 2.1 of the License, or (at your option) any later version. |
// | |
// | This library 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 |
// | Lesser General Public License for more details. |
// | |
// | You should have received a copy of the GNU Lesser General Public |
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: eflore_photo.inc.php,v 1.7 2004-12-23 20:05:17 jpm Exp $
/**
* Titre
*
* Description
*
*@package nom_du_paquetage
*@subpackage nom_du_sous-paquetage_si_necessaire
//Auteur original :
*@author linda ANGAMA<linda_angama@yahoo.fr>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.7 $ $Date: 2004-12-23 20:05:17 $
*/
 
 
$res='';
 
GEN_stockerStyleExterne('photo', GEN_CHEMIN_CLIENT.'eflore/presentations/styles/photo.css');
//connexion a la base
 
if (DB::isError($GLOBALS['db_eflore']))
{
echo '<ERREUR>';
echo 'Impossible d\'&eacutetablir de connexion '.$GLOBALS['db_eflore']->getMessage();
echo '</ERREUR>';
exit;
}
 
//requete sql
$req_img='select * from eflore_info_image, eflore_taxon_a_txt, eflore_inventaire_observation, eflore_licence, eflore_personne_contributeur';
$req=' where eii_id_image=eitat_id_taxon_ref ';
$req.=' and eii_id_version_projet_img=etat_id_version_projet_taxon_ref ';
$req.=' and eio_ce_image=eii_id_image ';
$req.=' and eii_id_version_projet_img=eio_ce_version_projet_img ';
$req.=' and eii_ce_licence_img=eli_id_licence';
$req.=' and eitat_id_texte='.N_TAXON;
$req.=' and eitat_id_version_projet_txt='.N_VERSION_PROJET_TAXON;
$req.=' and epc_id_contributeur=eii_ce_contributeur_image';
if (isset($_GET['suppr'])){
$req.=' and eii_ce_contributeur_image='.CONTRIBUTEUR;
}
$req_img.=$req;
$resultat_img=$GLOBALS['db_eflore']->query($req_img);
(DB::isError($resultat_img)) ?
die (BOG_afficherErreurSql(__FILE__, __LINE__, 'img:'.$resultat_img->getMessage(), $req_img)) : '' ;
$nbre_ligne=$resultat_img->numRows();
//-------------------------------------------PAGE AVEC LA PHOTO TAILLE REELLE-------------------------------------------------//
if (isset($_GET['agrandit'])){
$req_img.=' and eii_id_image='.$_GET['id'];
$resultat_img=$GLOBALS['db_eflore']->query($req_img);
(DB::isError($resultat_img)) ?
die (BOG_afficherErreurSql(__FILE__, __LINE__, 'img:'.$resultat_img->getMessage(), $req_img)) : '' ;
$ligne=& $resultat_img->fetchRow(DB_FETCHMODE_ASSOC);
$req_nom='select *';
$req_nom.=' from eflore_selection_nom , eflore_nom ';
$req_nom.=' LEFT JOIN eflore_botaniste_intitule_abreviation ON en_ce_auteur_basio= ebia_id_intitule_botaniste_abrege';
$req_nom.=' where esn_id_taxon='.N_TAXON;
$req_nom.=' and esn_id_version_projet_taxon='.N_VERSION_PROJET_TAXON;
$req_nom.=' and esn_id_nom=en_id_nom';
if ($ligne['eio_ce_autre_nom_latin']==0){
$req_nom.=' and en_id_nom='.selectNom();
}
else {
$req_nom.=' and en_id_nom='.$ligne['eio_ce_autre_nom_latin'];
}
$resultat_nom=$GLOBALS['db_eflore']->query($req_nom);
(DB::isError($resultat_nom)) ?
die (BOG_afficherErreurSql(__FILE__, __LINE__, 'cpt:'.$resultat_nom->getMessage(), $req_nom)) : '' ;
$nom=& $resultat_nom->fetchRow(DB_FETCHMODE_ASSOC);
$req_cat='select * from eflore_info_image_valeur, eflore_info_image_posseder_valeur';
$req_cat.=' where eiipv_id_valeur_categorie_img= eiiv_id_valeur_categorie_img ';
$req_cat.=' and eiipv_id_image='.$_GET['id'];
$resultat_cat=$GLOBALS['db_eflore']->query($req_cat);
(DB::isError($resultat_cat)) ?
die (BOG_afficherErreurSql(__FILE__, __LINE__, 'cpt:'.$resultat_cat->getMessage(), $req_cat)) : '' ;
$res.='<div>';
$res.='<p><a href="'.EFLORE_CHEMIN_APPLI.'&onglet=photo&deb='.$_SESSION['dep'].'">Retour &agrave; la miniature</a></p>';
$res.='<p>'.EN_ID_NOM.$nom['en_nom_genre'].' '.$nom['en_epithete_espece'].' '.$nom['ebia_intitule_botaniste_abrege'].'</p>';
if ($ligne['eio_ce_autre_nom_latin']!=0){
$res.='<p>'.EIO_AUTRE_FLORE.$ligne['eio_autre_flore'].'</p>';
}
$res.='<p>'.CONTRIBUTEUR_IMG.$ligne['epc_nom_principal'].'</p>';
$res.='<p>'.EII_AUTEUR_IMG.$ligne['eii_auteur_img'].'</p>';
if ($ligne['eio_autre_auteur_determination']!=NULL){
$res.='<p>'.EIO_AUTRE_AUTEUR_DETERMINATION.$ligne['eio_autre_auteur_determination'].'</p>';
}
while($cat=& $resultat_cat->fetchRow(DB_FETCHMODE_ASSOC)){
switch ($cat['eiiv_ce_categorie_img']) {
case 1:
$res.='<p>'.NATURE.$cat['eiiv_intitule_valeur_categorie_img'].'</p>';
break;
case 2:
$res.='<p>'.DEVELOPPEMENT.$cat['eiiv_intitule_valeur_categorie_img'].'</p>';
break;
case 3:
$res.='<p>'.SUJET.$cat['eiiv_intitule_valeur_categorie_img'].'</p>';
}
}
$res.='<p>'.EIS_LIEUDIT.'</p>';
$form_date=substr($ligne['eio_date_observation'],0,4);
if (($mois=substr($ligne['eio_date_observation'],5,2))!='00'){
$form_date=$mois.'/'.$form_date;
}
if (($jour=substr($ligne['eio_date_observation'],8,2))!='00'){
$form_date=$jour.'/'.$form_date;
}
$res.='<p>'.DATE_IMG.$form_date.'</p>';
$info='';
if ($ligne['eii_description_courte_img']!=NULL){
$info=$ligne['eii_description_courte_img'];
}
else {
$info=$ligne['eii_description_longue_img'];
}
if ($ligne['eii_description_courte_img']!=NULL || $ligne['eii_description_longue_img']!=NULL){
$res.='<p>Informations compl&eacute;mentaires : '.$info.'</p>';
}
$res.='<div class="debord"><img src="'.$_GET['agrandit'].'"></div></div>';
 
$res.=$ligne['eli_texte_licence'];
}
 
//-----------------------------------------PAGE AVEC L'AFFICHAGE DES MINIATURES------------------------------------------------//
else
{
if (!isset($_GET['deb'])) {$deb=0;}
else {$deb=$_GET['deb'];}
$_SESSION['dep']=$deb;
$img_pg=6;
$img_l=3;
$prec=null;
$suiv=null;
 
if (!isset($_GET['suppr'])){
//affichage du lien vers le formulaire de soumission d'images
$res.='<a href="'.EFLORE_CHEMIN_APPLI.'&onglet=photo&soum=1">'.FORM_AJOUT.'</a>';
if ($nbre_ligne==0){
$res.='<p class="plein_texte">Il n\'y a aucune illustration de ce taxon disponible</p>';
}
$res.='<br /><a href="'.EFLORE_CHEMIN_APPLI.'&onglet=photo&suppr=1">'.FORM_MODIF.'</a>';
}
else{
$res.='<p><a href="'.EFLORE_CHEMIN_APPLI.'&onglet=photo&deb='.$_SESSION['dep'].'">'.AFF_MINI.'</a></p>';
}
 
//selection des lignes de la requete &agrave; traiter
 
if (($deb+$img_pg+1)<=($nbre_ligne))
{
$fin=$deb+$img_pg-1;
}
else
{
$fin=$nbre_ligne-1;
}
 
//affichage des miniatures et g&eacute;n&eacute;ration des fichiers rdf
if ($fin!==0)
{
$res.=' <ul class="liste_photo">'."\n";
$i=0;
foreach (range($deb, $fin) as $num_ligne)
{
if (!$ligne =& $resultat_img->fetchrow(DB_FETCHMODE_ASSOC, $num_ligne))
{
break;
}
if ($num_ligne%$img_l==0)
{
$res.=' ';
$res.='<li class="colonne">';
$res.="\n ";
$res.='<ul>'."\n";
}
$i++;
$url_img=$ligne['eii_lien_vers_img'];
$url_img_mini=EFLORE_CHEMIN_IMG_PLTE.'mini_photos_plte/mini_';
$url_img_mini .=$ligne['eii_id_image'].'.jpg';
if ($ligne['eii_lien_vers_img']!=EFLORE_CHEMIN_IMG_PLTE){
$url_img .=$ligne['eii_nom_fichier_img'];
}
else{
$url_img .=$ligne['eii_id_image'].'.jpg';
}
$res.=' ';
$res.='<li class="ligne">'."\n";
$res.=' ';
$res.='<p class="info">';
if (!@fopen($url_img,'r')){
$res.="\n ";
$res.='<img src="'.$url_img_mini.'" alt="'.$ligne['eii_description_courte_img'].' date:'.$ligne['eio_date_observation'].'" border=0 />';
$res.="\n ";
$res.='</a>';
$res.="\n ";
$res.="\n ";
$res.='</p>';
$res.="\n ";
$res.="\n ";
$res.='<p class="label">';
$res.="\n ";
$res.=DEFAUT_IMG.'<br />';
$res.="\n ";
$res.=AUTEUR.$ligne['eii_auteur_img'];
$res.="\n ";
$res.='</p>';
$res.="\n ";
$res.='</li>'."\n";
}
else{
if (!isset($_GET['suppr'])){
$res.='<a href="'.EFLORE_CHEMIN_APPLI.'&onglet=photo&agrandit='.$url_img.'&id='.$ligne['eii_id_image'].'">';
}
else{
$res.='<a href="'.EFLORE_CHEMIN_APPLI.'&onglet=photo&modif=1&id='.$ligne['eii_id_image'].'">';
}
$res.="\n ";
$res.='<img src="'.$url_img_mini.'" alt="'.$ligne['eii_description_courte_img'].DATE_IMG.$ligne['eio_date_observation'].'" border=0 />';
$res.="\n ";
$res.='</a>';
$res.="\n ";
$res.="\n ";
$res.='</p>';
$res.="\n ";
$res.="\n ";
$res.='<p class="label">';
$res.="\n ";
$res.=POIDS.$ligne['eii_poids_img'].' ko<br />';
$res.="\n ";
$res.=TAILLE.$ligne['eii_larg_img'].'x'.$ligne['eii_long_img'].' px<br />';
$res.="\n ";
$res.=AUTEUR.$ligne['eii_auteur_img'];
$res.="\n ";
$res.='</p>';
$res.="\n ";
$res.='</li>'."\n";
}
if ($num_ligne%$img_l==($img_l-1))
{
$res.=" </ul></li> \n";
$res.='<li class="colonne"><span class="spacer"></span></li>';
}
if (!isset($_GET['suppr'])){
generationRdf($ligne);
}
}
$res.='<li class="colonne"><span class="spacer"></span></li>';
$res.="</ul>\n";
//affichage des liens suivant/précédent
if ($deb!=0)
{
if (($deb-$img_pg)>=0)
{
if (!isset($_GET['suppr'])){
$prec='<a href="'.EFLORE_CHEMIN_APPLI.'&onglet=photo&deb='.($deb-$img_pg).'">'.PREC.'</a>';
}
else{
$prec='<a href="'.EFLORE_CHEMIN_APPLI.'&onglet=photo&deb='.($deb-$img_pg).'&suppr=1">'.PREC.'</a>';
}
}
else
{
if (!isset($_GET['suppr'])){
$prec='<a href="'.EFLORE_CHEMIN_APPLI.'"&onglet=photo&deb=0">'.PREC.'</a>';
}
else{
$prec='<a href="'.EFLORE_CHEMIN_APPLI.'"&onglet=photo&deb=0&suppr=1">'.PREC.'</a>';
}
}
$res.='<div class="prec">'.$prec.'</div>';
}
if ($deb+$img_pg<$nbre_ligne)
{
if (!isset($_GET['suppr'])){
$suiv='<a href="'.EFLORE_CHEMIN_APPLI.'&onglet=photo&deb='.($fin+1).'">'.SUIV.'</a>';
}
else{
$suiv='<a href="'.EFLORE_CHEMIN_APPLI.'&onglet=photo&deb='.($fin+1).'&suppr=1">'.SUIV.'</a>';
}
$res.='<div class="suiv">'.$suiv.'</div>';
}
}
 
}
?>
/trunk/eflore_recherche_taxonomie.inc.php
New file
0,0 → 1,191
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.3 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of eFlore-consultation. |
// | |
// | 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: eflore_recherche_taxonomie.inc.php,v 1.4 2005-06-30 15:24:26 jpm Exp $
/**
* Affichage du moteur de recherche taxonomique et de ses résultats.
*
* Ce script fournit le code html correspondant aux moteurs de recherche taxonomique (par projet) et ses
* résultats.
*
*@package eFlore
//Auteur original :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.4 $ $Date: 2005-06-30 15:24:26 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTÊTE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
function ajouterArboressenceClassif($arguments) {
if (isset($GLOBALS['_EFLORE_']['classif'][$arguments[0]])) {
$retour = $GLOBALS['_EFLORE_']['classif'][$arguments[0]];
return $retour;
}
return '';
}
 
function remplacerUrlClassif($arguments) {
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_ACTION, EFLORE_LG_URL_ACTION_RECH_TAX);
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_NT, $arguments[0]);
$retour = $GLOBALS['_EFLORE_']['url']->getURL().'#eflore_taxon_'.$arguments[0];
$GLOBALS['_EFLORE_']['url']->removeQueryString(EFLORE_LG_URL_ACTION);
$GLOBALS['_EFLORE_']['url']->removeQueryString(EFLORE_LG_URL_NT);
return $retour;
}
 
function remplacerInfoCommune(&$squelette) {
$squelette->setCallbackFunction('ajouterArboressenceClassif', 'ajouterArboressenceClassif');
$squelette->setCallbackFunction('remplacerUrlClassif', 'remplacerUrlClassif');
$squelette->performCallback();
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_ACTION, EFLORE_LG_URL_ACTION_FICHE);
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_ONGLET, EFLORE_LG_URL_ONGLET_SYNTHESE);
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_NVP, $_REQUEST['eflore_projet']);
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_NN, '');
$squelette->setVariable('UrlFicheNom', $GLOBALS['_EFLORE_']['url']->getURL());
$GLOBALS['_EFLORE_']['url']->removeQueryString(EFLORE_LG_URL_ACTION);
$GLOBALS['_EFLORE_']['url']->removeQueryString(EFLORE_LG_URL_ONGLET);
$GLOBALS['_EFLORE_']['url']->removeQueryString(EFLORE_LG_URL_NVP);
$GLOBALS['_EFLORE_']['url']->removeQueryString(EFLORE_LG_URL_NN);
return $squelette;
}
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
// Recherche sur les noms scientifiques
//$GLOBALS['_DEBOGAGE_'] .= '<pre>'.print_r($GLOBALS, true).'</pre>';
if (isset($_REQUEST['eflore_projet']) AND isset($_REQUEST['eflore_rang']) AND isset($_REQUEST['eflore_ordre'])) {
if (!isset($_REQUEST['eflore_lettre'])) {
$_REQUEST['eflore_lettre'] = 'A';
}
$url = sprintf(EFLORE_URL_FORM_TAXON_ALPHABET, rawurlencode($_REQUEST['eflore_projet']), rawurlencode($_REQUEST['eflore_rang']), rawurlencode($_REQUEST['eflore_ordre']), rawurlencode($_REQUEST['eflore_lettre']));
$_SESSION['eflore_projet'] = $_REQUEST['eflore_projet'];
$_SESSION['eflore_rang'] = $_REQUEST['eflore_rang'];
$_SESSION['eflore_ordre'] = $_REQUEST['eflore_ordre'];
$_SESSION['eflore_lettre'] = $_REQUEST['eflore_lettre'];
$_SESSION['eflore_classif'] = array();
$_SESSION['eflore_classif_chemin'] = '';
} else if (isset($_REQUEST[EFLORE_LG_URL_NT])) {
$_REQUEST['eflore_projet'] = $_SESSION['eflore_projet'];
$_REQUEST['eflore_rang'] = $_SESSION['eflore_rang'];
$_REQUEST['eflore_ordre'] = $_SESSION['eflore_ordre'];
$_REQUEST['eflore_lettre'] = $_SESSION['eflore_lettre'];
$url = sprintf(EFLORE_URL_FORM_TAXON_ALPHABET, rawurlencode($_REQUEST['eflore_projet']), rawurlencode($_REQUEST['eflore_rang']), rawurlencode($_REQUEST['eflore_ordre']), rawurlencode($_REQUEST['eflore_lettre']));
} else {
$url = EFLORE_URL_FORM_TAXON;
}
 
$contenu = file_get_contents($url);
 
//Analyse du squelette
require_once 'HTML/Template/IT.php';
$squelette = new HTML_Template_IT();
$squelette->setTemplate($contenu, FALSE, FALSE);
 
// Indique l'url pour obtenir fiche d'un nom
$squelette->setCurrentBlock('corps');
// Ajout du paramêtre action à l'url courante.
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_ACTION, EFLORE_LG_URL_ACTION_RECH_TAX);
$squelette->setVariable('UrlProjetTaxon', $GLOBALS['_EFLORE_']['url']->getURL());
$GLOBALS['_EFLORE_']['url']->removeQueryString(EFLORE_LG_URL_ACTION);
$squelette->parseCurrentBlock('corps');
 
// Récupère le bloc "corps"
$sortie .= $squelette->get('corps');
 
// --------------------------------------------------------------------------------------------------------
// Lancement de la recherche
if (isset($_REQUEST['eflore_taxonomie_submit'])) {
//Constitution du chemin de navigation dans la classification
if (isset($_REQUEST[EFLORE_LG_URL_NT])) {
if (!isset($_SESSION['eflore_classif'][$_REQUEST[EFLORE_LG_URL_NT]])) {
$_SESSION['eflore_classif_chemin'] .= $_REQUEST[EFLORE_LG_URL_NT].'>';
$_SESSION['eflore_classif'][$_REQUEST[EFLORE_LG_URL_NT]] = $_REQUEST['eflore_projet'];
}
}
if (!empty($_SESSION['eflore_classif_chemin'])) {
$GLOBALS['_DEBOGAGE_'] .= $_SESSION['eflore_classif_chemin'].'<br/>';
$tab_classif_chemin = array_reverse(explode('>', substr($_SESSION['eflore_classif_chemin'], 0, -1)));
$GLOBALS['_EFLORE_']['classif'] = array();
$GLOBALS['_DEBOGAGE_'] .= $tab_classif_chemin[0].'<br />';
for ($i = 0; $i < count($tab_classif_chemin); $i++) {
$url = sprintf(EFLORE_URL_LISTE_CLASSIF, rawurlencode($_SESSION['eflore_classif'][$tab_classif_chemin[$i]]), rawurlencode($tab_classif_chemin[$i]));
$GLOBALS['_DEBOGAGE_'] .= $url.'<br />';
$contenu = file_get_contents($url);
//Analyse du squelette
require_once 'HTML/Template/ITX.php';
$squelette = new HTML_Template_ITX();
$squelette->setTemplate($contenu, FALSE, FALSE);
$squelette->setCurrentBlock('liste');
$squelette =& remplacerInfoCommune($squelette);
$squelette->parseCurrentBlock('liste');
$GLOBALS['_EFLORE_']['classif'][$tab_classif_chemin[$i]] = $squelette->get('liste');
}
}
// Recherche sur les taxons
$url = sprintf(EFLORE_URL_LISTE_TAXON, rawurlencode($_REQUEST['eflore_projet']), rawurlencode($_REQUEST['eflore_rang']), rawurlencode($_REQUEST['eflore_ordre']), rawurlencode($_REQUEST['eflore_lettre']));
$contenu = file_get_contents($url);
//Analyse du squelette
require_once 'HTML/Template/ITX.php';
$squelette = new HTML_Template_ITX();
$squelette->setTemplate($contenu, FALSE, FALSE);
// Analyse du corps de la recherche
$squelette->setCurrentBlock('corps');
$squelette =& remplacerInfoCommune($squelette);
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_NVP, $_REQUEST['eflore_projet']);
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_RG, $_REQUEST['eflore_rang']);
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_OD, $_REQUEST['eflore_ordre']);
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_LE, '');
$squelette->setVariable('UrlRechercheTaxonAlphabet', $GLOBALS['_EFLORE_']['url']->getURL());
$squelette->parseCurrentBlock('corps');
// Récupère le bloc "corps"
$sortie .= $squelette->get('corps');
}
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.3 2005/02/15 13:00:51 jpm
* Ajout de la possibilité de naviguer dans la classification.
*
* Revision 1.2 2005/01/28 19:47:55 jpm
* Ajout de la recherche pour les taxons.
*
* Revision 1.1 2004/12/23 20:05:17 jpm
* Début prise en maine eflore-consultation.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/eflore_photo_soum.inc.php
New file
0,0 → 1,131
<?
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This library is free software; you can redistribute it and/or |
// | modify it under the terms of the GNU Lesser General Public |
// | License as published by the Free Software Foundation; either |
// | version 2.1 of the License, or (at your option) any later version. |
// | |
// | This library 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 |
// | Lesser General Public License for more details. |
// | |
// | You should have received a copy of the GNU Lesser General Public |
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: eflore_photo_soum.inc.php,v 1.1 2004-08-17 11:16:46 linda Exp $
/**
* Titre
*
* Description
*
*@package nom_du_paquetage
*@subpackage nom_du_sous-paquetage_si_necessaire
//Auteur original :
*@author linda ANGAMA<linda_angama@yahoo.fr>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.1 $ $Date: 2004-08-17 11:16:46 $
// +------------------------------------------------------------------------------------------------------+
*/
 
$res='';
 
GEN_stockerStyleExterne('form_soum', GEN_CHEMIN_CLIENT.'eflore/presentations/styles/form_soum.css');
GEN_stockerFichierScript('eflore_soum', GEN_CHEMIN_CLIENT.'eflore/presentations/scripts/eflore_soum.inc.js');
 
//connexion a la base
if (DB::isError($GLOBALS['db_eflore'])){
echo "<ERREUR>";
echo "Impossible d'&eacutetablir de connexion ",$GLOBALS['db_eflore']->getMessage();
echo "</ERREUR>";
exit;
}
 
$id_photo='';
$correct='';
 
 
//creation du formulaire
$form =& new HTML_QuickForm('soumission', 'post',EFLORE_CHEMIN_APPLI.'&onglet=photo&soum=1&fic=1','','enctype="multipart/form-data"');
if (isset($_POST['form_valider'])){
$id=SQL_obtenirNouveauId($GLOBALS['db_eflore'], 'eflore_info_image', 'eii_id_image');
if($form->validate() && verifDate() && verifLicence() && verifSelection0() && verifSelection1() && verifAuteur() && verifFlore() && copyFile($id) && $_POST['NATURE']> -1){
$form->process(insertionImg());
}
else{
if (!verifDate()){
$form->addElement('html','<span class="erreur">'.ERR_VALID_DATE.'</span>');
}
if (!verifLicence()){
$form->addElement('html','<span class="erreur">'.ERR_CHOIX_LICENCE.'</span>');
}
if (!verifSelection0()){
$form->addElement('html','<span class="erreur">'.ERR_CHOIX_FICHIER.'</span>');
}
if (!verifSelection1()){
$form->addElement('html','<span class="erreur">'.ERR_CHOIX_URL.'</span>');
}
if (!verifAuteur()){
$form->addElement('html','<span class="erreur">'.ERR_CHOIX_AUTEUR.'</span>');
}
if (!verifFlore()){
$form->addElement('html','<span class="erreur">'.ERR_CHOIX_FLORE.'</span>');
}
if (!copyFile($id)){
$form->addElement('html','<span class="erreur">'.ERR_CHOIX_FICHIER_JPEG.'</span>');
}
if ($_POST['NATURE']<=-1){
$form->addElement('html','<span class="erreur">'.ERR_NATURE_REQ.'</span>');
}
}
}
$tab_index = 1000;
$default_value_array=array('EN_ID_NOM' => selectNom(), 'EIO_AUTRE_FLORE' => -1,'autre_flore' =>'', 'UPLOADED_FILE' => NULL, 'EII_LIEN_VERS_IMG' => 'http://',
'EII_AUTEUR_IMG'=>'', 'EIO_AUTRE_AUTEUR_DETERMINATION'=>'', 'NATURE' => -1, 'EIS_LIEUDIT' => '',
'EIO_DATE_OBSERVATION[AN]'=>'','LICENCE[EII_CE_LICENCE_IMG_COM]' =>false, 'LICENCE[EII_CE_LICENCE_IMG_MOD]' =>false,
'LICENCE[EII_CE_LICENCE_IMG_AUCUN]' =>false,'SUJET' => -1,'DEVELOPPEMENT' => -1, 'EII_DESCRIPTION_IMG' => '');
$default_value_array['EIO_DATE_OBSERVATION']['date_1']['d']=0;
$default_value_array['EIO_DATE_OBSERVATION']['date_1']['F']=0;
construireForm(&$form,&$tab_index,$default_value_array);
//ajout des règles de validation
$form->addRule('loc',ERR_CHOIX_FICHIER,'callback','verifSelection0');
$form->addRule('loc',ERR_CHOIX_URL,'callback','verifSelection1');
$form->addRule(array('EIS_LIEUDIT'),ERR_CHOIX_LIEU,'required','','client');
$form->addRule(array('NATURE'),'','required','','client');
$form->addRule('LICENCE',ERR_CHOIX_LICENCE,'licence');
$form->addGroupRule('LICENCE', ERR_CHOIX_LICENCE_REQ, 'required', null, 1, 'client', true);
$rule_date['AN'][]=array(ERR_CHOIX_ANNEE_REQ, 'required', null, 'client');
$rule_date['AN'][]=array(ERR_CHOIX_ANNEE_NUM,'numeric',null,'client');
$rule_date['AN'][]=array(ERR_CHOIX_ANNEE_LONG,'minlength',4,'client');
$rule_date['AN'][]=array(ERR_CHOIX_ANNEE_LONG,'maxlength',4,'client');
$rule_date['AN'][]=array(ERR_VALID_JOUR_MOIS,'date_val','','client');
$form->addGroupRule('EIO_DATE_OBSERVATION',$rule_date);
 
//ajout des boutons et fermeture du formulaire
$liste_bouton_debut = '<ul class="liste">'."\n";
$form->addElement('html', $liste_bouton_debut);
$asso_array=array('tabindex'=>$tab_index++);
$form->addElement('submit','form_valider',FORM_VALIDER,$asso_array);
$liste_bouton_fin = '</ul>'."\n";
$form->addElement('html', $liste_bouton_fin);
$res.=$form->toHTML()."\n";
$form_fin =& new HTML_QuickForm('bouton_quitter', 'post',EFLORE_CHEMIN_APPLI.'&onglet=photo');
$asso_array=array('tabindex'=>$tab_index++);
$form_fin->addElement('submit','form_quit',FORM_QUIT,$asso_array);
$res.=$form_fin->toHTML()."\n";
 
$res.='<a href="'.EFLORE_CHEMIN_APPLI.'&onglet=photo">'.AFF_MINI.'</a>';
 
 
 
 
?>
/trunk/configuration/eflore_config.inc.php
New file
0,0 → 1,152
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.3 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of eFlore-consultation. |
// | |
// | 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: eflore_config.inc.php,v 1.11 2005-07-01 19:02:11 jp_milcent Exp $
/**
* Fichier de configuration d'eFlore.
*
* Fichier contenant des constantes et des variables globales permettant de configurer eFlore-consultation.
*
*@package eflore
*@subpackage configuration
//Auteur original :
*@author Linda ANGAMA<linda_angama@yahoo.fr>
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.11 $ $Date: 2005-07-01 19:02:11 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
/** Definition de la variable globale d'eFlore.*/
$GLOBALS['_EFLORE_'] = array();
 
// +------------------------------------------------------------------------------------------------------+
// Définition des chemins de fichiers.
/** Constante stockant le chemin du dossier contenant les images de plantes.*/
define('EFLORE_CHEMIN_IMG_PLTE', 'sites/eflore/generique/images/photos_plte/');
/** Constante stockant le chemin du dossier contenant les fichiers rdf.*/
define('EFLORE_CHEMIN_RDF', 'sites/eflore/generique/images/photos_plte/');
/** Constante stockant l'URL de base de l'application recherche de plante.*/
define('EFLORE_CHEMIN_APPLI', GEN_CHEMIN_CLIENT.'eflore/');
/** Constante stockant le chemin vers le dossier bibliothèque.*/
define('EFLORE_CHEMIN_BIBLIO', EFLORE_CHEMIN_APPLI.'bibliotheque/');
/** Constante stockant le chemin vers le dossier présentation.*/
define('EFLORE_CHEMIN_PRESENTATION', EFLORE_CHEMIN_APPLI.'presentations/');
/** Constante stockant le chemin vers le dossier styles.*/
define('EFLORE_CHEMIN_STYLE', EFLORE_CHEMIN_PRESENTATION.'styles/');
 
/** Constante stockant l'URL de base de l'application recherche de plante sous forme d'objet Pear URL.*/
$GLOBALS['_EFLORE_']['url'] = $GLOBALS['_GEN_commun']['url'];
$GLOBALS['_EFLORE_']['url_base'] = $GLOBALS['_GEN_commun']['url'];
 
// +------------------------------------------------------------------------------------------------------+
// Définition des urls du serveur de ressources
/** Constante stockant l'url de base du serveur eRibosome.*/
define('EFLORE_URL_ERIBO', 'http://eflore-test.tela-botanica.org/serveurXML/eribo_serveur.php');
/** Constante stockant l'url pour obtenir une liste de noms à partir d'un radical de nom scientifique.*/
define('EFLORE_URL_LISTE_NOM_LATIN', EFLORE_URL_ERIBO.'?cle=recherche_latin&radical=%s');
/** Constante stockant l'url pour obtenir une liste de noms à partir d'un radical de nom scientifique pour un projet donné.*/
define('EFLORE_URL_LISTE_NOM_LATIN_REF', EFLORE_URL_ERIBO.'?cle=recherche_latin&radical=%s&nvp=%s');
/** Constante stockant l'url pour obtenir une liste de noms à partir d'un radical de nom vernaculaire.*/
define('EFLORE_URL_LISTE_NOM_VERNA', EFLORE_URL_ERIBO.'?cle=recherche_verna&radical=%s');
/** Constante stockant l'url pour obtenir une liste de noms à partir d'un radical de nom vernaculaire pour un projet donné.*/
define('EFLORE_URL_LISTE_NOM_VERNA_REF', EFLORE_URL_ERIBO.'?cle=recherche_verna&radical=%s&nvp=%s');
/** Constante stockant l'url pour obtenir une synthèse sur un nom scientifique.*/
define('EFLORE_URL_FICHE_SYNTHESE', EFLORE_URL_ERIBO.'?cle=fiche_synthese&nn=%s');
/** Constante stockant l'url pour obtenir une synthèse sur un nom scientifique pour un projet donné.*/
define('EFLORE_URL_FICHE_SYNTHESE_PROJET', EFLORE_URL_ERIBO.'?cle=fiche_synthese&nn=%s&nvp=%s');
/** Constante stockant l'url pour obtenir un formulaire sur les noms.*/
define('EFLORE_URL_FORM_NOM', EFLORE_URL_ERIBO.'?cle=form_nom');
/** Constante stockant l'url pour obtenir un formulaire sur les projets taxo.*/
define('EFLORE_URL_FORM_TAXON', EFLORE_URL_ERIBO.'?cle=form_taxon');
/** Constante stockant l'url pour obtenir un formulaire sur les projets taxo.*/
define('EFLORE_URL_FORM_TAXON_ALPHABET', EFLORE_URL_ERIBO.'?cle=form_taxon&nvp=%s&rg=%s&od=%s&le=%s');
/** Constante stockant l'url pour obtenir un formulaire sur les projets taxo.*/
define('EFLORE_URL_LISTE_TAXON', EFLORE_URL_ERIBO.'?cle=recherche_taxon&nvp=%s&rg=%s&od=%s&le=%s');
/** Constante stockant l'url pour obtenir une liste des taxons fils d'un taxon.*/
define('EFLORE_URL_LISTE_CLASSIF', EFLORE_URL_ERIBO.'?cle=recherche_classif&nvp=%s&nt=%s');
/** Constante stockant l'url pour obtenir des infos sur le taxon supérieur dans la classification.*/
define('EFLORE_URL_INFO_TAXON_SUP', EFLORE_URL_ERIBO.'?cle=info_taxon_sup&nt=%s&nvp=%s');
/** Constante stockant l'url pour obtenir des infos sur un nom latin.*/
define('EFLORE_URL_INFO_NOM_LATIN', EFLORE_URL_ERIBO.'?cle=info_nom_latin&nn=%s');
 
// +------------------------------------------------------------------------------------------------------+
// Définition de la langue
/** Constante stockant la langue utilisée pour l'application.*/
define('EFLORE_LANGUE', substr($GLOBALS['_GEN_commun']['i18n'], 0, 2));
 
// +------------------------------------------------------------------------------------------------------+
// Définition de constante spécifiques
define('EFLORE_RECH_NOM_FORM_TAB', '1');
define('EFLORE_RECH_NOM_FORM_NOM_SIZE', '45');
define('EFLORE_RECH_NOM_FORM_NOM_MAXLENGTH', '255');
 
// +------------------------------------------------------------------------------------------------------+
// Définition des variables temporairement utilisées pour les essais de l'application.
define('N_TAXON', 3288);
define('N_VERSION_PROJET_TAXON', 1);
define('CONTRIBUTEUR', 4);
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.10 2005/06/30 15:24:26 jpm
* Début des modifications pour ajout de l'arborescence de la classif.
*
* Revision 1.9 2005/06/09 18:10:25 jpm
* Début gestion des sessions dans la recherche nomenclaturale.
*
* Revision 1.8 2005/02/15 13:33:25 jpm
* Suppression des constantes les infos de connexion à la base de données. Inutile puisque l'on utilise le serveur eRibo.
*
* Revision 1.7 2005/02/15 13:01:25 jpm
* Ajout de constantes.
*
* Revision 1.6 2005/01/28 19:49:26 jpm
* Ajout de nouvelles constantes pour les url entre autres.
*
* Revision 1.5 2004/12/23 20:04:59 jpm
* Début prise en maine eflore-consultation.
*
* Revision 1.4 2004/08/17 11:22:45 linda
* définition du chemin de l'application et des constantes nécessaires pour le fonctionnement de l'appli eflore mais non encore disponibles via le site test
*
* Revision 1.3 2004/06/22 12:25:02 linda
* modifications des paramètre de connexion à la base de données
*
* Revision 1.2 2004/06/17 15:21:37 linda
* ajout du fichier initial
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/eflore_fiche.inc.php
New file
0,0 → 1,167
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.3 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of eFlore-consultation. |
// | |
// | 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: eflore_fiche.inc.php,v 1.5 2005-07-26 09:20:40 jp_milcent Exp $
/**
* Affichage des fiches d'eFlore.
*
* Ce script fournit le code html correspondant aux fiches d'eFlore.
*
*@package eFlore
//Auteur original :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.5 $ $Date: 2005-07-26 09:20:40 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTÊTE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
if (isset($_REQUEST['nn']) && $_REQUEST['nn'] != '') {
// Récupération fiche -- onglet "Synthèse"
if (isset($_REQUEST['nvp']) && $_REQUEST['nvp'] != '') {
// Nous avons en plus un projet de sélectionné
$contenu = file_get_contents(sprintf(EFLORE_URL_FICHE_SYNTHESE_PROJET, $_REQUEST['nn'], $_REQUEST['nvp']));
} else {
// Avec le projet par défaut (BDNFF)
$contenu = file_get_contents(sprintf(EFLORE_URL_FICHE_SYNTHESE, $_REQUEST['nn']));
}
//Analyse du squelette
require_once 'HTML/Template/ITX.php';
$squelette = new HTML_Template_ITX();
$squelette->setTemplate($contenu, FALSE, FALSE);
// Gestion des niveaux taxonomiques supérieurs
$squelette->setCallbackFunction('selectionnerEfloreRef', 'selectionnerEfloreRef');
$squelette->performCallback();
// Indique l'url pour obtenir fiche d'un nom
$squelette->setCurrentBlock('corps');
//http://testv4.tela-botanica.org/papyrus.php?site=5&menu=39&action=fiche&onglet=synthese&nn=1573
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_ACTION, EFLORE_LG_URL_ACTION_FICHE);
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_ONGLET, EFLORE_LG_URL_ONGLET_SYNTHESE);
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_NN, $_REQUEST['nn']);
$squelette->setVariable('FormUrlProjetChangement', $GLOBALS['_EFLORE_']['url']->getURL());
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_NVP, '');
$squelette->setVariable('LienUrlProjetChangement', $GLOBALS['_EFLORE_']['url']->getURL());
// Référentiel sélectionné par défaut
$squelette->setCallbackFunction('NiveauTaxo', 'afficherNiveauTaxoSuperieur');
$squelette->performCallback();
$squelette->parseCurrentBlock('corps');
// Récupère le bloc "corps"
$sortie .= $squelette->get('corps');
}
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE des FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
 
function afficherNiveauTaxoSuperieur($arguments) {
$tab_nom_sup = array();
$retour = '';
$nt = $arguments[0];
$nvp = $arguments[1];
while ($nt != 0) {
$aso_taxon = array();
$contenu = file_get_contents(sprintf(EFLORE_URL_INFO_TAXON_SUP, rawurlencode($nt), rawurlencode($nvp)));
preg_match("/<en_ce_r>(\d+)<\/en_ce_r>/", $contenu, $info);
if (isset($info[1])) {
$aso_taxon['nr'] = $info[1];
$nr = $info[1];
}
preg_match('/<etr_id_t2>(\d+)<\/etr_id_t2>/', $contenu, $info);
if (isset($info[1])) {
$aso_taxon['nt'] = $info[1];
$nt = $info[1];
} else {
$nt = 0;
}
preg_match('/<etr_id_vpt2>(\d+)<\/etr_id_vpt2>/', $contenu, $info);
if (isset($info[1])) {
$aso_taxon['nvp'] = $info[1];
$nvp = $info[1];
}
preg_match('/<en_id_n>(\d+)<\/en_id_n>/', $contenu, $info);
if (isset($info[1])) {
$aso_taxon['nn'] = $info[1];
}
if ($nt != 0) {
array_push($tab_nom_sup, $aso_taxon);
}
}
// Nous avons des taxons supérieurs
if (count($tab_nom_sup) > 0) {
$retour .= '<ul>'."\n";
$j = 0;
for($i = (count($tab_nom_sup)-1); $i >= 0; $i--) {
$contenu = file_get_contents(sprintf(EFLORE_URL_INFO_NOM_LATIN, rawurlencode($tab_nom_sup[$i]['nn'])));
preg_match("/<eni_in>(.+?)<\/eni_in>/", $contenu, $info);
if (isset($info[1])) {
$retour .= '<li>'.str_repeat('&nbsp;', ($j++ * 3)).$info[1].'</li>';
} else {
$retour .= '<li>'.str_repeat('&nbsp;', ($j++ * 3)).'???'.'</li>';
}
}
$retour .= '</ul>'."\n";
} else {
$retour .= 'Aucun taxon supérieur ou information non renseignée.';
}
return $retour;
}
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.4 2005/07/01 19:04:12 jp_milcent
* Fin gestion des niveaux taxonomiques supérieurs.
*
* Revision 1.3 2005/06/30 15:24:26 jpm
* Début des modifications pour ajout de l'arborescence de la classif.
*
* Revision 1.2 2005/06/24 09:46:43 jpm
* Test pour mathilde
*
* Revision 1.1 2005/01/28 19:48:11 jpm
* Ajout d'une fiche de synthèse.
*
* Revision 1.2 2005/01/03 19:44:40 jpm
* Ajout de la gestion de l'action "fiche".
*
* Revision 1.1 2004/12/23 20:05:17 jpm
* Début prise en maine eflore-consultation.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/serveur/.htaccess
New file
0,0 → 1,0
AddHandler application/x-httpd-php5 .php
/trunk/serveur/definitions/macro_elements/NOM_SELECTION_TEST
New file
0,0 → 1,66
<?xml version="1.0"?>
<macroelement nom="NOM_SELECTION_TEST"
version="1.0"
auteur="F. Legens">
<description>Permet de recuperer une liste de noms latin</description>
<requetes>
<requete id="r2">
<description>Retrouve la liste a partir d'un radical et pour un rang taxonomique donnee
</description>
<parametres>
<parametre nom="radical" legende="radical recherche"/>
<parametre nom="rang" legende="rang taxonomique"/>
</parametres>
<sql>SELECT nom.*, intitule.eni_intitule_nom
FROM eflore_nom_intitule as intitule,
eflore_nom as nom
WHERE intitule.eni_intitule_nom like '%${contexte['radical']}%'
and nom.en_id_nom = intitule.eni_id_nom
and nom.en_ce_rang = ${contexte['rang']}
</sql>
</requete>
<requete id="r1">
<description>Retrouve la liste a partir d'un radical
</description>
<parametres>
<parametre nom="radical" legende="radical recherche"/>
</parametres>
<sql>SELECT nom.*, intitule.eni_intitule_nom
FROM eflore_nom_intitule as intitule,
eflore_nom as nom
WHERE intitule.eni_intitule_nom like '%${contexte['radical']}%'
and nom.en_id_nom = intitule.eni_id_nom
</sql>
</requete>
</requetes>
<publications>
<publication id="" type="xml" default="true">
<description>ici la description de la publication</description>
<dom>
<liste_nom_latin root="true">
<nom nt="5">
<auteur>titi</auteur>
</nom>
<nom2/>
</liste_nom_latin>
</dom>
</publication>
<publication id="" type="xhtml">
<description>ici la description de la methode de publication</description>
<dom>
<A href="${donnees['en_id_nom']}">${donnees['en_nom_genre']}</A>
</dom>
</publication>
<publication id="" type="rdf" default="true">
<description>ici la description de la publication</description>
<dom>
<liste_nom_latin root="true">
<nom nt="5">
<auteur>titi</auteur>
</nom>
<nom2/>
</liste_nom_latin>
</dom>
</publication>
</publications>
</macroelement>
/trunk/serveur/definitions/groupes_macro_elements/selectionnoms
New file
0,0 → 1,11
<?xml version="1.0"?>
<groupemacroelement classe="selectionnoms" nom="FICHE_LISTE_NOMS"
version="1.0"
auteur="F. Legens">
<description>Ici la description du groupedemacroelements</description>
<parametres>
<parametre nom="radical" legende="ici la legende du parametre radical"/>
<parametre nom="rang" legende="ici la legende du parametre rang"/>
</parametres>
<macroelement nom="NOM_SELECTION_TEST"/>
</groupemacroelement>
/trunk/serveur/bibliotheque/fonctions/eribo_encodage.fonct.php
New file
0,0 → 1,89
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | 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: eribo_encodage.fonct.php,v 1.2 2005-03-15 12:18:30 jpm Exp $
/**
* Fonctions manipulant les encodages
*
* Fichiers contenant des fonctions manipulant l'encodage.
*
*@package eRibo
*@subpackage Fonctions
//Auteur original :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.2 $ $Date: 2005-03-15 12:18:30 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE DES FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
 
/**
* La fonction remplaceEntiteHTLM() remplace des caractères par les entités html.
*
* Cette fonction retourne un texte dans lequel touts les caractères correspondant
* à des entités html sont remplacés par la valeur de l'entité, à l'exception
* des caractères <, >, & et ".
* Cela permet de remplacer toutes les entités dans une chaine contenant du html.
*
*@param string la chaîne html à parsser.
*@return string contient la chaîne html avec les entités intégrées.
*/
 
function remplaceEntiteHTLM($texte)
{
$texte_retour = '';
$tab_entites = get_html_translation_table(HTML_ENTITIES);
unset($tab_entites['"']);
unset($tab_entites['<']);
unset($tab_entites['>']);
unset($tab_entites['&']);
$tab_entites[' & '] = ' &amp; ';
return strtr($texte, $tab_entites);
}
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/01/18 12:14:24 jpm
* Ajout d'un fichier contenant une fonction permettant d'attribuer des entités html à la place des caractères non impliqués dans le HTML.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/serveur/bibliotheque/interfaces/eribo_macro_element.interface.php
New file
0,0 → 1,6
<?
interface iMacroElement {
function __construct($aConn,$parentDataBlock);
function construire();
};
?>
/trunk/serveur/bibliotheque/interfaces/eribo_vue.interface.php
New file
0,0 → 1,6
<?php
interface iVue {
function __construct($un_block);
function serialiser();
};
?>
/trunk/serveur/bibliotheque/interfaces/eribo_modele.interface.php
New file
0,0 → 1,7
<?php
interface iModel {
function __construct($une_connexion);
function contruire();
function recupererBlockDeDonnees();
};
?>
/trunk/serveur/bibliotheque/carto/carto.php
New file
0,0 → 1,83
<?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 Cartographie. |
// | |
// | 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: carto.php,v 1.1 2005-02-17 10:58:00 jpm Exp $
/**
* Fournie une image cartographique.
*
* Fichier permettant de récupérer l'image d'une carte créer par la bibliothèque cartographique
* et de la faire passer dans les entête HTTP.
*
*@package Cartographie
//Auteur original :
*@author Nicolas MATHIEU
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.1 $ $Date: 2005-02-17 10:58:00 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
define('CAR_CHEMIN_TMP', '../../../tmp/carto/');
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
$image = imagecreatefrompng(CAR_CHEMIN_TMP.$fichier.'.png');
chmod (CAR_CHEMIN_TMP.$fichier.'.png', 755) ;
 
header("Expires: Wen, 01 Dec 1999 01:00:00 GMT");// Date du passé
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");// toujours modifié
header("Cache-Control: no-cache, must-revalidate");// HTTP/1.1
header("Pragma: no-cache"); // HTTP/1.0
header ("content-type:image/png");
imagepng($image);
unlink(CAR_CHEMIN_TMP.$fichier.'.png');
//Nous nettoyons le dossier tmp des fichiers qu'il contient:
$poignet_de_dossier = opendir(CAR_CHEMIN_TMP);
while ($fichier_dechet = readdir($poignet_de_dossier)) {
if ($fichier_dechet != '.' && $fichier_dechet != '..') {
unlink(CAR_CHEMIN_TMP.$fichier_dechet);
}
}
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
closedir($poignet_de_dossier);
exit();
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/serveur/bibliotheque/carto/carto_historique.class.php
New file
0,0 → 1,127
<?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 Cartographie. |
// | |
// | 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: carto_historique.class.php,v 1.1 2005-02-17 10:58:00 jpm Exp $
/**
* Classe Carto_Historique.
*
* Classe permettant de réaliser des cartes.
*
*@package Cartographie
//Auteur original :
*@author Nicolas MATHIEU
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.1 $ $Date: 2005-02-17 10:58:00 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
//==================================================================================================
// La classe Carto_Historique sert à pouvoir afficher les liens avec les carte précédentes
// On accède à cette fonctionnalité grâce à la méthode afficherHistoriqueCarte()
// L'objet Carto_HistoriqueCarte recoit en parametres :
// -la généalogie du niveau ou on en est (du type monde*europe*france )
// -l'url du document
// -en option : *le caractere de separation (par defaut c'est >)
// *la classe css des liens
//===================================================================================================
 
class Carto_Historique
{
var $historique;
var $url;
var $caractere_separation;
var $class_css;
var $nom;
 
function Carto_HistoriqueCarte ($objet_carte, $caractere = '&gt;', $class = '')
{
global $GS_GLOBAL;
 
$this->historique = $objet_carte->historique;
$this->url = $objet_carte->url;
$this->nom = $objet_carte->nom;
unset ($objet_carte);
$this->caractere_separation = $caractere;
$this->class_css = $class;
}//Fin du constructeur Carto_HistoriqueCarte().
function afficherHistoriqueCarte ()
{
$res='';
$tabonglet = explode ('*', $this->historique);
$tabnom = explode ('*', $this->nom);
foreach ($tabonglet as $key=>$value) {
if ($key == 0) {
$chemin = $value;
}
else {
$chemin .= '*'.$value;
}
$res.= '<a ';
if (!empty($this->class_css)) {
$res.='class="'.$this->class_css.'" ';
}
$res.='href="'.$this->url.'&amp;historique_cartes='.$chemin.'">&nbsp;'.$this->caractere_separation.'&nbsp;'.$tabnom[$key].'</a>';
}
return $res;
}//Fin de la méthode afficherHistoriqueCarte().
 
}//Fin de la classe Carto_Historique.
 
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
 
// +--------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/serveur/bibliotheque/carto/carto_action.class.php
New file
0,0 → 1,208
<?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 Cartographie. |
// | |
// | 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: carto_action.class.php,v 1.1 2005-02-17 10:58:00 jpm Exp $
/**
* Classe ActionCarte.
*
* Calsse permettant de connaître les actions à réaliser sur une carte.
*
*@package Cartographie
//Auteur original :
*@author Nicolas MATHIEU
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.1 $ $Date: 2005-02-17 10:58:00 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
//================================================================================================
//La classe Carto_Action sert a definir les paramètres nécessaires pour recueillir l'action a réaliser en
// fonction des coordonnées du point, du masque et du niveau.
//Elle remplace la fonction get_cartoAction() que l'on peut trouver dans le fichier carto_commun.php
//des différentes application utilisant la carto.
// Les champs a renseigner sont les suivants :
// -le nom de la table ($nom_table_carto_action) où sont stokée les actions à réalisées
// en fonction des couleurs
// -les 5 champs principaux de la table :
// -l'identifiant de la zone géographique (un nom, un numéro ou une abréviation) -> $nom_champ_cle
// -les couleurs -> $nom_champ_rouge, $nom_champ_vert, $nom_champ_bleu
// -l'action -> $nom_champ_action
// Elle possède une seule méthode : get_cartoAction().
//================================================================================================
 
class Carto_Action
{
var $_table_zone_geo;
var $_id_zone_geo_zone;
var $_rouge;
var $_vert;
var $_bleu;
var $_table_action;
var $_id_carte_action;
var $_id_zone_geo_action;
var $_type_zone_geo_action;
var $_action;
var $_id_carte_destination;
function Carto_Action ($table_zone_geo, $zone_chp_id_zone, $chp_rouge,
$chp_vert, $chp_bleu, $table_carto_action, $action_chp_id_carte, $action_chp_id_zone,
$action_chp_type_zone, $chp_action, $chp_destination)
{
$this->_table_zone_geo = $table_zone_geo;
$this->_id_zone_geo_zone = $zone_chp_id_zone;
$this->_rouge = $chp_rouge;
$this->_vert = $chp_vert;
$this->_bleu = $chp_bleu;
$this->_table_action = $table_carto_action;
$this->_id_carte_action = $action_chp_id_carte;
$this->_id_zone_geo_action = $action_chp_id_zone;
$this->_type_zone_geo_action = $action_chp_type_zone;
$this->_action = $chp_action;
$this->_id_carte_destination = $chp_destination;
}
//**********************************************************************************************************
// Méthode get_cartoAction($imageX, $imageY, $masque, $id_carte)
// Elle renvoit l'action a réaliser.
// Nous passons les paramètres suivant :
// -les coordonnees du point ($imageX et $imageY)
// -le masque pour recuperer la couleur ($masque)
// -l'identifiant de la carte où nous nous trouvons ($id_carte)
//**********************************************************************************************************
function _consulterActionImage($imageX, $imageY, $masque, $id_carte)
{
// Nous récuperons les valeurs RVB de la couleur sur laquelle l'utilisateur a cliqué.
// Les valeurs RVB sont stockées dans le tableau associatif $valeurs_RVB.
$masque_courant = imagecreatefrompng($masque);
$index_couleur = imagecolorat($masque_courant,$imageX,$imageY);
$valeurs_RVB = imagecolorsforindex($masque_courant, $index_couleur);
// Nous effectuons une requete dans la table carto_ACTION pour récupérer la valeur
// du champ "action", afin de savoir quoi faire.
$requete =
'SELECT '.$this->_action.', '.$this->_id_carte_destination.', '.$this->_id_zone_geo_action.
' FROM '.$this->_table_action.', '.$this->_table_zone_geo.
' WHERE '.$this->_table_zone_geo.'.'.$this->_rouge.' = '.$valeurs_RVB['red'].
' AND '.$this->_table_zone_geo.'.'.$this->_vert.' = '.$valeurs_RVB['green'].
' AND '.$this->_table_zone_geo.'.'.$this->_bleu.' = '.$valeurs_RVB['blue'].
' AND '.$this->_table_action.'.'.$this->_id_zone_geo_action.' = '.$this->_table_zone_geo.'.'.$this->_id_zone_geo_zone.
' AND '.$this->_table_action.'.'.$this->_id_carte_action.' = "'.$id_carte.'"';
$resultat=mysql_query($requete) or die('
<H2 style="text-align: center; font-weight: bold; font-size: 26px;">Erreur de requête</H2>'.
'<b>Requete : </b>'.$requete.
'<br/><br/><b>Erreur : </b>'.mysql_error());
$ligne = mysql_fetch_object ($resultat);
if (mysql_num_rows ($resultat) != 0) {
$chp_id_zone_geo = $this->_id_zone_geo_action;
$chp_action = $this->_action;
$chp_id_carte_destination = $this->_id_carte_destination;
$action['id_zone_geo'] = $ligne->$chp_id_zone_geo;
$action['type_action'] = $ligne->$chp_action;
$action['id_carte_destination'] = $ligne->$chp_id_carte_destination;
return $action;
}
}//Fin de la méthode _consulterActionImage().
//**********************************************************************************************************
// Méthode _consulterActionListe($id_zone_carte, $id_carte)
// Elle renvoit l'action a réaliser.
// Nous passons les paramètres suivant :
// -l'identifiant de la zone que l'on veut afficher
// -l'identifiant de la carte où nous nous trouvons ($id_carte)
//**********************************************************************************************************
function _consulterActionListe($id_zone_carte, $id_carte)
{
// Nous effectuons une requete dans la table carto_ACTION pour récupérer la valeur
// du champ "action", afin de savoir quoi faire.
$requete =
'SELECT '.$this->_action.', '.$this->_id_carte_destination.', '.$this->_id_zone_geo_action.
' FROM '.$this->_table_action.', '.$this->_table_zone_geo.
' WHERE '.$this->_table_action.'.'.$this->_id_zone_geo_action.' = '.$this->_table_zone_geo.'.'.$this->_id_zone_geo_zone.
' AND '.$this->_table_zone_geo.'.'.$this->_id_zone_geo_zone.' = "'.$id_zone_carte.'"'.
' AND '.$this->_table_action.'.'.$this->_id_carte_action.' = "'.$id_carte.'"';
$resultat=mysql_query($requete) or die('
<H2 style="text-align: center; font-weight: bold; font-size: 26px;">Erreur de requête</H2>'.
'<b>Requete : </b>'.$requete.
'<br/><br/><b>Erreur : </b>'.mysql_error());
$ligne = mysql_fetch_object ($resultat);
if (mysql_num_rows ($resultat) != 0) {
$chp_id_zone_geo = $this->_id_zone_geo_action;
$chp_action = $this->_action;
$chp_id_carte_destination = $this->_id_carte_destination;
$action['id_zone_geo'] = $ligne->$chp_id_zone_geo;
$action['type_action'] = $ligne->$chp_action;
$action['id_carte_destination'] = $ligne->$chp_id_carte_destination;
return $action;
}
}//Fin de la méthode get_cartoAction().
}//Fin de la classe Carto_Action.
 
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
 
// +--------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/serveur/bibliotheque/carto/carto_carte.class.php
New file
0,0 → 1,805
<?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 Cartographie. |
// | |
// | 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: carto_carte.class.php,v 1.1 2005-02-17 10:58:00 jpm Exp $
/**
* Classe Carto_Carte.
*
* Calsse permettant de réaliser des cartes.
*
*@package Cartographie
//Auteur original :
*@author Nicolas MATHIEU
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.1 $ $Date: 2005-02-17 10:58:00 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
require 'carto_action.class.php';
require 'carto_couleur.class.php';
require 'carto_historique.class.php';
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
class Carto_Carte
{
var $id;
var $_id_zone_geo_carte;
var $nom;
var $masque;
var $fond;
var $chemin;
var $image;
var $fils;
var $url;
var $_info_table_zg;
var $filiation;
var $image_x;
var $image_y;
var $historique_cartes;
var $liste_zone_carte;
var $historique;
// La couleur dominante ( $maxiRVB ), la couleur la plus claire ($miniRVB) et la couleur
// intermédiaire précédant le maximum ( $mediumRVB ) au cas ou il y aurait un trop grand
//ecart entre les deux plus grandes valeurs.
var $_zeroR;
var $_zeroV;
var $_zeroB;
var $_miniR;
var $_miniV;
var $_miniB;
var $_mediumR;
var $_mediumV;
var $_mediumB;
var $_maxiR;
var $_maxiV;
var $_maxiB;
//Le type de formule mathématique permettant de colorier la carte
var $_formule_coloriage;
//L'action à réaliser
var $_action;
// +--------------------------------------------------------------------------------------------------+
// Conifugration de la carto
var $_maxiB;
// +--------------------------------------------------------------------------------------------------+
function _construct($id, $id_zone_geo_carte, $nom, $masque, $fond, $chemin, $info_table)
{
$this->id = $id;
$this->_id_zone_geo_carte = $id_zone_geo_carte;
$this->nom = $nom;
$this->masque = $chemin.$masque;
$this->fond = $chemin.$fond;
$this->chemin = $chemin;
$this->_info_table_zg = $info_table;
$this->_action = new Carto_Action($info_table['nom_table_zone'],$info_table['nom_chp_id_zone'], $info_table['nom_chp_rouge'], $info_table['nom_chp_vert'], $info_table['nom_chp_bleu'],
'carto_ACTION', 'CA_ID_Carte', 'CA_ID_Zone_geo', 'CA_Type_zone', 'CA_Action', 'CA_ID_Carte_destination');
$this->fils = array();
$this->filiation = $id;
$this->historique_cartes = '';
$this->liste_zone_carte = '';
$this->definirCouleurs();
$this->definirFormuleColoriage();
}
// +--------------------------------------------------------------------------------------------------+
function definirCouleurs (
$couleur_zero_R = '255', $couleur_zero_V = '255', $couleur_zero_B = '255',
$couleur_mini_R = '210', $couleur_mini_V = '230', $couleur_mini_B = '210',
$couleur_medium_R = '92', $couleur_medium_V = '181', $couleur_medium_B = '92',
$couleur_maxi_R = '0', $couleur_maxi_V = '127', $couleur_maxi_B = '0')
{
$this->_zeroR = $couleur_zero_R;
$this->_zeroV = $couleur_zero_V;
$this->_zeroB = $couleur_zero_B;
$this->_miniR = $couleur_mini_R;
$this->_miniV = $couleur_mini_V;
$this->_miniB = $couleur_mini_B;
$this->_mediumR = $couleur_medium_R;
$this->_mediumV = $couleur_medium_V;
$this->_mediumB = $couleur_medium_B;
$this->_maxiR = $couleur_maxi_R;
$this->_maxiV = $couleur_maxi_V;
$this->_maxiB = $couleur_maxi_B;
}
function definirFormuleColoriage ($nomFormuleColoriage = 'defaut')
{
$this->_formule_coloriage = $nomFormuleColoriage;
}
//********************************************************************************************************
// La méthode donnerImageSimple ($objet) permet de récupérer une image non cliquable.
//*********************************************************************************************************
function donnerImageSimple($objet)
{
$nom_fichier_image = $this->_donnerIdUnique();
$objet->_lancerColoriage('', $nom_fichier_image);
$retour = '<img src="cartographie/bibliotheque/lib.carto.extractimg.php?fichier='.$nom_fichier_image.'" alt="Carte" />';
return $retour;
}
//********************************************************************************************************
// La methode ajouterFils() est essentielle. Elle permet d'ajouter toutes les sous cartes voulues.
// Il faut lui indiquer, comme a la carte du niveau du dessus, son nom, le masque, le fond et info_table_couleur.
// On a ainsi une inclusion d'objets les uns dans les autres.
//*********************************************************************************************************
function ajouterFils($id, $id_zone_geo_carte, $nom, $masque, $fond, $info_table)
{
$this->fils[$id] = new Carto_Carte ($id, $id_zone_geo_carte, $nom, $masque, $fond, $this->chemin, $info_table);
//Si on ajoute à la carte du monde comme fils celle de l'europe, alors
//on aura comme valeur pour $this->filiation de la carte d'europe : monde*europe
$this->fils[$id]->filiation = $this->filiation.'*'.$id;
$this->fils[$id]->url = $this->url;
//Si on ajoute à la carte du monde dont le nom est 'Monde' comme fils celle de l'europe,
//dont le nom est 'Europe', alors on aura comme valeur pour $this->nom de la carte d'europe : Monde*Europe
$this->fils[$id]->nom = $this->nom.'*'.$nom;
$this->fils[$id]->historique_cartes = $this->historique_cartes;
}
//*********************************************************************************************************
// La methode donnerFormulaireImage() est la methode principale de la carto. C'est elle qui gere ce qu'il y a faire en
// fonction de l'action de l'utilisateur.
// Trois cas se distinguent :
// -soit l'utilisateur a clique sur un point de la carte.
// -soit il a clique sur un des liens que l'on a afficher avec la méthode afficherHistoriqueCarte de l'objet Carto_HistoriqueCarte.
// -soit il a sélectionné une zone géographique dans la liste déroulante.
// Elle renvoit a la fin:
// -soit une nouvelle carte coloriée
// -soit false.
//**********************************************************************************************************
function donnerFormulaireImage ()
{
global $GS_GLOBAL;
$res = '';
// Nous commençons par tester tout d'abords si nous venons d'une autre carte. Pour cela nous vérifions,
// si les attributs $this->image_x et $this->image_y de la classe Carte existe ou ne sont pas null.
// La carte est une image appelée par une balise <input type="image"> et non par une balise classique <img>.
// Ansi, lorsqu'on clique sur la carte le formulaire appelle (via l'url du formulaire) l'application
// utilisant la classe carte et lui renvoit deux variables contenant les coordonnées x et y du clic.
// L'application instancie à nouveau les objets cartes mais cette fois ci la carte affichée dépendra des
// informations founit par une table de la base de données.
// La classe carto_action instanciée dans l'application utilisant la classe carte fournit les noms
// des champs et celui de la table contenant les valeur RVB de chaque zone des cartes, l'identifiant
// de la zone et l'action à entreprendre pour la zone conssidérée.
// La méthode imgform() utilise la méthode get_cartoAction() de l'objet Carto_Action pour connaître
// en fonction des coordonnées du clic l'action à entreprendre.
// Quoi qu'il arrive, on ouvre la balise formulaire
$res = '<form action="'.$this->url.'" method="post">'."\n";
$res .= '<p>'.CAR_CLIQUER_ACCEDER ;
if (isset ($this->image_x) && ($this->image_x != '') && isset ($this->image_y) && ($this->image_y != '')) {
// on regarde ici si l'on a pas un objet de plus bas niveau présent dans la variable de session carte
//a charger a la place de l'objet de plus haut niveau
$var_session_retour = $_SESSION['carte'] ;
if ($var_session_retour) {
$image_x = $this->image_x;
$image_y = $this->image_y;
$liste_zone_carte = $this->liste_zone_carte;
// Nous chargons alors l'ojet approprié en descendant grâce a la généalogie
 
$historique_cartes = explode('*',$this->historique_cartes);
foreach ($historique_cartes as $key => $value) {
if ($key != 0) {
$this = $this->fils[$value];
}
}
$this->image_x = $image_x;
$this->image_y = $image_y;
$this->liste_zone_carte = $liste_zone_carte;
unset ($_SESSION['carte']) ;
}
// on regarde qu'est-ce qu'on doit faire grace a la methode _consulterAction() de l'objet Carto_Action
$action = $this->_action->_consulterActionImage($this->image_x, $this->image_y, $this->masque, $this->id);
// Nous distinguons 2 cas :
//le cas ou il faut afficher une nouvelle carte ... :
if ($action['type_action'] == 'Aller_a') {
$id_carte_destination = $action['id_carte_destination'] ;
$this->fils[$id_carte_destination]->liste_zone_carte = $this->liste_zone_carte;
$res .= ''.$this->fils[$id_carte_destination]->_donnerListeZoneCarte()."<br />\n";
$res .= '<input type="image" src="';
$id_image = $this->_donnerIdUnique();
$this->fils[$id_carte_destination]->_lancerColoriage($id_image);
$obj = serialize($this->fils[$id_carte_destination]);
$_SESSION['carte'] = $obj ;
$this->historique = $this->fils[$id_carte_destination]->filiation;
$this->id = $this->fils[$id_carte_destination]->id;
$this->nom = $this->fils[$id_carte_destination]->nom;
}
//Dans le cas où l'on veut rappeler une nouvelle carte, il se peut que la nouvelle carte à rappeler
//soit la même que précédement.
//Cette possibilité peut se présenter quand on clique sur un zone blanche d'une carte (càd dans la mer)
//Là, on recharge la carte précédente :
elseif ($action['type_action'] == 'Recharger') {
$res .= ''.$this->_donnerListeZoneCarte()."<br />\n";
$res .= '<input type="image" src="';
$id_image = $this->_donnerIdUnique();
$this->_lancerColoriage($id_image);
$obj = serialize($this);
$_SESSION['carte'] = $obj ;
$this->historique = $this->filiation;
}
// ... et le cas ou il faut lancer le dernier niveau
else if ($action['type_action'] == 'Stop') {
unset ($_SESSION['carte']) ;
$this->historique = $this->filiation.'*'.$action['id_zone_geo'];
$obj = serialize($this);
$_SESSION['carte'] = $obj ;
return false;
}
}
elseif ($this->liste_zone_carte != '') {
$liste_zone_carte = $this->liste_zone_carte;
$historique_cartes = explode('*',$this->historique_cartes);
foreach ($historique_cartes as $key => $value) {
if ($key != 0) {
$this = $this->fils[$value];
}
}
$this->liste_zone_carte = $liste_zone_carte;
$res .= ''.$this->_donnerListeZoneCarte($this->liste_zone_carte)."<br />\n";
$res .= '<input type="image" src="';
$id_image = $this->_donnerIdUnique();
$this->_lancerColoriage($id_image, '', $this->liste_zone_carte);
$this->historique = $this->historique_cartes;
$obj = serialize($this);
$_SESSION['carte'] = $obj ;
}
// On teste maintenant si l'on vient d'un lien. Si c'est le cas on a recu un argument
// qui nous donne la "genealogie" de la carte que l'on doit afficher
else if ($this->historique_cartes) {
// Nous chargons alors l'ojet approprié en descendant grâce a la généalogie
$historique_cartes = explode('*',$this->historique_cartes);
foreach ($historique_cartes as $key => $value) {
if ($key != 0) {
$this = $this->fils[$value];
}
}
// une foit que l'on a charge le bon objet nous le colorions
$res .= ''.$this->_donnerListeZoneCarte()."<br />\n";
$res .= '<input type="image" src="';
$id_image = $this->_donnerIdUnique();
$this->_lancerColoriage($id_image);
$this->historique = $this->historique_cartes;
$obj = serialize($this);
$_SESSION['carte'] = $obj ;
}
// Enfin si on ne vient pas d'une carte ou d'un lien c'est que l'on vient de l'onglet carto du menu
// et on affiche alors la premiere carte
else {
unset ($_SESSION['carte']) ;
$res .= ''.$this->_donnerListeZoneCarte()."<br />\n";
$res .= '<input type="image" src="';
$id_image = $this->_donnerIdUnique();
$this->_lancerColoriage($id_image);
$this->historique = $this->id;
$obj = serialize($this);
$_SESSION['carte'] = $obj ;
}
$res .= CAR_CHEMIN_LIBRAIRIE.'/lib.carto.extractimg.php?fichier='.$this->id.$id_image.'"';
$res .= ' name="image" onmouseover="javascript:show(\'d\');" onmouseout="javascript:show(\'d\');" />'."\n";
$res .= '<input type="hidden" name="historique_cartes" value="'.$this->historique.'" /></p>';
$res .= '</form>'."\n";
return $res;
}
/*|=============================================================================================|*/
/*| LES METHODES PRIVEES |*/
/*|---------------------------------------------------------------------------------------------|*/
function _donnerListeZoneCarte($zone_par_defaut = '')
{
$retour = '';
$requete =
'SELECT '.$this->_info_table_zg['nom_chp_id_zone'].', '.$this->_info_table_zg['nom_chp_nom_zone'].
' FROM '.$this->_info_table_zg['nom_table_zone'];
if ($this->_info_table_zg['nom_chp_zone_sup'] != ''){
if(ereg("[a-z]+",$this->_id_zone_geo_carte)){
$requete .=
' WHERE '.$this->_info_table_zg['nom_chp_zone_sup'].' = "'.$this->_id_zone_geo_carte.'"';
}
else{
$requete .=
' WHERE '.$this->_info_table_zg['nom_chp_zone_sup'].' = '.$this->_id_zone_geo_carte;
}
}
$requete .=
' ORDER BY '.$this->_info_table_zg['nom_chp_nom_zone'].' ASC';
$resultat = mysql_query ($requete) or die('
<H2 style="text-align: center; font-weight: bold; font-size: 26px;">Erreur de requête</H2>'.
'<b>Requete : </b>'.$requete.
'<br/><br/><b>Erreur : </b>'.mysql_error());
$i=0;
$retour = '<select name="liste_zone_carte" onchange="javascript:this.form.submit();">'."\n";
$retour .= '<option value="">Visualiser une zone :</option>'."\n";
$nom_chp_nom_zone = $this->_info_table_zg['nom_chp_nom_zone'];
$nom_chp_id_zone = $this->_info_table_zg['nom_chp_id_zone'];
while ($ligne = mysql_fetch_object ($resultat)) {
if ($zone_par_defaut == $ligne->$nom_chp_id_zone){
$retour .= '<option value="'.$ligne->$nom_chp_id_zone.'" selected="selected">'.$ligne->$nom_chp_nom_zone.'</option>'."\n";
}
else {
$retour .= '<option value="'.$ligne->$nom_chp_id_zone.'">'.$ligne->$nom_chp_nom_zone.'</option>'."\n";
}
$i++;
}
$retour .= '</select>'."\n";
return $retour;
}
//==============================================================================
// METHODE _lancerColoriage()
//
// Elle lance le coloriage de l'image.
// Elle est lancée toute seule par la méthode donnerFormulaireImage().
// Les informations qui lui sont necessaires sont déjà données à l'objet carte (fond, info_table_couleur).
//==============================================================================
function _lancerColoriage ($id_image = '_00', $nom_fichier = '', $id_zone_a_reperer = '')
{
$this->image = imagecreatefrompng($this->fond);
$this->_colorierImage ($this->image, $this->_info_table_zg['nom_table_zone'], $this->_info_table_zg['nom_chp_id_zone'], $this->_info_table_zg['nom_chp_rouge'],
$this->_info_table_zg['nom_chp_vert'], $this->_info_table_zg['nom_chp_bleu'], $this->_info_table_zg['nom_chp_zone_sup'],
$this->_info_table_zg['tableau_valeurs_zone'], $id_zone_a_reperer) ;
if ($nom_fichier != '') {
imagepng(&$this->image,'tmp/carto/'.$nom_fichier.'.png');
//$this->image = imagepng(&$this->image);
}
else {
imagepng(&$this->image,'tmp/carto/'.$this->id.$id_image.'.png');
//imagepng(&$this->image);
}
}
//==============================================================================
// METHODE _colorierImage()
//
// Elle réalise le coloriage de l'image.
//==============================================================================
function _colorierImage (&$image_fond, $table_zone_geo, $chp_id_zone_couleur, $chp_rouge, $chp_vert, $chp_bleu, $chp_zone_sup, $tableau_valeurs_zone, $id_zone_a_reperer)
{
//----------------------------------------------------------------------------
// Cherche les valeurs RVB de la couleur de chaque zone géographique et les rentre dans
//un tableau d'objets Carto_InformationCouleur (voir la description de la classe ci-dessus.
$requete_01 =
'SELECT *'.
' FROM '.$table_zone_geo;
if ($chp_zone_sup != ''){
if(ereg("[a-z]+",$this->_id_zone_geo_carte)){
$requete_01 .=
' WHERE '.$chp_zone_sup.' = "'.$this->_id_zone_geo_carte.'"';
}
else{
$requete_01 .=
' WHERE '.$chp_zone_sup.' = '.$this->_id_zone_geo_carte;
}
}
$resultat_01 = mysql_query ($requete_01) or die('
<H2 style="text-align: center; font-weight: bold; font-size: 26px;">Erreur de requête</H2>'.
'<b>Requete : </b>'.$requete_01.
'<br/><br/><b>Erreur : </b>'.mysql_error());
$i=0;
$attachments = array();
while ($ligne_01 = mysql_fetch_object ($resultat_01)) {
$attachments[$i] = new Carto_InformationCouleur ($ligne_01->$chp_id_zone_couleur, $ligne_01->$chp_rouge, $ligne_01->$chp_vert, $ligne_01->$chp_bleu);
$i++;
}
//Nous libérons toute la mémoire associée à l'identifiant de résultat.
mysql_free_result ($resultat_01);
//----------------------------------------------------------------------------
// On realide l'association entre l'index des couleurs et la zone de meme couleur
$attachments = $this->_construireAssociationIndexZone ($image_fond, $attachments);
//----------------------------------------------------------------------------
//Dans l'application qui utilise la classe carte, nous avons instancié un tableau
//associatif qui contient en clé l'identifiant d'une zone géographique et en valeur
//un nombre (qui peut-être un nombre d'inscrit, d'institutions, de taxons...).
// Nous récupérons ci-dessous la valeur minimum autre que 0 présente dans ce tableau
//puis une valeur conscidérée comme maximum
if (!is_array($tableau_valeurs_zone)) {
$mini = 0;
$medium = 0;
$maxi = 0;
$nbre_valeurs = 0;
}
else {
if (count($tableau_valeurs_zone) == 0) {
$mini=0;
$medium = 0;
$maxi=0;
}
else {
$i=0;
foreach ($tableau_valeurs_zone as $cle => $valeur) {
//Nous recherchons le minimum, le maximum et le la valeur médium juste au dessous du maximum.
if ($valeur != 0) {
$tablo_valeurs[$i] = $valeur;
$i++;
}
}
//Nombre d'entrées dans le tableau de valeurs non nulles :
$nbre_valeurs = count($tablo_valeurs);
$somme_valeurs = array_sum($tablo_valeurs);
$tablo_frequences = array_count_values($tablo_valeurs);
$nbre_frequences = count($tablo_frequences);
if ($nbre_valeurs > 0){
//Nous trions le tableau dans l'ordre croissant :
sort($tablo_valeurs);
//Nous récupérons la valeur la plus petite :
$mini = $tablo_valeurs[0];
$maxi = $tablo_valeurs[$nbre_valeurs-1];
isset($tablo_valeurs[$nbre_valeurs-2]) ? $medium = $tablo_valeurs[$nbre_valeurs-2] : $medium = 0;
$moyenne = $somme_valeurs/$nbre_valeurs;
$ecart_au_carre_moyen = 0;
for ($i = 0; $i < $nbre_valeurs; $i++) {
$ecart_au_carre_moyen += pow(($tablo_valeurs[$i] - $moyenne), 2);
}
$variance = $ecart_au_carre_moyen/$nbre_valeurs;
$ecart_type = sqrt($variance);
$moyenne = round($moyenne, 0);
$variance = round($variance, 0);
$ecart_type = round($ecart_type, 0);
/*echo 'Nombre de valeurs : '.$nbre_valeurs.'<br>';
echo 'Nombre de frequences : '.$nbre_frequences.'<br>';
echo 'Moyenne : '.$moyenne.'<br>';
echo 'Variance : '.$variance.'<br>';
echo 'Ecart-type : '.$ecart_type.'<br>';
echo 'Formule de coloriage : '.$this->_formule_coloriage.'<br>';
echo "mini : $mini medium : $medium maxi : $maxi<br/>";
*/
}
}
}
 
//----------------------------------------------------------------------------
// Nous réalisons le coloriage de toutes les zones :
$requete_03 =
"SELECT $chp_id_zone_couleur ".
"FROM $table_zone_geo";
$resultat_03 = mysql_query ($requete_03) or die('
<H2 style="text-align: center; font-weight: bold; font-size: 26px;">Erreur de requête</H2>'.
'<b>Requete : </b>'.$requete_03.
'<br/><br/><b>Erreur : </b>'.mysql_error());
while ($ligne_03 = mysql_fetch_object ($resultat_03)) {
$id_zone_geo = $ligne_03->$chp_id_zone_couleur;
if (!isset ($tableau_valeurs_zone[$id_zone_geo])) {
$tableau_valeurs_zone[$id_zone_geo] = 0;
}
//Nous cherchons la couleur a afficher pour chaque zone.
if ($tableau_valeurs_zone[$id_zone_geo] != 0) {
//echo 'ZONE:'.$id_zone_geo."<br/>";
//echo $tableau_valeurs_zone[$id_zone_geo]."<br/>";
$theColor = $this->_donnerCouleur (
$this->_miniR, $this->_miniV, $this->_miniB,
$this->_mediumR , $this->_mediumV , $this->_mediumB ,
$this->_maxiR , $this->_maxiV , $this->_maxiB ,
$mini, $medium, $maxi, $nbre_valeurs, $ecart_type, $moyenne, $tablo_valeurs,
$tablo_frequences, $nbre_frequences,
$tableau_valeurs_zone[$id_zone_geo],
$this->_formule_coloriage);
//echo $theColor['R'].'<br>';
//echo $theColor['V'].'<br>';
//echo $theColor['B'].'<br>';
}
else {
$theColor['R'] = $this->_zeroR;
$theColor['V'] = $this->_zeroV;
$theColor['B'] = $this->_zeroB;
}
//Nous réalisons le coloriage de toutes les zones de l'image avec la couleur obtenue.
$this->_remplacerCouleur ($image_fond, $attachments, $id_zone_geo, $theColor['R'], $theColor['V'], $theColor['B'], $id_zone_a_reperer);
}
//Nous libérons toute la mémoire associée à l'identifiant de résultat de la requête.
mysql_free_result ($resultat_03);
}
//==============================================================================
// METHODE _construireAssociationIndexZone ($image, &$att)
//
// Le tableau $att est passé par référence. La méthode modifie donc directement
// le tableau et ne renvoit donc rien.
// Attache dans un tableau $att, contenant sous forme d'objet (Carto_ColorInfo)
// les valeurs RVB des zones d'une image, la valeur de l'index correspondant
// à la couleur de la zone.
// Note : les images en question sont constituées de zones distincte possédant
// chacune une couleur unique et unie.
//==============================================================================
function _construireAssociationIndexZone (&$image_fond, &$att)
{
// Nous récupérons le nombre de couleur différentes contenues dans l'image.
//echo $this->fond.'<BR>';
$image_fond = imagecreatefrompng($this->fond);
$taille_palette = imagecolorstotal ($image_fond);
//echo $taille_palette.'<br>';
// Pour chaque couleur contenue dans l'image, nous cherchons l'objet correspondant
// dans le tableau $att, qui contient des informations sur chaque zone de l'image,
// et nous attribuons à l'objet la valeur de l'index de sa couleur dans l'image.
for ($i = 0; $i < $taille_palette; $i++) {
$valeurs_RVB = array();
$valeurs_RVB = imagecolorsforindex ($image_fond, $i);
for ($j = 0; $j < count ($att); $j++) {
if (($att[$j]->rouge == $valeurs_RVB['red']) && ($att[$j]->vert == $valeurs_RVB['green']) && ($att[$j]->bleu == $valeurs_RVB['blue'])) {
$att[$j]->index = $i;
//echo 'ICI'.$att[$j]->id_zone.$att[$j]->index.'<br>';
break;
}
}
}
return $att;
}//Fin méthode _construireAssociationIndexZone()
 
//==============================================================================
// METHODE _donnerCouleur()
//------------------------------------------------------------------------------
// Renvoie pour une valeur donnee la couleur a mettre
//------------------------------------------------------------------------------
// ENTREE
// $miniR : valeur rouge du minimum
// $miniV : valeur vert du minimum
// $miniB : valeur blue du minimum
// $maxiR : valeur rouge du maximum
// $maxiV : valeur vert du maximum
// $maxiB : valeur bleu du maximum
// $mediumR : valeur rouge du deuxieme maximum
// $mediumV : valeur vert du deuxieme maximum
// $mediumB : valeur bleu du deuxieme maximum
// $mini : valeur mini sur l'echelle
// $medium : valeur juste au dessous du maximum sur l'echelle
// $maxi : valeur maxi sur l'echelle
// $val : valeur dont on cherche la couleur
//------------------------------------------------------------------------------
// SORTIE
// $couleur array donne la couleur pour la valeur demande ($val)
//------------------------------------------------------------------------------
function _donnerCouleur ($miniR, $miniV, $miniB, $mediumR, $mediumV, $mediumB, $maxiR,
$maxiV, $maxiB, $mini, $medium, $maxi, $nbre_valeurs, $ecart_type, $moyenne, $tablo_valeurs, $tablo_frequences, $nbre_frequences, $val, $formuleColoriage)
{
if ($formuleColoriage == 'defaut'){
if ($val == $maxi) {
$couleur['R'] = $maxiR;
$couleur['V'] = $maxiV;
$couleur['B'] = $maxiB;
}
if ($val == $mini && $val != $maxi) {
$couleur['R'] = $miniR;
$couleur['V'] = $miniV;
$couleur['B'] = $miniB;
}
if ($maxi/10 > $medium && $maxi/40 < $medium) {
$diff = $medium - $mini;
if ($diff > 0 && $val != $medium && $val != $maxi) {
$diffR = $mediumR - $miniR;
$diffV = $mediumV - $miniV;
$diffB = $mediumB - $miniB;
$variationR = round ( ($diffR/$diff ), 0 );
$variationV = round ( ($diffV/$diff ), 0 );
$variationB = round ( ($diffB/$diff ), 0 );
$couleur['R'] = couleur_bornerNbre(($miniR + ($val * $variationR)), 0, 255);
$couleur['V'] = couleur_bornerNbre(($miniV + ($val * $variationV)), 0, 255);
$couleur['B'] = couleur_bornerNbre(($miniB + ($val * $variationB)), 0, 255);
}
else if ($val == $medium) {
$couleur['R'] = $mediumR;
$couleur['V'] = $mediumV;
$couleur['B'] = $mediumB;
}
}
else {
$diff = $maxi - $mini;
if ($diff > 0 && $val != $maxi && $val != $mini) {
$diffR = $maxiR - $miniR;
$diffV = $maxiV - $miniV;
$diffB = $maxiB - $miniB;
$variationR = round ( ($diffR/$diff ), 0 );
$variationV = round ( ($diffV/$diff ), 0 );
$variationB = round ( ($diffB/$diff ), 0 );
$couleur['R'] = couleur_bornerNbre(($miniR + ($val * $variationR)), 0, 255);
$couleur['V'] = couleur_bornerNbre(($miniV + ($val * $variationV)), 0, 255);
$couleur['B'] = couleur_bornerNbre(($miniB + ($val * $variationB)), 0, 255);
}
else if ($diff == 0){
$couleur['R'] = $mediumR;
$couleur['V'] = $mediumV;
$couleur['B'] = $mediumB;
}
}
}
elseif ($formuleColoriage == 'ecart_type') {
if ($ecart_type == 0) {
$couleur['R'] = $maxiR;
$couleur['V'] = $maxiV;
$couleur['B'] = $maxiB;
}
elseif ($ecart_type >= 1 && $ecart_type <= 15) {
if ($val == $mini) {
$couleur['R'] = $miniR;
$couleur['V'] = $miniV;
$couleur['B'] = $miniB;
}
elseif ($val == $medium) {
$couleur['R'] = $mediumR;
$couleur['V'] = $mediumV;
$couleur['B'] = $mediumB;
}
elseif ($val == $maxi) {
$couleur['R'] = $maxiR;
$couleur['V'] = $maxiV;
$couleur['B'] = $maxiB;
}
else {
$dif_valeur_maxi_mini = $maxi - $mini;
$diffR = $maxiR - $miniR;
$diffV = $maxiV - $miniV;
$diffB = $maxiB - $miniB;
$variationR = round ( ($diffR/$dif_valeur_maxi_mini ), 0 );
$variationV = round ( ($diffV/$dif_valeur_maxi_mini ), 0 );
$variationB = round ( ($diffB/$dif_valeur_maxi_mini ), 0 );
$couleur['R']=$miniR + ($val * $variationR);
$couleur['V']=$miniV + ($val * $variationV);
$couleur['B']=$miniB + ($val * $variationB);
}
}
elseif ($ecart_type > 15) {
//Le tableau est trié de la plus petite à la plus grande clé.
ksort($tablo_frequences);
$i = 0;
foreach ($tablo_frequences as $cle => $valeur){
//Nous cherchons la correspondance entre la valeur et la clé.
if ($cle == $val) {
//Pour faire le Rouge, Vert, Bleu
$couleur['R'] = $miniR + ($i/$nbre_frequences) * ($maxiR - $miniR);
$couleur['V'] = $miniV + ($i/$nbre_frequences) * ($maxiV - $miniV);
$couleur['B'] = $miniB + ($i/$nbre_frequences) * ($maxiB - $miniB);
}
$i++;
}
}
}
return $couleur;
}//Fin méthode _donnerCouleur()
 
//==============================================================================
// METHODE _remplacerCouleur ($img, $att, $id_zone_geo, $r, $g, $b)
//
// $img is the image, $att an array of carto_colorinfo objects, $id_zone_geo the name
// of an object of $att, ($r, $g, $b) the new color.
//
// In the palette of $img, the color matching with $id_zone_geo is modified.
//==============================================================================
function _remplacerCouleur (&$image, &$atta, $id_zone_geo, $rouge, $vert, $bleu, $id_zone_a_reperer)
{
// Nous recherchons la valeur de l'index.
$index = -1;
for ($i = 0; $i < count ($atta); $i++) {
if ($atta[$i]->id_zone == $id_zone_geo) {
$index = $atta[$i]->index;
//Dans le cas où nous voulons repérer une zone sur la carte :
if($id_zone_geo == $id_zone_a_reperer) {
$rouge = 255;
$vert = 0;
$bleu = 0;
}
break;
}
}
// Nous mettons à jour l'image de la carte avec la valeur de l'index.
if ($index >= 0) {
imagecolorset (&$image, $index, $rouge, $vert, $bleu);
}
}//Fin de la méthode _remplacerCouleur
//==============================================================================
// METHODE _donnerIdUnique ()
//
// Cette méthode privée retourne un identifiant de 32 caractères unique.
//
//==============================================================================
function _donnerIdUnique ()
{
$id = '';
$id = md5 (uniqid (rand()));
return $id;
}//Fin de la méthode _donnerIdUnique()
 
 
}//Fin de la classe Carto_Carte()
 
 
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
 
 
 
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/serveur/bibliotheque/carto/carto_couleur.class.php
New file
0,0 → 1,191
<?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 Cartographie. |
// | |
// | 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: carto_couleur.class.php,v 1.1 2005-02-17 10:58:00 jpm Exp $
/**
* Classe Carto_Couleur.
*
* Classe permettant de réaliser des cartes.
*
*@package Cartographie
//Auteur original :
*@author Nicolas MATHIEU
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.1 $ $Date: 2005-02-17 10:58:00 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
//==============================================================================
// La classe Carto_Couleur n'est utilisée que par la classe carte.
// C'est une classe privée.
// Elle sert à stocker les informations (RVB et index) sur la couleur d'une
// zone d'une image.
//==============================================================================
 
class Carto_Couleur
{
// +--------------------------------------------------------------------------------------------------+
// LES ATTRIBUTS DE LA CLASSE
var $id_zone;
var $rouge;
var $vert;
var $bleu;
var $index;
// +--------------------------------------------------------------------------------------------------+
// LE CONSTRUCTEUR DE LA CLASSE
function _construct ($id_zone, $rouge, $vert, $bleu)
{
$this->id_zone = $id_zone;
$this->rouge = $rouge;
$this->vert = $vert;
$this->bleu = $bleu;
$this->index = -1;
}
// +--------------------------------------------------------------------------------------------------+
// LES METHODES PUBLIQUES
/**
* La fonction array couleur_hexadecimalAuRgb(string color) renvoie des valeurs de couleur en RGB.
*
*Cette fonction prend une valeur de couleur codée en hexadécimal et retourne
*les valeurs RGB correspondantes sous forme de tableau.
*Exemple d'utilisation:
*$rgb = couleur_hexadecimalAuRgb("fffc49");
*echo "<br>couleur_hexadecimalAuRgb de 'fffc49' : ".$rgb['R']." ".$rgb['V']." ".$rgb['B'];
*
*@author iubito <sylvain_machefert@yahoo.fr>
*@copyright iubito - http://iubito.free.fr/ - 2003
*
*@param string $couleur représente une couleur codée en héxadécimal.
*
*@return array tableau associatif contenant les 3 valeurs RGB, avec clé du rouge 'R',
* du vert 'V' et enfin du bleu 'B'.
*/
function couleur_hexadecimalAuRgb($couleur_html)
{
//gestion du #...
if (substr($couleur_html, 0, 1) == "#") {
$couleur_html = substr($couleur_html, 1, 6);
}
$tablo_rgb['R'] = hexdec(substr($couleur_html, 0, 2));
$tablo_rgb['V'] = hexdec(substr($couleur_html, 2, 2));
$tablo_rgb['B'] = hexdec(substr($couleur_html, 4, 2));
return $tablo_rgb;
}
/**
* La fonction string couleur_rgbAuHexadecimal(array tablo) renvoie la valeur d'une
*couleur en héxadécimal.
*
*Cette fonction prend un tableau de valeurs d'une couleur codées en RGB et retourne
*la valeur hexadécimal correspondante sous forme de chaîne.
*C'est la réciproque exacte de la fonction couleur_hexadecimalAuRgb.
*
*@author iubito <sylvain_machefert@yahoo.fr>
*@copyright iubito - http://iubito.free.fr/ - 2003
*
*@param array $tablo_RGB représente un tableau associatif avec les valeurs RGB
*d'une couleur.Les trois clés du tableau sont : R pour rouge, V pour vert et B pour bleu.
*
*@return string chaîne contenant la valeur de la couleur sous forme héxadécimale.
*/
function couleur_rgbAuHexadecimal($tablo_rgb)
{
//Vérification des bornes...
foreach($tablo_rgb as $cle => $valeur) {
$tablo_rgb[$cle] = bornes($tablo_rgb[$cle],0,255);
}
//Le str_pad permet de remplir avec des 0
//parce que sinon couleur_rgbAuHexadecimal(array(0,255,255)) retournerai #0ffff<=manque un 0 !
return "#".str_pad(dechex(($tablo_rgb['R']<<16)|($tablo_rgb['V']<<8)|$tablo_rgb['B']),6,"0",STR_PAD_LEFT);
}
/**
* La fonction int couleur_bornerNbre(int nb, int min, int max) borne des nombres.
*
*Cette fonction permet de borner la valeur d'un nombre entre un minimum $mini et
*un maximum $maxi.
*
*@author iubito <sylvain_machefert@yahoo.fr>
*@copyright iubito - http://iubito.free.fr/ - 2003
*
*@param integer $nbre le nombre à borner.
*@param integer $mini la borne minimum.
*@param integer $maxi la borne maximum.
*
*@return integer le nombre limité aux bornes si nécessaire.
*/
function couleur_bornerNbre($nbre, $mini, $maxi)
{
if ($nbre < $mini) {
$nbre = $mini;
}
if ($nbre > $maxi) {
$nbre = $maxi;
}
return $nbre;
}
}//Fin de la classe Carto_Couleur
 
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
 
// +--------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/serveur/bibliotheque/classes/eribo_block.class.php
New file
0,0 → 1,208
<?php
 
class blockdedonnees {
protected $identifiant;
protected $donnees;
protected $collectionBlocksfils;
protected $erreur;
function __construct($identifiant)
{
$this->identifiant = $identifiant;
$this->donnees = array();
$this->collectionBlocksfils = array();
}
function affecterIdentifiant($identifiant)
{
$this->identifiant = $identifiant;
}
function recupererIdentifiant()
{
return $this->identifiant;
}
function affecterDonnees($donnees)
{
$this->donnees = $donnees;
}
function recupererDonnees()
{
return $this->donnees;
}
function recupererDonneesRecursivement($tab_chemin, $aso_retour = array())
{
if ($tab_chemin[0] == $this->recupererIdentifiant()) {
return $aso_retour[$this->recupererIdentifiant()] = $this->donnees;
$collection_block_fils = $this->recupererCollectionBlockFils();
for($i = 0; $i < count($collection_block_fils); $i++) {
$collection = $collection_block_fils[$i];
if ($collection->recupererIdentifiant() == $tab_chemin[1]) {
$blocks = $collection->recupererBlocksDeDonnees();
for($j = 0; $j < count($blocks); $j++) {
$block = $blocks[$j];
$block->recupererDonneesRecursivement(array_shift($tab_chemin), $aso_retour);
}
}
}
}
return $aso_retour;
}
function recupererDonneesRecursivementSsChemin($un_block)
{
$aso_donnees = array();
$aso_donnees = $un_block->recupererDonnees();
$collection_block_fils = $un_block->recupererCollectionBlockFils();
for($i = 0; $i < count($collection_block_fils); $i++) {
$une_collection = $collection_block_fils[$i];
$blocks_de_donnees = $une_collection->recupererBlocksDeDonnees();
for ($i = 0; $i < count($blocks_de_donnees); $i++) {
$block = $blocks_de_donnees[$i];
$aso_donnees[$block->recupererIdentifiant()] = $this->recupererDonneesRecursivementSsChemin($block);
}
}
return $aso_donnees;
}
function ajouterDonnee($clef, $valeur)
{
$this->donnees[$clef] = $valeur;
}
function recupererDonnee($clef)
{
return $this->donnees[$clef];
}
function recupererErreur()
{
return $this->erreur;
}
function ajouterCollectionBlockFils($collection_block)
{
array_push($this->collectionBlocksfils, $collection_block);
}
function recupererCollectionBlockFils()
{
return $this->collectionBlocksfils;
}
function afficherPatternRecursivement($nom_fonction, $aso_parametres = array())
{
$retour = '';
$aso_donnees = $this->recupererDonneesRecursivementSsChemin($this);
return call_user_func($nom_fonction, $aso_donnees, $aso_parametres);
}
function afficherPattern($chemin, $nom_fonction, $aso_parametres = array(), $recuperer_ascendance = FALSE, &$aso_donnees = array())
{
$retour = '';
if ($recuperer_ascendance == TRUE) {
$aso_donnees[$this->recupererIdentifiant()] = $this->recupererDonnees();
}
if ($chemin == $this->recupererIdentifiant() && $recuperer_ascendance == TRUE) {
$retour .= call_user_func($nom_fonction, $aso_donnees, $aso_parametres);
} else if ($chemin == $this->recupererIdentifiant()) {
$retour .= call_user_func($nom_fonction, $this->recupererDonnees(), $aso_parametres);
} else {
$tab_etape_chemin = explode('>', $chemin);
if($this->recupererIdentifiant() == $tab_etape_chemin[0]) {
$collection_block_fils = $this->recupererCollectionBlockFils();
for($i = 0; $i < count($collection_block_fils); $i++) {
$collection = $collection_block_fils[$i];
if ($collection->recupererIdentifiant() == $tab_etape_chemin[1]) {
array_shift($tab_etape_chemin);
if ($recuperer_ascendance == TRUE) {
$retour .= $collection->afficherPattern(implode('>', $tab_etape_chemin), $nom_fonction, $aso_parametres, $recuperer_ascendance, $aso_donnees);
} else {
$retour .= $collection->afficherPattern(implode('>', $tab_etape_chemin), $nom_fonction, $aso_parametres);
}
}
}
}
}
return $retour;
}
function attribuerContexteSql($chemin, $cle_contexte, $cle_donnee)
{
if ($chemin == $this->recupererIdentifiant()) {
$donnees = $this->recupererDonnees();
return $donnees;
} else {
$etape_chemin = explode('>', $chemin);
if($this->identifiant == $etape_chemin[0]) {
$collection_block_fils = $this->recupererCollectionBlockFils();
for($i = 0; $i < count($collection_block_fils); $i++) {
$collection = $collection_block_fils[$i];
if ($collection->recupererIdentifiant() == $etape_chemin[1]) {
array_shift($etape_chemin);
$donnees = null;
$donnees = $collection->attribuerContexteSql(implode('>', $etape_chemin), $cle_contexte, $cle_donnee);
if (isset($donnees)) {
$i = count($collection_block_fils);
}
}
}
}
}
$this->ajouterDonnee($cle_contexte, $donnees[$cle_donnee]);
return null;
}
function attribuerContexteValeur($chemin, $cle_contexte, $valeur = null)
{
if ($chemin == $this->recupererIdentifiant()) {
$this->ajouterDonnee($cle_contexte, $valeur);
return null;
} else {
$etape_chemin = explode('>', $chemin);
if($this->identifiant == $etape_chemin[0]) {
$collection_block_fils = $this->recupererCollectionBlockFils();
for($i = 0; $i < count($collection_block_fils); $i++) {
$collection = $collection_block_fils[$i];
if ($collection->recupererIdentifiant() == $etape_chemin[1]) {
array_shift($etape_chemin);
$donnees = null;
$donnees = $collection->attribuerContexteValeur(implode('>', $etape_chemin), $cle_contexte, $valeur);
if (isset($donnees)) {
$i = count($collection_block_fils);
}
}
}
}
}
return null;
}
function afficher()
{
echo '<ol>';
foreach ($this->donnees as $key => $value) {
echo '<li>'.$key.' : '.$value;
}
echo '</ol>';
for ($i = 0; $i < count($this->collectionBlocksfils); $i++) {
$collection = $this->collectionBlocksfils[$i];
echo '<ol>';
$collection->afficher();
echo '</ol>';
}
}
}
?>
/trunk/serveur/bibliotheque/classes/eribo_macro_element.class.php
New file
0,0 → 1,191
<?php
 
class macroElement implements iMacroElement{
protected $identifiantblockdedonnees;
protected $identifiant_parent;
protected $connexion;
protected $contexteRef;
protected $contexteRefTmp;
protected $contexteChemin;
protected $contexteSQL;
protected $blockdedonneesParent;
protected $collectionblockdedonnees;
protected $idRes;
function __construct($une_connexion, $un_block_donnees_parent, $chemin_macro_element)
{
$this->connexion = $une_connexion;
$this->blockdedonneesParent = $un_block_donnees_parent;
$tab_etape_chemin = array_reverse(explode('>', $chemin_macro_element));
$this->identifiantblockdedonnees = $tab_etape_chemin[0];
$this->identifiant_parent = NULL;//$this->blockdedonneesParent->recupererIdentifiant();
$this->contexteRef = $this->blockdedonneesParent->recupererDonnees();
$this->contexteMultiple = FALSE;
if (count($tab_etape_chemin) > 1) {
$this->contexteMultiple = TRUE;
$this->identifiant_parent = $tab_etape_chemin[1];
}
}
function attribuerContexteRef($un_block_donnees, $id)
{
$collection_block_fils = $un_block_donnees->recupererCollectionBlockFils();
for($i = 0; $i < count($collection_block_fils); $i++) {
$collection = $collection_block_fils[$i];
if ($collection->recupererIdentifiant() == $id) {
return $collection->recupererBlocksDeDonnees();
} else if (is_object($un_block_donnees->recupererCollectionBlockFils())) {
$this->attribuerContexteRef($un_block_donnees->recupererCollectionBlockFils(), $id);
}
}
}
function attribuerCollectionBlockFils($un_block_donnees, $id, $num = null, $num_courant = null)
{
if ($un_block_donnees->recupererIdentifiant() == $id AND is_null($num)) {
return $un_block_donnees->ajouterCollectionBlockFils($this->collectionblockdedonnees);
} else if ($un_block_donnees->recupererIdentifiant() == $id AND !is_null($num) AND $num == $num_courant) {
//echo '<pre>'.print_r($this->contexteRefTmp, true).'</pre>';
//echo $un_block_donnees->recupererIdentifiant().'----'.$num.'-'.$num_courant.'<br />';
return $un_block_donnees->ajouterCollectionBlockFils($this->collectionblockdedonnees);
} else if (is_array($un_block_donnees->recupererCollectionBlockFils()) AND count($un_block_donnees->recupererCollectionBlockFils()) > 0) {
$collection_block_fils = $un_block_donnees->recupererCollectionBlockFils();
for($i = 0; $i < count($collection_block_fils); $i++) {
$blocks_de_donnees = $collection_block_fils[$i]->recupererBlocksDeDonnees();
for ($j = 0; $j < count($blocks_de_donnees); $j++) {
//echo $blocks_de_donnees[$j]->recupererIdentifiant().'-'.$id.'----'.$num.'-'.$j.'<br />';
$this->attribuerCollectionBlockFils($blocks_de_donnees[$j], $id, $num, $j);
}
}
}
}
function recupererCollectionBlockFils($un_block_donnees, $id)
{
$collection_block_fils = $un_block_donnees->recupererCollectionBlockFils();
for($i = 0; $i < count($collection_block_fils); $i++) {
$une_collection = $collection_block_fils[$i];
if ($une_collection->recupererIdentifiant() == $id ) {
return $une_collection->recupererBlocksDeDonnees();
} else {
$blocks_de_donnees = $une_collection->recupererBlocksDeDonnees();
for ($i = 0; $i < count($blocks_de_donnees); $i++) {
$block = $blocks_de_donnees[$i];
if (is_array($block->recupererCollectionBlockFils()) AND count($block->recupererCollectionBlockFils()) > 0) {
return $this->recupererCollectionBlockFils($block, $id);
}
}
}
}
return null;
}
function construire()
{
if ($this->contexteMultiple == FALSE) {
$sql = $this->getSQL();
if (!is_null($sql)) {
$this->openCursor($sql);
while ($this->fetch());
$this->closeCursor();
}
} else {
$this->contexteRefTmp = $this->attribuerContexteRef($this->blockdedonneesParent, $this->identifiant_parent);
//echo '<pre>'.print_r($this->contexteRefTmp, true).'</pre>';
for($i = 0; $i < count($this->contexteRefTmp); $i++) {
$this->contexteRef = $this->contexteRefTmp[$i]->recupererDonnees();
$sql = $this->getSQL();
if (!is_null($sql)) {
$this->openCursor($sql);
while ($this->fetch());
$this->closeCursor($this->identifiant_parent, $i);
}
}
}
}
function construireParRecursivite($niveau_max, $aso_contexte = null, $id = null)
{
static $niveau_courant = 0;
if ($niveau_courant > $niveau_max) {
return null;
}
if (!is_null($aso_contexte)) {
$this->contexteRef = $aso_contexte;
}
if (is_null($id)) {
$id = $this->identifiantblockdedonnees;
$this->identifiant_parent = $this->blockdedonneesParent->recupererIdentifiant();
} else {
$this->identifiant_parent = $id;
}
$sql = $this->getSQL();
if (!is_null($sql)) {
$this->openCursor($sql, $id);
for ($i = 0; $this->fetch($id.'-'.$i); $i++);
$this->closeCursor($this->identifiant_parent);
$blocks_de_donnees = $this->recupererCollectionBlockFils($this->blockdedonneesParent, $id);
if (count($blocks_de_donnees) > 0) {
$niveau_courant++;
}
for ($i = 0; $i < count($blocks_de_donnees); $i++) {
$block = $blocks_de_donnees[$i];
$this->construireParRecursivite($niveau_max, $block->recupererDonnees(), $block->recupererIdentifiant());
}
}
}
function contruireParRecursivitePlate()
{
construire();
$this->$contexteRef = $this->blockdedonnees;
construire();
}
function openCursor($sql, $id = null)
{
$resultat = mysql_query($sql, $this->connexion);
if (!$resultat) {
echo 'Numéro erreur Mysql : '.mysql_errno().'<br />'."\n";
echo 'Erreur Mysql : '.mysql_error().'<br />'."\n";
echo 'Requête : '.'<pre>'.$sql.'</pre>';
}
$this->idRes = $resultat;
if (is_null($id)) {
$this->collectionblockdedonnees = new collectionblockdedonnees($this->identifiantblockdedonnees);
} else {
$this->collectionblockdedonnees = new collectionblockdedonnees($id);
}
}
function fetch($identifiant = null)
{
$resultat = mysql_fetch_assoc($this->idRes);
if (!$resultat) {
// Nous ne faisons rien car aucune donnée n'est collectée.
} else {
$this->collectionblockdedonnees->ajouterDonnees($resultat, $identifiant);
}
return $resultat;
}
function closeCursor($id = null, $num = null)
{
mysql_free_result($this->idRes);
// Nous ajoutons les données de la requêtes seulement si elle a ramenée des données
if (count($this->collectionblockdedonnees->recupererBlocksDeDonnees()) > 0) {
if (is_null($id)) {
$this->blockdedonneesParent->ajouterCollectionBlockFils($this->collectionblockdedonnees);
} else {
$this->attribuerCollectionBlockFils($this->blockdedonneesParent, $id, $num);
}
}
}
}
?>
/trunk/serveur/bibliotheque/classes/eribo_groupe_macro_element.class.php
New file
0,0 → 1,34
<?php
 
abstract class groupeMacroElement implements iModel{
protected $connexion;
protected $contexte;
protected $newContexte;
protected $dblock;
function __construct($une_connexion)
{
$this->connexion = $une_connexion;
}
function contruire()
{
}
function recupererBlockDeDonnees()
{
return $this->dblock;
}
function macroElementFactory($chemin_macro_element, $block_donnees_parent)
{
$etape_chemin = array_reverse(explode('>', $chemin_macro_element));
$macro_element_nom = $etape_chemin[0];
require_once EFSE_CHEMIN_MV_MACRO.$macro_element_nom.'.php';
$un_macro_element = new $macro_element_nom($this->connexion, $block_donnees_parent, $chemin_macro_element);
return $un_macro_element;
}
}
?>
/trunk/serveur/bibliotheque/classes/eribo_collection_block.class.php
New file
0,0 → 1,101
<?php
 
class collectionblockdedonnees{
protected $identifiant;
protected $collection;
protected $erreur;
function __construct($identifiant)
{
$this->identifiant = $identifiant;
$this->collection = array();
}
function affecterIdentifiant($identifiant)
{
$this->identifiant = $identifiant;
}
function ajouterDonnees($donnees, $identifiant = null)
{
if (is_null($identifiant)) {
$block = new blockdedonnees($this->identifiant);
} else {
$block = new blockdedonnees($identifiant);
}
$block->affecterDonnees($donnees);
$this->affecterBlockDeDonnees($block);
}
function affecterBlockDeDonnees($block_donnees)
{
array_push($this->collection,$block_donnees);
}
function recupererBlocksDeDonnees()
{
return $this->collection;
}
function recupererIdentifiant()
{
return $this->identifiant;
}
function recupererErreur()
{
return $this->erreur;
}
function afficherPattern($chemin, $nom_fonction, $aso_parametres = array(), $recuperer_ascendance = FALSE, &$aso_donnees = array())
{
$retour = '';
$collection = $this->recupererBlocksDeDonnees();
for($i = 0; $i < count($collection); $i++) {
$block = $collection[$i];
if ($recuperer_ascendance == TRUE) {
$retour .= $block->afficherPattern($chemin, $nom_fonction, $aso_parametres, $recuperer_ascendance, $aso_donnees);
} else {
$retour .= $block->afficherPattern($chemin, $nom_fonction, $aso_parametres);
}
}
return $retour;
}
function attribuerContexteSql($chemin, $cle_contexte, $cle_donnee)
{
for($i = 0; $i < count($this->collection); $i++) {
$block_donnees = $this->collection[$i];
$donnees = null;
$donnees = $block_donnees->attribuerContexteSql($chemin, $cle_contexte, $cle_donnee);
if (isset($donnees)) {
return $donnees;
}
}
return null;
}
function attribuerContexteValeur($chemin, $cle_contexte, $valeur = null)
{
for($i = 0; $i < count($this->collection); $i++) {
$block_donnees = $this->collection[$i];
$donnees = null;
$donnees = $block_donnees->attribuerContexteValeur($chemin, $cle_contexte, $valeur);
if (isset($donnees)) {
return $donnees;
}
}
return null;
}
function afficher()
{
echo '<li><b>'.$this->identifiant.'</b></li>';
for($i = 0; $i < count($this->collection); $i++) {
$une_collection = $this->collection[$i];
$une_collection->afficher();
}
}
}
?>
/trunk/serveur/eflore_mv/modeles/macro_elements/NOM_SELECTION.php
New file
0,0 → 1,87
<?php
class NOM_SELECTION extends macroElement {
function getSQL()
{
$contexte = array();
if (array_key_exists('nn', $this->contexteRef) AND array_key_exists('nvp', $this->contexteRef)) {
$contexte['nn'] = $this->contexteRef['nn'];
$contexte['nvp'] = $this->contexteRef['nvp'];
if ($contexte['nn'] != '' AND $contexte['nvp'] != '') {
return
'SELECT DISTINCT
nom.en_id_nom,
selection.esn_code_numerique_1,
selection.esn_code_numerique_2,
selection.esn_code_alphanumerique_1,
selection.esn_code_alphanumerique_2,
selection.esn_commentaire_nomenclatural,
statut.esns_intitule_statut,
statut.esns_abreviation_intitule_statut,
statut.esns_description_statut,
taxon.et_id_taxon,
taxon.et_notes_taxon
FROM
eflore_nom AS nom,
eflore_selection_nom AS selection,
eflore_selection_nom_statut AS statut,
eflore_taxon AS taxon,
eflore_projet_version AS version,
eflore_projet AS projet
WHERE
nom.en_id_nom = '.$contexte['nn'].'
AND nom.en_id_nom = selection.esn_id_nom
AND selection.esn_id_version_projet_taxon = '.$contexte['nvp'].'
AND selection.esn_ce_statut = statut.esns_id_statut
AND selection.esn_id_taxon = taxon.et_id_taxon
AND selection.esn_id_version_projet_taxon = taxon.et_id_version_projet_taxon
AND taxon.et_id_version_projet_taxon = version.eprv_id_version
AND version.eprv_ce_projet = projet.epr_id_projet
AND version.eprv_date_fin_version IS NULL
AND projet.epr_mark_projet_consultable = 1
ORDER BY version.eprv_nom ASC';
}
}
if (array_key_exists('nn', $this->contexteRef)) {
$contexte['nn'] = $this->contexteRef['nn'];
if (!empty($contexte['nn'])) {
return
'SELECT DISTINCT
nom.en_id_nom,
selection.esn_code_numerique_1,
selection.esn_code_numerique_2,
selection.esn_code_alphanumerique_1,
selection.esn_code_alphanumerique_2,
selection.esn_commentaire_nomenclatural,
statut.esns_intitule_statut,
statut.esns_abreviation_intitule_statut,
statut.esns_description_statut,
taxon.et_id_taxon,
taxon.et_notes_taxon
FROM
eflore_nom AS nom,
eflore_selection_nom AS selection,
eflore_selection_nom_statut AS statut,
eflore_taxon AS taxon,
eflore_projet_version AS version,
eflore_projet AS projet
WHERE
nom.en_id_nom = '.$contexte['nn'].'
AND nom.en_id_nom = selection.esn_id_nom
AND selection.esn_ce_statut = statut.esns_id_statut
AND selection.esn_id_taxon = taxon.et_id_taxon
AND selection.esn_id_version_projet_taxon = taxon.et_id_version_projet_taxon
AND taxon.et_id_version_projet_taxon = version.eprv_id_version
AND version.eprv_ce_projet = projet.epr_id_projet
AND version.eprv_date_fin_version IS NULL
AND projet.epr_mark_projet_consultable = 1
ORDER BY version.eprv_nom ASC';
}
}
return null;
}
}
?>
/trunk/serveur/eflore_mv/modeles/macro_elements/NOM_LATIN.php
New file
0,0 → 1,112
<?php
class NOM_LATIN extends macroElement {
function getSQL()
{
$contexte = array();
if (array_key_exists('en_id_nom', $this->contexteRef)) {
$contexte['en_id_nom'] = $this->contexteRef['en_id_nom'];
if (!empty($contexte['en_id_nom'])) {
// Notes: utiliser à terme le format 5 qui devrait correspondre au nom reconstitué courant!
return
'SELECT DISTINCT
nom.en_id_nom,
nom.en_nom_supra_generique,
nom.en_nom_genre,
nom.en_epithete_infra_generique,
nom.en_epithete_espece,
nom.en_epithete_infra_specifique,
nom.en_notes_nom,
nom.en_ce_auteur_basio_ex,
nom.en_ce_auteur_basio,
nom.en_ce_auteur_modif_ex,
nom.en_ce_auteur_modif,
auteur_bex.enaia_intitule_naturaliste_abrege AS intitule_abrege_auteur_basio_ex,
auteur_b.enaia_intitule_naturaliste_abrege AS intitule_abrege_auteur_basio,
auteur_mex.enaia_intitule_naturaliste_abrege AS intitule_abrege_auteur_modif_ex,
auteur_m.enaia_intitule_naturaliste_abrege AS intitule_abrege_auteur_modif,
citation.enci_intitule_complet_citation,
intitule.eni_intitule_nom,
rang.enrg_intitule_rang,
rang.enrg_abreviation_rang,
rang.enrg_description_rang
FROM
eflore_nom_intitule AS intitule,
eflore_nom AS nom,
eflore_naturaliste_intitule_abreviation AS auteur_bex,
eflore_naturaliste_intitule_abreviation AS auteur_b,
eflore_naturaliste_intitule_abreviation AS auteur_mex,
eflore_naturaliste_intitule_abreviation AS auteur_m,
eflore_nom_citation AS citation,
eflore_nom_intitule_commentaire AS commentaire,
eflore_nom_rang AS rang
WHERE
nom.en_ce_auteur_basio_ex = auteur_bex.enaia_id_intitule_naturaliste_abrege
AND nom.en_ce_auteur_basio = auteur_b.enaia_id_intitule_naturaliste_abrege
AND nom.en_ce_auteur_modif_ex = auteur_mex.enaia_id_intitule_naturaliste_abrege
AND nom.en_ce_auteur_modif = auteur_m.enaia_id_intitule_naturaliste_abrege
AND nom.en_ce_citation_initiale = citation.enci_id_citation
AND nom.en_id_nom = intitule.eni_id_nom
AND intitule.eni_id_categorie_format = 3
AND intitule.eni_id_valeur_format = 5
AND nom.en_ce_rang = rang.enrg_id_rang
AND nom.en_id_nom = '.$contexte['en_id_nom'];
}
}
if (array_key_exists('nn', $this->contexteRef)) {
$contexte['nn'] = $this->contexteRef['nn'];
if (!empty($contexte['nn'])) {
// Notes: utiliser à terme le format 5 qui devrait correspondre au nom reconstitué courant!
return
'SELECT DISTINCT
nom.en_id_nom,
nom.en_nom_supra_generique,
nom.en_nom_genre,
nom.en_epithete_infra_generique,
nom.en_epithete_espece,
nom.en_epithete_infra_specifique,
nom.en_notes_nom,
nom.en_ce_auteur_basio_ex,
nom.en_ce_auteur_basio,
nom.en_ce_auteur_modif_ex,
nom.en_ce_auteur_modif,
auteur_bex.enaia_intitule_naturaliste_abrege AS intitule_abrege_auteur_basio_ex,
auteur_b.enaia_intitule_naturaliste_abrege AS intitule_abrege_auteur_basio,
auteur_mex.enaia_intitule_naturaliste_abrege AS intitule_abrege_auteur_modif_ex,
auteur_m.enaia_intitule_naturaliste_abrege AS intitule_abrege_auteur_modif,
citation.enci_intitule_complet_citation,
intitule.eni_intitule_nom,
rang.enrg_intitule_rang,
rang.enrg_abreviation_rang,
rang.enrg_description_rang
FROM
eflore_nom_intitule AS intitule,
eflore_nom AS nom,
eflore_naturaliste_intitule_abreviation AS auteur_bex,
eflore_naturaliste_intitule_abreviation AS auteur_b,
eflore_naturaliste_intitule_abreviation AS auteur_mex,
eflore_naturaliste_intitule_abreviation AS auteur_m,
eflore_nom_citation AS citation,
eflore_nom_intitule_commentaire AS commentaire,
eflore_nom_rang AS rang
WHERE
nom.en_ce_auteur_basio_ex = auteur_bex.enaia_id_intitule_naturaliste_abrege
AND nom.en_ce_auteur_basio = auteur_b.enaia_id_intitule_naturaliste_abrege
AND nom.en_ce_auteur_modif_ex = auteur_mex.enaia_id_intitule_naturaliste_abrege
AND nom.en_ce_auteur_modif = auteur_m.enaia_id_intitule_naturaliste_abrege
AND nom.en_ce_citation_initiale = citation.enci_id_citation
AND nom.en_id_nom = intitule.eni_id_nom
AND intitule.eni_id_categorie_format = 3
AND intitule.eni_id_valeur_format = 5
AND nom.en_ce_rang = rang.enrg_id_rang
AND nom.en_id_nom = '.$contexte['nn'];
}
}
return null;
}
}
?>
/trunk/serveur/eflore_mv/modeles/macro_elements/NOM_RECHERCHE.php
New file
0,0 → 1,97
<?php
class NOM_RECHERCHE extends macroElement {
function getSQL()
{
$contexte = array();
if (array_key_exists('radical', $this->contexteRef) AND array_key_exists('rang', $this->contexteRef) ) {
$contexte['radical'] = $this->contexteRef['radical'];
$contexte['rang'] = $this->contexteRef['rang'];
if(!empty($contexte['radical']) AND !empty($contexte['rang']) ) {
return
'SELECT
nom.en_id_nom,
nom.en_nom_supra_generique,
nom.en_nom_genre,
nom.en_epithete_infra_generique,
nom.en_epithete_espece,
nom. en_epithete_infra_specifique,
auteur_bex. enaia_intitule_naturaliste_abrege AS intitule_abrege_auteur_basio_ex,
auteur_b. enaia_intitule_naturaliste_abrege AS intitule_abrege_auteur_basio,
auteur_mex.enaia_intitule_naturaliste_abrege AS intitule_abrege_auteur_modif_ex,
auteur_m.enaia_intitule_naturaliste_abrege AS intitule_abrege_auteur_modif,
citation.enci_intitule_complet_citation,
intitule.eni_intitule_nom ,
commentaire.enic_intitule_cn_complet
FROM
eflore_nom_intitule AS intitule,
eflore_nom AS nom,
eflore_naturaliste_intitule_abreviation AS auteur_bex,
eflore_naturaliste_intitule_abreviation AS auteur_b,
eflore_naturaliste_intitule_abreviation AS auteur_mex,
eflore_naturaliste_intitule_abreviation AS auteur_m,
eflore_nom_citation AS citation,
eflore_nom_intitule_commentaire AS commentaire
WHERE
intitule.eni_intitule_nom LIKE "'.$contexte['radical'].'"
AND intitule.eni_id_categorie_format = 3
AND intitule.eni_id_valeur_format = 5
AND intitule.eni_id_nom = nom.en_id_nom
AND nom.en_ce_auteur_basio_ex = auteur_bex.enaia_id_intitule_naturaliste_abrege
AND nom.en_ce_auteur_basio = auteur_b.enaia_id_intitule_naturaliste_abrege
AND nom.en_ce_auteur_modif_ex = auteur_mex.enaia_id_intitule_naturaliste_abrege
AND nom.en_ce_auteur_modif = auteur_m.enaia_id_intitule_naturaliste_abrege
AND nom.en_ce_citation_initiale = citation.enci_id_citation
AND nom.en_ce_intitule_cn = commentaire.enic_id_intitule_cn
AND nom.en_id_nom = commentaire.enic_id_intitule_cn
AND nom.en_ce_rang = '.$contexte['rang'];
}
}
if (array_key_exists('radical', $this->contexteRef) AND array_key_exists('nvp', $this->contexteRef) ) {
$contexte['radical'] = $this->contexteRef['radical'];
$contexte['nvp'] = $this->contexteRef['nvp'];
if(!empty($contexte['radical']) AND !empty($contexte['nvp']) ) {
return
'SELECT
nom.*,
intitule.eni_intitule_nom,
selection.esn_ce_statut,
selection.esn_id_version_projet_taxon
FROM
eflore_nom_intitule AS intitule,
eflore_nom AS nom,
eflore_selection_nom AS selection
WHERE
intitule.eni_intitule_nom LIKE "'.$contexte['radical'].'"
AND intitule.eni_id_categorie_format = 3
AND intitule.eni_id_valeur_format = 4
AND nom.en_id_nom = intitule.eni_id_nom
AND nom.en_id_nom = selection.esn_id_nom
AND selection.esn_id_version_projet_taxon = '.$contexte['nvp'];
}
}
if (array_key_exists('radical', $this->contexteRef) ) {
$contexte['radical'] = $this->contexteRef['radical'];
if(!empty($contexte['radical']) ) {
return
'SELECT
nom.*, intitule.eni_intitule_nom
FROM
eflore_nom_intitule AS intitule,
eflore_nom AS nom
WHERE
intitule.eni_intitule_nom LIKE "'.$contexte['radical'].'"
AND intitule.eni_id_categorie_format = 3
AND intitule.eni_id_valeur_format = 4
AND nom.en_id_nom = intitule.eni_id_nom';
}
}
return null;
}
}
?>
/trunk/serveur/eflore_mv/modeles/macro_elements/TAXON_RECHERCHE.php
New file
0,0 → 1,51
<?php
class TAXON_RECHERCHE extends macroElement {
function getSQL()
{
$contexte = array();
if (array_key_exists('nvp', $this->contexteRef) and
array_key_exists('rg', $this->contexteRef) and
array_key_exists('od', $this->contexteRef)) {
$contexte['nvp'] = $this->contexteRef['nvp'];
$contexte['rg'] = $this->contexteRef['rg'];
$contexte['od'] = $this->contexteRef['od'];
if (!empty($contexte['nvp']) && !empty($contexte['rg']) && !empty($contexte['od'])) {
$requete =
'SELECT DISTINCT
nom.en_id_nom,
intitule.eni_intitule_nom,
selection.esn_id_taxon,
selection.esn_id_version_projet_taxon
FROM
eflore_nom AS nom,
eflore_nom_intitule AS intitule,
eflore_selection_nom AS selection
WHERE
nom.en_id_nom = intitule.eni_id_nom
AND intitule.eni_id_categorie_format = 3
AND intitule.eni_id_valeur_format = 4
AND selection.esn_id_nom = nom.en_id_nom
AND selection.esn_ce_statut = 3
AND selection.esn_id_version_projet_taxon = '.$contexte['nvp'].' ';
switch ($contexte['od']) {
case 'sup' :
$requete .= 'AND nom.en_ce_rang < '.$contexte['rg'].' ';
break;
case 'ega' :
$requete .= 'AND nom.en_ce_rang = '.$contexte['rg'].' ';
break;
case 'inf' :
$requete .= 'AND nom.en_ce_rang > '.$contexte['rg'].' ';
break;
}
$requete .= 'ORDER BY intitule.eni_intitule_nom ASC';
return $requete;
}
}
return null;
}
}
?>
/trunk/serveur/eflore_mv/modeles/macro_elements/TAXON_RECHERCHE_ALPHABET.php
New file
0,0 → 1,55
<?php
class TAXON_RECHERCHE_ALPHABET extends macroElement {
function getSQL()
{
$contexte = array();
if (array_key_exists('nvp', $this->contexteRef) and
array_key_exists('rg', $this->contexteRef) and
array_key_exists('od', $this->contexteRef) and
array_key_exists('le', $this->contexteRef)) {
$contexte['nvp'] = $this->contexteRef['nvp'];
$contexte['rg'] = $this->contexteRef['rg'];
$contexte['od'] = $this->contexteRef['od'];
$contexte['le'] = $this->contexteRef['le'];
if (!empty($contexte['nvp']) && !empty($contexte['rg']) && !empty($contexte['od']) && !empty($contexte['le'])) {
$requete =
'SELECT DISTINCT
nom.en_id_nom,
intitule.eni_intitule_nom,
selection.esn_id_taxon,
selection.esn_id_version_projet_taxon
FROM
eflore_nom AS nom,
eflore_nom_intitule AS intitule,
eflore_selection_nom AS selection
WHERE
intitule.eni_intitule_nom LIKE "'.$contexte['le'].'%"
AND nom.en_id_nom = intitule.eni_id_nom
AND intitule.eni_id_categorie_format = 3
AND intitule.eni_id_valeur_format = 4
AND nom.en_id_nom = selection.esn_id_nom
AND selection.esn_ce_statut = 3
AND selection.esn_id_version_projet_taxon = '.$contexte['nvp'].' ';
switch ($contexte['od']) {
case 'sup' :
$requete .= 'AND nom.en_ce_rang < '.$contexte['rg'].' ';
break;
case 'ega' :
$requete .= 'AND nom.en_ce_rang = '.$contexte['rg'].' ';
break;
case 'inf' :
$requete .= 'AND nom.en_ce_rang > '.$contexte['rg'].' ';
break;
}
$requete .= 'ORDER BY intitule.eni_intitule_nom ASC';
return $requete;
}
}
return null;
}
}
?>
/trunk/serveur/eflore_mv/modeles/macro_elements/PROJET_VERSION_TOUS.php
New file
0,0 → 1,32
<?php
class PROJET_VERSION_TOUS extends macroElement {
function getSQL()
{
$contexte = array();
return
'SELECT DISTINCT
version.eprv_id_version,
version.eprv_nom,
version.eprv_code_version,
projet.epr_id_projet,
projet.epr_intitule_projet,
projet.epr_abreviation_projet
FROM
eflore_projet_version AS version,
eflore_projet AS projet,
eflore_projet_type AS type,
eflore_projet_utiliser_module AS avoir_module
WHERE
version.eprv_ce_projet = projet.epr_id_projet
AND version.eprv_date_fin_version IS NULL
AND projet.epr_mark_projet_consultable = 1
AND projet.epr_ce_type_projet = type.eprt_id_type_projet
AND type.eprt_id_type_projet IN (4, 5)
AND avoir_module.eprum_id_version = version.eprv_id_version
AND avoir_module.eprum_id_module = 18
ORDER BY version.eprv_nom ASC';
}
}
?>
/trunk/serveur/eflore_mv/modeles/macro_elements/NOM_SELECTION_PROJETS.php
New file
0,0 → 1,40
<?php
class NOM_SELECTION_PROJETS extends macroElement {
function getSQL()
{
$contexte = array();
if (array_key_exists('nn', $this->contexteRef)) {
$contexte['nn'] = $this->contexteRef['nn'];
if (!empty($contexte['nn'])) {
return
'SELECT DISTINCT
nom.en_id_nom,
version.eprv_id_version,
version.eprv_nom,
version.eprv_code_version,
projet.epr_intitule_projet,
projet.epr_abreviation_projet
FROM
eflore_nom AS nom,
eflore_selection_nom AS selection,
eflore_taxon AS taxon,
eflore_projet_version AS version,
eflore_projet AS projet
WHERE
nom.en_id_nom = '.$contexte['nn'].'
AND nom.en_id_nom = selection.esn_id_nom
AND selection.esn_id_taxon = taxon.et_id_taxon
AND selection.esn_id_version_projet_taxon = taxon.et_id_version_projet_taxon
AND taxon.et_id_version_projet_taxon = version.eprv_id_version
AND version.eprv_ce_projet = projet.epr_id_projet
AND version.eprv_date_fin_version IS NULL
AND projet.epr_mark_projet_consultable = 1
ORDER BY version.eprv_nom ASC';
}
}
return null;
}
}
?>
/trunk/serveur/eflore_mv/modeles/macro_elements/TAXON_NOMS.php
New file
0,0 → 1,42
<?php
class TAXON_NOMS extends macroElement {
function getSQL()
{
$contexte = array();
if (array_key_exists('nt', $this->contexteRef) and array_key_exists('nvp', $this->contexteRef)) {
$contexte['nt'] = $this->contexteRef['nt'];
$contexte['nvp'] = $this->contexteRef['nvp'];
if (!empty($contexte['nt']) && !empty($contexte['nvp'])) {
return
'SELECT DISTINCT
nom.en_id_nom,
selection.esn_code_numerique_1,
selection.esn_code_numerique_2,
selection.esn_code_alphanumerique_1,
selection.esn_code_alphanumerique_2,
selection.esn_commentaire_nomenclatural,
statut.esns_id_statut,
statut.esns_intitule_statut,
statut.esns_abreviation_intitule_statut,
statut.esns_description_statut,
taxon.et_id_taxon
FROM
eflore_nom AS nom,
eflore_selection_nom AS selection,
eflore_selection_nom_statut AS statut,
eflore_taxon AS taxon
WHERE
selection.esn_id_taxon = '.$contexte['nt'].'
AND selection.esn_id_version_projet_taxon = '.$contexte['nvp'].'
AND selection.esn_ce_statut = statut.esns_id_statut
AND selection.esn_id_nom = nom.en_id_nom
AND selection.esn_id_taxon = taxon.et_id_taxon';
}
}
return null;
}
}
?>
/trunk/serveur/eflore_mv/modeles/macro_elements/PROJET_VERSION.php
New file
0,0 → 1,34
<?php
class PROJET_VERSION extends macroElement {
function getSQL()
{
$contexte = array();
echo '<pre>'.print_r($this->contexteRef, true).'</pre>';
if (array_key_exists('nvp', $this->contexteRef)) {
$contexte['nvp'] = $this->contexteRef['nvp'];
if (!empty($contexte['nvp'])) {
return
'SELECT DISTINCT
version.eprv_id_version,
version.eprv_nom,
version.eprv_code_version,
projet.epr_id_projet,
projet.epr_intitule_projet,
projet.epr_abreviation_projet
FROM
eflore_projet_version AS version,
eflore_projet AS projet
WHERE
version.eprv_id_version = '.$contexte['nvp'].'
AND version.eprv_ce_projet = projet.epr_id_projet
AND version.eprv_date_fin_version IS NULL
AND projet.epr_mark_projet_consultable = 1
ORDER BY version.eprv_nom ASC';
}
}
return null;
}
}
?>
/trunk/serveur/eflore_mv/modeles/macro_elements/VERNACULAIRE_RECHERCHE.php
New file
0,0 → 1,118
<?php
class VERNACULAIRE_RECHERCHE extends macroElement {
function getSQL()
{
$contexte = array();
echo '<pre>'.print_r($this->contexteRef, true).'</pre>';
if (array_key_exists('radical', $this->contexteRef) AND array_key_exists('nvp', $this->contexteRef)) {
$contexte['radical'] = $this->contexteRef['radical'];
$contexte['nvp'] = $this->contexteRef['nvp'];
if(!empty($contexte['radical']) AND !empty($contexte['nvp'])) {
return
'SELECT DISTINCT
langue.el_nom_langue_principal,
langue.el_code_langue,
zg.ezg_intitule_principal_zg,
zg.ezg_code_zg,
vernaculaire.ev_id_nom_vernaculaire,
vernaculaire.ev_intitule_nom_vernaculaire,
selection.esn_id_version_projet_taxon,
selection.esn_ce_statut,
intitule.eni_intitule_nom,
nom.en_id_nom
FROM
eflore_langue AS langue,
eflore_zg AS zg,
eflore_vernaculaire AS vernaculaire,
eflore_vernaculaire_attribution AS attribution,
eflore_selection_nom AS selection,
eflore_nom AS nom,
eflore_nom_intitule AS intitule
WHERE
vernaculaire.ev_intitule_nom_vernaculaire LIKE "'.$contexte['radical'].'"
AND attribution.eva_ce_zone_geo = zg.ezg_id_zone_geo
AND attribution.eva_ce_version_projet_zg = zg.ezg_id_version_projet_zg
AND vernaculaire.ev_ce_langue = langue.el_id_langue
AND vernaculaire.ev_ce_version_projet_langue = langue.el_id_version_projet_langue
AND attribution.eva_id_nom_vernaculaire = vernaculaire.ev_id_nom_vernaculaire
AND attribution.eva_id_version_projet_taxon_ref = '.$contexte['nvp'].'
AND selection.esn_ce_statut = 3
AND selection.esn_id_version_projet_taxon = attribution.eva_id_version_projet_taxon_ref
AND selection.esn_id_taxon = attribution.eva_id_taxon_ref
AND nom.en_id_nom = selection.esn_id_nom
AND intitule.eni_id_nom = nom.en_id_nom
AND intitule.eni_id_valeur_format = 4
AND intitule.eni_id_categorie_format = 3
AND nom.en_id_nom NOT IN
(
SELECT nom_relation.enr_id_nom_1
FROM eflore_nom_relation AS nom_relation
WHERE nom_relation.enr_id_nom_1 = nom_relation.enr_id_nom_2
AND nom_relation.enr_id_categorie_relation = 10
AND nom_relation.enr_id_valeur_relation = 3
)
ORDER BY vernaculaire.ev_intitule_nom_vernaculaire ASC';
}
}
if (array_key_exists('radical', $this->contexteRef)) {
$contexte['radical'] = $this->contexteRef['radical'];
if(!empty($contexte['radical'])) {
return
'SELECT DISTINCT
langue.el_nom_langue_principal,
langue.el_code_langue,
zg.ezg_intitule_principal_zg,
zg.ezg_code_zg,
vernaculaire.ev_id_nom_vernaculaire,
vernaculaire.ev_intitule_nom_vernaculaire,
taxon.et_id_version_projet_taxon,
selection.esn_ce_statut,
intitule.eni_intitule_nom,
nom.en_id_nom
FROM
eflore_langue AS langue,
eflore_zg AS zg,
eflore_vernaculaire AS vernaculaire,
eflore_vernaculaire_attribution AS attribution,
eflore_taxon AS taxon,
eflore_selection_nom AS selection,
eflore_selection_nom_statut AS statut,
eflore_nom AS nom,
eflore_nom_intitule AS intitule
WHERE
intitule.eni_id_categorie_format = 3
AND intitule.eni_id_valeur_format = 4
AND intitule.eni_id_nom = nom.en_id_nom
AND nom.en_id_nom NOT IN
(
SELECT nom_relation.enr_id_nom_1
FROM eflore_nom_relation AS nom_relation
WHERE nom_relation.enr_id_nom_1 = nom_relation.enr_id_nom_2
AND nom_relation.enr_id_categorie_relation = 10
AND nom_relation.enr_id_valeur_relation = 3
)
AND nom.en_id_nom = selection.esn_id_nom
AND selection.esn_id_taxon = taxon.et_id_taxon
AND selection.esn_id_version_projet_taxon = taxon.et_id_version_projet_taxon
AND selection.esn_ce_statut = statut.esns_id_statut
AND statut.esns_id_statut = 3
AND taxon.et_id_version_projet_taxon = attribution.eva_id_version_projet_taxon_ref
AND taxon.et_id_taxon = attribution.eva_id_taxon_ref
AND attribution.eva_id_nom_vernaculaire = vernaculaire.ev_id_nom_vernaculaire
AND vernaculaire.ev_ce_langue = langue.el_id_langue
AND vernaculaire.ev_ce_version_projet_langue = langue.el_id_version_projet_langue
AND attribution.eva_ce_zone_geo = zg.ezg_id_zone_geo
AND attribution.eva_ce_version_projet_zg = zg.ezg_id_version_projet_zg
AND vernaculaire.ev_intitule_nom_vernaculaire LIKE "'.$contexte['radical'].'"
ORDER BY vernaculaire.ev_intitule_nom_vernaculaire ASC';
}
}
return null;
}
}
?>
/trunk/serveur/eflore_mv/modeles/macro_elements/TAXON_RECHERCHE_CLASSIFICATION.php
New file
0,0 → 1,123
<?php
class TAXON_RECHERCHE_CLASSIFICATION extends macroElement {
function getSQL()
{
$contexte = array();
if (array_key_exists('etr_id_version_projet_taxon_1', $this->contexteRef) and
array_key_exists('etr_id_taxon_1', $this->contexteRef)) {
$contexte['etr_id_version_projet_taxon_1'] = $this->contexteRef['etr_id_version_projet_taxon_1'];
$contexte['etr_id_taxon_1'] = $this->contexteRef['etr_id_taxon_1'];
if (!empty($contexte['etr_id_version_projet_taxon_1']) && !empty($contexte['etr_id_taxon_1'])) {
$requete =
'SELECT DISTINCT
nom.en_id_nom,
nom.en_ce_rang,
intitule.eni_intitule_nom,
taxon_relation.etr_id_version_projet_taxon_1,
taxon_relation.etr_id_taxon_1
FROM
eflore_nom AS nom,
eflore_nom_intitule AS intitule,
eflore_selection_nom AS selection,
eflore_taxon_relation AS taxon_relation
WHERE
nom.en_id_nom = intitule.eni_id_nom
AND intitule.eni_id_categorie_format = 3
AND intitule.eni_id_valeur_format = 4
AND nom.en_id_nom = selection.esn_id_nom
AND selection.esn_ce_statut = 3
AND selection.esn_id_version_projet_taxon = taxon_relation.etr_id_version_projet_taxon_1
AND selection.esn_id_taxon = taxon_relation.etr_id_taxon_1
AND taxon_relation.etr_id_version_projet_taxon_2 = '.$contexte['etr_id_version_projet_taxon_1'].'
AND taxon_relation.etr_id_taxon_2 = '.$contexte['etr_id_taxon_1'].'
AND taxon_relation.etr_id_categorie_taxon = 3
AND taxon_relation.etr_id_valeur_taxon = 3
ORDER BY intitule.eni_intitule_nom ASC';
return $requete;
}
}
if (array_key_exists('nvp', $this->contexteRef) and
array_key_exists('nt', $this->contexteRef)) {
$contexte['nvp'] = $this->contexteRef['nvp'];
$contexte['nt'] = $this->contexteRef['nt'];
if (!empty($contexte['nvp']) && !empty($contexte['nt'])) {
$requete =
'SELECT DISTINCT
nom.en_id_nom,
nom.en_ce_rang,
intitule.eni_intitule_nom,
taxon_relation.etr_id_taxon_1,
taxon_relation.etr_id_version_projet_taxon_1
FROM
eflore_nom AS nom,
eflore_nom_intitule AS intitule,
eflore_selection_nom AS selection,
eflore_taxon_relation AS taxon_relation
WHERE
nom.en_id_nom = intitule.eni_id_nom
AND intitule.eni_id_categorie_format = 3
AND intitule.eni_id_valeur_format = 4
AND nom.en_id_nom = selection.esn_id_nom
AND selection.esn_ce_statut = 3
AND selection.esn_id_version_projet_taxon = taxon_relation.etr_id_version_projet_taxon_1
AND selection.esn_id_taxon = taxon_relation.etr_id_taxon_1
AND taxon_relation.etr_id_version_projet_taxon_2 = '.$contexte['nvp'].'
AND taxon_relation.etr_id_taxon_2 = '.$contexte['nt'].'
AND taxon_relation.etr_id_categorie_taxon = 3
AND taxon_relation.etr_id_valeur_taxon = 3
ORDER BY intitule.eni_intitule_nom ASC';
return $requete;
}
}
if (array_key_exists('nvp', $this->contexteRef) and
array_key_exists('rg', $this->contexteRef)) {
$contexte['nvp'] = $this->contexteRef['nvp'];
$contexte['rg'] = $this->contexteRef['rg'];
if (!empty($contexte['nvp']) && !empty($contexte['rg'])) {
$requete =
'SELECT DISTINCT
nom.en_id_nom,
intitule.eni_intitule_nom,
selection.esn_id_taxon,
selection.esn_id_version_projet_taxon,
taxon_relation.etr_id_taxon_1
FROM
eflore_nom AS nom,
eflore_nom_intitule AS intitule,
eflore_selection_nom AS selection,
eflore_taxon AS taxon,
eflore_taxon_relation AS taxon_relation
WHERE
nom.en_id_nom = intitule.eni_id_nom
AND intitule.eni_id_categorie_format = 3
AND intitule.eni_id_valeur_format = 4
AND nom.en_ce_rang = '.$contexte['rg'].'
AND nom.en_id_nom = selection.esn_id_nom
AND selection.esn_ce_statut = 3
AND selection.esn_id_version_projet_taxon = '.$contexte['nvp'].'
AND selection.esn_id_version_projet_taxon = taxon.et_id_version_projet_taxon
AND selection.esn_id_taxon = taxon.et_id_taxon
AND taxon.et_id_version_projet_taxon = taxon_relation.etr_id_version_projet_taxon_2
AND taxon.et_id_taxon = taxon_relation.etr_id_taxon_2
AND taxon_relation.etr_id_categorie_taxon = 3
AND taxon_relation.etr_id_valeur_taxon = 3
ORDER BY intitule.eni_intitule_nom ASC';
return $requete;
}
}
return null;
}
}
?>
/trunk/serveur/eflore_mv/modeles/macro_elements/TAXON_SUPERIEUR.php
New file
0,0 → 1,39
<?php
class TAXON_SUPERIEUR extends macroElement {
function getSQL()
{
$contexte = array();
if (array_key_exists('nvp', $this->contexteRef) and array_key_exists('nt', $this->contexteRef)) {
$contexte['nvp'] = $this->contexteRef['nvp'];
$contexte['nt'] = $this->contexteRef['nt'];
if (!empty($contexte['nvp']) && !empty($contexte['nt'])) {
$requete =
'SELECT DISTINCT
nom.en_id_nom,
nom.en_ce_rang,
relation.etr_id_version_projet_taxon_2,
relation.etr_id_taxon_2
FROM
eflore_nom AS nom,
eflore_selection_nom AS selection,
eflore_taxon_relation AS relation
WHERE
nom.en_id_nom = selection.esn_id_nom
AND selection.esn_ce_statut = 3
AND selection.esn_id_version_projet_taxon = relation.etr_id_version_projet_taxon_2
AND selection.esn_id_taxon = relation.etr_id_taxon_2
AND relation.etr_id_version_projet_taxon_1 = '.$contexte['nvp'].'
AND relation.etr_id_taxon_1 = '.$contexte['nt'].'
AND relation.etr_id_categorie_taxon = 3
AND relation.etr_id_valeur_taxon = 3 ';
return $requete;
}
}
return null;
}
}
?>
/trunk/serveur/eflore_mv/modeles/macro_elements/VERNACULAIRE_NOMS.php
New file
0,0 → 1,65
<?php
class VERNACULAIRE_NOMS extends macroElement {
function getSQL()
{
$contexte = array();
if (array_key_exists('nvp', $this->contexteRef) and array_key_exists('nt', $this->contexteRef)) {
$contexte['nvp'] = $this->contexteRef['nvp'];
$contexte['nt'] = $this->contexteRef['nt'];
if ($contexte['nvp'] != '' AND $contexte['nt'] != '' ) {
return
'SELECT DISTINCT
vernaculaire.ev_intitule_nom_vernaculaire,
vernaculaire.ev_notes_nom_vernaculaire,
eflore_genre_nombre.elv_id_valeur_lg AS egn_id_genre_nombre,
eflore_genre_nombre.elv_intitule_valeur_lg AS egn_intitule,
eflore_genre_nombre.elv_abreviation_valeur_lg AS egn_abreviation,
eflore_genre_nombre.elv_description_valeur_lg AS egn_description,
langue.el_nom_langue_principal,
langue.el_code_langue,
conseil.evce_id_emploi,
conseil.evce_intitule_conseil_emlploi,
conseil.evce_abreviation_conseil_emploi,
conseil.evce_description_conseil_emploi,
attribution.eva_commentaires_geographiques,
attribution.eva_mark_info_biblio,
citation.enci_intitule_complet_citation,
attribution.eva_notes_emploi_nom_vernaculaire,
contributeur.epc_nom_principal,
contributeur.epc_courriel_principal,
zg.ezg_intitule_principal_zg,
zg.ezg_code_zg,
zg.ezg_notes_zone_geo
FROM
eflore_vernaculaire_attribution AS attribution,
eflore_vernaculaire AS vernaculaire,
eflore_vernaculaire_conseil_emploi AS conseil,
eflore_nom_citation AS citation,
eflore_langue_valeur AS eflore_genre_nombre,
eflore_personne_contributeur AS contributeur,
eflore_langue AS langue,
eflore_zg AS zg
WHERE
attribution.eva_id_version_projet_taxon_ref = '.$contexte['nvp'].'
AND attribution.eva_id_taxon_ref = '.$contexte['nt'].'
AND attribution.eva_id_nom_vernaculaire = vernaculaire.ev_id_nom_vernaculaire
AND attribution.eva_ce_emploi = conseil.evce_id_emploi
AND vernaculaire.ev_ce_categorie_genre_nombre = eflore_genre_nombre.elv_id_categorie_lg
AND vernaculaire.ev_ce_valeur_genre_nombre = eflore_genre_nombre.elv_id_valeur_lg
AND attribution.eva_ce_citation_biblio = citation.enci_id_citation
AND attribution.eva_ce_contributeur = contributeur.epc_id_contributeur
AND vernaculaire.ev_ce_langue = langue.el_id_langue
AND vernaculaire.ev_ce_version_projet_langue = langue.el_id_version_projet_langue
AND attribution.eva_ce_zone_geo = zg.ezg_id_zone_geo
AND attribution.eva_ce_version_projet_zg = zg.ezg_id_version_projet_zg
ORDER BY zg.ezg_code_zg, conseil.evce_id_emploi ASC';
}
}
return null;
}
}
?>
/trunk/serveur/eflore_mv/modeles/groupes_macro_elements/formulairenomenclatural.php
New file
0,0 → 1,37
<?php
class formulairenomenclatural extends groupeMacroElement {
function __construct($une_connexion)
{
parent::__construct($une_connexion);
}
function construire()
{
$this->dblock = new blockdedonnees('FORMULAIRE_NOMENCLATURAL');
// Numéro de version du projet
if (array_key_exists('nvp', $_REQUEST)) {
$this->dblock->ajouterDonnee('nvp', $_REQUEST['nvp']);
}
$this->construireContexte();
$this->ajouterMacroElement();
}
function construireContexte()
{
}
function ajouterMacroElement()
{
if (!isset($_REQUEST['nvp'])) {
// La valeur par défaut 3 qui correspond à la BDNFF.
$this->dblock->attribuerContexteValeur('FORMULAIRE_NOMENCLATURAL', 'nvp', 3);
}
$un_macro_element = $this->macroElementFactory('PROJET_VERSION_TOUS', $this->dblock);
$un_macro_element->construire();
}
}
?>
/trunk/serveur/eflore_mv/modeles/groupes_macro_elements/recherchenomlatin.php
New file
0,0 → 1,45
<?php
class recherchenomlatin extends groupeMacroElement {
function __construct($une_connexion)
{
parent::__construct($une_connexion);
}
function construire()
{
$this->dblock = new blockdedonnees('FICHE_LISTE_NOMS');
// Radical du nom recherché
if (array_key_exists('radical', $_REQUEST)) {
$this->dblock->ajouterDonnee('radical', $_REQUEST['radical']);
}
// Rang des noms
if (array_key_exists('rang',$_REQUEST)) {
$this->dblock->ajouterDonnee('rang', $_REQUEST['rang']);
}
// Numéro de version du projet
if (array_key_exists('nvp', $_REQUEST)) {
$this->dblock->ajouterDonnee('nvp', $_REQUEST['nvp']);
}
$this->construireContexte();
$this->ajouterMacroElement();
}
function construireContexte()
{
}
function ajouterMacroElement()
{
$un_macro_element = $this->macroElementFactory('PROJET_VERSION', $this->dblock);
$un_macro_element->construire();
$un_macro_element = $this->macroElementFactory('NOM_RECHERCHE', $this->dblock);
$un_macro_element->construire();
}
}
?>
/trunk/serveur/eflore_mv/modeles/groupes_macro_elements/infonomlatin.php
New file
0,0 → 1,34
<?php
class infonomlatin extends groupeMacroElement {
function __construct($une_connexion)
{
parent::__construct($une_connexion);
}
function construire()
{
$this->dblock = new blockdedonnees('FICHE_NOM_LATIN');
 
// Numéro nomenclatural
if (array_key_exists('nn', $_REQUEST)) {
$this->dblock->ajouterDonnee('nn', $_REQUEST['nn']);
}
$this->construireContexte();
$this->ajouterMacroElement();
}
function construireContexte()
{
}
function ajouterMacroElement()
{
$un_macro_element = $this->macroElementFactory('NOM_LATIN', $this->dblock);
$un_macro_element->construire();
//echo '<pre>'.print_r($this->dblock, true).'</pre>';
}
}
?>
/trunk/serveur/eflore_mv/modeles/groupes_macro_elements/infotaxonsup.php
New file
0,0 → 1,39
<?php
class infotaxonsup extends groupeMacroElement {
function __construct($une_connexion)
{
parent::__construct($une_connexion);
}
function construire()
{
$this->dblock = new blockdedonnees('FICHE_TAXON_SUPERIEUR');
// Numéro de version du projet
if (array_key_exists('nvp', $_REQUEST)) {
$this->dblock->ajouterDonnee('nvp', $_REQUEST['nvp']);
}
// Ordre
if (array_key_exists('nt', $_REQUEST)) {
$this->dblock->ajouterDonnee('nt', $_REQUEST['nt']);
}
$this->construireContexte();
$this->ajouterMacroElement();
}
function construireContexte()
{
}
function ajouterMacroElement()
{
$un_macro_element = $this->macroElementFactory('TAXON_SUPERIEUR', $this->dblock);
$un_macro_element->construire();
//echo '<pre>'.print_r($this->dblock, true).'</pre>';
}
}
?>
/trunk/serveur/eflore_mv/modeles/groupes_macro_elements/recherchenomverna.php
New file
0,0 → 1,40
<?php
class recherchenomverna extends groupeMacroElement {
function __construct($une_connexion)
{
parent::__construct($une_connexion);
}
function construire()
{
$this->dblock = new blockdedonnees('FICHE_LISTE_NOMS_VERNA');
// Radical à rechercher
if (array_key_exists('radical', $_REQUEST)) {
$this->dblock->ajouterDonnee('radical', $_REQUEST['radical']);
}
// Numéro de version du projet
if (array_key_exists('nvp', $_REQUEST)) {
$this->dblock->ajouterDonnee('nvp', $_REQUEST['nvp']);
}
$this->construireContexte();
$this->ajouterMacroElement();
}
function construireContexte()
{
}
function ajouterMacroElement()
{
$un_macro_element = $this->macroElementFactory('PROJET_VERSION', $this->dblock);
$un_macro_element->construire();
$un_macro_element = $this->macroElementFactory('VERNACULAIRE_RECHERCHE', $this->dblock);
$un_macro_element->construire();
}
}
?>
/trunk/serveur/eflore_mv/modeles/groupes_macro_elements/formulairetaxonomique.php
New file
0,0 → 1,50
<?php
class formulairetaxonomique extends groupeMacroElement {
function __construct($une_connexion)
{
parent::__construct($une_connexion);
}
function construire()
{
$this->dblock = new blockdedonnees('FORMULAIRE_TAXONOMIQUE');
// Numéro de version du projet
if (array_key_exists('nvp', $_REQUEST)) {
$this->dblock->ajouterDonnee('nvp', $_REQUEST['nvp']);
}
// Rang
if (array_key_exists('rg',$_REQUEST)) {
$this->dblock->ajouterDonnee('rg', $_REQUEST['rg']);
}
// Ordre
if (array_key_exists('od',$_REQUEST)) {
$this->dblock->ajouterDonnee('od', $_REQUEST['od']);
}
// Lettre du début du nom
if (array_key_exists('le',$_REQUEST)) {
$this->dblock->ajouterDonnee('le', $_REQUEST['le']);
}
$this->construireContexte();
$this->ajouterMacroElement();
}
function construireContexte()
{
}
function ajouterMacroElement()
{
$un_macro_element = $this->macroElementFactory('PROJET_VERSION_TOUS', $this->dblock);
$un_macro_element->construire();
$un_macro_element = $this->macroElementFactory('TAXON_RECHERCHE', $this->dblock);
$un_macro_element->construire();
}
}
?>
/trunk/serveur/eflore_mv/modeles/groupes_macro_elements/fichesynthese.php
New file
0,0 → 1,57
<?php
class fichesynthese extends groupeMacroElement {
function __construct($une_connexion)
{
parent::__construct($une_connexion);
}
function construire()
{
$this->dblock = new blockdedonnees('FICHE_SYNTHESE');
if (array_key_exists('nn', $_REQUEST)) {
$this->dblock->ajouterDonnee('nn', $_REQUEST['nn']);
}
if (array_key_exists('nvp', $_REQUEST)) {
$this->dblock->ajouterDonnee('nvp', $_REQUEST['nvp']);
}
$this->construireContexte();
$this->ajouterMacroElement();
}
function construireContexte()
{
}
function ajouterMacroElement()
{
$un_macro_element = $this->macroElementFactory('NOM_LATIN', $this->dblock);
$un_macro_element->construire();
$un_macro_element = $this->macroElementFactory('NOM_SELECTION_PROJETS', $this->dblock);
$un_macro_element->construire();
if (!isset($_REQUEST['nvp'])) {
// La valeur par défaut 3 qui correspond à la BDNFF.
$this->dblock->attribuerContexteValeur('FICHE_SYNTHESE', 'nvp', 3);
}
$un_macro_element = $this->macroElementFactory('NOM_SELECTION', $this->dblock);
$un_macro_element->construire();
if (!isset($_REQUEST['nt'])) {
$this->dblock->attribuerContexteSql('FICHE_SYNTHESE>NOM_SELECTION', 'nt', 'et_id_taxon');
}
$un_macro_element = $this->macroElementFactory('PROJET_VERSION', $this->dblock);
$un_macro_element->construire();
$un_macro_element = $this->macroElementFactory('TAXON_NOMS', $this->dblock);
$un_macro_element->construire();
$un_macro_element = $this->macroElementFactory('FICHE_SYNTHESE>TAXON_NOMS>NOM_LATIN', $this->dblock);
$un_macro_element->construire();
$un_macro_element = $this->macroElementFactory('VERNACULAIRE_NOMS', $this->dblock);
$un_macro_element->construire();
//echo '<pre>'.print_r($this->dblock, true).'</pre>';
//$this->dblock->afficher();
}
}
?>
/trunk/serveur/eflore_mv/modeles/groupes_macro_elements/recherchetaxon.php
New file
0,0 → 1,55
<?php
class recherchetaxon extends groupeMacroElement {
function __construct($une_connexion)
{
parent::__construct($une_connexion);
}
function construire()
{
$this->dblock = new blockdedonnees('FICHE_LISTE_TAXONS');
// Numéro de version du projet
if (array_key_exists('nvp', $_REQUEST)) {
$this->dblock->ajouterDonnee('nvp', $_REQUEST['nvp']);
}
// Rang
if (array_key_exists('rg',$_REQUEST)) {
$this->dblock->ajouterDonnee('rg', $_REQUEST['rg']);
}
// Ordre
if (array_key_exists('od',$_REQUEST)) {
$this->dblock->ajouterDonnee('od', $_REQUEST['od']);
}
// Lettre du début du nom
if (array_key_exists('le',$_REQUEST)) {
$this->dblock->ajouterDonnee('le', $_REQUEST['le']);
}
// Numéro du taxon dans un projet
if (array_key_exists('nt',$_REQUEST)) {
$this->dblock->ajouterDonnee('nt', $_REQUEST['nt']);
}
$this->construireContexte();
$this->ajouterMacroElement();
}
function construireContexte()
{
}
function ajouterMacroElement()
{
$un_macro_element = $this->macroElementFactory('TAXON_RECHERCHE_ALPHABET', $this->dblock);
$un_macro_element->construire();
$un_macro_element = $this->macroElementFactory('TAXON_RECHERCHE_CLASSIFICATION', $this->dblock);
$un_macro_element->construire();
}
}
?>
/trunk/serveur/eflore_mv/modeles/groupes_macro_elements/rechercheclassification.php
New file
0,0 → 1,44
<?php
class rechercheclassification extends groupeMacroElement {
function __construct($une_connexion)
{
parent::__construct($une_connexion);
}
function construire()
{
$this->dblock = new blockdedonnees('FICHE_LISTE_TAXONS');
// Numéro de version du projet
if (array_key_exists('nvp', $_REQUEST)) {
$this->dblock->ajouterDonnee('nvp', $_REQUEST['nvp']);
}
// Rang
if (array_key_exists('rg', $_REQUEST)) {
$this->dblock->ajouterDonnee('rg', $_REQUEST['rg']);
}
// Ordre
if (array_key_exists('nt', $_REQUEST)) {
$this->dblock->ajouterDonnee('nt', $_REQUEST['nt']);
}
$this->construireContexte();
$this->ajouterMacroElement();
}
function construireContexte()
{
}
function ajouterMacroElement()
{
$un_macro_element = $this->macroElementFactory('TAXON_RECHERCHE_CLASSIFICATION', $this->dblock);
$un_macro_element->construireParRecursivite(0);
//echo '<pre>'.print_r($this->dblock, true).'</pre>';
}
}
?>
/trunk/serveur/eflore_mv/eflore_services.map
New file
0,0 → 1,12
cle serviceName viewName schema.xsd ratioControle style.xslt
listenoms1 recherchenomlatin default_html null 0 null
listenoms2 recherchenomlatin identite_html null 0 null
recherche_latin recherchenomlatin recherche_nom_latin_xhtml null 0 null
recherche_verna recherchenomverna recherche_nom_vernaculaire_xhtml null 0 null
recherche_taxon recherchetaxon recherche_taxon_xhtml null 0 null
recherche_classif rechercheclassification recherche_classif_xhtml null 0 null
fiche_synthese fichesynthese fiche_synthese_xhtml null 0 null
form_taxon formulairetaxonomique formulaire_taxonomique_xhtml null 0 null
form_nom formulairenomenclatural formulaire_nomenclatural_xhtml null 0 null
info_taxon_sup infotaxonsup info_taxon_sup_xml null 0 null
info_nom_latin infonomlatin info_nom_latin_xml null 0 null
/trunk/serveur/eflore_mv/vues/recherche_nom_latin_xhtml.php
New file
0,0 → 1,194
<?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ème
echo 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 ----------------------------------------------------------------------------------------+
*/
?>
/trunk/serveur/eflore_mv/vues/formulaire_nomenclatural_xhtml.php
New file
0,0 → 1,150
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 5.0.3 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2005 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_nomenclatural_xhtml.php,v 1.3 2005-08-25 14:35:59 ddelon Exp $
/**
* Vue affichant le formulaire de recherche nomenclaturale.
*
* Permet de retourner le xhtml correspondant au formulaire de recherche nomenclaturale.
*
*@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-2005
*@version $Revision: 1.3 $ $Date: 2005-08-25 14:35:59 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
require_once EFSE_CHEMIN_FONCTION.'eribo_encodage.fonct.php';
 
// +------------------------------------------------------------------------------------------------------+
// | CLASSE de la VUE |
// +------------------------------------------------------------------------------------------------------+
class formulaire_nomenclatural_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 nomenclaturale</title>'."\n";
$retour .= '<!-- END entete -->'."\n";
$retour .= '</head>'."\n";
$retour .= '<body>'."\n";
$retour .= '<!-- BEGIN corps -->'."\n";
$retour .= '<h2>'.'Rechercher une plante par son nom'.'</h2>'."\n";
$retour .= '<form id="eflore_form_nomenclature" name="eflore_form_nomenclature" action="{UrlProjetNom}" method="post">'."\n";
$retour .= '<fieldset>'."\n".'<legend>'.'Recherche par nom'.'</legend>'."\n";
$retour .= '<ul>'."\n";
$retour .= '<li><label for="eflore_nom">'.'Nom : '.'</label>'."\n";
$retour .= '<input id="eflore_nom" name="eflore_nom" class="champ" tabindex="1000" size="45" maxlength="255" onclick="javascript: this.value=\'\';" type="text" value="{eflore_nom}" /></li>'."\n";
$retour .= '<li><label for="eflore_referenciel">'.'Référentiel : '.'</label>'."\n";
$retour .= '<select id="eflore_referenciel" name="eflore_referenciel" tabindex="1001">'."\n";
$retour .= ' <option value="0" func_selectionnerEfloreRef(0)>'.'Tous'.'</option>'."\n";
$retour .= $this->leBlock->afficherPattern('FORMULAIRE_NOMENCLATURAL>PROJET_VERSION_TOUS','afficherReferenciels', null, TRUE);
$retour .= '</select></li>'."\n";
$retour .= '<li>'."\n".'<ul>'."\n";
$retour .= '<li><input id="eflore_type_nom_scientifique" tabindex="1002" name="eflore_type_nom" value="nom_scientifique" type="radio" {eflore_type_nom_scientifique} />';
$retour .= '<label for="eflore_type_nom_scientifique">nom scientifique</label></li>'."\n";
$retour .= '<li><input id="eflore_type_nom_vernaculaire" tabindex="1003" name="eflore_type_nom" value="nom_vernaculaire" type="radio" {eflore_type_nom_vernaculaire} />';
$retour .= '<label for="eflore_type_nom_vernaculaire">nom vernaculaire</label></li>'."\n";
$retour .= '</ul>'."\n".'</li>'."\n";
$retour .= '<li><input id="eflore_nomenclature_submit" type="submit" value="'.'OK'.'" /></li>'."\n";
$retour .= '</ul>'."\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 afficherReferenciels($donnees)
{
//$retour .= '<pre>'.print_r($donnees, true).'</pre>';
$retour .= ' <option value="'.$donnees['PROJET_VERSION_TOUS']['eprv_id_version'].'" func_selectionnerEfloreRef('.$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;
}
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.2 2005/06/30 15:25:07 jpm
* Début des modifications pour ajout de l'arborescence de la classif.
*
* Revision 1.1 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 ----------------------------------------------------------------------------------------+
*/
?>
/trunk/serveur/eflore_mv/vues/default_html.php
New file
0,0 → 1,16
<?php
class default_html implements iVue {
protected $le_block;
function __construct($un_block)
{
$this->le_block = $un_block;
}
function serialiser()
{
$this->le_block->afficher();
}
}
?>
/trunk/serveur/eflore_mv/vues/recherche_classif_xhtml.php
New file
0,0 → 1,176
<?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_classif_xhtml.php,v 1.2 2005-02-14 18:11:43 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.2 $ $Date: 2005-02-14 18:11:43 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
require_once EFSE_CHEMIN_FONCTION.'eribo_encodage.fonct.php';
 
// +------------------------------------------------------------------------------------------------------+
// | CLASSE de la VUE |
// +------------------------------------------------------------------------------------------------------+
class recherche_classif_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 .= '<!-- BEGIN liste -->'."\n";
$retour .= $this->leBlock->afficherPatternRecursivement('afficherTaxon', 'TAXON_RECHERCHE_CLASSIFICATION');
$retour .= '<!-- END liste -->'."\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, $parametre)
{
//echo '<pre>'.print_r($donnees, true).'</pre>';
if (isset($donnees['eni_intitule_nom'])) {
if (!empty($donnees['eni_intitule_nom'])) {
$retour .= '<a href="func_remplacerUrlClassif('.$donnees['etr_id_taxon_1'].')">';
$retour .= '<img src="#" alt="+"/>';
$retour .= '</a><a id="eflore_taxon_'.$donnees['etr_id_taxon_1'].'" href="{UrlFicheNom}'.$donnees['en_id_nom'].'">';
$retour .= $donnees['eni_intitule_nom'];
$retour .= '</a>'."\n";
$retour_tax = '';
$nbre_taxon = 0;
foreach ($donnees as $cle => $valeur) {
if (strstr($cle, $parametre)) {
$retour_tax .= afficherTaxon($valeur, $parametre);
$nbre_taxon++;
}
}
if ($nbre_taxon > 0) {
$retour .= '<ol>'."\n";
$retour .= $retour_tax;
$retour .= '</ol>'."\n";
} else {
$retour .= 'func_ajouterArboressenceClassif('.$donnees['etr_id_taxon_1'].')';
}
$retour .= '</li>'."\n";
}
} else {
$retour .= '<ol>'."\n";
foreach ($donnees as $cle0 => $valeur0) {
if (strstr($cle0, $parametre)) {
if (!empty($valeur0['eni_intitule_nom'])) {
$retour .= '<li>'."\n";
$retour .= '<a href="func_remplacerUrlClassif('.$valeur0['etr_id_taxon_1'].')">';
$retour .= '<img src="#" alt="+"/>';
$retour .= '</a><a id="eflore_taxon_'.$valeur0['etr_id_taxon_1'].'" href="{UrlFicheNom}'.$valeur0['en_id_nom'].'">';
$retour .= $valeur0['eni_intitule_nom'];
$retour .= '</a>'."\n";
$retour_tax = '';
$nbre_taxon = 0;
foreach ($valeur0 as $cle1 => $valeur1) {
if (strstr($cle1, $parametre)) {
$retour_tax .= afficherTaxon($valeur1, $parametre);
$nbre_taxon++;
}
}
if ($nbre_taxon > 0) {
$retour .= '<ol>'."\n";
$retour .= $retour_tax;
$retour .= '</ol>'."\n";
} else {
$retour .= 'func_ajouterArboressenceClassif('.$valeur0['etr_id_taxon_1'].')';
}
$retour .= '</li>'."\n";
}
}
}
$retour .= '</ol>'."\n";
}
return $retour;
}
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/02/09 13:07:16 jpm
* Permet de voir la classification d'un taxon.
*
* Revision 1.1 2005/01/28 19:45:44 jpm
* Début recheche taxons.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/serveur/eflore_mv/vues/identite_html.php
New file
0,0 → 1,27
<?php
global $gBlock;
 
class identite_html implements iVue {
protected $leBlock;
function __construct($unBlock)
{
$this->leBlock = $unBlock;
}
function serialiser()
{
$gBlock = $this->leBlock;
$retour = '';
$retour .= '<html>';
$retour .= '<head>';
$retour .= '</head>';
$retour .= '<body>';
$retour .= '<h3>'.'coucou'.'</h3>';
$retour .= $gBlock->afficher();
$retour .= '</body>';
$retour .= '</html>';
}
}
?>
/trunk/serveur/eflore_mv/vues/formulaire_taxonomique_xhtml.php
New file
0,0 → 1,234
<?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.9 2005-08-25 14:35:59 ddelon 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.9 $ $Date: 2005-08-25 14:35:59 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | 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érentiel : '.'</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ème
echo 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éfaut
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;
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.8 2005/06/30 15:25:07 jpm
* Début des modifications pour ajout de l'arborescence de la classif.
*
* 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 ----------------------------------------------------------------------------------------+
*/
?>
/trunk/serveur/eflore_mv/vues/info_nom_latin_xml.php
New file
0,0 → 1,100
<?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: info_nom_latin_xml.php,v 1.1 2005-07-01 19:06:59 jp_milcent 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-07-01 19:06:59 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
require_once EFSE_CHEMIN_FONCTION.'eribo_encodage.fonct.php';
 
// +------------------------------------------------------------------------------------------------------+
// | CLASSE de la VUE |
// +------------------------------------------------------------------------------------------------------+
class info_nom_latin_xml implements iVue {
protected $leBlock;
function __construct($unBlock)
{
$this->leBlock = $unBlock;
}
function serialiser()
{
$retour = '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>'."\n";
$retour .= $this->leBlock->afficherPattern('FICHE_NOM_LATIN>NOM_LATIN','afficherInfoNomLatin');
// Envoi au navigateur après encodage en entité des caractères posant problème
header('Content-Type: text/xml');
echo utf8_encode($retour);
}
}
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE des FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
function afficherInfoNomLatin($donnees)
{
$retour = '';
$retour .= '<nom_latin>'."\n";
$retour .= ' <eni_in>'.$donnees['eni_intitule_nom'].'</eni_in>'."\n";
$retour .= '</nom_latin>'."\n";
return $retour;
}
 
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/07/01 18:31:30 jp_milcent
* changement de nom
*
* Revision 1.1 2005/06/30 15:25:07 jpm
* Début des modifications pour ajout de l'arborescence de la classif.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/serveur/eflore_mv/vues/info_taxon_sup_xml.php
New file
0,0 → 1,103
<?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: info_taxon_sup_xml.php,v 1.2 2005-07-01 19:06:59 jp_milcent 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.2 $ $Date: 2005-07-01 19:06:59 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
require_once EFSE_CHEMIN_FONCTION.'eribo_encodage.fonct.php';
 
// +------------------------------------------------------------------------------------------------------+
// | CLASSE de la VUE |
// +------------------------------------------------------------------------------------------------------+
class info_taxon_sup_xml implements iVue {
protected $leBlock;
function __construct($unBlock)
{
$this->leBlock = $unBlock;
}
function serialiser()
{
$retour = '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>'."\n";
$retour .= $this->leBlock->afficherPattern('FICHE_TAXON_SUPERIEUR>TAXON_SUPERIEUR','afficherInfoTaxon');
// Envoi au navigateur après encodage en entité des caractères posant problème
header('Content-Type: text/xml');
echo utf8_encode($retour);
}
}
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE des FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
function afficherInfoTaxon($donnees)
{
$retour = '';
$retour .= '<taxon>'."\n";
$retour .= ' <etr_id_t2>'.$donnees['etr_id_taxon_2'].'</etr_id_t2>'."\n";
$retour .= ' <etr_id_vpt2>'.$donnees['etr_id_version_projet_taxon_2'].'</etr_id_vpt2>'."\n";
$retour .= ' <en_ce_r>'.$donnees['en_ce_rang'].'</en_ce_r>'."\n";
$retour .= ' <en_id_n>'.$donnees['en_id_nom'].'</en_id_n>'."\n";
$retour .= '</taxon>'."\n";
return $retour;
}
 
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/07/01 18:31:30 jp_milcent
* changement de nom
*
* Revision 1.1 2005/06/30 15:25:07 jpm
* Début des modifications pour ajout de l'arborescence de la classif.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/serveur/eflore_mv/vues/fiche_synthese_xhtml.php
New file
0,0 → 1,497
<?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: fiche_synthese_xhtml.php,v 1.12 2005-11-09 09:17:14 jp_milcent Exp $
/**
* Vue affichant la fiche de synthèse d'un nom dans le projet donné
*
* Permet de retourner le html correspondant à la fiche de synthèse d'un nom
* dans un projet donné.
*
*@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.12 $ $Date: 2005-11-09 09:17:14 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
require_once EFSE_CHEMIN_FONCTION.'eribo_encodage.fonct.php';
$GLOBALS['nbre_projet'] = 0;
 
// +------------------------------------------------------------------------------------------------------+
// | CLASSE de la VUE |
// +------------------------------------------------------------------------------------------------------+
class fiche_synthese_xhtml implements iVue {
protected $leBlock;
function __construct($unBlock)
{
$this->leBlock = $unBlock;
}
function serialiser()
{
$referentiel_nom = $this->leBlock->afficherPattern('FICHE_SYNTHESE>PROJET_VERSION','afficherNomProjetVersion');
$nt = $this->leBlock->afficherPattern('FICHE_SYNTHESE','afficherNomInfosNt');
// La page xhtml :
$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://www.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>Synthèse d\'un nom latin</title>'."\n";
$retour .= '<!-- END entete -->'."\n";
$retour .= '</head>'."\n";
$retour .= '<body>'."\n";
$retour .= '<!-- BEGIN corps -->'."\n";
$retour .= '<h1>'.'Synthèse d\'un nom latin'.'</h1>'."\n";
$retour .= '<h2>'.'Informations sur le nom :'.'</h2>'."\n";
$retour .= '<p>'."\n";
$retour .= $this->leBlock->afficherPattern('FICHE_SYNTHESE>NOM_LATIN','afficherNomInfos');
$retour .= 'Numéro taxonomique pour le référentiel "'.$referentiel_nom.'" : '.$nt;
$retour .= '</p>'."\n";
$retour .= '<h2>'.'Référentiel courant: '.'</h2>';
$retour .= '<p>'."\n";
$retour .= $referentiel_nom;
$retour .= '</p>'."\n";
$retour .= $this->leBlock->afficherPattern('FICHE_SYNTHESE>NOM_SELECTION_PROJETS','compterProjets');
if ($GLOBALS['nbre_projet'] == 1) {
$retour .= '<h2>'.'Présent uniquement dans le référentiel : '.'</h2>'."\n";
$retour .= '<p>'."\n";
$retour .= $this->leBlock->afficherPattern('FICHE_SYNTHESE>PROJET_VERSION','afficherNomProjetVersion');
$retour .= '</p>'."\n";
} else if ($GLOBALS['nbre_projet'] > 1 AND $GLOBALS['nbre_projet'] < 6) {
$retour .= '<h2>'.'Présent dans les référentiels: '.'</h2>'."\n";
$retour .= '<ul>'."\n";
$retour .= $this->leBlock->afficherPattern('FICHE_SYNTHESE>NOM_SELECTION_PROJETS','afficherListeProjets', null, TRUE);
$retour .= '</ul>'."\n";
} else {
$retour .= '<h2>'.'Présent dans les référentiels: '.'</h2>'."\n";
$retour .= '<form id="eflore_form_projet" action="{FormUrlProjetChangement}" method="post">'."\n";
$retour .= '<p>'."\n";
$retour .= $this->leBlock->afficherPattern('FICHE_SYNTHESE>NOM_LATIN','afficherChampNom');
$retour .= '<select id="nvp" name="nvp">'."\n";
$retour .= $this->leBlock->afficherPattern('FICHE_SYNTHESE>NOM_SELECTION_PROJETS','afficherOptionProjets', null, TRUE);
$retour .= '</select>'."\n";
$retour .= '<input type="submit" value="ok" />'."\n";
$retour .= '</p>'."\n";
$retour .= '</form>'."\n";
}
// Gestion du nom correct
$retour .= '<h2>'.'Nom correct dans le référentiel courant: '.'</h2>'."\n";
$aso_param['statut_id'] = 3;
$retour .= $this->leBlock->afficherPattern('FICHE_SYNTHESE>TAXON_NOMS>NOM_LATIN','afficherNomCorrect', $aso_param, TRUE);
// Gestion de la recherche Google
$retour .= '<h2>'.'Rechercher des illustrations avec Google : '.'</h2>'."\n";
$aso_param['statut_id'] = 3;
$retour .= $this->leBlock->afficherPattern('FICHE_SYNTHESE>TAXON_NOMS>NOM_LATIN','afficherRechercheGoogle', $aso_param, TRUE);
// Gestion des taxons supérieurs
$retour .= '<h2>'.'Niveaux taxinomiques supérieurs : '.'</h2>'."\n";
$retour .= $this->leBlock->afficherPattern('FICHE_SYNTHESE','afficherNiveauTaxoSuperieur');
// Gestion de la synonymie
// Gestion des noms dont le statut n'est pas renseigné
$aso_param['statut_id'] = 0;
$retour_syno = $this->leBlock->afficherPattern('FICHE_SYNTHESE>TAXON_NOMS>NOM_LATIN','afficherSynonyme', $aso_param, TRUE);
if (!empty($retour_syno)) {
$synonymie = '<h3>'.'Statut non renseigné : '.'</h3>'."\n";
$synonymie .= '<ol>'."\n";
$synonymie .= $retour_syno;
$synonymie .= '</ol>'."\n";
$retour_syno_final .= $synonymie;
}
// Gestion des noms dont le statut est inconnu
$aso_param['statut_id'] = 1;
$retour_syno = $this->leBlock->afficherPattern('FICHE_SYNTHESE>TAXON_NOMS>NOM_LATIN','afficherSynonyme', $aso_param, TRUE);
if (!empty($retour_syno)) {
$synonymie = '<h3>'.'Statut inconnu : '.'</h3>'."\n";
$synonymie .= '<ol>'."\n";
$synonymie .= $retour_syno;
$synonymie .= '</ol>'."\n";
$retour_syno_final .= $synonymie;
}
// Gestion des noms dont le statut pose problème
$aso_param['statut_id'] = 2;
$retour_syno = $this->leBlock->afficherPattern('FICHE_SYNTHESE>TAXON_NOMS>NOM_LATIN','afficherSynonyme', $aso_param, TRUE);
if (!empty($retour_syno)) {
$synonymie = '<h3>'.'Statut posant problème : '.'</h3>'."\n";
$synonymie .= '<ol>'."\n";
$synonymie .= $retour_syno;
$synonymie .= '</ol>'."\n";
$retour_syno_final .= $synonymie;
}
// Gestion des synonymes taxonomiques
$aso_param['statut_id'] = 4;
$retour_syno = $this->leBlock->afficherPattern('FICHE_SYNTHESE>TAXON_NOMS>NOM_LATIN','afficherSynonyme', $aso_param, TRUE);
if (!empty($retour_syno)) {
$synonymie = '<h3>'.'Synonymes taxonomiques : '.'</h3>'."\n";
$synonymie .= '<ol>'."\n";
$synonymie .= $retour_syno;
$synonymie .= '</ol>'."\n";
$retour_syno_final .= $synonymie;
}
// Gestion des synonymes nomenclaturaux
$aso_param['statut_id'] = 5;
$retour_syno = $this->leBlock->afficherPattern('FICHE_SYNTHESE>TAXON_NOMS>NOM_LATIN','afficherSynonyme', $aso_param, TRUE);
if (!empty($retour_syno)) {
$synonymie = '<h3>'.'Synonymes nomenclaturaux : '.'</h3>'."\n";
$synonymie .= '<ol>'."\n";
$synonymie .= $retour_syno;
$synonymie .= '</ol>'."\n";
$retour_syno_final .= $synonymie;
}
// Gestion des synonymes indéterminés
$aso_param['statut_id'] = 6;
$retour_syno = $this->leBlock->afficherPattern('FICHE_SYNTHESE>TAXON_NOMS>NOM_LATIN','afficherSynonyme', $aso_param, TRUE);
if (!empty($retour_syno)) {
$synonymie = '<h3>'.'Synonymes indéterminés : '.'</h3>'."\n";
$synonymie .= '<ol>'."\n";
$synonymie .= $retour_syno;
$synonymie .= '</ol>'."\n";
$retour_syno_final .= $synonymie;
}
// Gestion des synonymes "inclu dans"
$aso_param['statut_id'] = 7;
$retour_syno = $this->leBlock->afficherPattern('FICHE_SYNTHESE>TAXON_NOMS>NOM_LATIN','afficherSynonyme', $aso_param, TRUE);
if (!empty($retour_syno)) {
$synonymie = '<h3>'.'Synonymes "inclu dans": '.'</h3>'."\n";
$synonymie .= '<ol>'."\n";
$synonymie .= $retour_syno;
$synonymie .= '</ol>'."\n";
$retour_syno_final .= $synonymie;
}
// Gestion des synonymes au sens de
$aso_param['statut_id'] = 8;
$retour_syno = $this->leBlock->afficherPattern('FICHE_SYNTHESE>TAXON_NOMS>NOM_LATIN','afficherSynonyme', $aso_param, TRUE);
if (!empty($retour_syno)) {
$synonymie = '<h3>'.'Synonymes "au sens de (<i>sensu</i>)": '.'</h3>'."\n";
$synonymie .= '<ol>'."\n";
$synonymie .= $retour_syno;
$synonymie .= '</ol>'."\n";
$retour_syno_final .= $synonymie;
}
if (empty($retour_syno_final)) {
$retour .= '<h2>'.'Synonymie : '.'</h2>'."\n";
$retour .= '<p>'.'Aucune synonymie pour ce nom dans ce référentiel.'.'</p>'."\n";
} else {
$retour .= '<h2>'.'Synonymie : '.'</h2>'."\n";
$retour .= $retour_syno_final;
}
// Gestion des noms vernaculaires
$nom_verna_lignes = $this->leBlock->afficherPattern('FICHE_SYNTHESE>VERNACULAIRE_NOMS','afficherNomVernaculaire');
if (empty($nom_verna_lignes)) {
$retour .= '<h2>'.'Noms vernaculaires :'.'</h2>'."\n";
$retour .= '<p>'.'Aucun nom vernaculaire pour ce taxon dans ce référentiel.'.'</p>'."\n";
} else {
$retour .= '<h2>'.'Noms vernaculaires : '.'</h2>'."\n";
$retour .= '<table id="tableau_nom_verna" summary="Tableau contenant la liste des noms vernaculaires du taxon">'."\n";
$retour .= ' <thead>'."\n";
$retour .= ' <tr><th>'.'Langue'.'</th><th>'.'Pays'.'</th><th>'.'Nom'.'</th><th>'.'Emploi'.'</th><th>'.'Genre et nombre'.'</th></tr>'."\n";
$retour .= ' </thead>'."\n";
$retour .= ' <tbody>'."\n";
$retour .= $nom_verna_lignes;
$retour .= ' </tbody>'."\n";
$retour .= '</table>'."\n";
}
$retour .= '<!-- END corps -->'."\n";
$retour .= '<!-- BEGIN pied -->'."\n";
$retour .= '<p>'.'Si vous constatez des erreurs ou des insuffisances en consultant cet index, veuillez contacter '."\n";
$retour .= ' <a href="mailto:eflore_remarques@tela-botanica.org">l\'équipe d\'eFlore</a>.'."\n";
$retour .= '</p>'."\n";
$retour .= '<p>'."\n";
$retour .= ' <a href="http://jigsaw.w3.org/css-validator/check/referer">'."\n";
$retour .= ' <img class="reference" src="/accueil/images/references/css.png" alt="CSS valide!" />'."\n";
$retour .= ' </a>'."\n";
$retour .= ' <a href="http://validator.w3.org/check?uri=referer">'."\n";
$retour .= ' <img class="reference" src="/accueil/images/references/xhtml11.png" alt="XHTML 1.1 valide!" />'."\n";
$retour .= ' </a>'."\n";
$retour .= ' <a href="http://frenchmozilla.org">'."\n";
$retour .= ' <img class="reference" src="/accueil/images/references/firefox.png" alt="Télécharger un très bon navigateur!" />'."\n";
$retour .= ' </a>'."\n";
$retour .= '</p>'."\n";
$retour .= '<!-- END pied -->'."\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 construireNomLatin($donnees, $bool_nom_court = FALSE)
{
// Constitution du nom:
$nom = '';
if (!empty($donnees['en_nom_supra_generique'])) {
$nom .= $donnees['en_nom_supra_generique'];
} else if (!empty($donnees['en_epithete_infra_generique'])){
$nom .= $donnees['en_epithete_infra_generique'];
} else {
if (!empty($donnees['en_nom_genre'])) {
$nom .= $donnees['en_nom_genre'];
}
if (!empty($donnees['en_epithete_espece'])) {
$nom .= ' '.$donnees['en_epithete_espece'];
}
if (!empty($donnees['en_epithete_infra_specifique'])) {
if (!empty($donnees['enrg_abreviation_rang'])) {
$nom .= ' '.$donnees['enrg_abreviation_rang'].'';
}
$nom .= ' '.$donnees['en_epithete_infra_specifique'];
}
}
if (!$bool_nom_court) {
$auteur_basio = '';
$auteur_modif = '';
if (!empty($donnees['intitule_abrege_auteur_basio_ex']) && $donnees['en_ce_auteur_basio_ex'] != 0) {
$auteur_basio .= $donnees['intitule_abrege_auteur_basio_ex'];
if (!empty($donnees['intitule_abrege_auteur_basio'])) {
$auteur_basio .= ' ex '.$donnees['intitule_abrege_auteur_basio'];
}
} else if (!empty($donnees['intitule_abrege_auteur_basio']) && $donnees['en_ce_auteur_basio'] != 0) {
$auteur_basio .= $donnees['intitule_abrege_auteur_basio'];
}
if (!empty($donnees['intitule_abrege_auteur_modif_ex']) && $donnees['en_ce_auteur_modif_ex'] != 0) {
$auteur_modif .= $donnees['intitule_abrege_auteur_modif_ex'];
if (!empty($donnees['intitule_abrege_auteur_modif'])) {
$auteur_modif .= ' ex '.$donnees['intitule_abrege_auteur_modif'];
}
} else if (!empty($donnees['intitule_abrege_auteur_modif']) && $donnees['en_ce_auteur_modif'] != 0) {
$auteur_modif .= $donnees['intitule_abrege_auteur_modif'];
}
if (!empty($auteur_modif)) {
$nom .= ' ('.$auteur_basio.') ex '.$auteur_modif;
} else {
$nom .= ' '.$auteur_basio;
}
}
return $nom;
}
 
function afficherChampNom($donnees)
{
$retour = '';
$retour .= '<input type="hidden" id="nn" name="nn" value="'.$donnees['en_id_nom'].'" />'."\n";
$retour .= '<input type="hidden" id="cle" name="cle" value="synthese" />'."\n";
return $retour;
}
 
function afficherNomInfos($donnees)
{
$retour = '';
//$retour .= '<pre>'.print_r($donnees, true).'</pre>';
$retour .= '<br />';
$retour .= 'Nom sélectionné précédemment : '.construireNomLatin($donnees).'<br />'."\n";
$retour .= 'Numéro nomenclatural absolu : '.$donnees['en_id_nom'].'<br />'."\n";
return $retour;
}
function afficherNomInfosNt($donnees)
{
return $donnees['nt'];
}
 
function afficherNomProjetVersion($donnees)
{
return $donnees['eprv_nom'];
}
 
function compterProjets($donnees)
{
$GLOBALS['nbre_projet']++;
}
 
function afficherListeProjets($donnees)
{
$retour = '';
if ($donnees['FICHE_SYNTHESE']['nvp'] != $donnees['NOM_SELECTION_PROJETS']['eprv_id_version']) {
$retour .= ' <li>';
$retour .= '<a href="{LienUrlProjetChangement}'.$donnees['NOM_SELECTION_PROJETS']['eprv_id_version'].'" title="Consulter la fiche de ce projet.">';
$retour .= $donnees['NOM_SELECTION_PROJETS']['eprv_nom'].' - '.$donnees['NOM_SELECTION_PROJETS']['epr_intitule_projet'];
$retour .= '</a>';
$retour .= '</li>'."\n";
}
return $retour;
}
 
function afficherOptionProjets($donnees)
{
$retour = '';
if ($donnees['FICHE_SYNTHESE']['nvp'] != $donnees['NOM_SELECTION_PROJETS']['eprv_id_version']) {
$retour .= ' <option value="'.$donnees['NOM_SELECTION_PROJETS']['eprv_id_version'].'">';
$retour .= $donnees['NOM_SELECTION_PROJETS']['eprv_nom'].' - '.$donnees['NOM_SELECTION_PROJETS']['epr_intitule_projet'];
$retour .= '</option>'."\n";
}
return $retour;
}
 
function afficherNomCorrect($donnees, $aso_param)
{
$retour = '';
//$retour .= '<pre>'.print_r($donnees, true).'</pre>';
if ($donnees['TAXON_NOMS']['esns_id_statut'] == $aso_param['statut_id']) {
$retour .= '<p><strong>'.$donnees['NOM_LATIN']['eni_intitule_nom'].'</strong></p>'."\n";
}
return $retour;
}
 
function afficherRechercheGoogle($donnees, $aso_param)
{
$retour = '';
//$retour .= '<pre>'.print_r($donnees, true).'</pre>';
if ($donnees['TAXON_NOMS']['esns_id_statut'] == $aso_param['statut_id']) {
$retour .= '<form method="get" action="http://images.google.fr/images" target="_blank">'."\n";
$retour .= '<p>'."\n";
$retour .= '<a href="http://www.google.com/" title="Aller sur Google France">'."\n";
$retour .= ' <img src="http://www.google.com/logos/Logo_25wht.gif" alt="Google" />'."\n";
$retour .= '</a>'."\n";
$retour .= '<input type="text" name="q" size="25" maxlength="255" value="'.construireNomLatin($donnees['NOM_LATIN'], TRUE).'" />'."\n";
$retour .= '<input type="hidden" name="ie" value="ISO-8859-1" />'."\n";
$retour .= '<input type="hidden" name="oe" value="ISO-8859-1" />'."\n";
$retour .= '<input type="hidden" name="hl" value="fr" />'."\n";
$retour .= '<input type="submit" name="btnG" value="Recherche Google" />'."\n";
$retour .= '</p>'."\n";
$retour .= '</form>'."\n";
}
return $retour;
}
function afficherNiveauTaxoSuperieur($donnees)
{
$retour = '';
//$retour .= '<pre>'.print_r($donnees, true).'</pre>';
$retour .= 'func_NiveauTaxo('.$donnees['nt'].', '.$donnees['nvp'].')';
return $retour;
}
function afficherSynonyme($donnees, $aso_param)
{
$retour = '';
//$retour .= '<pre>'.print_r($donnees, true).'</pre>';
if ($donnees['TAXON_NOMS']['esns_id_statut'] == $aso_param['statut_id']) {
$retour .= ' <li>'.$donnees['NOM_LATIN']['eni_intitule_nom'].'</li>'."\n";
}
return $retour;
}
 
function afficherNomVernaculaire($donnees)
{
$retour = '';
$retour .= ' <tr>';
$retour .= '<td title="'.$donnees['el_nom_langue_principal'].'">'.$donnees['el_code_langue'].'</td>';
$retour .= '<td title="'.$donnees['ezg_intitule_principal_zg'].'">'.$donnees['ezg_code_zg'].'</td>';
if ($donnees['evce_id_emploi'] == 0) {// Non renseigné
$retour .= '<td>'.$donnees['ev_intitule_nom_vernaculaire'].'</td>';
$retour .= '<td>&nbsp;</td>';
} else if ($donnees['evce_id_emploi'] == 3) {// Recommandé ou typique
$retour .= '<td><strong>'.$donnees['ev_intitule_nom_vernaculaire'].'</strong></td>';
$retour .= '<td><strong>'.$donnees['evce_intitule_conseil_emlploi'].'</strong></td>';
} else if ($donnees['evce_id_emploi'] == 2) {// Secondaire ou régional
$retour .= '<td><em>'.$donnees['ev_intitule_nom_vernaculaire'].'</em></td>';
$retour .= '<td><em>'.$donnees['evce_intitule_conseil_emlploi'].'</em></td>';
} else {
$retour .= '<td>'.$donnees['ev_intitule_nom_vernaculaire'].'</td>';
$retour .= '<td>'.$donnees['evce_intitule_conseil_emlploi'].'</td>';
}
if ($donnees['egn_id_genre_nombre'] == 0) {
$retour .= '<td>&nbsp;</td>';
} else {
$retour .= '<td>'.$donnees['egn_intitule'].'</td>';
}
$retour .= '</tr>'."\n";
return $retour;
}
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.11 2005/11/09 09:14:42 jp_milcent
* Correction erreur HTML.
*
* Revision 1.10 2005/08/26 13:43:24 jp_milcent
* Changement du terme "Projet" en "Référentiel".
* Ajout de l'affichage du numéro taxonomique.
*
* Revision 1.9 2005/06/30 15:25:07 jpm
* Début des modifications pour ajout de l'arborescence de la classif.
*
* Revision 1.8 2005/02/14 18:11:43 jpm
* Amélioration.
*
* Revision 1.7 2005/01/28 19:46:18 jpm
* Amélioration de l'affichage des projets utilisant le noms sélectionné.
*
* Revision 1.6 2005/01/26 10:44:57 jpm
* Correction de la version de PHP.
*
* Revision 1.5 2005/01/25 12:26:19 jpm
* Utilisation de mot clé pour le template à la place des urls.
*
* Revision 1.4 2005/01/24 16:53:25 jpm
* Modification des méthodes permettant la récupération des données de la hiérarchie.
*
* Revision 1.3 2005/01/19 12:58:19 jpm
* Début des tests pour gérer le formulaire de changement de projet.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/serveur/eflore_mv/vues/recherche_nom_vernaculaire_xhtml.php
New file
0,0 → 1,201
<?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_vernaculaire_xhtml.php,v 1.4 2005-06-30 15:25:07 jpm Exp $
/**
* Vue affichant la liste des noms vernaculaire correspondant à un radical recherché.
*
* Permet de retourner le html correspondant à la liste des noms vernaculaires 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.4 $ $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 nom verna actuellement affiché*/
$GLOBALS['_NOM_VERNA_']['num'] = 0;
/* Variable stockant le n° du message à afficher*/
$GLOBALS['_NOM_VERNA_']['message'] = 1;
/* Variable permettant de savoir si on a déjà afficher l'entête du tableau des noms verna*/
$GLOBALS['_NOM_VERNA_']['tete'] = true;
/* Variable permettant de savoir si on a déjà afficher le pied du tableau des noms verna*/
$GLOBALS['_NOM_VERNA_']['pied'] = true;
 
// +------------------------------------------------------------------------------------------------------+
// | CLASSE de la VUE |
// +------------------------------------------------------------------------------------------------------+
class recherche_nom_vernaculaire_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://www.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 vernaculaires'.'</title>'."\n";
$retour .= '<!-- END entete -->'."\n";
$retour .= '</head>'."\n";
$retour .= '<body>'."\n";
$retour .= '<!-- BEGIN corps -->'."\n";
$retour .= '<h1>'.'Liste des noms vernaculaires'.'</h1>'."\n";
$retour .= '<h2>'.'Résumé de la recherche :'.'</h2>'."\n";
$retour .= '<dl>'."\n";
$retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS_VERNA','afficherRadical');
$retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS_VERNA>PROJET_VERSION','afficherResumerRecherche');
$retour .= '</dl>'."\n";
$retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS_VERNA>VERNACULAIRE_RECHERCHE','afficherTableEntete');
$retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS_VERNA>VERNACULAIRE_RECHERCHE','afficherNomVerna');
$retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS_VERNA>VERNACULAIRE_RECHERCHE','afficherTablePied');
$retour .= afficherMessage();
$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 afficherRadical($donnees)
{
//$retour = '<pre>'.print_r($donnees, true).'</pre>';
$retour = '<dt>'.'Radical : '.'</dt>'."\n";
$retour .= '<dd>'.$donnees['radical'].'</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 afficherTableEntete($donnees)
{
$retour = '';
if (isset($donnees['ev_id_nom_vernaculaire']) AND $GLOBALS['_NOM_VERNA_']['tete'] == true) {
$GLOBALS['_NOM_VERNA_']['tete'] = false;
$retour .= '<table id="eflore_table_resultat_nv">'."\n";
$retour .= '<caption>'.'Liste des noms vernaculaires correspondant au radical recherché'.'</caption>'."\n";
$retour .= '<thead>'."\n";
$retour .= '<tr><th>'.'N°'.'</th><th>'.'Langue'.'</th><th>'.'Pays'.'</th><th>'.'Nom vernaculaire'.'</th><th>'.'Nom latin correspondant'.'</th></tr>'."\n";
$retour .= '</thead>'."\n";
$retour .= '<tbody>'."\n";
}
return $retour;
}
function afficherNomVerna($donnees)
{
$retour = '';
//$retour .= '<pre>'.print_r($donnees, true).'</pre>';
if (isset($donnees['ev_id_nom_vernaculaire'])) {
$GLOBALS['_NOM_VERNA_']['message'] = 0;
$retour .= '<tr>'."\n";
$retour .= '<td>'.++$GLOBALS['_NOM_VERNA_']['num'].'</td>'."\n";
$retour .= '<td><abbr title="'.$donnees['ezg_intitule_principal_zg'].'">'.$donnees['ezg_code_zg'].'</abbr></td>'."\n";
$retour .= '<td><abbr title="'.$donnees['el_nom_langue_principal'].'">'.$donnees['el_code_langue'].'</abbr></td>'."\n";
$retour .= '<td>'.$donnees['ev_intitule_nom_vernaculaire'].'</td>'."\n";
if (isset($donnees['esn_ce_statut'])) {
if ($donnees['esn_ce_statut'] == 3) {//Nom retenu
$retour .= '<td><strong><a href="func_UrlFicheNom('.$donnees['en_id_nom'].', '.$donnees['esn_id_version_projet_taxon'].')">'.$donnees['eni_intitule_nom'].'</a></strong></td>';
} else {
$retour .= '<td><a href="func_UrlFicheNom('.$donnees['en_id_nom'].', '.$donnees['esn_id_version_projet_taxon'].')">'.$donnees['eni_intitule_nom'].'</a></td>';
}
}
$retour .= '</tr>'."\n";
}
return $retour;
}
function afficherTablePied($donnees)
{
$retour = '';
if (isset($donnees['ev_id_nom_vernaculaire']) AND $GLOBALS['_NOM_VERNA_']['pied'] == true) {
$GLOBALS['_NOM_VERNA_']['pied'] = false;
$retour .= '</tbody>'."\n";
$retour .= '</table>'."\n";
}
return $retour;
}
function afficherMessage($donnees = array())
{
$retour = '';
if ($GLOBALS['_NOM_VERNA_']['message'] == 1 AND $GLOBALS['_NOM_VERNA_']['num'] == 0) {
$retour .= '<p class="information">'.'Les noms vernaculaires de ce référentiel n\'ont pas encore été renseignés!'.'</p>'."\n";
} elseif ($GLOBALS['_NOM_VERNA_']['num'] == 0) {
$retour .= '<p class="information">'.'Aucun nom vernaculaire ne correspond à ce radical!'.'</p>'."\n";
}
return $retour;
}
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.3 2005/06/09 18:09:52 jpm
* Début gestion des référenciels dans la recherche nomenclaturale.
*
* Revision 1.2 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.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,121
<?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.3 2005-03-15 16:08:00 tam 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.3 $ $Date: 2005-03-15 16:08:00 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | 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 id="liste_taxons">'."\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)
{
//echo '<pre>'.print_r($donnees, true).'</pre>';
$retour = '<li><a href="func_remplacerUrlClassif('.$donnees['esn_id_taxon'].')">';
$retour .= '<img src="#" alt="+"/>';
$retour .= '</a><a id="eflore_taxon_'.$donnees['esn_id_taxon'].'" href="{UrlFicheNom}'.$donnees['en_id_nom'].'">';
$retour .= $donnees['eni_intitule_nom'];
$retour .= '</a>func_ajouterArboressenceClassif('.$donnees['esn_id_taxon'].')</li>'."\n";
return $retour;
}
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.2 2005/02/14 18:11:43 jpm
* Amélioration.
*
* Revision 1.1 2005/01/28 19:45:44 jpm
* Début recheche taxons.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/serveur/eribo_serveur.php
New file
0,0 → 1,138
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 5.0 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of eFlore-Serveur. |
// | |
// | 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: eribo_serveur.php,v 1.2 2005-01-24 17:42:54 jpm Exp $
/**
* Fichier principal d'eFlore-Serveur
*
* Ce fichier initialise le programme lance la recherche des infos et transfères les données
* à la vue demandée par l'action.
* Abréviation du programme : EFSE
*
*@package eFlore-Serveur
//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.2 $ $Date: 2005-01-24 17:42:54 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
require_once 'configuration/eribo_config_avancee.inc.php';
require_once EFSE_FICHIER_CONFIG;
require_once EFSE_CHEMIN_INTERFACE.'eribo_modele.interface.php';
require_once EFSE_CHEMIN_INTERFACE.'eribo_vue.interface.php';
require_once EFSE_CHEMIN_INTERFACE.'eribo_macro_element.interface.php';
require_once EFSE_CHEMIN_CLASSE.'eribo_block.class.php';
require_once EFSE_CHEMIN_CLASSE.'eribo_collection_block.class.php';
require_once EFSE_CHEMIN_CLASSE.'eribo_groupe_macro_element.class.php';
require_once EFSE_CHEMIN_CLASSE.'eribo_macro_element.class.php';
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
$cle = $_REQUEST['cle'];
/* Lecture du fichier donnant la carte des services disponibles */
$fichier_services_map = fopen(EFSE_FICHIER_MAP, 'r');
while($donnee = fscanf($fichier_services_map, "%s\t%s\t%s\t%s\t%s\t%s", $cle_nom, $service_nom, $vue_nom, $schema, $ratio, $style)) {
if ($cle == $cle_nom) {
lancerService($service_nom, $vue_nom, $schema, $ratio, $style);
}
}
fclose($fichier_services_map);
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
 
function lancerService($modele_nom, $vue_nom, $schema, $ratio, $style)
{
$donnees_block = '';
$un_modele = fabriquerModele($modele_nom);
if ($un_modele != null) {
$un_modele->construire();
$donnees_block = $un_modele->recupererBlockDeDonnees();
}
$une_vue = fabriquerVue($vue_nom, $donnees_block);
if ($une_vue != null) {
$une_vue->serialiser();
}
}
 
function fabriquerModele($modele_nom)
{
require_once EFSE_CHEMIN_MV_MACRO_GROUPE.$modele_nom.'.php';
$une_connexion = donnerConnexionBaseDeDonnees();
$un_modele = new $modele_nom($une_connexion);
return $un_modele;
}
 
function fabriquerVue($vue_nom, $donnees)
{
require_once EFSE_CHEMIN_MV_VUE.$vue_nom.'.php';
$une_vue = new $vue_nom($donnees);
return $une_vue;
}
 
function donnerConnexionBaseDeDonnees() {
if (!$link_id = mysql_connect(EFSE_BDD_SERVEUR, EFSE_BDD_UTILISATEUR, EFSE_BDD_MOT_DE_PASSE)) {
echo '<ERREUR>';
echo 'Impossible d\'établir de connexion à'.EFSE_BDD_SERVEUR;
echo '</ERREUR>';
exit(0);
}
mysql_select_db(EFSE_BDD_NOM, $link_id);
return $link_id;
}
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/01/19 15:24:08 jpm
* Changement de nom.
*
* Revision 1.5 2005/01/19 15:23:43 jpm
* Changement de nom de fichiers.
*
* Revision 1.4 2004/12/22 13:32:33 jpm
* Inclusion des deux fichiers de config.
*
* Revision 1.3 2004/12/21 19:06:59 jpm
* Mise en conformité convention de codage.
*
* Revision 1.2 2004/12/16 22:07:35 fred
* correction du numéro de version de PHP
*
* Revision 1.1.1.1 2004/12/16 12:24:36 jpm
* Importation initiale eFlore v1.1 et serveur.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/serveur/generateur/generateur.html
New file
0,0 → 1,18
<?xml version="1.0" encoding="iso-8859-15" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" />
<meta http-equiv="Content-style-type" content="text/css" />
<meta http-equiv="Content-script-type" content="text/javascript" />
<meta http-equiv="Content-language" content="fr" />
<title>Générateur de macro-éléments</title>
</head>
<body>
<h1>Générateur de groupes et de macro-éléments</h1>
<p>Double cliquer sur l'élément à afficher.</p>
</body>
</html>
/trunk/serveur/generateur/eribo_editeur.php
New file
0,0 → 1,144
<?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 Serveur eRibosome. |
// | |
// | 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 |
// +------------------------------------------------------------------------------------------------------+
//
/**
* Fichier principal du generateur du serveur eRibosome.
*
* Ce fichier presente les macro-elements, groupes de macro-elements, ainsi que
* la map des services disponibles et permet de lancer leurs
* traductions en php
* Abréviation du programme : ERIBO
*
*@package eRibosome
*@subpackage Generateur
//Auteur original :
*@author Frédéric LEGENS <flegens@free.fr>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.2 $ $Date: 2005-01-23 22:23:32 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
require_once '../configuration/eribo_config.php';
require_once '../configuration/eribo_config_avancee.inc.php';
header("Content-type: application/vnd.mozilla.xul+xml");
echo '<?xml version="1.0" encoding="UTF-8" ?>';
echo '<?xml-stylesheet href="css/style.css" type="text/css"?>';
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
?>
<!DOCTYPE window>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1">
<script type="application/x-javascript" src="eribo_editeur.js" />
<!-- <script type="application/x-javascript" src="eribo_generateur.js" /> -->
<vbox flex="1">
<tree id="composants" hidecolumnpicker="true" flex="1" ondblclick="afficherSelection('composants','src','editeur');">
<treecols>
<treecol id="name" label="Elements" flex="1" primary="true"/>
</treecols>
<treechildren>
<treeitem container="true">
<treerow><treecell label="Groupes" src="generateur.html"/></treerow>
<treechildren>
<? ecrireListeFichier(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO_GROUPE,'groupes_macro_elements'); ?>
</treechildren>
</treeitem>
<treeitem container="true">
<treerow><treecell label="Macroelements" src="generateur.html"/></treerow>
<treechildren>
<? ecrireListeFichier(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO,'macro_elements'); ?>
</treechildren>
</treeitem>
<treeitem container="true">
<treerow><treecell label="Map" src="generateur.html"/></treerow>
<treechildren></treechildren>
</treeitem>
</treechildren>
</tree>
<button label="Compiler macroelements" onclick="compileSelection('listemacroelements')"/>
<button label="Compiler groupes" onclick="compileSelection('groupesmacroelements')"/>
</vbox>
</window>
<?php
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
function ecrirelisteFichier($chemin, $type)
{
$repertoire = openDir($chemin);
while ($fichier = readDir($repertoire)) {
if (($fichier != '.') && ($fichier != '..') && ($fichier != 'CVS')) {
echo '<treeitem><treerow>';
//echo '<treecell label="'.$fichier.'" src="../definitions/'.$type.'/'.$fichier.'"/>';
echo '<treecell label="'.$fichier.'" src="eribo_afficher.php?'.$type.'='.$fichier.'"/>';
echo '</treerow></treeitem>';
}
}
closeDir($repertoire);
}
 
function ecrireFichierMap()
{
$fichierServicesMap = fopen('..\\'.$appConfig['service_map'], 'r');
$ligne = 0;
while($donnee = fscanf($fichierServicesMap,"%s\t%s\t%s\t%s\t%s\t%s", $keyName, $serviceName, $viewName, $schema, $ratio, $style)) {
$ligne++;
if ($ligne > 1) {
echo '<listitem><listcell label="'.$keyName.'"/><listcell label="'.$serviceName.'"/>'.
'<listcell label="'.$viewName.'"/><listcell label="'.$schema.'"/><listcell label="'.$ratio.'"/>'.
'<listcell label="'.$style.'"/></listitem>';
}
}
fclose($fichierServicesMap);
}
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/01/19 15:44:33 jpm
* Changement de nom.
*
* Revision 1.4 2005/01/19 15:43:40 jpm
* Changement de nom des fichiers à appeler.
*
* Revision 1.3 2004/12/23 15:45:48 jpm
* Changement de version de PHP.
*
* Revision 1.2 2004/12/23 15:43:37 jpm
* Mise en conformité convention de codage.
*
* Revision 1.1 2004/12/22 23:28:47 fred
* création de l'éditeur
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/serveur/generateur/eribo_generateur.php
New file
0,0 → 1,159
<?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 Serveur eRibosome. |
// | |
// | 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 |
// +------------------------------------------------------------------------------------------------------+
//
/**
* Fichier principal du generateur du serveur eRibosome.
*
* Ce fichier presente les macro-elements, groupes de macro-elements, ainsi que
* la map des services disponibles et permet de lancer leurs
* traductions en php
* Abréviation du programme : ERIBO
*
*@package eRibosome
*@subpackage Generateur
//Auteur original :
*@author Frédéric LEGENS <flegens@free.fr>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.1 $ $Date: 2005-01-19 15:45:02 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
require_once '../configuration/eribo_config_avancee.inc.php';
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
header('Content-type: application/vnd.mozilla.xul+xml');
echo '<?xml version="1.0" encoding="UTF-8" ?>';
echo '<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>'
 
?>
 
<!DOCTYPE window>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" >
<script type="application/x-javascript" src="eribo_generateur.js" />
<hbox flex="1">
<vbox flex="1">
<label value="Macro Elements"/>
<listbox id="listemacroelements">
<? ecrireListeFichier(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO); ?>
</listbox>
<hbox>
<button label="Tout compiler" onclick="compileSelection('listemacroelements')"/>
<button label="Afficher" onclick="afficheSelection('listemacroelements')"/>
</hbox>
</vbox>
<vbox flex="1">
<label value="Service Donnees"/>
<listbox id="groupesmacroelements">
<? ecrireListeFichier(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO_GROUPE); ?>
</listbox>
<hbox>
<button label="Tout compiler" onclick="compileSelection('groupesmacroelements')"/>
<button label="Afficher" onclick="afficheSelection('groupesmacroelements')"/>
</hbox>
</vbox>
<!--
<vbox flex="1">
<label value="Publications HTML"/>
<listbox>
<? ecrireListeFichier(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_PUBLI_XHTML); ?>
</listbox>
<hbox><button label="Tout compiler"/><button label="Afficher"/></hbox>
</vbox>
<vbox flex="1">
<label value="Publications XML"/>
<listbox>
<? ecrireListeFichier(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_PUBLI_XML); ?>
</listbox>
<hbox><button label="Tout compiler"/><button label="Afficher"/></hbox>
</vbox>
-->
</hbox>
<hbox flex="1" >
<listbox flex="1">
<listcols><listcol flex="1" /><listcol flex="1" /><listcol flex="1" /><listcol flex="1" /><listcol flex="1" /><listcol flex="1" /></listcols>
<listhead><listheader label="Clef"/><listheader label="Service"/><listheader label="Publication"/><listheader label="Schema a respecter"/><listheader label="Ratio de control"/><listheader label="Style"/></listhead>
<? ecrireFichierMap(); ?>
</listbox>
</hbox>
</window>
 
<?
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
 
function ecrirelisteFichier($chemin)
{
$repertoire = openDir($chemin);
while ($fichier = readDir($repertoire)) {
if (($fichier !='.') && ($fichier !='..')) {
echo '<listitem label="'.$fichier.'"/>';
}
}
closeDir($repertoire);
}
 
function ecrireFichierMap()
{
$fichierServicesMap = fopen(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_FICHIER_MAP, 'r');
$ligne = 0;
while($donnee = fscanf($fichierServicesMap,"%s\t%s\t%s\t%s\t%s\t%s", $keyName, $serviceName, $viewName, $schema, $ratio, $style)) {
$ligne++;
if ($ligne > 1) {
echo '<listitem><listcell label="'.$keyName.'"/><listcell label="'.$serviceName.'"/><listcell label="'.$viewName.'"/><listcell label="'.$schema.'"/><listcell label="'.$ratio.'"/><listcell label="'.$style.'"/></listitem>';
}
}
fclose($fichierServicesMap);
}
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.6 2005/01/19 15:43:40 jpm
* Changement de nom des fichiers à appeler.
*
* Revision 1.5 2004/12/23 15:45:48 jpm
* Changement de version de PHP.
*
* Revision 1.4 2004/12/23 15:22:15 jpm
* Modification du fichier de config appelé.
*
* Revision 1.3 2004/12/22 23:29:01 fred
* intégration de la license
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
 
/trunk/serveur/generateur/css/style.css
New file
0,0 → 1,12
treecell {
background-color: yellow;
font-weight: bold !important;
}
 
treerow {
background-color: yellow;
}
 
tree {
background-color: yellow;
}
/trunk/serveur/generateur/css/html.css
New file
0,0 → 1,17
td.titre {
vertical-align: top;
font-weight: bold;
}
 
table.parametres {
width: 100%;
border: solid 1px;
border-color:gray;
}
 
td.paramtitre {
border: solid 1px;
border-color:gray;
vertical-align: top;
font-weight: bold;
}
/trunk/serveur/generateur/eribo_traducteur.php
New file
0,0 → 1,135
<?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 Serveur eRibosome. |
// | |
// | 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 |
// +------------------------------------------------------------------------------------------------------+
//
/**
* Fichier de traduction des définitions en php.
*
* Ce fichier permet de transformer la définition d'un macro-element ou d'un
* groupe de macro-elements en code php.
*
* Abréviation du programme : ERIBO
*
*@package eRibosome
*@subpackage Generateur
//Auteur original :
*@author Frédéric LEGENS <flegens@free.fr>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.1 $ $Date: 2005-01-19 15:45:16 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
require_once '../configuration/eribo_config.php';
require_once '../configuration/eribo_config_avancee.inc.php';
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
if(!empty($_REQUEST['listemacroelements']))
{
genererTousMacroElements(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO);
//genererTousMacroElements('..\\'.$appConfig['def_macro']);
}
 
if(!empty($_REQUEST['groupesmacroelements']))
{
genererTousGroupesMacroElements(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO_GROUPE);
//genererTousGroupesMacroElements('..\\'.$appConfig['def_groupes']);
}
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
 
function genererTousGroupesMacroElements($chemin)
{
$repertoire = openDir($chemin);
while ($fichier = readDir($repertoire)) {
if (($fichier != '.') && ($fichier != '..') && ($fichier != 'CVS')) {
echo '<li>'.$fichier.' début de la génération';
$res = EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_MV_MACRO_GROUPE.$fichier.'.php';
genererFichier(EFSE_CHEMIN_GENE_XSLT.'groupemacroelement.xslt', $chemin.$fichier, $res);
echo 'Fin de la génération';
}
}
closeDir($repertoire);
}
 
function genererTousMacroElements($chemin)
{
$repertoire = openDir($chemin);
while ($fichier = readDir($repertoire)) {
if (($fichier != '.') && ($fichier != '..') && ($fichier != 'CVS')) {
echo '<li>'.$fichier.' début de la génération';
$res = EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_MV_MACRO.$fichier.'.php';
genererFichier(EFSE_CHEMIN_GENE_XSLT.'macroelement.xslt',$chemin.$fichier,$res);
echo 'Fin de la génération';
}
}
closeDir($repertoire);
}
 
function genererFichier($xsltFilePath, $xmlFilePath, $resFilePath)
{
$processeur = new XSLTprocessor();
$style = new domDocument();
$style->load($xsltFilePath);
$processeur->importStyleSheet($style);
$doc = new domDocument();
$doc->load($xmlFilePath);
$handle = fopen ($resFilePath, 'w');
fwrite($handle, $processeur->transformToXML($doc));
fclose($handle);
}
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.5 2005/01/19 15:43:40 jpm
* Changement de nom des fichiers à appeler.
*
* Revision 1.4 2004/12/23 15:45:48 jpm
* Changement de version de PHP.
*
* Revision 1.3 2004/12/23 15:21:48 jpm
* Mise en conformité convention de codage.
*
* Revision 1.2 2004/12/22 23:29:15 fred
* intégration de la license
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/serveur/generateur/index.html
New file
0,0 → 1,18
<?xml version="1.0" encoding="iso-8859-15" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" />
<meta http-equiv="Content-style-type" content="text/css" />
<meta http-equiv="Content-script-type" content="text/javascript" />
<meta http-equiv="Content-language" content="fr" />
<title>Générateur</title>
</head>
<frameset cols="25%,75%">
<frame name="arbreFrame" src="eribo_editeur.php"/>
<frame name="docFrame" src="generateur.html"/>
</frameset>
</html>
/trunk/serveur/generateur/xslt/afficher_groupemacroelement.xslt
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/serveur/generateur/xslt/afficher_groupemacroelement.xslt
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/serveur/generateur/xslt/macroelement.xslt
New file
0,0 → 1,105
<?xml version="1.0" encoding="UTF-8"?>
<!-- Note : enregistrer ce fichier avec l'encodage UTF-8 cookie. -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/macroelement">&lt;?
<xsl:apply-templates select="//balise2" mode="require_once"/>
class <xsl:value-of select="@nom"/> extends macroElement {
function getSQL()
{
$contexte = array();
<xsl:apply-templates select="requetes/requete"/>
return;
}
<!--function buildRoot()
{
<xsl:apply_templates select="mapping" mode="root"/>
}
 
-->
}
?&gt;
</xsl:template>
<xsl:template match="mapping" mode="root">
<xsl:apply-templates select="*[@root]" mode="level1root"/>
</xsl:template>
<xsl:template match="requete">
if (<xsl:apply-templates select="parametres/parametre" mode="isnull"/>)
{
<xsl:apply-templates select="parametres/parametre" mode="contexte"/>
if(<xsl:apply-templates select="parametres/parametre" mode="renseigne"/>)
{ return "<xsl:value-of select="sql"/>"; }
}
</xsl:template>
<xsl:template match="parametre[position()=last()]" mode="isnull">array_key_exists('<xsl:value-of select="@nom"/>',$this->contexteRef) </xsl:template>
<xsl:template match="parametre" mode="isnull">array_key_exists('<xsl:value-of select="@nom"/>',$this->contexteRef) and </xsl:template>
<xsl:template match="parametre" mode="contexte">
$contexte['<xsl:value-of select="@nom"/>']= $this->contexteRef['<xsl:value-of select="@nom"/>'];
</xsl:template>
<xsl:template match="parametre[position()=last()]" mode="renseigne">!empty($contexte['<xsl:value-of select="@nom"/>']) </xsl:template>
<xsl:template match="parametre" mode="renseigne">!empty($contexte['<xsl:value-of select="@nom"/>']) and </xsl:template>
<xsl:template match="*" mode="level1root">
$element= new domElement('<xsl:value-of select="name()"/>');
$this->baseDOM->appendChild($element);
<xsl:apply-templates select="@*"/>
<xsl:apply-templates select="text()"/>
</xsl:template>
<xsl:template match="mapping" mode="fetch">
<xsl:apply-templates select="*" mode="level1"/>
</xsl:template>
<xsl:template match="*" mode="level1">
$element= new domElement('<xsl:value-of select="name()"/>');
$this->baseDOM->appendChild($element);
<xsl:apply-templates select="@*"/>
<xsl:apply-templates select="text()"/>
<xsl:apply-templates select="*" mode="level2"/>
</xsl:template>
<xsl:template match="*" mode="level2">
$this->baseDOM = $element;
$element= new domElement('<xsl:value-of select="name()"/>');
$this->baseDOM->appendChild($element);
<xsl:apply-templates select="@*"/>
<xsl:apply-templates select="text()"/>
<xsl:apply-templates select="*" mode="level3"/>
</xsl:template>
<xsl:template match="*" mode="level3">
$this->baseDOM = $element;
$element= new domElement('<xsl:value-of select="name()"/>');
$this->baseDOM->appendChild($element);
<xsl:apply-templates select="@*"/>
<xsl:apply-templates select="text()"/>
<xsl:apply-templates select="*" mode="level4"/>
</xsl:template>
<xsl:template match="*" mode="level4">
$this->baseDOM = $element;
$element= new domElement('<xsl:value-of select="name()"/>');
$this->baseDOM->appendChild($element);
<xsl:apply-templates select="@*"/>
<xsl:apply-templates select="text()"/>
</xsl:template>
<xsl:template match="@*">
$element->setAttribute('<xsl:value-of select="name()"/>',<xsl:value-of select="."/>);
</xsl:template>
<xsl:template match="text()">
/*text(<xsl:value-of select="."/>)*/
</xsl:template>
</xsl:stylesheet>
/trunk/serveur/generateur/xslt/groupemacroelement.xslt
New file
0,0 → 1,51
<?xml version="1.0" encoding="UTF-8"?>
<!-- Note : enregistrer ce fichier avec l'encodage UTF-8 cookie. -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/groupemacroelement">&lt;?
class <xsl:value-of select="@classe"/> extends groupeMacroElement {
function __construct($aConn)
{
parent::__construct($aConn);
}
function construire()
{
$this->dblock= new blockdedonnees('<xsl:value-of select="@nom"/>');
<xsl:apply-templates select="parametres" />
$this->buildContext();
$this->addMacroElement();
}
function buildContext()
{
}
function addMacroElement()
{
<xsl:apply-templates select="macroelement" />
}
}
?&gt;
</xsl:template>
<xsl:template match="parametres" >
<xsl:apply-templates select="parametre" />
</xsl:template>
<xsl:template match="parametre" >
if (array_key_exists('<xsl:value-of select="@nom"/>',$_REQUEST)) { $this->dblock->ajouterDonnee('<xsl:value-of select="@nom"/>',$_REQUEST['<xsl:value-of select="@nom"/>']); }
</xsl:template>
<xsl:template match="macroelement" >
/*balise:<xsl:value-of select="@nom"/>*/
$aMacroElement = $this->macroElementFactory('<xsl:value-of select="@nom"/>',$this->dblock);
$aMacroElement->construire();
</xsl:template>
</xsl:stylesheet>
/trunk/serveur/generateur/xslt/afficher_macroelement.xslt
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/serveur/generateur/xslt/afficher_macroelement.xslt
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/serveur/generateur/eribo_editeur.js
New file
0,0 → 1,27
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserWrite");
 
function afficherSelection(aTreeChildrenId, aAttributeName, aTabBrowserId)
{
var uneUrl = donnerAttributSelectionArbre(aTreeChildrenId, aAttributeName);
window.parent.frames[1].location.href = uneUrl;
}
 
 
function donnerAttributSelectionArbre(aTreeChildrenId, aAttributeName)
{
var unArbre = document.getElementById(aTreeChildrenId);
var uneSelection = unArbre.contentView.getItemAtIndex(unArbre.currentIndex);
var uneUrl;
if (uneSelection.firstChild.firstChild.hasAttribute(aAttributeName))
{
uneUrl = uneSelection.firstChild.firstChild.getAttribute(aAttributeName);
}
return uneUrl;
}
 
function compileSelection(listid)
{
window.parent.frames[1].location.href="eribo_traducteur.php?"+listid+"="+listid;
}
/trunk/serveur/generateur/eribo_generateur.js
New file
0,0 → 1,10
function afficheSelection(listid)
{
var liste = document.getElementById(listid);
window.location.assign("http://eflore-test.tela-botanica.org/serveurXML/generateur/eribo_afficher.php?"+listid+"="+liste.selectedItem.label);
}
 
function compileSelection(listid)
{
window.location.assign("http://eflore-test.tela-botanica.org/serveurXML/generateur/eribo_traducteur.php?"+listid+"="+listid);
}
/trunk/serveur/generateur/eribo_afficher.php
New file
0,0 → 1,111
<?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 Serveur eRibosome. |
// | |
// | 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 |
// +------------------------------------------------------------------------------------------------------+
//
/**
* Fichier permmetant d'afficher les sources.
*
* Ce fichier permet d'afficher le code source d'un macro-element ou d'un groupe
* de macro-elements
*
* Abréviation du programme : ERIBO
*
*@package eRibosome
*@subpackage Generateur
//Auteur original :
*@author Frédéric LEGENS <flegens@free.fr>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.2 $ $Date: 2005-01-23 22:22:42 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
require_once '../configuration/eribo_config.php';
require_once '../configuration/eribo_config_avancee.inc.php';
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
header('Content-type: text/html');
if (!empty($_REQUEST['macro_elements'])) {
$nom = EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO.$_REQUEST['macro_elements'];
echo genererAffichage(EFSE_CHEMIN_GENE_XSLT.'afficher_macroelement.xslt',$nom);
}
 
if (!empty($_REQUEST['groupes_macro_elements'])) {
$nom = EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO_GROUPE.$_REQUEST['groupes_macro_elements'];
echo genererAffichage(EFSE_CHEMIN_GENE_XSLT.'afficher_groupemacroelement.xslt',$nom);
}
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
 
function genererAffichage($xsltFilePath, $xmlFilePath)
{
$processeur = new XSLTprocessor();
$style = new domDocument();
$style->load($xsltFilePath);
$processeur->importStyleSheet($style);
$doc = new domDocument();
$doc->load($xmlFilePath);
return $processeur->transformToXML($doc);
}
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/01/19 15:44:03 jpm
* Changement de nom.
*
* Revision 1.7 2005/01/19 15:43:40 jpm
* Changement de nom des fichiers à appeler.
*
* Revision 1.6 2004/12/23 15:45:48 jpm
* Changement de version de PHP.
*
* Revision 1.5 2004/12/23 15:44:57 jpm
* Mise en conformité convention de codage.
*
* Revision 1.4 2004/12/23 15:22:15 jpm
* Modification du fichier de config appelé.
*
* Revision 1.3 2004/12/22 23:28:14 fred
* intégration de la license
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/serveur/info.php
New file
0,0 → 1,0
<? phpinfo() ?>
/trunk/serveur/configuration/eribo_config.php
New file
0,0 → 1,85
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 5.0 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of eFlore-Serveur. |
// | |
// | 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: eribo_config.php,v 1.2 2005-09-30 13:42:19 jp_milcent Exp $
/**
* Fichier de configuration contenant les mots de passe, login...
*
* Ce fichier contient les constantes et éventuellement des variables globales contenant des infos liées à la
* sécurité.
*
*@package eFlore-Serveur
*@subpackage Configuration
//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.2 $ $Date: 2005-09-30 13:42:19 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
// +------------------------------------------------------------------------------------------------------+
// Constante de la base de données
/** Constante stockant le nom du serveur de la base de donnée.*/
define('EFSE_BDD_SERVEUR', 'localhost');
/** Constante stockant le nom de la base de donnée.*/
define('EFSE_BDD_NOM', '');
/** Constante stockant le nom de l'utilisateur.*/
define('EFSE_BDD_UTILISATEUR', '');
/** Constante stockant le mot de passe de l'utilisateur.*/
define('EFSE_BDD_MOT_DE_PASSE', '');
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/01/19 15:19:45 jpm
* Changement de nom.
*
* Revision 1.5 2004/12/22 13:28:23 jpm
* Les constantes et variables liées à la sécurité.
*
* Revision 1.4 2004/12/22 13:24:47 jpm
* Modif.
*
* Revision 1.3 2004/12/16 22:07:53 fred
* correction du numéro de version de PHP
*
* Revision 1.2 2004/12/16 16:40:59 jpm
* Ajout de chemin.
*
* Revision 1.1.1.1 2004/12/16 12:24:36 jpm
* Importation initiale eFlore v1.1 et serveur.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/serveur/configuration/eribo_config_avancee.inc.php
New file
0,0 → 1,143
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 5.0 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of eFlore-Serveur. |
// | |
// | 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: eribo_config_avancee.inc.php,v 1.3 2005-02-23 17:32:17 jpm Exp $
/**
* Fichier de configuration avancée d'eFlore-Serveur
*
* Ce fichier contient les constantes et éventuellement des variables globales contenant toutes les info
* nécessaire à la configuration du programme eFlore-Serveur.
*
*@package eFlore-Serveur
*@subpackage Configuration
//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-02-23 17:32:17 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
// Constante générale
/** Constante stockant la version du programme.*/
define('EFSE_VERSION', '0.0.1');
/** Constante stockant l'intitulé de version du programme.*/
define('EFSE_VERSION_INTITULE', 'Version '.EFSE_VERSION);
 
// +------------------------------------------------------------------------------------------------------+
// Constante de chemin de dossier et fichier
$separateur = strstr( PHP_OS, 'WIN') ? '\\' : '/';
/** Constante stockant le séparateur de dossier qui dépend de l'OS.*/
define('EFSE_SEP', $separateur);
/** Constante stockant la valeur de la racine des chemins.*/
define('EFSE_CHEMIN_RACINE', '/');
/** Constante stockant le chemin vers la configuration.*/
define('EFSE_CHEMIN_CONFIG', 'configuration'.EFSE_SEP);
/** Constante stockant le chemin vers la bibliothèque.*/
define('EFSE_CHEMIN_BIBLIO', 'bibliotheque'.EFSE_SEP);
/** Constante stockant le chemin vers la bibliothèque des classes.*/
define('EFSE_CHEMIN_CLASSE', EFSE_CHEMIN_BIBLIO.'classes'.EFSE_SEP);
/** Constante stockant le chemin vers la bibliothèque des fonctions.*/
define('EFSE_CHEMIN_FONCTION', EFSE_CHEMIN_BIBLIO.'fonctions'.EFSE_SEP);
/** Constante stockant le chemin vers la bibliothèque de cartographie.*/
define('EFSE_CHEMIN_CARTO', EFSE_CHEMIN_BIBLIO.'carto'.EFSE_SEP);
/** Constante stockant le chemin vers la bibliothèque des interfaces.*/
define('EFSE_CHEMIN_INTERFACE', EFSE_CHEMIN_BIBLIO.'interfaces'.EFSE_SEP);
/** Constante stockant le chemin vers le dossier des définitions.*/
define('EFSE_CHEMIN_DEFINITION', 'definitions'.EFSE_SEP);
/** Constante stockant le chemin vers les groupes de macro-éléments.*/
define('EFSE_CHEMIN_DEF_MACRO', EFSE_CHEMIN_DEFINITION.'macro_elements'.EFSE_SEP);
/** Constante stockant le chemin vers les groupes de macro-éléments.*/
define('EFSE_CHEMIN_DEF_MACRO_GROUPE', EFSE_CHEMIN_DEFINITION.'groupes_macro_elements'.EFSE_SEP);
/** Constante stockant le chemin vers le dossier des publications au format xhtml.*/
define('EFSE_CHEMIN_DEF_PUBLI_XHTML', EFSE_CHEMIN_DEFINITION.'publications_html'.EFSE_SEP);
/** Constante stockant le chemin vers le dossier des publications au format xml.*/
define('EFSE_CHEMIN_DEF_PUBLI_XML', EFSE_CHEMIN_DEFINITION.'publications_xml'.EFSE_SEP);
/** Constante stockant le chemin vers le dossier des fichiers Modèles et Vues pouvant être générés.*/
define('EFSE_CHEMIN_MV', 'eflore_mv'.EFSE_SEP);
/** Constante stockant le chemin vers le dossier des Modèles.*/
define('EFSE_CHEMIN_MV_MODELE', EFSE_CHEMIN_MV.'modeles'.EFSE_SEP);
/** Constante stockant le chemin vers le dossier des Vues.*/
define('EFSE_CHEMIN_MV_VUE', EFSE_CHEMIN_MV.'vues'.EFSE_SEP);
/** Constante stockant le chemin vers le dossier permettant d'automatiser la création de PHP pour les groupes de macro-éléments.*/
define('EFSE_CHEMIN_MV_MACRO_GROUPE', EFSE_CHEMIN_MV_MODELE.'groupes_macro_elements'.EFSE_SEP);
/** Constante stockant le chemin vers le dossier permettant d'automatiser la création de PHP pour les macro-éléments.*/
define('EFSE_CHEMIN_MV_MACRO', EFSE_CHEMIN_MV_MODELE.'macro_elements'.EFSE_SEP);
/** Constante stockant le chemin vers le dossier du générateur vis à vis de la racine des fichiers du serveur.*/
define('EFSE_CHEMIN_GENERATEUR', 'generateur'.EFSE_SEP);
/** Constante stockant le chemin pour aller à la racine du serveur vis à vis du fichier principal du générateur.*/
define('EFSE_CHEMIN_GENERATEUR_RACINE', '..'.EFSE_SEP);
/** Constante stockant le chemin vers le dossier xslt du générateur vis à vis de l'emplacement du fichier principal du générateur.*/
define('EFSE_CHEMIN_GENE_XSLT', 'xslt'.EFSE_SEP);
/** Constante stockant le chemin vers le dossier css du générateur.*/
define('EFSE_CHEMIN_GENE_CSS', 'css'.EFSE_SEP);
 
/** Constante stockant le chemin vers la carte des services principaux.*/
define('EFSE_FICHIER_MAP', EFSE_CHEMIN_MV.'eflore_services.map');
/** Constante stockant le chemin vers le fichier de configuration principal.*/
define('EFSE_FICHIER_CONFIG', EFSE_CHEMIN_CONFIG.'eribo_config.php');
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.2 2005/01/19 15:23:19 jpm
* Changement de nom de fichier.
*
* Revision 1.1 2005/01/19 13:05:11 jpm
* Changement de nom.
*
* Revision 1.3 2005/01/19 12:54:47 jpm
* Ajout d'un chemin.
*
* Revision 1.2 2004/12/22 13:33:18 jpm
* Modification commentaire.
*
* Revision 1.1 2004/12/22 13:28:16 jpm
* Les constantes et variables non liées à la sécurité.
*
* Revision 1.4 2004/12/22 13:24:47 jpm
* Modif.
*
* Revision 1.3 2004/12/16 22:07:53 fred
* correction du numéro de version de PHP
*
* Revision 1.2 2004/12/16 16:40:59 jpm
* Ajout de chemin.
*
* Revision 1.1.1.1 2004/12/16 12:24:36 jpm
* Importation initiale eFlore v1.1 et serveur.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/bibliotheque/eflore_recherche.fonct.php
New file
0,0 → 1,56
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.3 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of eFlore-consultation. |
// | |
// | 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: eflore_recherche.fonct.php,v 1.1 2005-02-23 17:31:36 jpm Exp $
/**
* Fonctions communes aux moteurs de recherches d'eFlore.
*
* Contient des fonctions communes aux moteurs de recherches d'eFlore.
*
*@package eFlore
//Auteur original :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.1 $ $Date: 2005-02-23 17:31:36 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTÊTE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/bibliotheque/eflore_photo.fonct.php
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/bibliotheque/eflore_photo.fonct.php
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/eflore_recherche_nomenclature.inc.php
New file
0,0 → 1,228
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.3 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of eFlore-consultation. |
// | |
// | 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: eflore_recherche_nomenclature.inc.php,v 1.11 2005-06-09 18:10:25 jpm Exp $
/**
* Affichage du moteur de recherche nomenclatural et de ses résultats.
*
* Ce script fournit le code html correspondant aux moteurs de recherche nomenclatural et ses résultats.
*
*@package eFlore
//Auteur original :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.11 $ $Date: 2005-06-09 18:10:25 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTÊTE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
// Gestion de la session pour le nom
if (isset($_SESSION['eflore_nom']) ) {
if (isset($_REQUEST['eflore_nom']) AND $_SESSION['eflore_nom'] != $_REQUEST['eflore_nom']) {
$_SESSION['eflore_nom'] = $_REQUEST['eflore_nom'];
}
} else {
if (isset($_REQUEST['eflore_nom'])) {
$_SESSION['eflore_nom'] = $_REQUEST['eflore_nom'];
} else {
$_SESSION['eflore_nom'] = '';
}
}
// Gestion de la session pour le référenciel
if (isset($_SESSION['eflore_referenciel']) ) {
if (isset($_REQUEST['eflore_referenciel']) AND $_SESSION['eflore_referenciel'] != $_REQUEST['eflore_referenciel']) {
$_SESSION['eflore_referenciel'] = $_REQUEST['eflore_referenciel'];
}
} else {
if (isset($_REQUEST['eflore_referenciel'])) {
$_SESSION['eflore_referenciel'] = $_REQUEST['eflore_referenciel'];
} else {
$_SESSION['eflore_referenciel'] = 3;
}
}
// Gestion de la session pour le type du nom
if (isset($_SESSION['eflore_type_nom']) ) {
if (isset($_REQUEST['eflore_type_nom']) AND $_REQUEST['eflore_type_nom'] == 'nom_scientifique') {
$_SESSION['eflore_type_nom_scientifique'] = 'checked="checked"';
$_SESSION['eflore_type_nom_vernaculaire'] = '';
} elseif (isset($_REQUEST['eflore_type_nom']) AND $_REQUEST['eflore_type_nom'] == 'nom_vernaculaire') {
$_SESSION['eflore_type_nom_vernaculaire'] = 'checked="checked"';
$_SESSION['eflore_type_nom_scientifique'] = '';
}
} else {
if (isset($_REQUEST['eflore_type_nom']) AND $_REQUEST['eflore_type_nom'] == 'nom_scientifique') {
$_SESSION['eflore_type_nom_scientifique'] = 'checked="checked"';
$_SESSION['eflore_type_nom_vernaculaire'] = '';
} elseif (isset($_REQUEST['eflore_type_nom']) AND $_REQUEST['eflore_type_nom'] == 'nom_vernaculaire') {
$_SESSION['eflore_type_nom_vernaculaire'] = 'checked="checked"';
$_SESSION['eflore_type_nom_scientifique'] = '';
} else {
$_SESSION['eflore_type_nom_scientifique'] = 'checked="checked"';
$_SESSION['eflore_type_nom_vernaculaire'] = '';
}
}
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
// Création du formulaire
// Ajout du paramêtre action à l'url courante.
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_ACTION, EFLORE_LG_URL_ACTION_RECH_NOM);
$contenu = file_get_contents(EFLORE_URL_FORM_NOM);
 
//Analyse du squelette
require_once 'HTML/Template/ITX.php';
$squelette = new HTML_Template_ITX();
$squelette->setTemplate($contenu, FALSE, FALSE);
 
// Indique l'url pour obtenir fiche d'un nom
$squelette->setCurrentBlock('corps');
// Ajout du paramêtre action à l'url courante.
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_ACTION, EFLORE_LG_URL_ACTION_RECH_NOM);
$squelette->setVariable('UrlProjetNom', $GLOBALS['_EFLORE_']['url']->getURL());
$GLOBALS['_EFLORE_']['url']->removeQueryString(EFLORE_LG_URL_ACTION);
// Valeur du champ nom par défaut
$squelette->setVariable('eflore_nom', $_SESSION['eflore_nom']);
// Type nom scientifique coché par défaut
$squelette->setVariable('eflore_type_nom_scientifique', $_SESSION['eflore_type_nom_scientifique']);
// Type nom verna non coché par défaut
$squelette->setVariable('eflore_type_nom_vernaculaire', $_SESSION['eflore_type_nom_vernaculaire']);
// Référentiel sélectionné par défaut
$squelette->setCallbackFunction('selectionnerEfloreRef', 'selectionnerEfloreRef');
$squelette->performCallback();
$squelette->parseCurrentBlock('corps');
 
// Récupère le bloc "corps"
$sortie .= $squelette->get('corps');
 
// --------------------------------------------------------------------------------------------------------
// Lancement de la recherche
if (isset($_REQUEST['eflore_nom']) && $_REQUEST['eflore_nom'] != '' && !eregi("^%{1,}$", $_REQUEST['eflore_nom']) ) {
// Formatage de la chaine à rechercher
$_REQUEST['eflore_nom'] = '%'.str_replace(' ', '%', $_REQUEST['eflore_nom']).'%';
if ($_REQUEST['eflore_type_nom'] == 'nom_scientifique') {
// Recherche sur les noms scientifiques
if ($_REQUEST['eflore_referenciel'] != 0) {
$contenu = file_get_contents(sprintf(EFLORE_URL_LISTE_NOM_LATIN_REF, rawurlencode($_REQUEST['eflore_nom']), rawurlencode($_REQUEST['eflore_referenciel'])));
} else {
$contenu = file_get_contents(sprintf(EFLORE_URL_LISTE_NOM_LATIN, rawurlencode($_REQUEST['eflore_nom'])));
}
//Analyse du squelette
require_once 'HTML/Template/ITX.php';
$squelette = new HTML_Template_ITX();
$squelette->setTemplate($contenu, FALSE, FALSE);
// Indique l'url pour obtenir fiche d'un nom
$squelette->setCurrentBlock('corps');
// Ajout du paramêtre action à l'url courante.
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_ACTION, EFLORE_LG_URL_ACTION_FICHE);
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_ONGLET, EFLORE_LG_URL_ONGLET_SYNTHESE);
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_NN, '');
$squelette->setVariable('UrlFicheNom', $GLOBALS['_EFLORE_']['url']->getURL());
$squelette->setCallbackFunction('UrlFicheNom', 'remplacerUrlFicheNom');
$squelette->performCallback();
$squelette->parseCurrentBlock('corps');
// Récupère le bloc "corps"
$sortie .= $squelette->get('corps');
} else if ($_REQUEST['eflore_type_nom'] == 'nom_vernaculaire') {
// Recherche sur les noms vernaculaires
$contenu = file_get_contents(sprintf(EFLORE_URL_LISTE_NOM_VERNA, rawurlencode($_REQUEST['eflore_nom'])));
//Analyse du squelette
require_once 'HTML/Template/ITX.php';
$squelette = new HTML_Template_ITX();
$squelette->setTemplate($contenu, FALSE, FALSE);
// Indique l'url pour obtenir fiche d'un nom
$squelette->setCurrentBlock('corps');
$squelette->setCallbackFunction('UrlFicheNom', 'remplacerUrlFicheNom');
$squelette->performCallback();
$squelette->parseCurrentBlock('corps');
// Récupère le bloc "corps"
$sortie .= $squelette->get('corps');
}
}
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE des FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
 
function remplacerUrlFicheNom($arguments) {
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_ACTION, EFLORE_LG_URL_ACTION_FICHE);
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_ONGLET, EFLORE_LG_URL_ONGLET_SYNTHESE);
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_NN, $arguments[0]);
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_NVP, $arguments[1]);
return $GLOBALS['_EFLORE_']['url']->getURL();
}
function selectionnerEfloreRef($arguments) {
$retour = '';
if (isset($arguments[0]) AND $arguments[0] == $_SESSION['eflore_referenciel']) {// N° de la version par défaut de la BDNFF
$retour = 'selected="selected"';
}
return $retour;
}
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.10 2005/05/19 07:40:06 jpm
* Modification mineure syntaxe.
*
* Revision 1.9 2005/03/15 12:57:16 jpm
* Modification du code XHTML.
*
* Revision 1.8 2005/02/28 15:38:47 jpm
* Correction erreur due à un changement de nom.
*
* Revision 1.7 2005/02/23 12:39:27 jpm
* Correction bogue lié à QuickForm.
*
* Revision 1.6 2005/02/22 19:27:10 jpm
* Changement de nom de variables.
* Suppression de l'attribut nam de la balise form via une méthode de HTML_Common.
*
* Revision 1.5 2005/02/22 17:43:53 jpm
* Suppression de référence posant problème.
*
* Revision 1.4 2005/02/15 13:00:23 jpm
* Ajout d'un test pour initialiser une variable.
*
* Revision 1.3 2005/01/28 19:47:55 jpm
* Ajout de la recherche pour les taxons.
*
* Revision 1.2 2005/01/03 19:44:40 jpm
* Ajout de la gestion de l'action "fiche".
*
* Revision 1.1 2004/12/23 20:05:17 jpm
* Début prise en maine eflore-consultation.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/langues/eflore_langue_fr.inc.php
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/langues/eflore_langue_fr.inc.php
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/presentations/images/fermer.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/presentations/images/fermer.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/presentations/images/ouvrir.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/presentations/images/ouvrir.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/presentations/scripts/eflore_soum.inc.js
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/presentations/scripts/eflore_soum.inc.js
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/presentations/styles/form_soum.css
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/presentations/styles/form_soum.css
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/presentations/styles/photo.css
New file
0,0 → 1,77
 
 
.boite
{
display: block;
}
 
.suiv
{
position: absolute;
bottom: 2em;
right: 2em
}
.prec
{
position: absolute;
bottom: 2em;
left: 2em
}
 
.liste_photo
{
width:100%;
/* float:right;*/
}
 
.colonne
{
display:inline;
list-type-style:square;
}
 
.ligne
{
float:left;
width:30%;
list-style-type: none;
}
 
.ligne2
{
float:left;
width:3%;
list-style-type: none;
}
 
.info
{
display:block;
width: 33%;
text-align: center;
height:150px;
valign: bottom;
}
 
.debord
{
overflow: auto;
}
 
.separateur
{
width: 3%;
height: 50px;
visibility: hidden;
border: 1px black solid;
display: inline;
}
 
.spacer
{
width:100%;
display: block;
border: 1px black solid;
visibility: hidden;
clear: left;
}
/trunk/presentations/styles/eflore.css
New file
0,0 → 1,71
/*
+----------------------------------------------------------------------------+
| eflore.css |
+----------------------------------------------------------------------------+
| Copyright (c) 2005 Tela Botanica |
+----------------------------------------------------------------------------+
| Feuille de style specifique a l'application eflore |
+----------------------------------------------------------------------------+
| Auteur : Tamara LE BOURG |
| |
+----------------------------------------------------------------------------+
*/
 
/* Formulaire taxonomique */
#eflore_form_nomenclature legend {
display:none;}
#eflore_form_nomenclature fieldset {
border: 0px;
margin: 0px;
padding: 0px;}
#eflore_form_nomenclature label {
margin-right:15px;
font-weight:bold;}
#eflore_form_nomenclature ul {
margin:0px;
padding:0px;}
#eflore_form_nomenclature li {
margin:5px 0px;
padding:0px;
list-style:none;}
#eflore_form_nomenclature li ul {
margin-left:45px;}
#eflore_valider_nom {
margin-left:295px;}
 
/*Formulaire par projet */
#eflore_form_taxonomie legend {
display:none;}
#eflore_form_taxonomie fieldset {
border: 0px;
margin: 0px;
padding: 0px;}
#eflore_form_taxonomie label {
margin-right:15px;
font-weight:bold;}
#eflore_form_taxonomie ul {
margin:0px;
padding:0px;}
#eflore_form_taxonomie li {
margin-top:5px;
margin-bottom:5px;
list-style:none;}
#eflore_ordre_li {
display:inline;
padding-left:50px;}
#eflore_rang_li {
display:inline;
padding-left:15px;}
#eflore_projet_submit {
margin-left:295px;}
 
/*Liste des taxons*/
#liste_taxons img {
border:0;
margin-right:6px;}
 
/*Pied de page*/
#eflore_pied_page {
text-align:center;
font-size:10px;
color:#A9A9A9;}