Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 2538 Rev 2730
Line 148... Line 148...
148
				'famille'			=> self::GenColInfo(Array('abbrev' => 'famille',
148
				'famille'			=> self::GenColInfo(Array('abbrev' => 'famille',
149
															  'nom' => 'Famille',
149
															  'nom' => 'Famille',
150
															  'importable' => FALSE)),
150
															  'importable' => FALSE)),
151
				'nom_referentiel'	=> self::GenColInfo(Array('abbrev' => 'nom_referentiel',
151
				'nom_referentiel'	=> self::GenColInfo(Array('abbrev' => 'nom_referentiel',
152
															  'nom' => 'Referentiel taxonomique')),
152
															  'nom' => 'Referentiel taxonomique')),
153
				'pays'				=> self::GenColInfo(Array('abbrev' => 'pays',
153
				'pays'				=> self::GenColInfo(Array('abbrev' => 'pays',
154
															  'nom' => 'Pays')),
154
															  'nom' => 'Pays')),
155
				'zone_geo'			=> self::GenColInfo(Array('abbrev' => 'zone_geo',
155
				'zone_geo'			=> self::GenColInfo(Array('abbrev' => 'zone_geo',
156
															  'nom' => 'Commune')),
156
															  'nom' => 'Commune')),
157
				'ce_zone_geo'		=> self::GenColInfo(Array('abbrev' => 'ce_zone_geo',
157
				'ce_zone_geo'		=> self::GenColInfo(Array('abbrev' => 'ce_zone_geo',
158
															  'nom' => 'Identifiant Commune',
158
															  'nom' => 'Identifiant Commune',
Line 348... Line 348...
348
			} else if(function_exists($colonne['fonction_data'])) {// fonction pour obtenir des champs (étendus)
348
			} else if(function_exists($colonne['fonction_data'])) {// fonction pour obtenir des champs (étendus)
349
				$valeur = $colonne['fonction_data']($obs);
349
				$valeur = $colonne['fonction_data']($obs);
350
			} else if(method_exists(__CLASS__, $colonne['fonction_data'])) {
350
			} else if(method_exists(__CLASS__, $colonne['fonction_data'])) {
351
				$valeur = call_user_func(array(__CLASS__, $colonne['fonction_data']), $obs);
351
				$valeur = call_user_func(array(__CLASS__, $colonne['fonction_data']), $obs);
352
			}
352
			}
-
 
353
			echo "COL[$abbrev] => VAL[$valeur]<br/>";
Line 353... Line 354...
353
 
354
 
354
			// // cette section devrait être vide:
355
			// // cette section devrait être vide:
355
			// // cas particuliers ingérable avec l'architecture actuelle:
356
			// // cas particuliers ingérable avec l'architecture actuelle:
356
			if (false && $abbrev == 'date_observation' && $valeur == '0000-00-00') {
357
			if (false && $abbrev == 'date_observation' && $valeur == '0000-00-00') {
Line 369... Line 370...
369
			}
370
			}
Line 370... Line 371...
370
 
371
 
371
			// fin de section "cas particuliers"
372
			// fin de section "cas particuliers"
372
			$ligne_formatee[] = $valeur;
373
			$ligne_formatee[] = $valeur;
-
 
374
		}
Line 373... Line 375...
373
		}
375
			exit;
374
 
376
 
375
		// uniquement les champs dynamiques
377
		// uniquement les champs dynamiques
376
		foreach($colonnes as $abbrev => $colonne) {
378
		foreach($colonnes as $abbrev => $colonne) {
Line 510... Line 512...
510
		}
512
		}
Line 511... Line 513...
511
 
513
 
512
		return $code_departement;
514
		return $code_departement;
Line -... Line 515...
-
 
515
	}
-
 
516
 
-
 
517
	/**
-
 
518
	 * Enlève les zéros excédentaires (devenus nomades) au début et à la fin d'une
513
	}
519
	 * latitude ou longitude, en prenant garde à ne pas foirer les nombres 0.xyz
514
 
520
	 */
-
 
521
	public static function trim0($lonlat) {
-
 
522
		$retour = trim($lonlat, "0");
-
 
523
		// si on a trop enlevé de zéros à gauche, on en remet un (mode synthobois)
-
 
524
		if (substr($retour, 0, 1) == ".") {
-
 
525
			$retour = "0" . $retour;
515
	public static function trim0($lonlat) {
526
		}
Line 516... Line 527...
516
		return trim(trim($lonlat, "0"), ".");
527
		return $retour;
517
	}
528
	}
518
 
529