Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 1421 Rev 1466
Line 66... Line 66...
66
                    '   LEFT JOIN cel_zones_geo AS l '.
66
                    '   LEFT JOIN cel_zones_geo AS l '.
67
                    '       ON (l.id_zone_geo = co.ce_zone_geo) '.
67
                    '       ON (l.id_zone_geo = co.ce_zone_geo) '.
68
                    "WHERE transmission = '1' ".
68
                    "WHERE transmission = '1' ".
69
					$this->construireWhereDept().
69
					$this->construireWhereDept().
70
                    $this->construireWhereCommune().
70
                    $this->construireWhereCommune().
-
 
71
					$this->construireWherePhotosSeulement().
71
                    $this->construireWhereUtilisateur().
72
                    $this->construireWhereUtilisateur().
72
					$this->construireWhereNumTaxon().
73
					$this->construireWhereNumTaxon().
73
					$this->construireWhereNomTaxon().
74
					$this->construireWhereNomTaxon().
74
					$this->construireWhereDate().
75
					$this->construireWhereDate().
75
					$this->construireWhereCommentaire().
76
					$this->construireWhereCommentaire().
Line 138... Line 139...
138
						'FROM cel_obs AS co '.
139
						'FROM cel_obs AS co '.
139
						'	LEFT JOIN cel_zones_geo AS l '.
140
						'	LEFT JOIN cel_zones_geo AS l '.
140
						"		ON (l.id_zone_geo = co.ce_zone_geo) ".
141
						"		ON (l.id_zone_geo = co.ce_zone_geo) ".
141
						"WHERE transmission = '1' ".
142
						"WHERE transmission = '1' ".
142
						$this->construireWhereCoordonnees().
143
						$this->construireWhereCoordonnees().
-
 
144
						$this->construireWherePhotosSeulement().
143
						$this->construireWhereUtilisateur().
145
						$this->construireWhereUtilisateur().
144
						$this->construireWhereNumTaxon().
146
						$this->construireWhereNumTaxon().
145
						$this->construireWhereNomTaxon().
147
						$this->construireWhereNomTaxon().
146
						$this->construireWhereDate().
148
						$this->construireWhereDate().
147
						$this->construireWhereCommentaire().
149
						$this->construireWhereCommentaire().
Line 285... Line 287...
285
					'		ON (l.id_zone_geo = co.ce_zone_geo) '.
287
					'		ON (l.id_zone_geo = co.ce_zone_geo) '.
286
					"WHERE transmission = '1' ".
288
					"WHERE transmission = '1' ".
287
					"	AND nom_ret != '' ".
289
					"	AND nom_ret != '' ".
288
					$this->construireWhereDept().
290
					$this->construireWhereDept().
289
                    $this->construireWhereCommune().
291
                    $this->construireWhereCommune().
-
 
292
					$this->construireWherePhotosSeulement().
290
                    $this->construireWhereUtilisateur().
293
                    $this->construireWhereUtilisateur().
291
					$this->construireWhereNumTaxon().
294
					$this->construireWhereNumTaxon().
292
					$this->construireWhereNomTaxon().
295
					$this->construireWhereNomTaxon().
293
					$this->construireWhereDate().
296
					$this->construireWhereDate().
294
					$this->construireWhereCommentaire().
297
					$this->construireWhereCommentaire().
Line 598... Line 601...
598
			$sql = " AND zone_geo LIKE $commune ";
601
			$sql = " AND zone_geo LIKE $commune ";
599
		}
602
		}
600
		return $sql;
603
		return $sql;
601
	}
604
	}
Line -... Line 605...
-
 
605
	
-
 
606
	private function construireWherePhotosSeulement() {
-
 
607
		$sql = '';
-
 
608
		if (isset($this->parametres['photos']) && $this->parametres['photos'] == 1) {
-
 
609
			$sql = 'AND co.id_observation IN (SELECT DISTINCT id_observation FROM cel_obs_images) ';
-
 
610
		}
-
 
611
		return $sql;
-
 
612
	}
Line 602... Line 613...
602
	
613
	
603
	
614
	
604
	private function construireWhereUtilisateur() {
615
	private function construireWhereUtilisateur() {
605
		$sql = '';
616
		$sql = '';