Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 2171 → Rev 2172

/branches/v2.2-faucille/jrest/services/InventoryLocationList.php
New file
0,0 → 1,55
<?php
// ATTENTION ! Classe compatible uniquement avec nouveau format de bdd du cel //
 
/**
* @author David Delon <david@tela-botanica.org>
* @author Aurélien Peronnet <aurelien@tela-botanica.org>
* @license GPL v3 <http://www.gnu.org/licenses/gpl.txt>
* @license CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt>
* @version $Id$
* @copyright © 2010, David Delon, Aurélien Peronnet
*/
 
/**
* InventoryLocationList.php
*
* in : utf8
* out : utf8
* Cas d'utilisation :
* Service listage des zones géographiques d'un utilisateur
*/
class InventoryLocationList extends Cel {
function getElement($uid){
// Controle detournement utilisateur
$this->controleUtilisateur($uid[0]);
 
$retour = array();
 
$requete_zones_geo = 'SELECT DISTINCT ce_zone_geo, zone_geo, lieudit, station FROM cel_obs '.
'WHERE ce_utilisateur = '.Cel::db()->proteger($uid[0]).' '.
'ORDER BY ce_zone_geo ASC, zone_geo ASC, lieudit ASC, station ASC';
 
$resultat_zones_geo = Cel::db()->requeter($requete_zones_geo);
 
if (is_array($resultat_zones_geo)) {
$retour = $resultat_zones_geo;
}
 
$this->envoyerJson($retour);
return true;
}
}
/* +--Fin du code ---------------------------------------------------------------------------------------+
* $Log$
* Revision 1.6 2008-01-30 08:57:28 ddelon
* fin mise en place mygwt
*
* Revision 1.5 2007-05-22 12:54:09 ddelon
* Securisation acces utilisateur
*
*
*
*/
?>