| Line 30... |
Line 30... |
| 30 |
*
|
30 |
*
|
| 31 |
* Si <Utilisateur> est fourni, le observations seront le résultat de l'intersection des 2 contraintes
|
31 |
* Si <Utilisateur> est fourni, le observations seront le résultat de l'intersection des 2 contraintes
|
| 32 |
*
|
32 |
*
|
| 33 |
*/
|
33 |
*/
|
| 34 |
set_include_path(get_include_path() . PATH_SEPARATOR . dirname(dirname(realpath(__FILE__))) . '/lib');
|
34 |
set_include_path(get_include_path() . PATH_SEPARATOR . dirname(dirname(realpath(__FILE__))) . '/lib');
|
| - |
|
35 |
// TERM
|
| - |
|
36 |
ini_set('html_errors', 0);
|
| - |
|
37 |
ini_set('xdebug.cli_color', 2);
|
| - |
|
38 |
require_once('lib/PHPExcel/Classes/PHPExcel.php');
|
| Line 35... |
Line 39... |
| 35 |
|
39 |
|
| 36 |
// si getNomCommun_v2 ou getNomCommun_v3 sont utilisés
|
40 |
// si getNomCommun_v2 ou getNomCommun_v3 sont utilisés
|
| 37 |
/*require_once('/home/raphael/eflore/framework/framework/Framework.php');
|
41 |
/*require_once('/home/raphael/eflore/framework/framework/Framework.php');
|
| 38 |
Framework::setCheminAppli("/home/raphael/eflore/projets/services/index.php");
|
42 |
Framework::setCheminAppli("/home/raphael/eflore/projets/services/index.php");
|
| Line 99... |
Line 103... |
| 99 |
}
|
103 |
}
|
| Line 100... |
Line 104... |
| 100 |
|
104 |
|
| 101 |
$criteres['debut'] = isset($_GET['debut']) ? intval($_GET['debut']) : 0;
|
105 |
$criteres['debut'] = isset($_GET['debut']) ? intval($_GET['debut']) : 0;
|
| 102 |
$criteres['limite'] = isset($_GET['limite']) ? intval($_GET['limite']) : 0;
|
106 |
$criteres['limite'] = isset($_GET['limite']) ? intval($_GET['limite']) : 0;
|
| 103 |
$observations = $chercheur_observations
|
107 |
$observations = $chercheur_observations
|
| 104 |
->rechercherObservations($params['uid'], $criteres, $criteres['debut'], $criteres['limite'])
|
108 |
->rechercherObservations($params['uid'], $criteres, $criteres['debut'], $criteres['limite'], TRUE)
|
| Line 105... |
Line 109... |
| 105 |
->get();
|
109 |
->get();
|
| 106 |
|
110 |
|
| 107 |
// debug //echo ($chercheur_observations->requete_selection_observations);
|
111 |
// debug //echo ($chercheur_observations->requete_selection_observations);
|
| Line 192... |
Line 196... |
| 192 |
$inSets = explode(',', $in);
|
196 |
$inSets = explode(',', $in);
|
| 193 |
$outSets = array();
|
197 |
$outSets = array();
|
| Line 194... |
Line 198... |
| 194 |
|
198 |
|
| 195 |
foreach($inSets as $inSet) {
|
199 |
foreach($inSets as $inSet) {
|
| - |
|
200 |
list($start,$end) = explode('-', $inSet . '-' . $inSet);
|
| - |
|
201 |
// ignore les ranges trop importants
|
| 196 |
list($start,$end) = explode('-', $inSet . '-' . $inSet);
|
202 |
if($start > 10000000 || $end > 10000000 || abs($start-$end) > 10000) continue;
|
| 197 |
$outSets = array_merge($outSets,range($start,$end));
|
203 |
$outSets = array_merge($outSets,range($start,$end));
|
| 198 |
}
|
204 |
}
|
| 199 |
$outSets = array_unique($outSets);
|
205 |
$outSets = array_unique($outSets);
|
| 200 |
$outSets = array_filter($outSets, 'is_numeric');
|
206 |
$outSets = array_filter($outSets, 'is_numeric');
|