Subversion Repositories Applications.papyrus

Rev

Rev 1800 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?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: carto_google.php,v 1.7.2.2 2008-02-08 08:30:07 alexandre_tb Exp $
/**
* Cartographie google du bottin
*
*@package bottin
//Auteur original :
*@author        Alexandre Granier <alexandre@tela-botanica.org>
//Autres auteurs :
*@copyright     Tela-Botanica 2000-2007
*@version       $Revision: 1.7.2.2 $ $Date: 2008-02-08 08:30:07 $
// +------------------------------------------------------------------------------------------------------+
*/

// +------------------------------------------------------------------------------------------------------+
// |                                            ENTETE du PROGRAMME                                       |
// +------------------------------------------------------------------------------------------------------+

include_once 'configuration/bottin.config.inc.php';
include_once INS_CHEMIN_APPLI.'bibliotheque/bottin.fonct.php';
include_once INS_CHEMIN_APPLI.'bibliotheque/bottin.class.php';
// Inclusion d'une classe personnalise si elle existe
if (file_exists (INS_CHEMIN_APPLI.'bibliotheque/inscription.class.local.php')) {
        include_once INS_CHEMIN_APPLI.'bibliotheque/inscription.class.local.php' ;      
} else {
        include_once INS_CHEMIN_APPLI.'bibliotheque/inscription.class.php';
}

$GLOBALS ['ins_config'] = inscription::getConfig($GLOBALS['type_inscription_carto']);
$GLOBALS ['ins_config']['ic_inscription_template'] = inscription::getTemplate(INS_TEMPLATE_FORMULAIRE, 
                                                                        $GLOBALS['ins_config']['ic_id_inscription']);
$GLOBALS['ins_config']['ic_google_key'] = 'http://maps.google.com/maps?file=api&amp;v=2&amp;key='.INS_GOOGLE_KEY;
GEN_stockerFichierScript('googleMapScript', $GLOBALS['ins_config']['ic_google_key']);




include_once INS_CHEMIN_SQUELETTE.INS_FICHIER_DONNEES_GOOGLE;

ob_start();
include INS_CHEMIN_SQUELETTE.INS_FICHIER_SCRIPT_GOOGLE;
$script = ob_get_contents();
ob_end_clean();
GEN_stockerCodeScript($script);

function afficherContenuCorps() {
        // Appel du template
        include_once INS_CHEMIN_APPLI.'bibliotheque/bottin.class.php';
        $template = inscription::getTemplate(INS_TEMPLATE_CARTO_GOOGLE_ACCUEIL, 1);
        GEN_AttributsBody('onload', 'load()');
        $carte = '<div id="map" style="width: '.INS_GOOGLE_IMAGE_LARGEUR.'px; height: '.INS_GOOGLE_IMAGE_HAUTEUR.'px"></div>';
        $res = '';
        ob_start();
        if (file_exists(INS_CHEMIN_SQUELETTE.INS_FICHIER_LEGENDE)) include_once INS_CHEMIN_SQUELETTE.INS_FICHIER_LEGENDE;
        $res .= ob_get_contents();
        ob_end_clean();
        
        $res .= str_replace ('{CARTE}', $carte, $template);
        
        
        return $res;
}

/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.7.2.1  2007-11-16 11:19:01  alexandre_tb
* utilisation constante INS_FICHIER_DONNEES_GOOGLE
*
* Revision 1.7  2007-10-12 10:04:52  alexandre_tb
* ajout des contantes INS_GOOGLE_IMAGE_LARGEUR et INS_GOOGLE_IMAGE_HAUTEUR
*
* Revision 1.6  2007-10-01 12:18:29  alexandre_tb
* separation du script en 2 fichiers donnees_googlemap.php et script_googlemap.tpl.js
*
* Revision 1.5  2007-09-18 08:38:54  alexandre_tb
* ajout de la globale $GLOBALS['type_inscription'] pour indiquer quelle inscription on cartographie
*
* Revision 1.4  2007-09-06 08:29:22  alexandre_tb
* utilisation de constantes pour centrer la carte
*
* Revision 1.3  2007-08-27 12:35:13  alexandre_tb
* mise en place d un icone personnalise
* et de l affichage de plusieurs donnees sur un meme point
*
* Revision 1.2  2007-06-25 09:59:03  alexandre_tb
* ajout de carte_google, mise en place des templates avec api/formulaire, configuration de multiples inscriptions, ajout de modele pour les mails
*
* Revision 1.1  2007-06-01 13:39:14  alexandre_tb
* version initiale
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/