1427 |
alexandre_ |
1 |
<?php
|
|
|
2 |
/*vim: set expandtab tabstop=4 shiftwidth=4: */
|
|
|
3 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
4 |
// | PHP version 4.1 |
|
|
|
5 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
6 |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
|
|
|
7 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
8 |
// | This library is free software; you can redistribute it and/or |
|
|
|
9 |
// | modify it under the terms of the GNU Lesser General Public |
|
|
|
10 |
// | License as published by the Free Software Foundation; either |
|
|
|
11 |
// | version 2.1 of the License, or (at your option) any later version. |
|
|
|
12 |
// | |
|
|
|
13 |
// | This library is distributed in the hope that it will be useful, |
|
|
|
14 |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
|
|
15 |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
|
|
16 |
// | Lesser General Public License for more details. |
|
|
|
17 |
// | |
|
|
|
18 |
// | You should have received a copy of the GNU Lesser General Public |
|
|
|
19 |
// | License along with this library; if not, write to the Free Software |
|
|
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
|
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
1693 |
alexandre_ |
22 |
// CVS : $Id: carto_google.php,v 1.8 2007-11-16 14:21:33 alexandre_tb Exp $
|
1427 |
alexandre_ |
23 |
/**
|
|
|
24 |
* Cartographie google du bottin
|
|
|
25 |
*
|
|
|
26 |
*@package bottin
|
|
|
27 |
//Auteur original :
|
|
|
28 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
|
|
29 |
//Autres auteurs :
|
|
|
30 |
*@copyright Tela-Botanica 2000-2007
|
1693 |
alexandre_ |
31 |
*@version $Revision: 1.8 $ $Date: 2007-11-16 14:21:33 $
|
1427 |
alexandre_ |
32 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
33 |
*/
|
|
|
34 |
|
|
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
36 |
// | ENTETE du PROGRAMME |
|
|
|
37 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
38 |
|
|
|
39 |
include_once 'configuration/bottin.config.inc.php';
|
|
|
40 |
include_once INS_CHEMIN_APPLI.'bibliotheque/bottin.fonct.php';
|
1572 |
alexandre_ |
41 |
include_once INS_CHEMIN_APPLI.'bibliotheque/bottin.class.php';
|
1427 |
alexandre_ |
42 |
// Inclusion d'une classe personnalise si elle existe
|
|
|
43 |
if (file_exists (INS_CHEMIN_APPLI.'bibliotheque/inscription.class.local.php')) {
|
|
|
44 |
include_once INS_CHEMIN_APPLI.'bibliotheque/inscription.class.local.php' ;
|
|
|
45 |
} else {
|
|
|
46 |
include_once INS_CHEMIN_APPLI.'bibliotheque/inscription.class.php';
|
|
|
47 |
}
|
|
|
48 |
|
1605 |
alexandre_ |
49 |
$GLOBALS ['ins_config'] = inscription::getConfig($GLOBALS['type_inscription_carto']);
|
1572 |
alexandre_ |
50 |
$GLOBALS ['ins_config']['ic_inscription_template'] = inscription::getTemplate(INS_TEMPLATE_FORMULAIRE,
|
|
|
51 |
$GLOBALS['ins_config']['ic_id_inscription']);
|
1549 |
alexandre_ |
52 |
$GLOBALS['ins_config']['ic_google_key'] = 'http://maps.google.com/maps?file=api&v=2&key='.INS_GOOGLE_KEY;
|
1427 |
alexandre_ |
53 |
GEN_stockerFichierScript('googleMapScript', $GLOBALS['ins_config']['ic_google_key']);
|
|
|
54 |
|
|
|
55 |
|
|
|
56 |
|
|
|
57 |
|
1693 |
alexandre_ |
58 |
include_once INS_CHEMIN_SQUELETTE.INS_FICHIER_DONNEES_GOOGLE;
|
1427 |
alexandre_ |
59 |
|
1628 |
alexandre_ |
60 |
ob_start();
|
1693 |
alexandre_ |
61 |
include INS_CHEMIN_SQUELETTE.INS_FICHIER_SCRIPT_GOOGLE;
|
1628 |
alexandre_ |
62 |
$script = ob_get_contents();
|
|
|
63 |
ob_end_clean();
|
1427 |
alexandre_ |
64 |
GEN_stockerCodeScript($script);
|
|
|
65 |
|
|
|
66 |
function afficherContenuCorps() {
|
1549 |
alexandre_ |
67 |
// Appel du template
|
|
|
68 |
include_once INS_CHEMIN_APPLI.'bibliotheque/bottin.class.php';
|
|
|
69 |
$template = inscription::getTemplate(INS_TEMPLATE_CARTO_GOOGLE_ACCUEIL, 1);
|
1653 |
alexandre_ |
70 |
GEN_AttributsBody('onload', 'load()');
|
|
|
71 |
$carte = '<div id="map" style="width: '.INS_GOOGLE_IMAGE_LARGEUR.'px; height: '.INS_GOOGLE_IMAGE_HAUTEUR.'px"></div>';
|
1549 |
alexandre_ |
72 |
$res = str_replace ('{CARTE}', $carte, $template);
|
1427 |
alexandre_ |
73 |
|
|
|
74 |
return $res;
|
|
|
75 |
}
|
|
|
76 |
|
|
|
77 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
|
|
78 |
*
|
|
|
79 |
* $Log: not supported by cvs2svn $
|
1693 |
alexandre_ |
80 |
* Revision 1.7 2007-10-12 10:04:52 alexandre_tb
|
|
|
81 |
* ajout des contantes INS_GOOGLE_IMAGE_LARGEUR et INS_GOOGLE_IMAGE_HAUTEUR
|
|
|
82 |
*
|
1653 |
alexandre_ |
83 |
* Revision 1.6 2007-10-01 12:18:29 alexandre_tb
|
|
|
84 |
* separation du script en 2 fichiers donnees_googlemap.php et script_googlemap.tpl.js
|
|
|
85 |
*
|
1628 |
alexandre_ |
86 |
* Revision 1.5 2007-09-18 08:38:54 alexandre_tb
|
|
|
87 |
* ajout de la globale $GLOBALS['type_inscription'] pour indiquer quelle inscription on cartographie
|
|
|
88 |
*
|
1605 |
alexandre_ |
89 |
* Revision 1.4 2007-09-06 08:29:22 alexandre_tb
|
|
|
90 |
* utilisation de constantes pour centrer la carte
|
|
|
91 |
*
|
1572 |
alexandre_ |
92 |
* Revision 1.3 2007-08-27 12:35:13 alexandre_tb
|
|
|
93 |
* mise en place d un icone personnalise
|
|
|
94 |
* et de l affichage de plusieurs donnees sur un meme point
|
|
|
95 |
*
|
1549 |
alexandre_ |
96 |
* Revision 1.2 2007-06-25 09:59:03 alexandre_tb
|
|
|
97 |
* ajout de carte_google, mise en place des templates avec api/formulaire, configuration de multiples inscriptions, ajout de modele pour les mails
|
|
|
98 |
*
|
1467 |
alexandre_ |
99 |
* Revision 1.1 2007-06-01 13:39:14 alexandre_tb
|
|
|
100 |
* version initiale
|
|
|
101 |
*
|
1427 |
alexandre_ |
102 |
* +-- Fin du code ----------------------------------------------------------------------------------------+
|
|
|
103 |
*/
|