Line 158... |
Line 158... |
158 |
return $lien;
|
158 |
return $lien;
|
159 |
}
|
159 |
}
|
Line 160... |
Line 160... |
160 |
|
160 |
|
161 |
private function creerTitre($element) {
|
161 |
private function creerTitre($element) {
|
- |
|
162 |
$intitule = ($element['nom_sel'] != '') ? 'Proposition' : 'Commentaire';
|
- |
|
163 |
$idObs = $element['dob_id_observation'];
|
162 |
$intitule = ($element['nom_sel'] != '') ? 'Proposition' : 'Commentaire';
|
164 |
$nomSel = htmlspecialchars($element['dob_nom_sel']);
|
- |
|
165 |
$zoneGeo = htmlspecialchars((($element['dob_zone_geo'] != '') ? $element['dob_zone_geo'] : '?'));
|
- |
|
166 |
$dateObs = htmlspecialchars(strftime('%d %B %Y', strtotime($element['dob_date_observation'])));
|
- |
|
167 |
|
163 |
$titre = $intitule.' - Observation '.$element['dob_id_observation'].' - '.htmlspecialchars($element['dob_nom_sel']).' à '.$element['dob_zone_geo'].' le '.$element['dob_date_observation'];
|
168 |
$titre = "$intitule - Observation $idObs - $nomSel à $zoneGeo le $dateObs";
|
164 |
return $titre;
|
169 |
return $titre;
|
Line 165... |
Line 170... |
165 |
}
|
170 |
}
|
- |
|
171 |
|
166 |
|
172 |
private function creerDescription($donnees, $item) {
|
167 |
private function creerDescription($donnees, $item) {
|
173 |
$idCommentaire = $donnees['id_commentaire'];
|
168 |
$nomSel = ($donnees['nom_sel'] != '') ? htmlspecialchars($donnees['nom_sel']) : '';
|
174 |
$nomSel = ($donnees['nom_sel'] != '') ? htmlspecialchars($donnees['nom_sel']) : '';
|
169 |
$txt = ($donnees['texte'] != '') ? htmlspecialchars($donnees['texte']) : '';
|
175 |
$txt = ($donnees['texte'] != '') ? htmlspecialchars($donnees['texte']) : '';
|
170 |
$etreProposition = ($nomSel != '') ? true : false;
|
176 |
$etreProposition = ($nomSel != '') ? true : false;
|
Line 171... |
Line 177... |
171 |
$auteur = htmlspecialchars($this->creerAuteur($donnees)).
|
177 |
$auteur = htmlspecialchars($this->creerAuteur($donnees)).
|
172 |
($this->fluxAdminDemande() ? ' ('.$donnees['utilisateur_courriel'].')' : '');
|
178 |
($this->fluxAdminDemande() ? ' ('.$donnees['utilisateur_courriel'].')' : '');
|
173 |
|
179 |
|
174 |
$contenu = '';
|
180 |
$contenu = '';
|
175 |
if ($etreProposition) {
|
181 |
if ($etreProposition) {
|
176 |
$contenu = "<li>Proposition : <em>$nomSel</em></li>".
|
182 |
$contenu = "<li>Proposition #$idCommentaire : <em>$nomSel</em></li>".
|
177 |
((!empty($txt)) ? "<li>Argumentaire : $txt</li>" : '');
|
183 |
((!empty($txt)) ? "<li>Argumentaire : $txt</li>" : '');
|
178 |
"<li>Auteur de la proposition : $auteur</li>";
|
184 |
"<li>Auteur de la proposition : $auteur</li>";
|
179 |
} else {
|
185 |
} else {
|
180 |
$contenu = "<li>Commentaire : <pre>$txt</pre></li>".
|
186 |
$contenu = "<li>Commentaire #$idCommentaire : <pre>$txt</pre></li>".
|
181 |
"<li>Auteur du commentaire : $auteur</li>";
|
187 |
"<li>Auteur du commentaire : $auteur</li>";
|
182 |
}
|
188 |
}
|