Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 526 Rev 530
Line 104... Line 104...
104
							'img_id' => $img['ci_id_image']);
104
							'img_id' => $img['ci_id_image']);
105
					$images_doublons_id[] = $this->bdd->quote($img['ci_id_image']);
105
					$images_doublons_id[] = $this->bdd->quote($img['ci_id_image']);
106
				}
106
				}
107
			}
107
			}
Line -... Line 108...
-
 
108
			
108
			
109
			if (count($images_doublons_id) > 0) {
109
			$requete = 	'SELECT ci_id_image, ci_nom_original, ci_md5, ordre '.
110
				$requete = 	'SELECT ci_id_image, ci_nom_original, ci_md5, ordre '.
110
						'FROM cel_images AS cim '.
111
							'FROM cel_images AS cim '.
111
						'	LEFT JOIN cel_obs_images AS coi '.
112
							'	LEFT JOIN cel_obs_images AS coi '.
112
						'		ON (coi.coi_ce_image = cim.ci_id_image) '.
113
							'		ON (coi.coi_ce_image = cim.ci_id_image) '.
113
						'	LEFT JOIN cel_inventory AS ci '.
114
							'	LEFT JOIN cel_inventory AS ci '.
114
						'		ON (coi.coi_ce_observation = ci.ordre AND coi.coi_ce_utilisateur = ci.identifiant) '.
115
							'		ON (coi.coi_ce_observation = ci.ordre AND coi.coi_ce_utilisateur = ci.identifiant) '.
115
						"WHERE cim.ci_ce_utilisateur = '$utilisateur' ".
116
							"WHERE cim.ci_ce_utilisateur = '$utilisateur' ".
116
						'	AND cim.ci_id_image IN ('.implode(',', $images_doublons_id).')';
117
							'	AND cim.ci_id_image IN ('.implode(',', $images_doublons_id).')';
-
 
118
				$infos = $this->executerRequete($requete);
117
			$infos = $this->executerRequete($requete);
119
				
118
			foreach ($infos as $info) {
120
				foreach ($infos as $info) {
119
				if (isset($doublons[$info['ci_md5']][$info['ci_id_image']]) && ! $this->etreNull($info['ordre'])) {
121
					if (isset($doublons[$info['ci_md5']][$info['ci_id_image']]) && ! $this->etreNull($info['ordre'])) {
-
 
122
						$doublons[$info['ci_md5']][$info['ci_id_image']]['obs_ordre'][] = $info['ordre'];
120
					$doublons[$info['ci_md5']][$info['ci_id_image']]['obs_ordre'][] = $info['ordre'];
123
					}
121
				}
124
				}
122
			}
125
			}
Line 123... Line 126...
123
		}
126
		}