Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 813 Rev 814
Line 204... Line 204...
204
	}
204
	}
Line 205... Line 205...
205
	
205
	
206
	private function getServiceParDefaut() {
206
	private function getServiceParDefaut() {
207
		// Construction de la requête
207
		// Construction de la requête
208
		$requete = 	(isset($this->distinct) ? 'SELECT DISTINCT' : 'SELECT').' * '.
208
		$requete = 	(isset($this->distinct) ? 'SELECT DISTINCT' : 'SELECT').' * '.
209
			'FROM cel_inventory '.
209
			'FROM cel_inventory WHERE identifiant like "%@%" '.
210
			(($this->etreFluxAdmin()) ? '' : 'WHERE transmission = 1 ').
210
			(($this->etreFluxAdmin()) ? '' : 'AND transmission = 1 ').
211
			'ORDER BY '.(isset($this->orderby) && (!is_null($this->orderby)) ? $this->orderby  : 'date_modification DESC').' '.
211
			'ORDER BY '.(isset($this->orderby) && (!is_null($this->orderby)) ? $this->orderby  : 'date_modification DESC').' '.
Line 212... Line 212...
212
			"LIMIT $this->start,$this->limit ";
212
			"LIMIT $this->start,$this->limit ";
Line 260... Line 260...
260
		if (isset($_GET['limite'])) $this->limite = $_GET['limite'];
260
		if (isset($_GET['limite'])) $this->limite = $_GET['limite'];
Line 261... Line 261...
261
		
261
		
262
		// Construction de la requête
262
		// Construction de la requête
263
		$requete = (isset($this->distinct) ? 'SELECT DISTINCT' : 'SELECT').' * '.
263
		$requete = (isset($this->distinct) ? 'SELECT DISTINCT' : 'SELECT').' * '.
264
				'FROM cel_inventory '.
264
				'FROM cel_inventory '.
265
				'WHERE transmission = 1 '.
-
 
Line 266... Line 265...
266
			'	AND ';
265
				'WHERE identifiant like "%@%" AND '.(($this->etreFluxAdmin()) ? '' : ' transmission = 1 AND ');
267
		
266
		
268
		if ($this->estUneRechercheGenerale()) {
267
		if ($this->estUneRechercheGenerale()) {
269
			$chaine_requete = $_GET['recherche'];
268
			$chaine_requete = $_GET['recherche'];
Line 273... Line 272...
273
			if (!empty($criteres)) {
272
			if (!empty($criteres)) {
274
				$requete .= $this->creerSousRequeteRechercheParCriteres($criteres);
273
				$requete .= $this->creerSousRequeteRechercheParCriteres($criteres);
275
			}	
274
			}	
276
		}
275
		}
277
		$requete = rtrim($requete, 'AND ');
276
		$requete = rtrim($requete, 'AND ');
278
		$requete .= 'ORDER BY '.(isset($this->orderby) && (!is_null($this->orderby)) ? $this->orderby  : 
277
		$requete .= ' ORDER BY '.(isset($this->orderby) && (!is_null($this->orderby)) ? $this->orderby  : 
279
			'date_modification DESC, location ASC').' '.
278
			'date_modification DESC, location ASC').' '.
280
				"LIMIT $this->start,$this->limit ";
279
				"LIMIT $this->start,$this->limit ";
Line 281... Line 280...
281
		
280