Subversion Repositories Applications.bazar

Rev

Rev 363 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 363 Rev 376
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.5.2.3 2008-01-29 09:41:11 alexandre_tb Exp $
22
// CVS : $Id: bazar.carte_google.php,v 1.5.2.4 2008-02-08 08:20:24 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.5.2.3 $
30
*@version       $Revision: 1.5.2.4 $
31
// +------------------------------------------------------------------------------------------------------+
31
// +------------------------------------------------------------------------------------------------------+
32
*/
32
*/
Line 33... Line 33...
33
 
33
 
34
// +------------------------------------------------------------------------------------------------------+
34
// +------------------------------------------------------------------------------------------------------+
Line 50... Line 50...
50
// requete sur le bazar pour recuperer les evenements
50
// requete sur le bazar pour recuperer les evenements
Line 51... Line 51...
51
 
51
 
52
$requete = 'select * from bazar_fiche where ';
52
$requete = 'select * from bazar_fiche where ';
53
if ($GLOBALS['_BAZAR_']['id_typeannonce'] != '') $requete .= 'bf_ce_nature in ('.$GLOBALS['_BAZAR_']['id_typeannonce'].') and ' ;
53
if ($GLOBALS['_BAZAR_']['id_typeannonce'] != '') $requete .= 'bf_ce_nature in ('.$GLOBALS['_BAZAR_']['id_typeannonce'].') and ' ;
54
$requete .= ' ((bf_date_debut_validite_fiche<=now() and bf_date_fin_validite_fiche>=now()) or (bf_date_fin_validite_fiche="0000-00-00"' .
54
$requete .= ' ((bf_date_debut_validite_fiche<=now() and bf_date_fin_validite_fiche>=now()) or (bf_date_fin_validite_fiche="0000-00-00"' .
55
		' and date_add(bf_date_fin_evenement,interval 15 day)>now()))'.
55
		' ))'.
56
			' and bf_statut_fiche=1';
56
			' and bf_statut_fiche=1';
Line 57... Line 57...
57
$resultat = $GLOBALS['_BAZAR_']['db']->query ($requete);
57
$resultat = $GLOBALS['_BAZAR_']['db']->query ($requete);
58
 
58
 
Line 94... Line 94...
94
	}
94
	}
95
} else {
95
} else {
96
	$script_marker = '';
96
	$script_marker = '';
97
}
97
}
Line 98... Line -...
98
 
-
 
99
$script = '
98
 
100
    // Variables globales
99
$script = '    // Variables globales
101
    var map = null;
-
 
102
	var lat = document.getElementById("latitude");
-
 
103
    var lon = document.getElementById("longitude");';
100
    var map = null;';
104
if (BAZ_GOOGLE_MAXIMISE_TAILLE) $script .= '
101
if (BAZ_GOOGLE_MAXIMISE_TAILLE) $script .= '
105
    // Pour gerer la taille  
102
    // Pour gerer la taille  
106
    var winW = 630, winH = 560;
103
    var winW = 630, winH = 560;
107
    var deltaH = 220;
104
    var deltaH = 220;
Line 128... Line 125...
128
	if (map)  map.checkResize();
125
	if (map)  map.checkResize();
129
    }';
126
    }';
130
$script .= '
127
$script .= '
Line 131... Line 128...
131
    
128
    
132
    function createMarker(point, chaine) {
129
    function createMarker(point, chaine) {
133
	  	var icon = new GIcon();
130
	    var icon = new GIcon();
134
		icon.image = "http://connaisciences.fr/sites/connaisc/fr/images/marker.png";
131
		icon.image = "http://connaisciences.fr/sites/connaisc/fr/images/marker.png";
135
		icon.shadow = "http://www.google.com/mapfiles/shadow50.png";
132
		icon.shadow = "http://www.google.com/mapfiles/shadow50.png";
136
		icon.iconSize = new GSize(20, 34);
133
		icon.iconSize = new GSize(20, 34);
137
		icon.shadowSize = new GSize(37, 34);
134
		icon.shadowSize = new GSize(37, 34);
Line 166... Line 163...
166
	  if (BAZ_GOOGLE_FOND_KML != '') {
163
	  if (BAZ_GOOGLE_FOND_KML != '') {
167
	  	$script .= 'map.addOverlay(geoXml);';
164
	  	$script .= 'map.addOverlay(geoXml);';
168
	  }
165
	  }
169
	  $script .= '
166
	  $script .= '
170
   }
167
   }
171
	};
168
	};	
172
	// Creates a marker at the given point with the given number label
-
 
173
	
-
 
174
';
169
';
175
GEN_stockerCodeScript($script);
170
GEN_stockerCodeScript($script);
176
// On ajoute l attribut load a la balise body
171
// On ajoute l attribut load a la balise body
177
GEN_AttributsBody('onload', 'load()');
172
GEN_AttributsBody('onload', 'load()');
Line 190... Line 185...
190
 
185
 
191
 
186
 
192
/* +--Fin du code ----------------------------------------------------------------------------------------+
187
/* +--Fin du code ----------------------------------------------------------------------------------------+
-
 
188
*
-
 
189
* $Log: not supported by cvs2svn $
-
 
190
* Revision 1.5.2.3  2008-01-29 09:41:11  alexandre_tb
193
*
191
* utilisation des constantes BAZ_GOOGLE_FOND_KML
194
* $Log: not supported by cvs2svn $
192
*
195
* Revision 1.5.2.2  2007-12-14 09:57:15  alexandre_tb
193
* Revision 1.5.2.2  2007-12-14 09:57:15  alexandre_tb
196
* utilisation des constantes de la carte google
194
* utilisation des constantes de la carte google
197
*
195
*