Rev 416 | Rev 884 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?php// ATTENTION ! Classe compatible uniquement avec nouveau format de bdd du cel ///**David Delon 2008Cecill / GPL V3*/// in : utf8// out : utf8/** InventoryObservationCount.php** Cas d'utilisation :* Service recherche du nombre a partir de divers critères** 2: Le service recherche le nombre d'images correspondant au critères demandé* 3: Le service renvoie le nombre calcule*/class InventoryObservationCount extends Cel {/*** renvoie le nombre d' observations correspondant aux criteres* uid[0] : utilisateur obligatoire* uid[1] : criteres de filtrage de la forme critere1=valeur1&critere2=valeur2**/function getElement($uid){// Controle detournement utilisateur$this->controleUtilisateur($uid[0]);$chercheur_observations = new RechercheObservation($this->config);$criteres = array();if(isset($uid[1])){$criteres = $chercheur_observations->parserRequeteCriteres($uid[1]) ;}$retour = $chercheur_observations->compterObservations($uid[0], $criteres);$retour_encode = json_encode($retour) ;header("content-type: application/json") ;print $retour_encode ;exit() ;}}?>