Subversion Repositories Sites.obs-saisons.fr

Compare Revisions

Ignore whitespace Rev 209 → Rev 210

/trunk/applications/saisie/bibliotheque/dao/IndividuDao.php
70,14 → 70,36
if (is_numeric($id_individu)) {
$url = $this->url_jrest.self::SERVICE_INDIVIDU."/$id_individu";
$json = $this->envoyerRequeteModif($url, $donnees);
$donnees = json_decode($json, true);
if (true) {
//TODO: verifier modification
}
if($donnees_retour['reponse'] == 'OK') {
return true;
}
}
return true;
return false;
}
public function supprimerIndividu($id_individu) {
$donnees = $valeurs_individu_verifiees;
if (is_numeric($id_individu)) {
$url = $this->url_jrest.self::SERVICE_INDIVIDU."/".AppControleur::getIdUtilisateur()."/".$id_individu;
$json = $this->envoyerRequeteSuppression($url, $donnees);
$donnees = json_decode($json, true);
$donnees_retour = json_decode($json, true);
if($donnees_retour['reponse'] == 'OK') {
return true;
}
}
return false;
}
}
?>
/trunk/applications/saisie/bibliotheque/dao/ExportDao.php
New file
0,0 → 1,33
<?php
// declare(encoding='UTF-8');
/**
* Modèle d'accès à la base de données pour l'export
*
* @package ODS_saisie
* @category php 5.2
* @author Aurélien Peronnet <aurelien@tela-botanica.org>
* @copyright 2010 Tela-Botanica
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
* @version SVN: $Id: StationDao.php 154 2010-09-13 12:15:11Z aurelien $
*
*/
class ExportDao extends Dao {
const SERVICE_EXPORT = 'OdsExport';
const METHODE_EXPORT_EVENEMENTS = 'ExportObservationPlat';
 
/**
* Retourne l'ensemble des especes.
*
* @return array un tableau contenant les informations sur les evenement d'une espece.
*/
public function getExportObservations($id_espece) {
$url = $this->url_jrest.self::SERVICE_EXPORT.'/'.self::METHODE_EXPORT_EVENEMENTS.'/?utilisateur='.AppControleur::getIdUtilisateur();
$json = $this->envoyerRequeteConsultation($url);
$donnees = json_decode($json, true);
return $donnees;
}
}
/trunk/applications/saisie/bibliotheque/dao/StationDao.php
71,5 → 71,25
return false;
}
public function supprimerStation($id_station) {
 
$donnees['id_station'] = $id_station;
$donnees['id_participant'] = AppControleur::getIdUtilisateur();
if (is_numeric($id_station)) {
$url = $this->url_jrest.self::SERVICE_STATION."/".AppControleur::getIdUtilisateur()."/".$id_station;
$json = $this->envoyerRequeteSuppression($url, $donnees);
$donnees_retour = json_decode($json, true);
if($donnees_retour['reponse'] == 'OK') {
return true;
}
}
return false;
}
}
?>