Subversion Repositories eFlore/Applications.coel

Rev

Rev 1699 | Rev 1702 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1699 Rev 1700
Line 29... Line 29...
29
		} else {
29
		} else {
30
			$this->messages[] = "Le type de recherche demandé '$type' n'est pas disponible.";
30
			$this->messages[] = "Le type de recherche demandé '$type' n'est pas disponible.";
31
		}
31
		}
Line 32... Line 32...
32
		
32
		
-
 
33
		// Envoie sur la sortie standard
-
 
34
		if($this->formatRetour == 'text/plain') {
-
 
35
			$this->envoyer($info, 'text/plain', 'utf-8', false);
-
 
36
			exit;
33
		// Envoie sur la sortie standard
37
		}
34
		$this->envoyer($info);
38
		$this->envoyer($info);
Line 35... Line 39...
35
	}
39
	}
36
	
40
	
Line 133... Line 137...
133
		return $info;
137
		return $info;
134
	}
138
	}
Line 135... Line 139...
135
	
139
	
136
	private function pretraiterParametresUrl($param) {
140
	private function pretraiterParametresUrl($param) {
137
		// Tableau des paramêtres qui peuvent être passés dans l'url
141
		// Tableau des paramêtres qui peuvent être passés dans l'url
-
 
142
		$params_passes = array(
138
		$params_passes = array('mots' => 'str', 
143
			'mots' => 'str', 
139
			'sci' => 'bool', 
144
			'sci' => 'bool', 
140
			'bot' => 'int', 
145
			'bot' => 'int', 
141
			'zg' => 'str', 
146
			'zg' => 'str', 
142
			'p' => 'str', 
147
			'p' => 'str', 
143
			'pr' => 'int',
148
			'pr' => 'int',
144
			'str-d' => 'defaut',
149
			'str-d' => 'frdepliste',
145
			'veg' => 'int',
150
			'veg' => 'int',
Line 146... Line 151...
146
			'projets' => 'int');
151
			'projets' => 'int');
147
		
152
		
Line 187... Line 192...
187
							"séparés par des virgules et non '$valeur'.";
192
							"séparés par des virgules et non '$valeur'.";
188
						$valeur = null;
193
						$valeur = null;
189
					}
194
					}
190
				}
195
				}
Line -... Line 196...
-
 
196
 
-
 
197
				if ($type == 'frdepliste') {
-
 
198
					$valeur = array_filter(explode(',', $valeur), create_function('$val', 'return preg_match("/^(\d+|2A|2B)$/i", $val);'));
-
 
199
				}
191
				
200
 
192
				$p[$param_passe] = $valeur;
201
				$p[$param_passe] = $valeur;
193
			}
202
			}
Line 194... Line 203...
194
		}
203
		}
Line 250... Line 259...
250
		if (isset($p['pr'])) {
259
		if (isset($p['pr'])) {
251
			$where[] = "ccap_id_role IN ({$p['pr']})";
260
			$where[] = "ccap_id_role IN ({$p['pr']})";
252
		}
261
		}
253
		if (isset($p['str-d'])) {
262
		if (isset($p['str-d'])) {
254
			$where[] = 'cs_ce_truk_pays = 2654';
263
			$where[] = 'cs_ce_truk_pays = 2654';
255
            $where[] = "cs_code_postal LIKE '{$p['str-d']}%'";
264
			$where[] = sprintf("cs_code_postal REGEXP '^(%s).*'", implode('|', $p['str-d']));
256
		}
265
		}
Line 257... Line 266...
257
 
266
 
258
		if (isset($p['veg'])) {
267
		if (isset($p['veg'])) {
259
			$veg = explode(',', $p['veg']);
268
			$veg = explode(',', $p['veg']);