Subversion Repositories eFlore/Applications.cel

Rev

Rev 1014 | Rev 1765 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1014 Rev 1152
1
<?php
1
<?php
2
// ATTENTION ! Classe compatible uniquement avec nouveau format de bdd du cel //
2
// ATTENTION ! Classe compatible uniquement avec nouveau format de bdd du cel //
3
 
3
 
4
/**
4
/**
5
 * @author David Delon <aurelien@tela-botanica.org>
5
 * @author David Delon <david@tela-botanica.org>
6
 * @author Aurélien Peronnet <david@tela-botanica.org>
6
 * @author Aurélien Peronnet <aurelien@tela-botanica.org>
7
 * @license GPL v3 <http://www.gnu.org/licenses/gpl.txt>
7
 * @license GPL v3 <http://www.gnu.org/licenses/gpl.txt>
8
 * @license CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt>
8
 * @license CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt>
9
 * @version $Id$
9
 * @version $Id$
10
 * @copyright © 2010, David Delon, Aurélien Peronnet
10
 * @copyright © 2010, David Delon, Aurélien Peronnet
11
*/
11
*/
12
 
12
 
13
/**
13
/**
14
 * InventoryLocationList.php  
14
 * InventoryLocationList.php  
15
 * 
15
 * 
16
 * in : utf8
16
 * in : utf8
17
 * out : utf8
17
 * out : utf8
18
 * Cas d'utilisation :
18
 * Cas d'utilisation :
19
 * Service listage des zones géographiques d'un utilisateur
19
 * Service listage des zones géographiques d'un utilisateur
20
 */ 
20
 */ 
21
class InventoryLocationList extends Cel {
21
class InventoryLocationList extends Cel {
22
	
22
	
23
	function getElement($uid){
23
	function getElement($uid){
24
		
24
		
25
		// Controle detournement utilisateur
25
		// Controle detournement utilisateur
26
	 	$this->controleUtilisateur($uid[0]);
26
	 	$this->controleUtilisateur($uid[0]);
27
 
27
 
28
		$retour = array();
28
		$retour = array();
29
 
29
 
30
        $requete_zones_geo = 'SELECT DISTINCT ce_zone_geo, zone_geo, lieudit, station FROM cel_obs '.
30
        $requete_zones_geo = 'SELECT DISTINCT ce_zone_geo, zone_geo, lieudit, station FROM cel_obs '.
31
							 'WHERE ce_utilisateur = '.$this->proteger($uid[0]).' '.
31
							 'WHERE ce_utilisateur = '.$this->proteger($uid[0]).' '.
32
							 'ORDER BY ce_zone_geo ASC, zone_geo ASC, lieudit ASC, station ASC';
32
							 'ORDER BY ce_zone_geo ASC, zone_geo ASC, lieudit ASC, station ASC';
33
 
33
 
34
        $resultat_zones_geo = $this->requeter($requete_zones_geo);
34
        $resultat_zones_geo = $this->requeter($requete_zones_geo);
35
 
35
 
36
        if (is_array($resultat_zones_geo)) {
36
        if (is_array($resultat_zones_geo)) {
37
	        $retour = $resultat_zones_geo;
37
	        $retour = $resultat_zones_geo;
38
    	}
38
    	}
39
 
39
 
40
		$this->envoyerJson($retour);			
40
		$this->envoyerJson($retour);			
41
		return true;	
41
		return true;	
42
	}
42
	}
43
}
43
}
44
/* +--Fin du code ---------------------------------------------------------------------------------------+
44
/* +--Fin du code ---------------------------------------------------------------------------------------+
45
* $Log$
45
* $Log$
46
* Revision 1.6  2008-01-30 08:57:28  ddelon
46
* Revision 1.6  2008-01-30 08:57:28  ddelon
47
* fin mise en place mygwt
47
* fin mise en place mygwt
48
*
48
*
49
* Revision 1.5  2007-05-22 12:54:09  ddelon
49
* Revision 1.5  2007-05-22 12:54:09  ddelon
50
* Securisation acces utilisateur
50
* Securisation acces utilisateur
51
*
51
*
52
*
52
*
53
*
53
*
54
*/
54
*/
55
?>
55
?>