/tags/2015_03_02/applications/bb_organisme_carto/bb_organisme_carto.php |
---|
New file |
0,0 → 1,252 |
<?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 BiblioBota - Organisme Carto. | |
// | | |
// | 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: bb_organisme_carto.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $ |
/** |
* Application affichant une cartographie des organismes |
* |
* Fournit une carte des organimes liés à la botanique stockés dans la base Biblio Bota. |
* |
*@package BiblioBota-OrganismeCarto |
//Auteur original : |
*@author Jean-Charles GRANGER <tela@vecteur.org> |
//Autres auteurs : |
*@author Jean-Pascal MILCENT <jpm@clapas.org> |
*@copyright Tela-Botanica 2000-2005 |
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/** Inclusion du fichier de configuration de l'application Organisme Carto. */ |
require_once BB_CHEMIN_APPLI.'bb_organisme_carto/configuration/bboc_config.inc.php'; |
// Appel du fichier de traduction des textes de l'application Organisme Carto de Biblio Bota |
if (file_exists(BBOC_CHEMIN_LANGUES.'bboc_langue_'.BB_URL_I18N.'.inc.php')) { |
/** Inclusion du fichier de traduction de l'application Organisme Carto. */ |
include_once BBOC_CHEMIN_LANGUES.'bboc_langue_'.BB_URL_I18N.'.inc.php'; |
} else { |
/** Inclusion du fichier de traduction fr par défaut. */ |
include_once BBOC_CHEMIN_LANGUES.'bboc_langue_fr.inc.php'; |
} |
/** Inclusion du fichier comportant des fonctions fournissant des informations pour l'application Organisme Carto.*/ |
include_once BBOC_CHEMIN_BIBLIO.'bboc_information.fonct.php'; |
/** Inclusion de la bibliothèque Cartographie. */ |
require_once BBOC_CHEMIN_BIBLIO_CARTO.'carto_carte.class.php'; |
// +------------------------------------------------------------------------------------------------------+ |
// Initialisation des variables |
$res = ''; |
$res .= '<!-- BiblioBota - Organisme Carto : DEBUT -->'."\n"; |
// +------------------------------------------------------------------------------------------------------+ |
// | CORPS du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
// +------------------------------------------------------------------------------------------------------+ |
// Instanciation du tableau contenant les champs de la table action |
$info_table_action['nom_table_action'] = BB_BDD_NOM_CARTO.'.carto_ACTION'; |
$info_table_action['nom_chp_id_carte'] = 'CA_ID_Carte'; |
$info_table_action['nom_chp_id_zg_action'] = 'CA_ID_Zone_geo'; |
$info_table_action['nom_chp_type_zg'] = 'CA_Type_zone'; |
$info_table_action['nom_chp_action'] = 'CA_Action'; |
$info_table_action['nom_chp_id_carte_destination'] = 'CA_ID_Carte_destination'; |
// +------------------------------------------------------------------------------------------------------+ |
$requete_01 = 'SELECT DISTINCT CP_ID_Continent, count(CP_ID_Continent) as nbr '. |
'FROM '.BB_BDD_NOM.'.biblio_str, '.BB_BDD_NOM_CARTO.'.carto_PAYS '. |
'WHERE B_S_PAYS = CP_ID_Pays '. |
'AND CP_ID_Continent <> 0 '. |
'GROUP BY CP_ID_Continent'; |
$resultat_01 = mysql_query($requete_01) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete_01)); |
$tableau_asso_continent = array(); |
while ($ligne_01 = mysql_fetch_object($resultat_01)) { |
$tableau_asso_continent[$ligne_01->CP_ID_Continent] = $ligne_01->nbr; |
} |
$info_continent['nom_table_zone'] = BB_BDD_NOM_CARTO.'.carto_CONTINENT'; |
$info_continent['nom_chp_id_zone'] = 'CC_ID_Continent'; |
$info_continent['nom_chp_nom_zone'] = 'CC_Intitule_continent'; |
$info_continent['nom_chp_rouge'] = 'CC_Couleur_R'; |
$info_continent['nom_chp_vert'] = 'CC_Couleur_V'; |
$info_continent['nom_chp_bleu'] = 'CC_Couleur_B'; |
$info_continent['nom_chp_zone_sup'] = ''; |
$info_continent['tableau_valeurs_zone'] = $tableau_asso_continent; |
// +------------------------------------------------------------------------------------------------------+ |
$requete_02 = 'SELECT CC_ID_Continent '. |
'FROM '.BB_BDD_NOM_CARTO.'.carto_CONTINENT'; |
$resultat_02 = mysql_query ($requete_02) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete_02)); |
while ($ligne_02 = mysql_fetch_object($resultat_02)) { |
$requete_03 = 'SELECT CP_ID_Pays, count(B_S_PAYS) as nbr '. |
'FROM '.BB_BDD_NOM.'.biblio_str, '.BB_BDD_NOM_CARTO.'.carto_PAYS '. |
'WHERE B_S_PAYS = CP_ID_Pays '. |
'AND CP_ID_Continent = "'.$ligne_02->CC_ID_Continent.'" '. |
'GROUP BY B_S_PAYS'; |
$resultat_03 = mysql_query($requete_03) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete_03)); |
$tableau_asso_pays = array(); |
while ($ligne_03 = mysql_fetch_object($resultat_03)) { |
$tableau_asso_pays[$ligne_03->CP_ID_Pays] = $ligne_03->nbr; |
} |
$info_pays[$ligne_02->CC_ID_Continent]['nom_table_zone'] = BB_BDD_NOM_CARTO.'.carto_PAYS'; |
$info_pays[$ligne_02->CC_ID_Continent]['nom_chp_id_zone'] = 'CP_ID_Pays'; |
$info_pays[$ligne_02->CC_ID_Continent]['nom_chp_nom_zone'] = 'CP_Intitule_pays'; |
$info_pays[$ligne_02->CC_ID_Continent]['nom_chp_rouge'] = 'CP_Couleur_R'; |
$info_pays[$ligne_02->CC_ID_Continent]['nom_chp_vert'] = 'CP_Couleur_V'; |
$info_pays[$ligne_02->CC_ID_Continent]['nom_chp_bleu'] = 'CP_Couleur_B'; |
$info_pays[$ligne_02->CC_ID_Continent]['nom_chp_zone_sup'] = 'CP_ID_Continent'; |
$info_pays[$ligne_02->CC_ID_Continent]['tableau_valeurs_zone'] = $tableau_asso_pays; |
} |
// +------------------------------------------------------------------------------------------------------+ |
$requete_04 = 'SELECT CD_ID_Departement, COUNT(CD_ID_Departement) AS nbr '. |
'FROM '.BB_BDD_NOM.'.biblio_str, '.BB_BDD_NOM_CARTO.'.carto_DEPARTEMENT '. |
'WHERE B_S_PAYS = "fr" '. |
'AND CD_ID_Departement = IF (SUBSTRING(B_S_CODEPOSTAL,1,2)<>"97", SUBSTRING(B_S_CODEPOSTAL, 1,2), SUBSTRING(B_S_CODEPOSTAL,1,3)) '. |
'GROUP BY CD_ID_Departement'; |
$resultat_04 = mysql_query($requete_04) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete_04)); |
$tableau_asso_dpt_france = array(); |
while ($ligne_04 = mysql_fetch_object($resultat_04)) { |
$tableau_asso_dpt_france[$ligne_04->CD_ID_Departement] = $ligne_04->nbr; |
} |
$info_dpt_france['nom_table_zone'] = BB_BDD_NOM_CARTO.'.carto_DEPARTEMENT'; |
$info_dpt_france['nom_chp_id_zone'] = 'CD_ID_Departement'; |
$info_dpt_france['nom_chp_nom_zone'] = 'CD_Intitule_departement'; |
$info_dpt_france['nom_chp_rouge'] = 'CD_Couleur_R'; |
$info_dpt_france['nom_chp_vert'] = 'CD_Couleur_V'; |
$info_dpt_france['nom_chp_bleu'] = 'CD_Couleur_B'; |
$info_dpt_france['nom_chp_zone_sup'] = 'CD_ID_Pays'; |
$info_dpt_france['tableau_valeurs_zone'] = $tableau_asso_dpt_france; |
// On cree tout d'abords l'arborescence |
$monde = new Carto_Carte('continent', '', 'Monde', 'monde_masque5c.png', 'monde5c.png', BBOC_CHEMIN_CARTE, $info_continent, $info_table_action); |
$monde->historique_cartes = isset($GLOBALS['historique_cartes']) ? $GLOBALS['historique_cartes'] : ''; |
$monde->image_x = isset($GLOBALS['image_x']) ? $GLOBALS['image_x'] : ''; |
$monde->image_y = isset($GLOBALS['image_y']) ? $GLOBALS['image_y'] : ''; |
$monde->liste_zone_carte = isset($GLOBALS['liste_zone_carte']) ? $GLOBALS['liste_zone_carte'] : ''; |
$monde->url = $GLOBALS['_BIBLIO_']['url']->getURL(); |
foreach ($info_pays as $cle => $valeur) { |
$requete_05 = 'SELECT CDC_Titre_carte, CDC_ID_Carte, CDC_Carte_fond, CDC_Carte_masque, CDC_ID_Zone_geo_carte '. |
'FROM '.BB_BDD_NOM_CARTO.'.carto_DESCRIPTION_CARTE, '.BB_BDD_NOM_CARTO.'.carto_ACTION '. |
'WHERE CA_ID_Zone_geo = "'.$cle.'" '. |
'AND CA_Type_zone = 1 '. |
'AND CA_ID_Carte_destination = CDC_ID_Carte'; |
$resultat_05 = mysql_query($requete_05) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete_05)); |
$resultat_05_nbre = mysql_num_rows($resultat_05); |
if ($resultat_05_nbre > 0) { |
$ligne_05 = mysql_fetch_object($resultat_05); |
$monde->ajouterFils( $ligne_05->CDC_ID_Carte, $ligne_05->CDC_ID_Zone_geo_carte, $ligne_05->CDC_Titre_carte, |
$ligne_05->CDC_Carte_masque, $ligne_05->CDC_Carte_fond, $valeur, $info_table_action); |
} |
} |
$monde->fils['europe']->ajouterFils('france', 'fr', 'France' ,'france_masque.png', 'france.png', $info_dpt_france, $info_table_action); |
// Une fois l'arborescence créée on lance la méthode donnerFormulaireImage() pour récuperer le formulaire de la carte |
// (dans $img). S'il n'y a pas de carte à afficher donnerFormulaireImage() renvoi false. On peut alors récupérer |
// le niveau ou on en est grâce à $monde->historique (du type continent*namerique*ca). |
$img = $monde->donnerFormulaireImage(); |
// Test d'img |
if (!$img ) { |
/** Inclusion du fichier d'affichage des infos sur les organismes d'une zone. */ |
include_once BBOC_CHEMIN_RACINE.'bboc_organisme_liste.inc.php'; |
} else { |
// Construction du titre de la carte et de l'historique de navigation dans les cartes |
$historique_carte = new Carto_Historique($monde, '>', 'lien_non_souligne'); |
$tab = explode('*',$monde->historique); |
$id_carte = $tab[(count($tab)-1)]; |
$requete_06 = 'SELECT CDC_Titre_carte, CDC_Type_zone_carte, CDC_ID_Zone_geo_carte '. |
'FROM '.BB_BDD_NOM_CARTO.'.carto_DESCRIPTION_CARTE '. |
'WHERE CDC_ID_Carte = "'.$id_carte.'"'; |
$resultat_06 = mysql_query($requete_06) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete_06)); |
$ligne_06 = mysql_fetch_object($resultat_06); |
$structure_nbre = bboc_consulterNbreStructure($id_carte, $ligne_06->CDC_Type_zone_carte, $ligne_06->CDC_ID_Zone_geo_carte); |
$titre = ''; |
if ($structure_nbre == 0) { |
$titre .= $ligne_06->CDC_Titre_carte.' : aucun organisme répertorié'; |
} else if ($structure_nbre == 1) { |
$titre .= $ligne_06->CDC_Titre_carte.' : '.$structure_nbre.' organisme répertorié'; |
} else { |
$titre .= $ligne_06->CDC_Titre_carte.' : '.$structure_nbre.' organismes répertoriés'; |
} |
// Sortie XHTML |
$res .= '<h1 class="titre1_cartographie">'.$titre.'</h1>'."\n"; |
$res .= '<p><strong>'.$historique_carte->afficherHistoriqueCarte().'</strong></p>'."\n"; |
$res .= '<h2 class="titre2_cartographie">Cliquez sur une zone de la carte pour zoomer.</h2>'."\n"; |
$res .= '<p>La couleur est proportionnelle au nombre d\'organisations.'."\n"; |
$res .= $img; |
$res .= '<h2 class="titre2_cartographie">'.'Avertissement et déni de responsabilité : '.'</h2>'."\n"; |
$res .= '<p>'.'La représentation et l\'utilisation des frontières, des noms géographiques et autres données employés '."\n". |
'sur les cartes et utilisés dans les listes, les tableaux, les documents et les bases de données de ce site '."\n". |
'ne sont pas garanties sans erreurs, de même qu\'elles n\'engagent pas la responsabilité de l\'association '."\n". |
'ni n\'impliquent de reconnaissance officielle de sa part.'.'</p>'."\n"; |
} |
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
$res .= '<!-- BiblioBota - Organisme Carto : FIN -->'."\n"; |
$sortie = $res; |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.4 2005/05/30 09:10:26 jpm |
* Ajout de class aux titres! |
* |
* Revision 1.3 2005/05/17 10:10:08 jpm |
* Correction des bogues avant mise en ligne du site v4. |
* |
* Revision 1.2 2005/04/13 10:12:29 jpm |
* Ajout de la constante indiquant la bdd des tables de la carto. |
* |
* Revision 1.1 2005/03/01 15:19:17 jpm |
* Ajout des fichiers principaux de l'application Organisme Carto de Biblio Bota. |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/tags/2015_03_02/applications/bb_organisme_carto/bboc_organisme_liste.inc.php |
---|
New file |
0,0 → 1,258 |
<?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 BiblioBota - Organisme Carto. | |
// | | |
// | 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: bboc_organisme_liste.inc.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $ |
/** |
* Liste des organismes d'une zone géographique. |
* |
* Fichier fournissant la liste des organismes présents dans une zone géographique donnée. |
* |
*@package BiblioBota-OrganismeCarto |
//Auteur original : |
*@author Jean-Charles GRANGER <tela@vecteur.org> |
//Autres auteurs : |
*@author Jean-Pascal MILCENT <jpm@clapas.org> |
*@copyright Tela-Botanica 2000-2005 |
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
$res .= '<!-- BiblioBota - Organisme Carto Liste : DEBUT -->'."\n"; |
// +------------------------------------------------------------------------------------------------------+ |
// | CORPS du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
$tabmonde = explode ('*', $monde->historique); |
// +------------------------------------------------------------------------------------------------------+ |
// Nous avons à faire à un pays. |
if (count($tabmonde) == 3) { |
$argument = $tabmonde[2]; |
$query = 'SELECT * '. |
'FROM gen_COUNTRY '. |
'WHERE GC_ID = "'.$argument.'"'; |
$result = mysql_query($query); |
$row = mysql_fetch_object($result) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query)); |
$capitale = $row->GC_CAPITAL; |
$pays = $row->GC_NAME; |
$monde->nom = $monde->nom.'*'.$pays; |
// Titre de la page |
$query2 = 'SELECT COUNT(B_S_IDSTR) AS nbr '. |
'FROM biblio_str '. |
'WHERE B_S_PAYS = "'.$argument.'"'; |
$result2 = mysql_query($query2); |
$row2 = mysql_fetch_object($result2) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query2)); |
$res .= '<h1 class="titre1_cartographie">'; |
if ($row2->nbr == 0) { |
$res .= $pays.' ('.$capitale.') : aucun organisme répertorié.'; |
} else if ($row2->nbr==1) { |
$res .= $pays.' ('.$capitale.') : '.$row2->nbr.' organisme répertorié'; |
} else { |
$res .= $pays.' ('.$capitale.') : '.$row2->nbr.' organismes répertoriés'; |
} |
$res .= '</h1>'."\n"; |
// Chemin historique navigation dans les cartes |
$tabonglet = explode('*', $monde->historique); |
$tabnom = explode('*', $monde->nom); |
$res .= '<p><strong>'."\n"; |
foreach ($tabonglet as $key => $value) { |
if ($key == 0) { |
$chemin = $value; |
$value = 'monde'; |
$res .= '<a class="lien_non_souligne" href="'.$monde->url.'&historique_cartes='.$chemin.'">'. |
' > '.$tabnom[$key]. |
'</a>'; |
} else if ($key == (count($tabonglet) - 1)) { |
$res .= '<a class="lien_non_souligne">'. |
' > '.$pays. |
'</a>'; |
} else { |
$chemin .= '*'.$value; |
$res .= '<a class="lien_non_souligne" href="'.$monde->url.'&historique_cartes='.$chemin.'">'. |
' > '.$tabnom[$key]. |
'</a>'; |
} |
} |
$res .= '</strong></p>'."\n"; |
// Création de la liste des organismes de la zone géographique. |
$query = 'SELECT * '. |
'FROM biblio_str, biblio_str_type '. |
'WHERE B_S_PAYS = "'.$argument.'" '. |
'AND B_S_CACHER = 0 '. |
'AND B_S_TYPESTR = B_TYPSTR_ID '. |
'ORDER BY B_S_NOM'; |
$result = mysql_query($query); |
$nbr_final = mysql_num_rows($result) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query)); |
$res .= '<h1 class="titre1_cartographie">'.'Liste des organismes :'.'</h1>'."\n"; |
$res .= '<ul>'."\n"; |
$i = 0; |
while ($row = mysql_fetch_object($result)) { |
$get_idstr = $row->B_S_IDSTR; |
$get_name = $row->B_S_NOM; |
$get_cp = $row->B_S_CODEPOSTAL; |
$get_ville = $row->B_S_VILLE; |
$get_date = $row->B_S_MAJFICHE; |
$get_categ = $row->B_S_TYPESTR; |
$get_categ_nom = $row->B_TYPSTR_LABEL; |
$res .= '<li>'; |
$res .= '<strong>'.$get_name.'</strong> '; |
if ($get_ville != '') { |
$res .= '('.$get_ville.')'; |
} |
$res .= ' - '; |
if ($get_categ > 0) { |
$res .= $get_categ_nom; |
} |
/* Cross Biblio est le module qui permet d'avoir accès au popup transversal BBPOPUP */ |
if ($GLOBALS['var_biblio']['open_biblio_str'] == true) { |
$res .= ' - <a href="'.BB_URL_COURANTE_CONSULTATION_AVANCEE.'&str='.$get_idstr.'&arg_0=str%3D'.$get_idstr. |
'&arg_1=coll%3D'.$get_idstr.'&arg_2=book%3D'.$get_idstr.'&arg_3=media%3D'.$get_idstr.'">'. |
'Plus d\'infos'.'</a>'; |
} |
$res .= '</li>'."\n"; |
$i++; |
} |
$res .= '</ul>'."\n"; |
// +------------------------------------------------------------------------------------------------------+ |
// Nous avons à faire à un département français. |
} else if (count($tabmonde) == 4) { |
$argument = $tabmonde[3]; |
$query = 'SELECT *'. |
' FROM gen_FRENCH_DPT'. |
' WHERE GFD_ID = "'.$argument.'"'; |
$result = mysql_query($query); |
$row = mysql_fetch_object($result) or die (BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query)); |
$nom = $row->GFD_NAME; |
// Titre de la page |
$query2 = ' SELECT count(B_S_IDSTR) as nbr'. |
' FROM biblio_str'. |
' WHERE if (substring(B_S_CODEPOSTAL,1,2)<>"97", substring(B_S_CODEPOSTAL, 1,2), substring(B_S_CODEPOSTAL,1,3)) = '.$argument. |
' AND B_S_PAYS="fr"'; |
$result2 = mysql_query($query2); |
$row2 = mysql_fetch_object($result2) or die (BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query2)); |
$res .= '<h1 class="titre1_cartographie">'; |
if ($row2->nbr == 0) { |
$res .= $nom.' : aucun organisme répertoriée'; |
} else if ($row2->nbr == 1) { |
$res .= $nom.' : '.$row2->nbr.' organisme répertorié'; |
} else { |
$res .= $nom.' : '.$row2->nbr.' organismes répertoriés'; |
} |
$res .= '</h1>'."\n"; |
// Chemin historique navigation dans les cartes |
$tabonglet = explode ('*', $monde->historique); |
$tabnom = explode ('*', $monde->nom); |
$res .= '<p><strong>'."\n"; |
foreach ($tabonglet as $key => $value) { |
if ($key == 0) { |
$chemin = $value; |
$value = 'monde'; |
$res .= '<a class="lien_non_souligne" href="'.$monde->url.'&historique_cartes='.$chemin.'">'. |
' > '.$tabnom[$key]. |
'</a>'; |
} else if ($key == (count($tabonglet) - 1)) { |
$res .= '<a class="lien_non_souligne">'. |
' > '.$nom. |
'</a>'; |
} else { |
$chemin .= '*'.$value; |
$res .= '<a class="lien_non_souligne" href="'.$monde->url.'&historique_cartes='.$chemin.'">'. |
' > '.$tabnom[$key]. |
'</a>'; |
} |
} |
$res .= '</strong></p>'."\n"; |
// Création de la liste des organismes de la zone géographique. |
$query = 'SELECT *'. |
' FROM biblio_str, biblio_str_type'. |
' WHERE B_S_PAYS="fr"'. |
' AND if (substring(B_S_CODEPOSTAL,1,2) <> "97", substring(B_S_CODEPOSTAL, 1,2), substring(B_S_CODEPOSTAL,1,3)) = '.$argument. |
' AND B_S_CACHER = 0'. |
' AND B_S_TYPESTR = B_TYPSTR_ID'. |
' ORDER BY B_S_NOM'; |
$result = mysql_query($query); |
$nbr_final = mysql_num_rows($result) or die (BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query)); |
$res .= '<h1 class="titre1_cartographie">'.'Liste des organismes :'.'</h1>'."\n"; |
$res .= '<ul>'."\n"; |
$i = 0; |
while ($row = mysql_fetch_object($result)) { |
$get_idstr = $row->B_S_IDSTR; |
$get_name = $row->B_S_NOM; |
$get_cp = $row->B_S_CODEPOSTAL; |
$get_ville = $row->B_S_VILLE; |
$get_date = $row->B_S_MAJFICHE; |
$get_categ = $row->B_S_TYPESTR; |
$get_categ_nom = $row->B_TYPSTR_LABEL; |
$res .= '<li>'; |
$res .= '<strong>'.$get_name.'</strong> '; |
if ($get_ville != '') { |
$res .= '('.$get_ville.')'; |
} |
$res .= ' - '; |
if ($get_categ > 0) { |
$res .= $get_categ_nom; |
} |
/* Cross Biblio est le module qui permet d'avoir accès au popup transversal BBPOPUP */ |
if ($GLOBALS['var_biblio']['open_biblio_str'] == true) { |
$res .= ' - <a href="'.BB_URL_COURANTE_CONSULTATION_AVANCEE.'&str='.$get_idstr.'&arg_0=str%3D'.$get_idstr. |
'&arg_1=coll%3D'.$get_idstr.'&arg_2=book%3D'.$get_idstr.'&arg_3=media%3D'.$get_idstr.'">'. |
'Plus d\'infos'.'</a>'; |
} |
$res .= '</li>'."\n"; |
$i++; |
} |
$res .= '</ul>'."\n"; |
} |
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
$res .= '<!-- BiblioBota - Organisme Carto Liste : FIN -->'."\n"; |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.2 2005/05/30 09:14:04 jpm |
* Ajout de class aux titres! |
* |
* Revision 1.1 2005/03/01 15:19:17 jpm |
* Ajout des fichiers principaux de l'application Organisme Carto de Biblio Bota. |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/tags/2015_03_02/applications/bb_organisme_carto/configuration/bboc_config.inc.php |
---|
New file |
0,0 → 1,79 |
<?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 BiblioBota - Organisme Carto. | |
// | | |
// | 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: bboc_config.inc.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $ |
/** |
* Configuration de l'application Organisme Carto. |
* |
* Fichier de configuration de l'application Organisme Carto. |
* |
*@package BiblioBota-OrganismeCarto |
//Auteur original : |
*@author Jean-Pascal MILCENT <jpm@clapas.org> |
//Autres auteurs : |
*@author Jean-Charles GRANGER <tela@vecteur.org> |
*@copyright Tela-Botanica 2000-2005 |
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
// +------------------------------------------------------------------------------------------------------+ |
// | CORPS du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
// +------------------------------------------------------------------------------------------------------+ |
// Définition des chemins d'accès |
/** Constante stockant le chemin du dossier contenant l'application Organisme Carto de Biblio Bota.*/ |
define('BBOC_CHEMIN_RACINE', BB_CHEMIN_APPLI.'bb_organisme_carto/'); |
/** Constante stockant le chemin du dossier contenant les traductions.*/ |
define('BBOC_CHEMIN_LANGUES', BBOC_CHEMIN_RACINE.'langues/'); |
/** Constante stockant le chemin du dossier bibliothèque.*/ |
define('BBOC_CHEMIN_BIBLIO', BBOC_CHEMIN_RACINE.'bibliotheque/'); |
/** Constante stockant le chemin du dossier de la bibliothèque cartographique.*/ |
define('BBOC_CHEMIN_BIBLIO_CARTO', BB_CHEMIN_BIBLIO_CARTO); |
/** Constante stockant le chemin vers le dossier des images png de la bibliothèque cartographique.*/ |
define('BBOC_CHEMIN_CARTE', BB_CHEMIN_CARTE); |
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.2 2005/03/01 16:01:05 jpm |
* Transfère de la bibliothèque cartographique dans le dossier bibliothèque général de Biblio Bota. |
* |
* Revision 1.1 2005/03/01 15:20:00 jpm |
* Ajout du fichier de config de l'application Organisme Carto de Biblio Bota. |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/tags/2015_03_02/applications/bb_organisme_carto/bibliotheque/bboc_information.fonct.php |
---|
New file |
0,0 → 1,115 |
<?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 BiblioBota - Organisme Carto. | |
// | | |
// | 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: bboc_information.fonct.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $ |
/** |
* Fonctions de l'application Organisme Carto. |
* |
* Fichier de fonctions fournissant des informations de l'application Organisme Carto. |
* |
*@package BiblioBota-OrganismeCarto |
//Auteur original : |
*@author Jean-Charles GRANGER <tela@vecteur.org> |
//Autres auteurs : |
*@author Jean-Pascal MILCENT <jpm@clapas.org> |
*@copyright Tela-Botanica 2000-2005 |
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
// +------------------------------------------------------------------------------------------------------+ |
// | LISTE de FONCTIONS | |
// +------------------------------------------------------------------------------------------------------+ |
/** |
* Fonction bboc_consulterNbreStructure() - Donne le nombre de structure. |
* |
* La fonction bboc_consulterNbreStructure() renvoit une phrase complete |
* indiquant le nombre de structure dans la carte passée en argument |
* |
* @param int l'identifiant de la carte. |
* @param int l'identifiant du type de zones contenues dans la carte. |
* @param int l'identifiant de la zone géo de la carte. |
* @return string une chaine XHTML donnant le nombre de structure. |
*/ |
function bboc_consulterNbreStructure($id_carte, $type_zone_carte, $id_zone_geo_carte) |
{ |
switch ($type_zone_carte){ |
case '0' : |
$requete = |
'SELECT count(B_S_IDSTR) as nbr '. |
'FROM '.BB_BDD_NOM.'.biblio_str '. |
'WHERE B_S_CACHER = 0'; |
break; |
case '1' : |
$requete = |
'SELECT count(CP_ID_Continent) as nbr '. |
'FROM '.BB_BDD_NOM.'.biblio_str, '.BB_BDD_NOM_CARTO.'.carto_PAYS '. |
'WHERE B_S_CACHER = 0 '. |
'AND B_S_PAYS = CP_ID_Pays '. |
'AND CP_ID_Continent <> 0 '. |
'AND CP_ID_Continent = "'.$id_zone_geo_carte.'"'; |
break; |
case '2' : |
$requete = |
'SELECT count(B_S_IDSTR) as nbr '. |
'FROM '.BB_BDD_NOM.'.biblio_str '. |
'WHERE B_S_CACHER = 0 '. |
'AND B_S_PAYS = "fr"'; |
break; |
} |
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete)); |
$ligne = mysql_fetch_object($resultat); |
return $ligne->nbr; |
} |
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.3 2005/05/17 10:10:08 jpm |
* Correction des bogues avant mise en ligne du site v4. |
* |
* Revision 1.2 2005/04/13 10:12:34 jpm |
* Ajout de la constante indiquant la bdd des tables de la carto. |
* |
* Revision 1.1 2005/03/01 15:19:44 jpm |
* Ajout du fichier contenant les fonctions permettant de fournir des informations. |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/tags/2015_03_02/applications/bb_organisme_carto/langues/bboc_langue_fr.inc.php |
---|
New file |
0,0 → 1,64 |
<?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 BiblioBota - Organisme Carto. | |
// | | |
// | 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: bboc_langue_fr.inc.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $ |
/** |
* Traduction de l'application Organisme Carto : fr. |
* |
* Fichier de traduction en français de l'application Organisme Carto. |
* |
*@package BiblioBota-OrganismeCarto |
//Auteur original : |
*@author Jean-Pascal MILCENT <jpm@clapas.org> |
//Autres auteurs : |
*@author Jean-Charles GRANGER <tela@vecteur.org> |
*@copyright Tela-Botanica 2000-2005 |
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
// +------------------------------------------------------------------------------------------------------+ |
// | CORPS du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.1 2005/03/01 15:20:07 jpm |
* Ajout du fichier de traduction de l'application Organisme Carto de Biblio Bota. |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |