1,38 → 1,32 |
<?php |
// ATTENTION ! Classe compatible uniquement avec nouveau format de bdd du cel // |
// declare(encoding='UTF-8'); |
/** |
* PHP Version 5 |
* Service recherche d'images publique a partir de divers critères. |
* |
* @category PHP |
* @package jrest |
* @author Aurélien Peronnet <aurelien@tela-botania.org> |
* @copyright 2010 Tela-Botanica |
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL |
* @version SVN: <svn_id> |
* @link /doc/jrest/ |
* @internal Mininum PHP version : 5.2 |
* @category CEL |
* @package Services |
* @subpackage Images |
* @version 0.1 |
* @author Mathias CHOUET <mathias@tela-botanica.org> |
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org> |
* @author Aurelien 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> |
* @copyright 1999-2014 Tela Botanica <accueil@tela-botanica.org> |
*/ |
|
/** |
* in : utf8 |
* out : utf8 |
* |
* Service recherche d'images publique a partir de divers critères |
* |
*/ |
class InventoryImageListPublic extends Cel { |
|
const start_defaut = 0; |
const limit_defaut = 100; |
|
const tri_defaut = 'ci.date_creation'; |
const dir_defaut = 'DESC'; |
|
function getRessource() { |
public function getRessource() { |
|
} |
|
function getElement($uid) |
{ |
public function getElement($uid) { |
// restriction aux observations publiques |
$criteres = array('transmission' => '1'); |
|
57,12 → 51,10 |
$criteres['dir'] = isset($_GET['dir']) ? $_GET['dir'] : self::dir_defaut; |
|
$chercheur_images = new RechercheImage($this->config); |
|
$total = $chercheur_images->compterImages(null, $criteres); |
$images = $chercheur_images->rechercherImages(null, $criteres, $this->start, $this->limit); |
|
$resultat = array('total' => $total,'images' => $images); |
|
$images_json = json_encode($resultat) ; |
$images_json = str_replace('\u0000','',$images_json); |
|
70,5 → 62,4 |
print $images_json ; |
exit() ; |
} |
} |
?> |
} |