| Line 39... |
Line 39... |
| 39 |
private $projet = null;
|
39 |
private $projet = null;
|
| 40 |
private $dept = null;
|
40 |
private $dept = null;
|
| 41 |
private $num_taxon = null;
|
41 |
private $num_taxon = null;
|
| 42 |
private $station = null;
|
42 |
private $station = null;
|
| 43 |
private $format = null;// Format des obs pour les stations (tableau/liste)
|
43 |
private $format = null;// Format des obs pour les stations (tableau/liste)
|
| - |
|
44 |
private $photos = null; // Seulement les obs avec photos ou bien toutes
|
| Line 44... |
Line 45... |
| 44 |
|
45 |
|
| 45 |
/**
|
46 |
/**
|
| 46 |
* Méthode appelée par défaut pour charger ce widget.
|
47 |
* Méthode appelée par défaut pour charger ce widget.
|
| 47 |
*/
|
48 |
*/
|
| Line 76... |
Line 77... |
| 76 |
$this->date = (isset($date) ? $date : '*');
|
77 |
$this->date = (isset($date) ? $date : '*');
|
| 77 |
$this->taxon = (isset($taxon) ? $taxon : '*');
|
78 |
$this->taxon = (isset($taxon) ? $taxon : '*');
|
| 78 |
$this->commentaire = (isset($commentaire) ? $commentaire : null);
|
79 |
$this->commentaire = (isset($commentaire) ? $commentaire : null);
|
| 79 |
$this->station = (isset($station) ? $station : null);
|
80 |
$this->station = (isset($station) ? $station : null);
|
| 80 |
$this->format = (isset($format) ? $format : null);
|
81 |
$this->format = (isset($format) ? $format : null);
|
| - |
|
82 |
$this->photos = (isset($photos) ? $photos : null);
|
| 81 |
$this->start = (isset($start) ? $start : null);
|
83 |
$this->start = (isset($start) ? $start : null);
|
| 82 |
$this->limit = (isset($limit) ? $limit : null);
|
84 |
$this->limit = (isset($limit) ? $limit : null);
|
| 83 |
}
|
85 |
}
|
| Line 84... |
Line 86... |
| 84 |
|
86 |
|
| Line 101... |
Line 103... |
| 101 |
$widget['donnees']['commune'] = $this->commune;
|
103 |
$widget['donnees']['commune'] = $this->commune;
|
| 102 |
$widget['donnees']['num_taxon'] = $this->num_taxon;
|
104 |
$widget['donnees']['num_taxon'] = $this->num_taxon;
|
| 103 |
$widget['donnees']['date'] = $this->date;
|
105 |
$widget['donnees']['date'] = $this->date;
|
| 104 |
$widget['donnees']['taxon'] = $this->taxon;
|
106 |
$widget['donnees']['taxon'] = $this->taxon;
|
| 105 |
$widget['donnees']['commentaire'] = $this->commentaire;
|
107 |
$widget['donnees']['commentaire'] = $this->commentaire;
|
| - |
|
108 |
$widget['donnees']['photos'] = $this->photos;
|
| 106 |
$widget['donnees']['url_limites_communales'] = $this->obtenirUrlsLimitesCommunales();
|
109 |
$widget['donnees']['url_limites_communales'] = $this->obtenirUrlsLimitesCommunales();
|
| Line 107... |
Line 110... |
| 107 |
|
110 |
|
| Line 108... |
Line 111... |
| 108 |
$widget['squelette'] = 'carte_defaut';
|
111 |
$widget['squelette'] = 'carte_defaut';
|
| Line 117... |
Line 120... |
| 117 |
$url .= "/$action";
|
120 |
$url .= "/$action";
|
| Line 118... |
Line 121... |
| 118 |
|
121 |
|
| 119 |
$parametres_retenus = array();
|
122 |
$parametres_retenus = array();
|
| 120 |
$parametres_a_tester = array('station', 'utilisateur', 'projet', 'tag', 'dept', 'commune',
|
123 |
$parametres_a_tester = array('station', 'utilisateur', 'projet', 'tag', 'dept', 'commune',
|
| 121 |
'num_taxon', 'taxon', 'date', 'commentaire',
|
124 |
'num_taxon', 'taxon', 'date', 'commentaire',
|
| 122 |
'start', 'limit');
|
125 |
'start', 'limit', 'photos');
|
| 123 |
foreach ($parametres_a_tester as $param) {
|
126 |
foreach ($parametres_a_tester as $param) {
|
| 124 |
if (isset($this->$param) && $this->$param != '*') {
|
127 |
if (isset($this->$param) && $this->$param != '*') {
|
| 125 |
$parametres_retenus[$param] = $this->$param;
|
128 |
$parametres_retenus[$param] = $this->$param;
|
| 126 |
}
|
129 |
}
|
| Line 137... |
Line 140... |
| 137 |
}
|
140 |
}
|
| Line 138... |
Line 141... |
| 138 |
|
141 |
|
| 139 |
private function obtenirUrlsLimitesCommunales() {
|
142 |
private function obtenirUrlsLimitesCommunales() {
|
| 140 |
$urls = null;
|
143 |
$urls = null;
|
| 141 |
if (isset($this->dept)) {
|
144 |
if (isset($this->dept)) {
|
| 142 |
// si on veut afficher les limites départemmentales on va compter et chercher les noms de fichiers
|
145 |
// si on veut afficher les limites départementales on va compter et chercher les noms de fichiers
|
| 143 |
$fichiersKml = $this->chercherFichierKml();
|
146 |
$fichiersKml = $this->chercherFichierKml();
|
| 144 |
if (count($fichiersKml) > 0) {
|
147 |
if (count($fichiersKml) > 0) {
|
| 145 |
foreach ($fichiersKml as $kml => $dossier){
|
148 |
foreach ($fichiersKml as $kml => $dossier){
|
| 146 |
$url_limites_communales = sprintf($this->config['carto']['limitesCommunaleUrlTpl'], $dossier, $kml);
|
149 |
$url_limites_communales = sprintf($this->config['carto']['limitesCommunaleUrlTpl'], $dossier, $kml);
|
| Line 190... |
Line 193... |
| 190 |
$widget['donnees']['url_base'] = sprintf($this->config['chemins']['baseURLAbsoluDyn'], '');
|
193 |
$widget['donnees']['url_base'] = sprintf($this->config['chemins']['baseURLAbsoluDyn'], '');
|
| 191 |
$widget['squelette'] = 'avertissement';
|
194 |
$widget['squelette'] = 'avertissement';
|
| Line 192... |
Line 195... |
| 192 |
|
195 |
|
| 193 |
return $widget;
|
196 |
return $widget;
|
| 194 |
}
|
- |
|
| 195 |
}
|
197 |
}
|
| - |
|
198 |
}
|
| - |
|
199 |
?>
|
| 196 |
|
200 |
|