Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 2470 Rev 2502
Line 211... Line 211...
211
		$info = (int) Cel::db()->requeterValeurUnique($requete);
211
		$info = (int) Cel::db()->requeterValeurUnique($requete);
212
		return $info;
212
		return $info;
213
	}
213
	}
Line 214... Line 214...
214
 
214
 
215
	private function getNbImagesPubliques() {
215
	private function getNbImagesPubliques() {
216
		$requete = $this->construireRequeteNbreImgLiees();
216
		$requete = $this->construireRequeteNbreImgLiees(true);
217
		$info =(int) Cel::db()->requeterValeurUnique($requete);
217
		$info = (int) Cel::db()->requeterValeurUnique($requete);
218
		return $info;
218
		return $info;
Line 219... Line 219...
219
	}
219
	}
220
 
220
 
Line 323... Line 323...
323
		$requete = $select.$from.$where;
323
		$requete = $select.$from.$where;
Line 324... Line 324...
324
 
324
 
325
		return $requete;
325
		return $requete;
Line 326... Line 326...
326
	}
326
	}
327
 
327
 
328
	private function construireRequeteNbreImgLiees() {
328
	private function construireRequeteNbreImgLiees($publiquesSeulement=false) {
Line 329... Line 329...
329
		$select = 'SELECT COUNT(DISTINCT ci.id_image) AS nbre ';
329
		$select = 'SELECT COUNT(DISTINCT ci.id_image) AS nbre ';
330
		$from = 'FROM cel_images ci ';
330
		$from = 'FROM cel_images ci ';
Line 341... Line 341...
341
				$filtres[] = "nt = $num_taxon ";
341
				$filtres[] = "nt = $num_taxon ";
342
			}
342
			}
343
			if (isset($taxon)) {
343
			if (isset($taxon)) {
344
				$filtres[] = "nom_ret LIKE $taxon ";
344
				$filtres[] = "nom_ret LIKE $taxon ";
345
			}
345
			}
-
 
346
			if ($publiquesSeulement === true) {
-
 
347
				$filtres[] = "transmission = 1";
-
 
348
			}
Line 346... Line 349...
346
 
349
 
347
			if (isset($num_taxon) || isset($taxon)) {
350
			if (isset($num_taxon) || isset($taxon)) {
348
				$from .= 'LEFT JOIN cel_obs ON (ci.ce_observation = co.id_observation) ';
351
				$from .= 'LEFT JOIN cel_obs ON (ci.ce_observation = co.id_observation) ';