Rev 21 | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?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-chorologie. |// | |// | 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_chorologie_contributeur.php,v 1.2 2005-05-31 13:45:10 jpm Exp $/*** Affichage des contributeurs aux listes chorologiques.** Ce script fournit le code html permettant d'afficher les contributeurs aux listes chorologiques.**@package eFlore*@subpackage Chorologie//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-05-31 13:45:10 $// +------------------------------------------------------------------------------------------------------+*/// +------------------------------------------------------------------------------------------------------+// | ENTÊTE du PROGRAMME |// +------------------------------------------------------------------------------------------------------+/** Inclusion du fichier config de la base de données de l'application eflore-chorolgie. */require_once GEN_CHEMIN_CLIENT.'eflore_chorologie/configuration/echoro_config_bdd.inc.php';/** Inclusion du fichier config de l'application eflore-chorolgie. */require_once GEN_CHEMIN_CLIENT.'eflore_chorologie/configuration/echoro_config.inc.php';/** Inclusion du fichier de langue de l'application eflore-chorologie. */require_once ECHORO_CHEMIN_LANGUE.'echoro_langue_'.ECHORO_LANGUE.'.inc.php';// Ajout d'une feuille de style propre à eFlore.GEN_stockerStyleExterne('echoro', ECHORO_CHEMIN_STYLE.'echoro.css');/** Inclusion du fichier comportant des fonctions communes aux applis du package eFlore-chorologie.*/include_once ECHORO_CHEMIN_BIBLIO.'echoro_information.fonct.php';/** Inclusion du fichier gérant les fonctions d'encodage. */include_once ECHORO_CHEMIN_BIBLIO.'echoro_encodage.fonct.php';/** Inclusion du fichier gérant les fonctions fournissant l'affichage en XHTML. */include_once ECHORO_CHEMIN_BIBLIO.'echoro_affichage_xhtml.fonct.php';// +------------------------------------------------------------------------------------------------------+// | CORPS du PROGRAMME |// +------------------------------------------------------------------------------------------------------+function afficherContenuNavigation(){$sortie = '';return $sortie;}function afficherContenuTete(){$sortie = '';return $sortie;}function afficherContenuCorps(){// +--------------------------------------------------------------------------------------------------+// Initialisation$sortie = '';//Définition des attributs des de la balise <a> pour le lien sur le mail//Ce tableau est utilisé par la fonction choro_dep_possederCourriel.$tablo_formatLien['class']='eflore_lien';$tablo_formatLien['title']='Cliquer pour écrire un message';//Connection à la base$connexion = mysql_connect(ECHORO_BDD_SERVEUR, ECHORO_BDD_UTILISATEUR, ECHORO_BDD_MOT_DE_PASSE) or die (ER_CONNECT);mysql_select_db(BD_BOTA, $connexion) or die (ER_SEL_BD_BOTA);//Requête sql qui récupére les informations sur les correspondant présents dans chaque département.$requete_01 ='SELECT '.EZD_ID.', '.EZD_NOM.', '.ECC_ID.', '.ECC_PRENOM.', '.ECC_NOM.', '.ECC_COURRIEL.' FROM '.ECC_BD_TABLE.', '.EZD_BD_TABLE.', '.ECDC_BD_TABLE.' WHERE '.EZD_ID.' = '.ECDC_DEP.' AND '.ECDC_CORRES.' = '.ECC_ID.' ORDER BY '.EZD_ID.' ASC';$resultat_01 = mysql_query ($requete_01) or die('<H2 style='.STYLE_REQUETE.'>Erreur de requête</H2>'.'<b>Requete : </b>'.$requete_01.'<br/><br/><b>Erreur : </b>'.mysql_error());$num_dep = '';//Inclusion du tite et de l'ouverture du tableau qui permetra d'afficher les correspondants.$sortie .= inclusion_html('titre_contrib');$sortie .= inclusion_html('intro_contrib');//Boucle qui fournie les lignes du tableau.//Chaque ligne contient ://-soit le titre, càd numéro du département suivi de son nom//-soit un correspondant//-soit un message de recherche de correspondantwhile($resultat_corres = mysql_fetch_array($resultat_01)) {if ($num_dep != $resultat_corres[EZD_ID]){//Nous sommes dans le cas d'un nouveau département...$num_dep = $resultat_corres[EZD_ID]; //Nous récupérons le numéro du nouveau département// Nous fermons la liste du département précédentif ($num_dep != 1) {$sortie .= '</ul>'."\n";}//Nous affichons le titre$sortie .= '<h2>'.$resultat_corres[EZD_ID].' - '.$resultat_corres[EZD_NOM].'</h2>'."\n";$sortie .= '<ul>'."\n";// Nous testons si on est dans le cas d'une recherche de correspondant pour le départementif ($resultat_corres[ECC_ID] == 0){$sortie .= '<li>'.$resultat_corres[ECC_NOM].'</li>'."\n";} else {//Nous avons un correspondant pour le département et nous l'affichons$sortie .= '<li>'.$resultat_corres[ECC_PRENOM].' '.strtoupper($resultat_corres[ECC_NOM]).' - ';$sortie .= echoro_possederCourriel($resultat_corres[ECC_COURRIEL], $tablo_formatLien).'</li>'."\n";}} else {//Nous sommes dans le cas où nous avons plus d'un correspondant pour le département$sortie .= '<li>'.$resultat_corres[ECC_PRENOM].' '.strtoupper($resultat_corres[ECC_NOM]).' - ';$sortie .= echoro_possederCourriel($resultat_corres[ECC_COURRIEL], $tablo_formatLien).'</li>'."\n";}}$sortie .= '</ul>'."\n";return remplaceEntiteHTLM($sortie);}function afficherContenuPied(){return inclusion_html('pied_page');}// +------------------------------------------------------------------------------------------------------+// | PIED du PROGRAMME |// +------------------------------------------------------------------------------------------------------+/* +--Fin du code ----------------------------------------------------------------------------------------+** $Log: not supported by cvs2svn $* Revision 1.1 2005/02/23 17:30:35 jpm* Ajout de la consultation des contributeurs de la chorologie.*** +-- Fin du code ----------------------------------------------------------------------------------------+*/?>