Line 109... |
Line 109... |
109 |
$lien = sprintf($this->conteneur->getParametre('delFicheObsTpl'), $element['dob_id_observation']);
|
109 |
$lien = sprintf($this->conteneur->getParametre('delFicheObsTpl'), $element['dob_id_observation']);
|
110 |
return $lien;
|
110 |
return $lien;
|
111 |
}
|
111 |
}
|
Line 112... |
Line 112... |
112 |
|
112 |
|
- |
|
113 |
private function creerTitre($element) {
|
113 |
private function creerTitre($element) {
|
114 |
$intitule = ($element['nom_sel'] != '') ? 'Proposition' : 'Commentaire';
|
114 |
$titre = 'Observation '.$element['dob_id_observation'].' - '.htmlspecialchars($element['dob_nom_sel']).' à '.$element['dob_zone_geo'].' le '.$element['dob_date_observation'];
|
115 |
$titre = $intitule.' - Observation '.$element['dob_id_observation'].' - '.htmlspecialchars($element['dob_nom_sel']).' à '.$element['dob_zone_geo'].' le '.$element['dob_date_observation'];
|
115 |
return $titre;
|
116 |
return $titre;
|
Line 116... |
Line 117... |
116 |
}
|
117 |
}
|
117 |
|
118 |
|
Line 118... |
Line 119... |
118 |
private function creerDescription($donnees, $item) {
|
119 |
private function creerDescription($donnees, $item) {
|
119 |
$description = '<ul>';
|
120 |
$description = '<ul>';
|
120 |
|
121 |
|
- |
|
122 |
if($donnees['nom_sel'] != '') {
|
121 |
if($donnees['nom_sel'] != '') {
|
123 |
$description .= '<li>Proposition : <em>'.htmlspecialchars($donnees['nom_sel']).'</em></li>';
|
- |
|
124 |
}
|
122 |
$description = '<li>Proposition : '.htmlspecialchars($donnees['nom_sel']).'</li>';
|
125 |
if($donnees['texte'] != '') {
|
123 |
}
|
126 |
$description .= '<li>Commentaire : <pre>'.htmlspecialchars($donnees['texte']).'</pre></li>';
|
124 |
$description .= '<li>Commentaire : <pre>'.htmlspecialchars($donnees['texte']).'</pre></li>'.
|
127 |
}
|
125 |
'<li>Auteur : '.htmlspecialchars($this->creerAuteur($donnees)).'</li>'.
|
128 |
$description .= '<li>Auteur : '.htmlspecialchars($this->creerAuteur($donnees)).'</li>'.
|
Line 126... |
Line 129... |
126 |
'</ul>';
|
129 |
'</ul>';
|
127 |
return $description;
|
130 |
return $description;
|
128 |
}
|
131 |
}
|
Line 129... |
Line 132... |
129 |
|
132 |
|
130 |
private function creerAuteur($info) {
|
133 |
private function creerAuteur($info) {
|
131 |
return $info['utilisateur_prenom'].' '.$info['utilisateur_nom'];
|
134 |
return $info['utilisateur_prenom'].' '.$info['utilisateur_nom'];
|
132 |
}
|
135 |
}
|
133 |
|
136 |
|
134 |
private function getDerniersCommentaires() {
|
137 |
private function getDerniersCommentaires() {
|
- |
|
138 |
$requete = "SELECT DISTINCT dc.*, dob.id_observation as dob_id_observation, dob.ce_zone_geo as dob_ce_zone_geo, ".
|
135 |
$requete = "SELECT dc.*, dob.id_observation as dob_id_observation, dob.ce_zone_geo as dob_ce_zone_geo, ".
|
139 |
"dob.zone_geo as dob_zone_geo, dob.date_observation as dob_date_observation, dob.nom_sel as dob_nom_sel ".
|
136 |
"dob.zone_geo as dob_zone_geo, dob.date_observation as dob_date_observation, dob.nom_sel as dob_nom_sel ".
|
140 |
"FROM del_commentaire dc ".
|
137 |
"FROM del_commentaire dc ".
|
141 |
"INNER JOIN del_observation dob ".
|
- |
|
142 |
"ON dob.id_observation = dc.ce_observation ".
|
138 |
"INNER JOIN del_observation dob ".
|
143 |
"WHERE (dob.ce_utilisateur = dc.ce_utilisateur AND dob.nom_sel != dc.nom_sel) ".
|
139 |
"ON dob.id_observation = dc.ce_observation ".
|
144 |
" OR (dob.ce_utilisateur != dc.ce_utilisateur) ".
|
140 |
"AND dob.nom_sel != dc.nom_sel ".
|
145 |
"ORDER BY dc.date DESC ".
|
141 |
"ORDER BY dc.date DESC ".
|
146 |
"LIMIT 0,50 ";
|
142 |
"LIMIT 0,50 ";
|
147 |
|