Line 60... |
Line 60... |
60 |
$obsAAjouter['milieu'] = $obs['milieu'];
|
60 |
$obsAAjouter['milieu'] = $obs['milieu'];
|
61 |
$obsAAjouter['commentaire'] = $obs['notes'];
|
61 |
$obsAAjouter['commentaire'] = $obs['notes'];
|
62 |
$obsAAjouter['transmission'] = '1';
|
62 |
$obsAAjouter['transmission'] = '1';
|
63 |
$obsAAjouter['date_creation'] = date('Y-m-d H:i:s');
|
63 |
$obsAAjouter['date_creation'] = date('Y-m-d H:i:s');
|
64 |
$obsAAjouter['date_transmission'] = date('Y-m-d H:i:s');
|
64 |
$obsAAjouter['date_transmission'] = date('Y-m-d H:i:s');
|
65 |
$obsAAjouter['coord_x'] = $obs['latitude'];
|
- |
|
66 |
$obsAAjouter['coord_y'] = $obs['longitude'];
|
- |
|
67 |
$obsAAjouter['location'] = $obs['commune_nom'];
|
65 |
$obsAAjouter['location'] = $obs['commune_nom'];
|
68 |
$obsAAjouter['id_location'] = substr($obs['commune_code_insee'], 0, 2);
|
66 |
$obsAAjouter['id_location'] = substr($obs['commune_code_insee'], 0, 2);
|
- |
|
67 |
$obsAAjouter['lieudit'] = isset($obs['lieu_dit']) ? $obs['lieu_dit'] : null;
|
- |
|
68 |
$obsAAjouter['station'] = isset($obs['station']) ? $obs['station'] : null;
|
- |
|
69 |
$obsAAjouter['coord_x'] = $obs['latitude'];
|
- |
|
70 |
$obsAAjouter['coord_y'] = $obs['longitude'];
|
69 |
$obsAAjouter['ref_geo'] = 'WGS84';
|
71 |
$obsAAjouter['ref_geo'] = 'WGS84';
|
Line 70... |
Line 72... |
70 |
|
72 |
|
71 |
$imgAAjouter = null;
|
73 |
$imgAAjouter = null;
|
72 |
if (!empty($obs['image_nom'])) {
|
74 |
if (!empty($obs['image_nom'])) {
|
Line 97... |
Line 99... |
97 |
// Si l'image est transmise en base 64
|
99 |
// Si l'image est transmise en base 64
|
98 |
if (empty($img['b64']) === false) {
|
100 |
if (empty($img['b64']) === false) {
|
99 |
$this->transformerBase64enFichier($nomFichierImg, $img['b64']);
|
101 |
$this->transformerBase64enFichier($nomFichierImg, $img['b64']);
|
100 |
}
|
102 |
}
|
101 |
$cheminImage = $this->config['cel_db']['chemin_stockage_temp']."/$nomFichierImg";
|
103 |
$cheminImage = $this->config['cel_db']['chemin_stockage_temp']."/$nomFichierImg";
|
102 |
$idImg = $this->ajouterImageSurDdEtBdd($img['id_utilisateur'], $cheminImage);
|
104 |
$idImg = $this->ajouterImageSurDdEtBdd($img['id_utilisateur'], $cheminImage, $nomFichierImg);
|
103 |
if ($idImg !== false) {
|
105 |
if ($idImg !== false) {
|
104 |
$this->lierObsEtImg($idImg, $img['id_utilisateur'], $img['id_obs']);
|
106 |
$this->lierObsEtImg($idImg, $img['id_utilisateur'], $img['id_obs']);
|
105 |
}
|
107 |
}
|
106 |
}
|
108 |
}
|