Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 1058 Rev 1066
Line 103... Line 103...
103
								if ($idImg !== false) {
103
								if ($idImg !== false) {
104
									$this->lierObsEtImg($idImg, $img['id_utilisateur'], $img['id_obs']);
104
									$this->lierObsEtImg($idImg, $img['id_utilisateur'], $img['id_obs']);
105
								}
105
								}
106
							}
106
							}
Line 107... Line -...
107
 
-
 
108
 
107
 
109
							$insert = "INSERT INTO cel_inventory ";
108
							$requete = 'INSERT INTO cel_inventory '.
110
							$champs = '('.implode(', ', array_keys($obs)).') ';
109
								'('.implode(', ', array_keys($obs)).') '.
111
							$values = 'VALUES ('.implode(', ', $obs).') ';
110
								'VALUES ('.implode(', ', $obs).') ';
112
							$requete = $insert.$champs.$values;
-
 
113
 
111
							$this->debug[] = $requete;
114
							if ($this->executerRequeteSimple($requete) === false) {
112
							if ($this->executerRequeteSimple($requete) === false) {
115
								$ok = false;
113
								$ok = false;
116
							} else {
114
							} else {
117
								$obs_ok[] = trim($obs['ordre'], "'");
115
								$obs_a_lier[] = trim($obs['ordre'], "'");
118
							}
116
							}
Line 119... Line 117...
119
						}
117
						}
120
 
118
 
121
						if ($ok === true) {
119
						if ($ok === true) {
122
							$this->debug[] = print_r($obs_ok, true);
120
							$this->debug[] = 'AJOUT dans la BDD OK : '.print_r($obs_a_lier, true);
123
							$liaison_ok = $this->lierObsAMotsCles($obs_ok);
121
							$liaisonOk = $this->lierObsAMotsCles($obs_a_lier);
124
							if ($liaison_ok === false) {
122
							if ($liaisonOk === false) {
125
								$e = "Toutes les observations n'ont pas pu être liées au mot-clé du projet.";
123
								$e = "Toutes les observations n'ont pas pu être liées au mot-clé du projet.";
126
								$this->messages[] = $e;
124
								$this->messages[] = $e;
127
							}
125
							}
Line 180... Line 178...
180
		$ajout_mot_cle_2 = $this->ajouterMotCleObs($this->utilisateur_id, $this->projet, $projet, $categorie);
178
		$ajout_mot_cle_2 = $this->ajouterMotCleObs($this->utilisateur_id, $this->projet, $projet, $categorie);
181
		$liaison_ok = false;
179
		$liaison_ok = false;
182
		if ($ajout_mot_cle_1 && $ajout_mot_cle_2) {
180
		if ($ajout_mot_cle_1 && $ajout_mot_cle_2) {
183
			$liaison_ok = $this->lierMotCleObs($this->utilisateur_id, array($projet), $observations);
181
			$liaison_ok = $this->lierMotCleObs($this->utilisateur_id, array($projet), $observations);
184
		} else {
182
		} else {
185
			$e = "La catégorie du projet et le mot-clé du projet n'ont pas pu être ajouté.";
183
			$this->messages[] = "La catégorie du projet et le mot-clé du projet n'ont pas pu être ajouté.";
186
			$this->messages[] = $e;
-
 
187
		}
184
		}
188
		return $liaison_ok;
185
		return $liaison_ok;
189
	}
186
	}
Line 190... Line 187...
190
 
187