Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 314 | Rev 316 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 314 Rev 315
1
<?php
1
<?php
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */ 
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */ 
3
// +------------------------------------------------------------------------------------------------------+
3
// +------------------------------------------------------------------------------------------------------+
4
// | PHP version 5.1.1                                                                                    |
4
// | PHP version 5.1.1                                                                                    |
5
// +------------------------------------------------------------------------------------------------------+
5
// +------------------------------------------------------------------------------------------------------+
6
// | Copyright (C) 2006 Tela Botanica (accueil@tela-botanica.org)                                         |
6
// | Copyright (C) 2006 Tela Botanica (accueil@tela-botanica.org)                                         |
7
// +------------------------------------------------------------------------------------------------------+
7
// +------------------------------------------------------------------------------------------------------+
8
// | This file is part of eFlore-Fiche.                                                                   |
8
// | This file is part of eFlore-Fiche.                                                                   |
9
// |                                                                                                      |
9
// |                                                                                                      |
10
// | Foobar is free software; you can redistribute it and/or modify                                       |
10
// | Foobar is free software; you can redistribute it and/or modify                                       |
11
// | it under the terms of the GNU General Public License as published by                                 |
11
// | it under the terms of the GNU General Public License as published by                                 |
12
// | the Free Software Foundation; either version 2 of the License, or                                    |
12
// | the Free Software Foundation; either version 2 of the License, or                                    |
13
// | (at your option) any later version.                                                                  |
13
// | (at your option) any later version.                                                                  |
14
// |                                                                                                      |
14
// |                                                                                                      |
15
// | Foobar is distributed in the hope that it will be useful,                                            |
15
// | Foobar is distributed in the hope that it will be useful,                                            |
16
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
16
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
17
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                        |
17
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                        |
18
// | GNU General Public License for more details.                                                         |
18
// | GNU General Public License for more details.                                                         |
19
// |                                                                                                      |
19
// |                                                                                                      |
20
// | You should have received a copy of the GNU General Public License                                    |
20
// | You should have received a copy of the GNU General Public License                                    |
21
// | along with Foobar; if not, write to the Free Software                                                |
21
// | along with Foobar; if not, write to the Free Software                                                |
22
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
22
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
23
// +------------------------------------------------------------------------------------------------------+
23
// +------------------------------------------------------------------------------------------------------+
24
// CVS : $Id: effi_cel.action.php,v 1.9 2007-11-06 10:54:03 jp_milcent Exp $
24
// CVS : $Id: effi_cel.action.php,v 1.9 2007-11-06 10:54:03 jp_milcent Exp $
25
/**
25
/**
26
* Fichier d'action du module eFlore-Fiche : Cel
26
* Fichier d'action du module eFlore-Fiche : Cel
27
*
27
*
28
* Appel Carnet en ligne
28
* Appel Carnet en ligne
29
* 
29
* 
30
*
30
*
31
*@package eFlore
31
*@package eFlore
32
*@subpackage ef_fiche
32
*@subpackage ef_fiche
33
//Auteur original :
33
//Auteur original :
34
*@author        David Delon <dd@clapas.net>
34
*@author        David Delon <dd@clapas.net>
35
//Autres auteurs :
35
//Autres auteurs :
36
*@author        aucun
36
*@author        aucun
37
*@copyright     Tela-Botanica 2000-2006
37
*@copyright     Tela-Botanica 2000-2006
38
*@version       $Revision: 1.9 $ $Date: 2007-11-06 10:54:03 $
38
*@version       $Revision: 1.9 $ $Date: 2007-11-06 10:54:03 $
39
// +------------------------------------------------------------------------------------------------------+
39
// +------------------------------------------------------------------------------------------------------+
40
*/
40
*/
41
 
41
 
42
// +------------------------------------------------------------------------------------------------------+
42
// +------------------------------------------------------------------------------------------------------+
43
// |                                            ENTETE du PROGRAMME                                       |
43
// |                                            ENTETE du PROGRAMME                                       |
44
// +------------------------------------------------------------------------------------------------------+
44
// +------------------------------------------------------------------------------------------------------+
45
 
45
 
46
// +------------------------------------------------------------------------------------------------------+
46
// +------------------------------------------------------------------------------------------------------+
47
// |                                            CORPS du PROGRAMME                                        |
47
// |                                            CORPS du PROGRAMME                                        |
48
// +------------------------------------------------------------------------------------------------------+
48
// +------------------------------------------------------------------------------------------------------+
49
 
49
 
50
 
50
 
51
 
51
 
52
// TODO : CSS specifique (id)
52
// TODO : CSS specifique (id)
53
 
53
 
54
class Cartes {
54
class Cartes {
55
	private $tab_code_insee = array();
55
	private $tab_code_insee = array();
56
	public $src_map;
56
	public $src_map;
57
	private $cartesFormateur = null;
57
	private $cartesFormateur = null;
-
 
58
	const MIME_MAP = 'text/html';
-
 
59
	const MIME_JPG = 'image/jpeg';
58
	
60
	
59
	public function consulter($ressources, $param) {
61
	public function consulter($ressources, $param) {
60
		// Initialisation des variables
62
		// Initialisation des variables
61
		$this->ressources = $ressources;
63
		$this->ressources = $ressources;
62
		$this->param = $param;
64
		$this->param = $param;
63
		$this->traiterParametres();
65
		$this->traiterParametres();
64
		$this->creerFormateur();
66
		$this->creerFormateur();
65
		$this->cartesFormateur->initialiserImage();
67
		$this->cartesFormateur->initialiserImage();
66
		
68
		
67
		$inventories = $this->cartesFormateur->chargerDonnees();
69
		$inventories = $this->cartesFormateur->chargerDonnees();
68
		$retour = '';
70
		$retour = '';
69
		if (is_array($inventories) && $inventories !== array()){
71
		if (is_array($inventories) && $inventories !== array()){
70
			// Connection referentiel communes 
72
			// Connection referentiel communes 
71
			$this->chargerVille();
73
			$this->chargerVille();
72
			list($text, $merge) = $this->calculerRepartition($inventories);
74
			list($text, $merge) = $this->calculerRepartition($inventories);
73
			// D�finition des couleurs des points
75
			// D�finition des couleurs des points
74
			$couleurs = $this->cartesFormateur->definirCouleurs();
76
			$couleurs = $this->cartesFormateur->definirCouleurs();
75
			if ($text) {
77
			if ($text) {
76
				$usemap = $this->cartesFormateur->dessinerPoint($text, $merge, $couleurs);
78
				$usemap = $this->cartesFormateur->dessinerPoint($text, $merge, $couleurs);
77
			}
79
			}
78
			if (isset($usemap)) {
80
			if (isset($usemap)) {
79
				$this->cartesFormateur->img();
81
				$this->cartesFormateur->img();
80
				
-
 
81
				if ($this->info['miniature'] !== 'min')  {
-
 
82
					$retour = $this->cartesFormateur->formaterCartes($usemap);
82
				$retour = $this->cartesFormateur->formaterCartes($usemap);
83
				} else { // miniature
-
 
84
					$retour = $this->cartesFormateur->formaterCarteMiniature($retour, $usemap);
-
 
85
				}
-
 
86
			}
83
			}
87
		} else {
-
 
88
			$retour = $this->formaterCarteVide();
-
 
89
		}
84
		}
90
		if ($retour == '') {
85
		if ($retour == '') {
91
			$retour = $this->formaterCarteVide();
86
			$retour = $this->formaterCarteVide();
92
		}
87
		}
93
		
-
 
-
 
88
		$resultat = new ResultatService();
-
 
89
		$resultat->corps = ($this->info['retour'] == self::MIME_MAP) ? $retour : file_get_contents($retour);
-
 
90
		$resultat->mime = ($this->info['retour'] == self::MIME_MAP) ? self::MIME_MAP : self::MIME_JPG;
94
		print_r($retour);
91
		return $resultat;
95
	}
92
	}
96
	
93
	
97
	public function creerFormateur(){
94
	public function creerFormateur(){
98
		$projet = ucwords($this->param['projet']);
95
		$projet = ucwords($this->info['projet']);
99
		$Classe = $projet.'Formateur';
96
		$Classe = $projet.'Formateur';
100
		$chemin = dirname(__FILE__).DS.'cartes'.DS;
97
		$chemin = dirname(__FILE__).DS.'cartes'.DS;
101
		$cheminClasse = $chemin.$Classe.'.php';
98
		$cheminClasse = $chemin.$Classe.'.php';
102
		$cheminInterface = $chemin.'Formateur.php';
99
		$cheminInterface = $chemin.'Formateur.php';
103
		if (file_exists($cheminInterface)) {
100
		if (file_exists($cheminInterface)) {
104
			include_once $cheminInterface;
101
			include_once $cheminInterface;
105
			if (file_exists($cheminClasse)) {
102
			if (file_exists($cheminClasse)) {
106
				include_once $cheminClasse;
103
				include_once $cheminClasse;
107
				$this->cartesFormateur = new $Classe($this->param, $this->info);
104
				$this->cartesFormateur = new $Classe($this->info);
108
			} else {
105
			} else {
109
				$message = "La classe '$Classe' est introuvable.";Debug::printr($message);
106
				$message = "La classe '$Classe' est introuvable.";Debug::printr($message);
110
				throw new Exception($message);
107
				throw new Exception($message);
111
			}
108
			}
112
		}
109
		}
113
	}
110
	}
114
	
111
	
115
	private function traiterParametres() {
112
	private function traiterParametres() {
116
		$this->info['miniature'] = (isset($this->param['retour.format'])) ? $this->param['retour.format'] : false;
113
		$this->info['miniature'] = (isset($this->param['retour.format'])) ? $this->param['retour.format'] : false;
117
		if ($this->info['miniature'] == 'min') {
-
 
118
			$this->info['src_map'] = 'france_utm_miniature.jpg';
114
		$this->info['src_map'] = ($this->info['miniature'] == 'min') ? 'france_utm_miniature.jpg' : 'france_utm_600x564.jpg';
119
		} else {
-
 
120
			$this->info['src_map'] = 'france_utm_600x564.jpg';
115
		$this->info['retour'] = (isset($this->param['retour'])) ? $this->param['retour'] : self::MIME_JPG ;
121
		}
-
 
122
		// Ajout du code du r�f�rentiel
116
		// Ajout du code du r�f�rentiel
123
		$this->info['referentiel'] = 'bdtfx';
117
		$this->info['referentiel'] = 'bdtfx';
124
		$projets = array('cenlr', 'cel', 'cbnmed', 'sophy');
118
		$projets = array('cenlr', 'cel', 'cbnmed', 'sophy');
125
		if (isset($this->param['projet'])) {
-
 
126
			if (!in_array($this->param['projet'], $projets)) {
119
		if (isset($this->param['projet']) && in_array($this->param['projet'], $projets)) {
127
				$this->param['projet'] = 'general';
120
			$this->info['projet'] = $this->param['projet'];
128
			}
-
 
129
		} else {
121
		} else {
130
			$this->param['projet'] = 'general';
122
			$this->info['projet'] = 'general';
131
		}
123
		}
132
		// R�cup�ration d'infos g�n�rales
124
		// R�cup�ration d'infos g�n�rales
133
		// donnees exemple nn = 141; nt = 8522; nom = 'Acer campestre L.'; nom_ss_auteur = 'Acer campestre';
125
		// donnees exemple nn = 141; nt = 8522; nom = 'Acer campestre L.'; nom_ss_auteur = 'Acer campestre';
134
		$this->info['nn'] = $this->param['masque.nn'];
126
		$this->info['nn'] = $this->param['masque.nn'];
135
		$this->info['nt'] = $this->param['masque.nt'];
127
		$this->info['nt'] = $this->param['masque.nt'];
136
		$this->info['nom'] = $this->param['masque.ns'].' '.$this->param['masque.au'];
128
		$this->info['nom'] = $this->param['masque.ns'].' '.$this->param['masque.au'];
137
		$this->info['nom_ss_auteur'] = $this->param['masque.ns'];
129
		$this->info['nom_ss_auteur'] = $this->param['masque.ns'];
138
	}
130
	}
139
	
131
	
140
	private function chargerVille() {
132
	private function chargerVille() {
141
		$requete = "SELECT * FROM tb_cel.locations";
133
		$requete = "SELECT * FROM tb_cel.locations";
142
		$villes = $this->getBdd()->recupererTous($requete);
134
		$villes = $this->getBdd()->recupererTous($requete);
143
		foreach ($villes as $ville) {
135
		foreach ($villes as $ville) {
144
			$this->tab_code_insee[$ville['insee_code']] = $ville;
136
			$this->tab_code_insee[$ville['insee_code']] = $ville;
145
		}
137
		}
146
	}
138
	}
147
	
139
	
148
	private function calculerRepartition($inventories) {
140
	private function calculerRepartition($inventories) {
149
		$text = '';
141
		$text = '';
150
		// Recuperation du positionnement de la carte
142
		// Recuperation du positionnement de la carte
151
		$jpg_txt = file_get_contents(Config::get('Cartes.chemin').str_replace('jpg', 'txt', $this->info['src_map']));
143
		$jpg_txt = file_get_contents(Config::get('Cartes.chemin').str_replace('jpg', 'txt', $this->info['src_map']));
152
		parse_str($jpg_txt);
144
		parse_str($jpg_txt);
153
		// "Resolution" calculer à partir du fichier $jpg_txt par fuseau
145
		// "Resolution" calculer à partir du fichier $jpg_txt par fuseau
154
		$p['31T'] = ($X231T - $X131T) / ($X231TUTM - $X131TUTM);
146
		$p['31T'] = ($X231T - $X131T) / ($X231TUTM - $X131TUTM);
155
		$p['32T'] = ($X231T - $X131T ) / ($X231TUTM - $X131TUTM);
147
		$p['32T'] = ($X231T - $X131T ) / ($X231TUTM - $X131TUTM);
156
		$p['30T'] = ($X231T - $X131T ) / ($X231TUTM - $X131TUTM);
148
		$p['30T'] = ($X231T - $X131T ) / ($X231TUTM - $X131TUTM);
157
		
149
		
158
		$text = array();
150
		$text = array();
159
		$merge = array();
151
		$merge = array();
160
		foreach ($inventories as $inventory){
152
		foreach ($inventories as $inventory){
161
			$utm = $this->cartesFormateur->chercherVille($inventory, $this->tab_code_insee);
153
			$utm = $this->cartesFormateur->chercherVille($inventory, $this->tab_code_insee);
162
			// Ultime tentative 
154
			// Ultime tentative 
163
			if (!$utm) {
155
			if (!$utm) {
164
				$requete = "SELECT *  FROM tb_cel.locations WHERE name LIKE ".$this->getBdd()->proteger($inventory['location']);
156
				$requete = "SELECT *  FROM tb_cel.locations WHERE name LIKE ".$this->getBdd()->proteger($inventory['location']);
165
				$utm = $this->getBdd()->recupererTous($requete);
157
				$utm = $this->getBdd()->recupererTous($requete);
166
			}
158
			}
167
 
159
 
168
			// Si des doublons sur la commune : pas d'affichage , il vaut mieux ne rien afficher que d'afficher des erreurs.
160
			// Si des doublons sur la commune : pas d'affichage , il vaut mieux ne rien afficher que d'afficher des erreurs.
169
			if (sizeof($utm) == 1) {
161
			if (sizeof($utm) == 1) {
170
				$utm = $utm[0];
162
				$utm = $utm[0];
171
					
163
					
172
				// On centre le point au milieu de la maille 10x10 par defaut ...
164
				// On centre le point au milieu de la maille 10x10 par defaut ...
173
				$utm = $this->chercherCentreMaille($utm);
165
				$utm = $this->chercherCentreMaille($utm);
174
					
166
					
175
				// Calcul coordonnes x, y sur l'image
167
				// Calcul coordonnes x, y sur l'image
176
				if ($utm['sector']=='31T') {// Fuseau 31 T
168
				if ($utm['sector']=='31T') {// Fuseau 31 T
177
					$x = (($utm['x_utm'] - $X131TUTM) * $p['31T'] ) + $X131T;
169
					$x = (($utm['x_utm'] - $X131TUTM) * $p['31T'] ) + $X131T;
178
					$y = $Y231T - (($utm['y_utm'] - $Y131TUTM) * $p['31T'] );
170
					$y = $Y231T - (($utm['y_utm'] - $Y131TUTM) * $p['31T'] );
179
				} elseif ($utm['sector'] == '32T') {// Fuseau 32 T : une rotation + translation est appliqu�e
171
				} elseif ($utm['sector'] == '32T') {// Fuseau 32 T : une rotation + translation est appliqu�e
180
					$cosa = cos(deg2rad($angle3132));
172
					$cosa = cos(deg2rad($angle3132));
181
					$sina = sin(deg2rad($angle3132));
173
					$sina = sin(deg2rad($angle3132));
182
					$xp = (($utm['x_utm'] - $X132TUTM) * $cosa) + (($utm['y_utm']- $Y132TUTM) * $sina);
174
					$xp = (($utm['x_utm'] - $X132TUTM) * $cosa) + (($utm['y_utm']- $Y132TUTM) * $sina);
183
					$yp = (-($utm['x_utm'] - $X132TUTM)* $sina) + (($utm['y_utm'] - $Y132TUTM) * $cosa);
175
					$yp = (-($utm['x_utm'] - $X132TUTM)* $sina) + (($utm['y_utm'] - $Y132TUTM) * $cosa);
184
					$x = ($xp * $p['32T'] ) + $X132T;
176
					$x = ($xp * $p['32T'] ) + $X132T;
185
					$y = $Y232T-($yp * $p['32T'] );
177
					$y = $Y232T-($yp * $p['32T'] );
186
				} elseif ($utm['sector'] == '30T') {// Fuseau 30 T : une rotation + translation est appliqu�e
178
				} elseif ($utm['sector'] == '30T') {// Fuseau 30 T : une rotation + translation est appliqu�e
187
					$cosa = cos(deg2rad($angle3031));
179
					$cosa = cos(deg2rad($angle3031));
188
					$sina = sin(deg2rad($angle3031));
180
					$sina = sin(deg2rad($angle3031));
189
					$xp = (($utm['x_utm'] - $X130TUTM) * $cosa) + (($utm['y_utm'] - $Y130TUTM) * $sina);
181
					$xp = (($utm['x_utm'] - $X130TUTM) * $cosa) + (($utm['y_utm'] - $Y130TUTM) * $sina);
190
					$yp = (-($utm['x_utm'] - $X130TUTM) * $sina) + (($utm['y_utm'] - $Y130TUTM) * $cosa);
182
					$yp = (-($utm['x_utm'] - $X130TUTM) * $sina) + (($utm['y_utm'] - $Y130TUTM) * $cosa);
191
					$x = ($xp * $p['30T'] ) + $X130T;
183
					$x = ($xp * $p['30T'] ) + $X130T;
192
					$y = $Y230T - ($yp * $p['30T'] );
184
					$y = $Y230T - ($yp * $p['30T'] );
193
				}
185
				}
194
				$x = round($x);
186
				$x = round($x);
195
				$y = round($y);
187
				$y = round($y);
196
					
188
					
197
					
189
					
198
				if ($utm['name'] != null) {
190
				if ($utm['name'] != null) {
199
					$name = utf8_decode($utm['name']);
191
					$name = utf8_decode($utm['name']);
200
				}
192
				}
201
				$comment = $this->cartesFormateur->formerCommentaire($utm, $inventory);
193
				$comment = ($this->info['retour'] == self::MIME_MAP) ? $this->cartesFormateur->formerCommentaire($utm, $inventory) : '';
202
				// On stocke les commentaires pour affichage dans les tooltips
194
				// On stocke les commentaires pour affichage dans les tooltips
203
				// Commentaire deja pr�sent ? : on ajoute � la suite
195
				// Commentaire deja pr�sent ? : on ajoute � la suite
204
				list($text, $merge) = $this->cartesFormateur->stockerCommentaire($text, $merge, $name, $comment, $inventory['collection_code'],$x,$y); 
196
				list($text, $merge) = $this->cartesFormateur->stockerCommentaire($text, $merge, $name, $comment, $inventory['collection_code'],$x,$y); 
205
			}
197
			}
206
		}
198
		}
207
			
199
			
208
		return array($text, $merge);
200
		return array($text, $merge);
209
	}
201
	}
210
	
202
	
211
 
203
 
212
	
204
	
213
	private function formaterCarteVide() {
205
	private function formaterCarteVide() {
214
		$this->cheminCartesBase = Config::get('Cartes.chemin');
206
		$this->cheminCartesBase = Config::get('Cartes.chemin');
215
		$dest_map['vide'] = 'vide_'.$this->info['src_map'];
207
		$dest_map['vide'] = 'vide_'.$this->info['src_map'];
216
		$img['vide'] = imagecreatefromjpeg($this->cheminCartesBase.$this->info['src_map']);
208
		$img['vide'] = imagecreatefromjpeg($this->cheminCartesBase.$this->info['src_map']);
217
		imagejpeg($img['vide'], Config::get('cache.stockageChemin').$dest_map['vide'], 90);
209
		imagejpeg($img['vide'], Config::get('cache.stockageChemin').$dest_map['vide'], 90);
-
 
210
		$retour = Config::get('cel_dst').$dest_map['vide'];
-
 
211
		if ($this->info['retour'] == self::MIME_MAP) {
218
		$retour =  "<img src=\"".Config::get('cel_dst').$dest_map['vide']."\" style=\"border:none; cursor:crosshair\" alt=\"\" />\n";
212
			$retour =  "<img src=\"".$retour."\" style=\"border:none; cursor:crosshair\" alt=\"\" />\n";
-
 
213
		}
219
		return $retour;
214
		return $retour;
220
	}
215
	}
221
	
216
	
222
 
217
 
223
	
218
	
224
	
219
	
225
	//+----------------------------------------------------------------------------------------------------------------+
220
	//+----------------------------------------------------------------------------------------------------------------+
226
	// sous fonction de calculer répartition
221
	// sous fonction de calculer répartition
227
	
222
	
228
	
223
	
229
	private function chercherCentreMaille($utm) {
224
	private function chercherCentreMaille($utm) {
230
		$pad = str_repeat ('0' ,(7 - strlen( $utm['x_utm'])));
225
		$pad = str_repeat ('0' ,(7 - strlen( $utm['x_utm'])));
231
		$utm['x_utm'] = $pad.$utm['x_utm'];
226
		$utm['x_utm'] = $pad.$utm['x_utm'];
232
	
227
	
233
		$pad = str_repeat ('0' ,(7 - strlen( $utm['y_utm'])));
228
		$pad = str_repeat ('0' ,(7 - strlen( $utm['y_utm'])));
234
		$utm['y_utm'] = $pad.$utm['y_utm'];
229
		$utm['y_utm'] = $pad.$utm['y_utm'];
235
	
230
	
236
		$utm['x_utm'] = substr($utm['x_utm'] ,0,3);
231
		$utm['x_utm'] = substr($utm['x_utm'] ,0,3);
237
		$utm['x_utm'] = $utm['x_utm'].'5000';
232
		$utm['x_utm'] = $utm['x_utm'].'5000';
238
	
233
	
239
		$utm['y_utm'] = substr($utm['y_utm'] ,0,3);
234
		$utm['y_utm'] = substr($utm['y_utm'] ,0,3);
240
		$utm['y_utm'] = $utm['y_utm'].'5000';
235
		$utm['y_utm'] = $utm['y_utm'].'5000';
241
		return $utm;
236
		return $utm;
242
	}
237
	}
243
 
238
 
244
	//+----------------------------------------------------------------------------------------------------------------+
239
	//+----------------------------------------------------------------------------------------------------------------+
245
	// Méthodes d'accès aux objets du Framework
240
	// Méthodes d'accès aux objets du Framework
246
	/**
241
	/**
247
	* Méthode de connection à la base de données sur demande.
242
	* Méthode de connection à la base de données sur demande.
248
	* Tous les services web n'ont pas besoin de s'y connecter.
243
	* Tous les services web n'ont pas besoin de s'y connecter.
249
	*/
244
	*/
250
	protected function getBdd() {
245
	protected function getBdd() {
251
		if (! isset($this->Bdd)) {
246
		if (! isset($this->Bdd)) {
252
			$this->Bdd = new Bdd();
247
			$this->Bdd = new Bdd();
253
		}
248
		}
254
	return $this->Bdd;
249
	return $this->Bdd;
255
	}
250
	}
256
	
251
	
257
 
252
 
258
	
253
	
259
}
254
}
260
?>
255
?>