27,6 → 27,7 |
private $parametres = array(); |
private $ressources = array(); |
private $date_defaut = '1900-01-01'; |
private $ordre_defaut = 'ASC'; |
private $idsObsImg = array(); |
private $infosObsImg = array(); |
|
57,6 → 58,10 |
$this->parametres['date'] = $this->date_defaut; |
} |
|
if (!isset($parametres['ordre']) || !in_array($parametres['ordre'], array('asc','ASC','desc','DESC'))) { |
$this->parametres['ordre'] = $this->ordre_defaut; |
} |
|
// Lancement du service |
$this->idsObsImg = $this->getIdsObsImg(); |
$infos = array(); |
86,6 → 91,7 |
$limite = @min(intval($this->parametres['navigation.limite']), 1000); |
$limite = $limite ? $limite : 10; // 0 => 10 |
$depart = intval(@$this->parametres['navigation.depart']); |
$ordre = $this->parametres['ordre']; |
|
$requete = |
'SELECT SQL_CALC_FOUND_ROWS p.id_observation, p.id_image, '. |
117,7 → 123,7 |
' OR MAX(iv.date) >= '.$date_debut.' '. |
' OR MAX(c.date) >= '.$date_debut.' '. |
' OR MAX(cv.date) >= '.$date_debut.' '. |
'ORDER BY modif_date DESC '. |
'ORDER BY modif_date ' . $ordre . ' '. |
'LIMIT '.$depart.', '.$limite. |
' -- '.__FILE__.':'.__LINE__; |
//echo $requete; exit; |