New file |
0,0 → 1,93 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This file is part of Herbier - 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: hbca_herbier_liste.inc.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $ |
/** |
* Liste des herbiers d'une zone géographique. |
* |
* Fichier fournissant la liste des herbiers présents dans une zone géographique donnée. |
* |
*@package Herbier-Cartographie |
//Auteur original : |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
//Autres auteurs : |
*@author Jean-Pascal MILCENT <jpm@clapas.org> |
*@copyright Tela-Botanica 2000-2005 |
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:32:32 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
|
|
// +------------------------------------------------------------------------------------------------------+ |
// | CORPS du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
$tab = explode ('*',$france->historique); |
$numero_departement = $tab[1]; |
|
$requete_dpt = 'SELECT GFD_NAME '. |
'FROM '.HB_BDD_NOM_CARTO.'.gen_FRENCH_DPT '. |
'WHERE GFD_ID = '.$numero_departement; |
$resultat_dpt = mysql_query($requete_dpt) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete_dpt)); |
$ligne_dpt = mysql_fetch_object($resultat_dpt); |
$sortie .= '<h1>'.'Herbiers du département : '.$ligne_dpt->GFD_NAME.'</h1>'."\n"; |
|
$requete_info = 'SELECT gen_FRENCH_DPT.GFD_NAME, HERBIERS_ORGANISATION.INSTITUTION_NAME, '. |
'HERBIERS_ORGANISATION.ID_ORG, HERBIERS_ORGANISATION.TOWN '. |
'FROM '.HB_BDD_NOM_CARTO.'.gen_FRENCH_DPT, '.HB_BDD_NOM.'.HERBIERS_ORGANISATION '. |
'WHERE gen_FRENCH_DPT.GFD_ID = '.$numero_departement.' '. |
'AND gen_FRENCH_DPT.GFD_ID = '. |
'if (substring(ZIP,1,2) <> "97", '. |
'if (substring(ZIP,1,2) <> "98", substring(ZIP, 1,2),substring(ZIP,1,3)) , substring(ZIP,1,3))'; |
$resultat_info = mysql_query($requete_info) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete_info)); |
if (mysql_num_rows($resultat_info) != 0) { |
$sortie .= '<ul>'."\n"; |
// Une boucle sur chaque résultat, on affiche la ville et le nom de l'institution |
while ($ligne_info = mysql_fetch_object($resultat_info)) { |
$sortie .= '<li><a href="'.sprintf(HB_URL_COURANTE_CONSULTATION_FICHE_HERBIER_ID, $ligne_info->ID_ORG).'">'. |
$ligne_info->TOWN.' - '.$ligne_info->INSTITUTION_NAME.'</a></li>'."\n"; |
} |
$sortie .= '</ul>'."\n"; |
} else { |
$sortie .= '<p>'.'Il n\'y a aucun herbier dans ce département... '."\n". |
'<a href="'.HB_URL_COURANTE.'" hreflang="fr">'.'Retour à la cartographie'.'</a>'."\n". |
'</p>'."\n"; |
} |
|
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
|
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.1 2005/03/09 15:55:44 jpm |
* Ajout de l'application Cartographie des Herbiers. |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |