Subversion Repositories Sites.obs-saisons.fr

Rev

Rev 246 | Rev 249 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 246 Rev 248
Line 296... Line 296...
296
		
296
		
Line 297... Line 297...
297
		$resultats_formates = array();
297
		$resultats_formates = array();
Line -... Line 298...
-
 
298
		
298
		
299
		foreach($tableau_stations_infos as &$stations_infos) {
299
		foreach($tableau_stations_infos as &$stations_infos) {
300
			
300
			
301
			if(!isset($resultats_formates[$stations_infos['os_id_station']])) {
Line 301... Line 302...
301
			if($stations_infos['os_ce_commune'] == "NULL") {
302
				if($stations_infos['os_ce_commune'] == "NULL") {
Line 309... Line 310...
309
				'latitude' => $stations_infos['os_latitude'],
310
					'latitude' => $stations_infos['os_latitude'],
310
				'longitude' => $stations_infos['os_longitude'],
311
					'longitude' => $stations_infos['os_longitude'],
311
				'altitude' => $stations_infos['os_altitude'],
312
					'altitude' => $stations_infos['os_altitude'],
312
				'id_participant' => $stations_infos['os_ce_participant'],
313
					'id_participant' => $stations_infos['os_ce_participant'],
313
				'pseudo_participant' => '',
314
					'pseudo_participant' => '',
314
				'mail_participant' => ''
315
					'mail_participant' => '',
-
 
316
					'especes' => array()
315
			);
317
				);
Line -... Line 318...
-
 
318
				
-
 
319
				if(is_numeric($stations_infos['os_ce_commune'])) {
-
 
320
					$codes_insee_communes[] = $stations_infos['os_ce_commune'];
-
 
321
				}
-
 
322
			}
316
			
323
			
-
 
324
			$infos_espece = $especes[$stations_infos['oi_ce_espece']];
-
 
325
			
-
 
326
			if($infos_espece != null) {
317
			$infos_espece = $especes[$stations_infos['oi_ce_espece']];
327
				
318
			if($infos_espece['type'] != "") {
328
				if($infos_espece['type'] != "") {
319
				$infos_espece['type'] = $this->obtenirValeurTripleParId($infos_espece['type']);
329
					$infos_espece['type'] = $this->obtenirValeurTripleParId($infos_espece['type']);
Line 320... Line 330...
320
			}
330
				}
321
			
-
 
322
			$resultats_formates[$stations_infos['os_id_station']]['especes'][] = $infos_espece;
-
 
323
			
-
 
324
			if(is_numeric($stations_infos['os_ce_commune'])) {
331
				
325
				$codes_insee_communes[] = $stations_infos['os_ce_commune'];
332
				$resultats_formates[$stations_infos['os_id_station']]['especes'][$infos_espece['id_espece']] = $infos_espece;
Line 326... Line 333...
326
			}
333
			}
327
		}
334
		}
Line 336... Line 343...
336
			}
343
			}
Line 337... Line 344...
337
			
344
			
338
			$resultat['pseudo_participant'] = $correspondance_id_utilisateur[$resultat['id_participant']]['name'];
345
			$resultat['pseudo_participant'] = $correspondance_id_utilisateur[$resultat['id_participant']]['name'];
Line -... Line 346...
-
 
346
			$resultat['mail_participant'] = $correspondance_id_utilisateur[$resultat['id_participant']]['mail'];
-
 
347
			
-
 
348
			$types = array("Particulier" ,"Établissement scolaire", "Association" ,"Professionnel", "Autre","Inconnu");
-
 
349
			
-
 
350
			if(isset($correspondance_id_utilisateur[$resultat['id_participant']]['profile_type'])) {
339
			$resultat['mail_participant'] = $correspondance_id_utilisateur[$resultat['id_participant']]['mail'];
351
				$resultat['type_participant'] = $correspondance_id_utilisateur[$resultat['id_participant']]['profile_type'];
-
 
352
			} else {
340
			
353
				$resultat['type_participant'] = "Inconnu";
Line 341... Line 354...
341
			//TODO: selection champ infos complémentaires à transmettre
354
			}
342
		}
355
		}