| Line 445... |
Line 445... |
| 445 |
*/
|
445 |
*/
|
| 446 |
static function chargerLigne($ligne, $dernier_ordre, $cel) {
|
446 |
static function chargerLigne($ligne, $dernier_ordre, $cel) {
|
| 447 |
// en premier car le résultat est utile pour
|
447 |
// en premier car le résultat est utile pour
|
| 448 |
// * traiter espèce (traiterEspece())
|
448 |
// * traiter espèce (traiterEspece())
|
| 449 |
// * traiter longitude et latitude (traiterLonLat())
|
449 |
// * traiter longitude et latitude (traiterLonLat())
|
| 450 |
$referentiel = self::identReferentiel(trim(strtolower($ligne[C_NOM_REFERENTIEL])));
|
450 |
$referentiel = self::identReferentiel(trim(strtolower($ligne[C_NOM_REFERENTIEL])), $ligne);
|
| Line 451... |
Line 451... |
| 451 |
|
451 |
|
| 452 |
// $espece est rempli de plusieurs informations
|
452 |
// $espece est rempli de plusieurs informations
|
| 453 |
$espece = Array(C_NOM_SEL => NULL, C_NOM_SEL_NN => NULL, C_NOM_RET => NULL,
|
453 |
$espece = Array(C_NOM_SEL => NULL, C_NOM_SEL_NN => NULL, C_NOM_RET => NULL,
|
| 454 |
C_NOM_RET_NN => NULL, C_NT => NULL, C_FAMILLE => NULL);
|
454 |
C_NOM_RET_NN => NULL, C_NT => NULL, C_FAMILLE => NULL);
|
| Line 521... |
Line 521... |
| 521 |
$liste_images = array_filter(explode("/", $str));
|
521 |
$liste_images = array_filter(explode("/", $str));
|
| Line 522... |
Line 522... |
| 522 |
|
522 |
|
| 523 |
//array_walk($liste_images, '__anonyme_4', $cel);
|
523 |
//array_walk($liste_images, '__anonyme_4', $cel);
|
| 524 |
array_walk($liste_images, array(__CLASS__, '__anonyme_4'), $cel);
|
524 |
array_walk($liste_images, array(__CLASS__, '__anonyme_4'), $cel);
|
| 525 |
$requete = sprintf(
|
525 |
$requete = sprintf(
|
| 526 |
"SELECT id_image, nom_original FROM cel_images WHERE ce_utilisateur = %d AND nom_original IN (\"%s\")",
|
526 |
"SELECT id_image, nom_original FROM cel_images WHERE ce_utilisateur = %d AND nom_original IN (%s)",
|
| 527 |
$cel->id_utilisateur,
|
527 |
$cel->id_utilisateur,
|
| Line 528... |
Line 528... |
| 528 |
implode('","', $liste_images));
|
528 |
implode(',', $liste_images));
|
| Line 529... |
Line 529... |
| 529 |
|
529 |
|
| 530 |
$resultat = $cel->requeter($requete);
|
530 |
$resultat = $cel->requeter($requete);
|
| Line 590... |
Line 590... |
| 590 |
}
|
590 |
}
|
| 591 |
return strftime("%Y-%m-%d 00:00:00", $timestamp);
|
591 |
return strftime("%Y-%m-%d 00:00:00", $timestamp);
|
| 592 |
}
|
592 |
}
|
| 593 |
}
|
593 |
}
|
| Line 594... |
Line 594... |
| 594 |
|
594 |
|
| 595 |
static function identReferentiel($referentiel) {
|
595 |
static function identReferentiel($referentiel, $ligne) {
|
| 596 |
// SELECT DISTINCT nom_referentiel, COUNT(id_observation) AS count FROM cel_obs GROUP BY nom_referentiel ORDER BY count DESC;
|
596 |
// SELECT DISTINCT nom_referentiel, COUNT(id_observation) AS count FROM cel_obs GROUP BY nom_referentiel ORDER BY count DESC;
|
| 597 |
if(strpos($referentiel, 'bdtfx') !== FALSE) return 'bdtfx:v1.01';
|
597 |
if(strpos($referentiel, 'bdtfx') !== FALSE) return 'bdtfx:v1.01';
|
| 598 |
if(strpos($referentiel, 'bdtxa') !== FALSE) return 'bdtxa:v1.00';
|
598 |
if(strpos($referentiel, 'bdtxa') !== FALSE) return 'bdtxa:v1.00';
|
| 599 |
if(strpos($referentiel, 'bdnff') !== FALSE) return 'bdnff:4.02';
|
599 |
if(strpos($referentiel, 'bdnff') !== FALSE) return 'bdnff:4.02';
|
| Line 744... |
Line 744... |
| 744 |
|
744 |
|
| Line 745... |
Line 745... |
| 745 |
$departement = trim($departement); // TODO
|
745 |
$departement = trim($departement); // TODO
|
| 746 |
|
746 |
|
| 747 |
$localisation[C_ZONE_GEO] = $localisation[C_ZONE_GEO];
|
747 |
$localisation[C_ZONE_GEO] = $localisation[C_ZONE_GEO];
|
| 748 |
$localisation[C_CE_ZONE_GEO] = $localisation[C_CE_ZONE_GEO];
|
748 |
$localisation[C_CE_ZONE_GEO] = $localisation[C_CE_ZONE_GEO];
|
| Line 749... |
Line 749... |
| 749 |
|
749 |
return;
|
| Line 750... |
Line 750... |
| 750 |
}
|
750 |
}
|
| 751 |
|
751 |
|
| 752 |
|
752 |
|
| 753 |
$select = "SELECT DISTINCT nom, code FROM cel_zones_geo";
|
753 |
$select = "SELECT DISTINCT nom, code FROM cel_zones_geo";
|
| 754 |
|
754 |
|
| 755 |
if (preg_match('/(.*) \((\d+)\)/', $identifiant_commune, $elements)) {
|
755 |
if (preg_match('/(.+) \((\d+)\)/', $identifiant_commune, $elements)) {
|