Subversion Repositories eFlore/Applications.del

Rev

Rev 353 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 353 Rev 356
Line 30... Line 30...
30
	*
30
	*
31
	*/
31
	*/
32
	public function getElement($uid)
32
	public function getElement($uid)
33
	{
33
	{
34
		$format = 'json';
34
		$format = 'json';
-
 
35
		$retour_completion_noms = json_encode(array());
-
 
36
		$recherche = '';
Line 35... Line 37...
35
		
37
		
36
		$this->debut = isset($_GET['debut']) ? $_GET['debut'] : $this->debut;
38
		$this->debut = isset($_GET['debut']) ? $_GET['debut'] : $this->debut;
Line 37... Line 39...
37
		$this->limite = isset($_GET['limite']) ? $_GET['limite'] : $this->limite;
39
		$this->limite = isset($_GET['limite']) ? $_GET['limite'] : $this->limite;
38
	
40
	
-
 
41
		$format = isset($_GET['format']) ? strtolower($_GET['format']) : $format;			
-
 
42
		$recherche = isset($uid[0]) && $uid[0] != '' ? $uid[0] : '';
-
 
43
		$recherche_suite = isset($uid[1]) && $uid[1] != '' ? '/'.$uid[1] : '';
Line 39... Line 44...
39
		$format = isset($_GET['format']) ? strtolower($_GET['format']) : $format;			
44
		
40
		$recherche = isset($uid[0]) && $uid[0] != '' ? $uid[0] : '';
45
		$recherche .= $recherche_suite;
41
	
46
	
42
		switch ($format) {		
47
		switch ($format) {		
43
			case 'json':
48
			case 'json':
44
				$retour_completion_noms = $this->obtenirNomsCompletes($recherche);
49
				$retour_completion_noms = $this->obtenirNomsCompletes($recherche);
Line 45... Line 50...
45
				$mime = 'application/json';
50
				$mime = 'application/json';
46
			break;
51
			break;
Line 47... Line 52...
47
		}
52
		}
48
	
53
	
49
		$this->envoyer($retour,$mime);
54
		$this->envoyer($retour_completion_noms,$mime);