Subversion Repositories Applications.papyrus

Rev

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

Rev Author Line No. Line
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
// +------------------------------------------------------------------------------------------------------+
1800 alexandre_ 22
// CVS : $Id: carto_google.php,v 1.7.2.2 2008-02-08 08:30:07 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
1800 alexandre_ 31
*@version       $Revision: 1.7.2.2 $ $Date: 2008-02-08 08:30:07 $
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&amp;v=2&amp;key='.INS_GOOGLE_KEY;
1427 alexandre_ 53
GEN_stockerFichierScript('googleMapScript', $GLOBALS['ins_config']['ic_google_key']);
54
 
55
 
56
 
57
 
1691 alexandre_ 58
include_once INS_CHEMIN_SQUELETTE.INS_FICHIER_DONNEES_GOOGLE;
1427 alexandre_ 59
 
1628 alexandre_ 60
ob_start();
1691 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>';
1800 alexandre_ 72
	$res = '';
73
	ob_start();
74
	if (file_exists(INS_CHEMIN_SQUELETTE.INS_FICHIER_LEGENDE)) include_once INS_CHEMIN_SQUELETTE.INS_FICHIER_LEGENDE;
75
	$res .= ob_get_contents();
76
	ob_end_clean();
1427 alexandre_ 77
 
1800 alexandre_ 78
	$res .= str_replace ('{CARTE}', $carte, $template);
79
 
80
 
1427 alexandre_ 81
	return $res;
82
}
83
 
84
/* +--Fin du code ----------------------------------------------------------------------------------------+
85
*
86
* $Log: not supported by cvs2svn $
1800 alexandre_ 87
* Revision 1.7.2.1  2007-11-16 11:19:01  alexandre_tb
88
* utilisation constante INS_FICHIER_DONNEES_GOOGLE
89
*
1691 alexandre_ 90
* Revision 1.7  2007-10-12 10:04:52  alexandre_tb
91
* ajout des contantes INS_GOOGLE_IMAGE_LARGEUR et INS_GOOGLE_IMAGE_HAUTEUR
92
*
1653 alexandre_ 93
* Revision 1.6  2007-10-01 12:18:29  alexandre_tb
94
* separation du script en 2 fichiers donnees_googlemap.php et script_googlemap.tpl.js
95
*
1628 alexandre_ 96
* Revision 1.5  2007-09-18 08:38:54  alexandre_tb
97
* ajout de la globale $GLOBALS['type_inscription'] pour indiquer quelle inscription on cartographie
98
*
1605 alexandre_ 99
* Revision 1.4  2007-09-06 08:29:22  alexandre_tb
100
* utilisation de constantes pour centrer la carte
101
*
1572 alexandre_ 102
* Revision 1.3  2007-08-27 12:35:13  alexandre_tb
103
* mise en place d un icone personnalise
104
* et de l affichage de plusieurs donnees sur un meme point
105
*
1549 alexandre_ 106
* Revision 1.2  2007-06-25 09:59:03  alexandre_tb
107
* ajout de carte_google, mise en place des templates avec api/formulaire, configuration de multiples inscriptions, ajout de modele pour les mails
108
*
1467 alexandre_ 109
* Revision 1.1  2007-06-01 13:39:14  alexandre_tb
110
* version initiale
111
*
1427 alexandre_ 112
* +-- Fin du code ----------------------------------------------------------------------------------------+
113
*/