Subversion Repositories Applications.bazar

Rev

Rev 356 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 356 Rev 392
Line 17... Line 17...
17
// |                                                                                                      |
17
// |                                                                                                      |
18
// | You should have received a copy of the GNU Lesser General Public                                     |
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                                  |
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                            |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
21
// +------------------------------------------------------------------------------------------------------+
21
// +------------------------------------------------------------------------------------------------------+
22
// CVS : $Id: bazar.carte_google.php,v 1.7 2007-12-14 09:59:15 alexandre_tb Exp $
22
// CVS : $Id: bazar.carte_google.php,v 1.8 2008-09-17 14:08:45 alexandre_tb Exp $
23
/**
23
/**
24
* 
24
* 
25
*@package bazar
25
*@package bazar
26
//Auteur original :
26
//Auteur original :
27
*@author        Alexandre GRANIER <alexandre@tela-botanica.org>
27
*@author        Alexandre GRANIER <alexandre@tela-botanica.org>
28
//Autres auteurs :
28
//Autres auteurs :
29
*@copyright     Tela-Botanica 2000-2007
29
*@copyright     Tela-Botanica 2000-2007
30
*@version       $Revision: 1.7 $
30
*@version       $Revision: 1.8 $
31
// +------------------------------------------------------------------------------------------------------+
31
// +------------------------------------------------------------------------------------------------------+
32
*/
32
*/
Line 33... Line 33...
33
 
33
 
34
// +------------------------------------------------------------------------------------------------------+
34
// +------------------------------------------------------------------------------------------------------+
Line 44... Line 44...
44
 
44
 
45
if (defined('PAP_VERSION')) { //si on est dans Papyrus
45
if (defined('PAP_VERSION')) { //si on est dans Papyrus
46
	GEN_stockerStyleExterne( 'bazar_interne', 'client/bazar/bazar.interne.css');
46
	GEN_stockerStyleExterne( 'bazar_interne', 'client/bazar/bazar.interne.css');
47
}
47
}
48
$GLOBALS['_BAZAR_']['id_typeannonce']=$GLOBALS['_GEN_commun']['info_application']->id_nature;
-
 
-
 
48
$GLOBALS['_BAZAR_']['id_typeannonce']=$GLOBALS['_GEN_commun']['info_application']->id_nature;
49
 
49
$GLOBALS['_BAZAR_']['categorie_nature']=$GLOBALS['_GEN_commun']['info_application']->categorie_nature;
Line 50... Line 50...
50
// requete sur le bazar pour recuperer les evenements
50
// requete sur le bazar pour recuperer les evenements
51
 
51
 
52
$requete = 'select * from bazar_fiche where ';
52
$requete = 'select * from bazar_fiche where ';
Line 155... Line 155...
155
	  map.enableContinuousZoom();
155
	  map.enableContinuousZoom();
Line 156... Line 156...
156
	
156
	
157
	  // On centre la carte sur le languedoc roussillon
157
	  // On centre la carte sur le languedoc roussillon
158
	  center = new GLatLng('.BAZ_GOOGLE_CENTRE_LAT.', '.BAZ_GOOGLE_CENTRE_LON.');
158
	  center = new GLatLng('.BAZ_GOOGLE_CENTRE_LAT.', '.BAZ_GOOGLE_CENTRE_LON.');
159
      map.setCenter(center, '.BAZ_GOOGLE_ALTITUDE.');
159
      map.setCenter(center, '.BAZ_GOOGLE_ALTITUDE.');
-
 
160
	  map.setMapType(G_HYBRID_MAP);' ;
-
 
161
	  if (BAZ_GOOGLE_FOND_KML != '') {
160
	  map.setMapType(G_HYBRID_MAP);
162
	  	$script .= 'var geoXml = new GGeoXml("'.BAZ_GOOGLE_FOND_KML.'");';
-
 
163
	  }
161
      ' .
164
      
-
 
165
      $script .= $script_marker;
-
 
166
	  if (BAZ_GOOGLE_FOND_KML != '') {
-
 
167
	  	$script .= 'map.addOverlay(geoXml);';
-
 
168
	  }
162
      $script_marker.'
169
	  $script .= '
163
    }
170
   }
164
	};
-
 
165
	// Creates a marker at the given point with the given number label
-
 
166
	
171
	};	
167
';
172
';
168
GEN_stockerCodeScript($script);
173
GEN_stockerCodeScript($script);
169
// On ajoute l attribut load a la balise body
174
// On ajoute l attribut load a la balise body
Line 170... Line 175...
170
GEN_AttributsBody('onload', 'load()');
175
GEN_AttributsBody('onload', 'load()');
Line 171... Line 176...
171
 
176
 
172
function afficherContenuCorps() {
177
function afficherContenuCorps() {
173
	
178
	
-
 
179
	include_once BAZ_CHEMIN_APPLI.'bibliotheque/bazarTemplate.class.php';
174
	include_once BAZ_CHEMIN_APPLI.'bibliotheque/bazarTemplate.class.php';
180
    $modele = new bazarTemplate($GLOBALS['_BAZAR_']['db']);
175
    $modele = new bazarTemplate($GLOBALS['_BAZAR_']['db']);
181
   $html = $modele->getTemplate(BAZ_TEMPLATE_ACCUEIL_CARTE_GOOGLE, $GLOBALS['_BAZAR_']['langue'], $GLOBALS['_BAZAR_']['categorie_nature']);
Line 176... Line 182...
176
    $html = $modele->getTemplate(BAZ_TEMPLATE_ACCUEIL_CARTE_GOOGLE, $GLOBALS['_BAZAR_']['langue']);
182
    if (PEAR::isError($html)) return $html->getMessage();
177
	$res = str_replace ('{CARTE}', '<div id="map" style="width: '.BAZ_GOOGLE_IMAGE_LARGEUR.
183
	$res = str_replace ('{CARTE}', '<div id="map" style="width: '.BAZ_GOOGLE_IMAGE_LARGEUR.
Line 178... Line 184...
178
							'px; height: '.BAZ_GOOGLE_IMAGE_HAUTEUR.'px"></div>', $html);
184
							'px; height: '.BAZ_GOOGLE_IMAGE_HAUTEUR.'px"></div>', $html);
179
 
185
 
180
	return $res;
186
	return $res;
-
 
187
}
-
 
188
 
-
 
189
 
181
}
190
/* +--Fin du code ----------------------------------------------------------------------------------------+
182
 
191
*
183
 
192
* $Log: not supported by cvs2svn $
184
/* +--Fin du code ----------------------------------------------------------------------------------------+
193
* Revision 1.7  2007-12-14 09:59:15  alexandre_tb
185
*
194
* Fusion avec la livraison AHA : 14 decembre 2007