Line 181... |
Line 181... |
181 |
$guid = sprintf($this->conteneur->getParametre('voteParProtocole'), $element['id_vote']);
|
181 |
$guid = sprintf($this->conteneur->getParametre('voteParProtocole'), $element['id_vote']);
|
182 |
return $guid;
|
182 |
return $guid;
|
183 |
}
|
183 |
}
|
Line 184... |
Line 184... |
184 |
|
184 |
|
185 |
private function creerLienItem($element) {
|
185 |
private function creerLienItem($element) {
|
186 |
$lien = sprintf($this->conteneur->getParametre('pictofloraFicheObsTpl'), $element['del_obs']);
|
186 |
$lien = sprintf($this->conteneur->getParametre('pictofloraFicheObsTpl'), $element['id_observation']);
|
187 |
return $lien;
|
187 |
return $lien;
|
Line 188... |
Line 188... |
188 |
}
|
188 |
}
|
189 |
|
189 |
|
190 |
private function creerTitre($element) {
|
190 |
private function creerTitre($element) {
|
191 |
$noteVote = $element['valeur'];
|
191 |
$noteVote = $element['valeur'];
|
192 |
$nomSci = htmlspecialchars($element['nom_sel']);
|
192 |
$nomSci = htmlspecialchars($element['nom_sel']);
|
193 |
$utilisateur = array('prenom' => $element['utilisateur_prenom'], 'nom' => $element['utilisateur_nom']);
|
- |
|
194 |
$utilisateurTxt = htmlspecialchars($this->creerAuteur($utilisateur));
|
193 |
$votant = array('prenom' => $element['votant_prenom'], 'nom' => $element['votant_nom']);
|
195 |
$utilisateurTxt = empty($utilisateurTxt) ? 'Anonyme' : $utilisateurTxt;
|
194 |
$votantTxt = htmlspecialchars($this->creerAuteur($votant));
|
Line 196... |
Line 195... |
196 |
$observateur = array('prenom' => $element['observateur_prenom'], 'nom' => $element['observateur_nom']);
|
195 |
$observateur = array('prenom' => $element['observateur_prenom'], 'nom' => $element['observateur_nom']);
|
197 |
$observateurTxt = htmlspecialchars($this->creerAuteur($observateur));
|
196 |
$observateurTxt = htmlspecialchars($this->creerAuteur($observateur));
|
198 |
|
197 |
|
Line 199... |
Line 198... |
199 |
$titre = "Vote $noteVote - $observateurTxt ($nomSci), par $utilisateurTxt";
|
198 |
$titre = "Vote $noteVote par $votantTxt pour $nomSci de $observateurTxt";
|
- |
|
199 |
return $titre;
|
- |
|
200 |
}
|
200 |
return $titre;
|
201 |
|
201 |
}
|
202 |
private function creerDescription($donnees, $item) {
|
202 |
|
203 |
$idVote = htmlspecialchars($donnees['id_vote']);
|
203 |
private function creerDescription($donnees, $item) {
|
204 |
$idObs = htmlspecialchars($donnees['id_observation']);
|
204 |
$idImg = htmlspecialchars($donnees['ce_image']);
|
205 |
$idImg = htmlspecialchars($donnees['ce_image']);
|
Line 210... |
Line 211... |
210 |
$votantTxt = htmlspecialchars($this->creerAuteur($votant));
|
211 |
$votantTxt = htmlspecialchars($this->creerAuteur($votant));
|
211 |
$observateur = array('prenom' => $donnees['observateur_prenom'], 'nom' => $donnees['observateur_nom']);
|
212 |
$observateur = array('prenom' => $donnees['observateur_prenom'], 'nom' => $donnees['observateur_nom']);
|
212 |
$observateurTxt = htmlspecialchars($this->creerAuteur($observateur));
|
213 |
$observateurTxt = htmlspecialchars($this->creerAuteur($observateur));
|
Line 213... |
Line 214... |
213 |
|
214 |
|
- |
|
215 |
$description = '<ul>'.
|
214 |
$description = '<ul>'.
|
216 |
"<li>Vote pictoFlora #$idVote</li>".
|
215 |
'<li>'.
|
217 |
'<li>'.
|
216 |
' <a href="'.$urlImg.'">'.
|
218 |
' <a href="'.$urlImg.'">'.
|
217 |
' <img src="'.$miniatureUrl.'" alt="Img #'.$idImg.'"/>'.
|
219 |
' <img src="'.$miniatureUrl.'" alt="Img #'.$idImg.'"/>'.
|
218 |
' Image #'.$idImg.
|
220 |
' Image #'.$idImg.
|
219 |
' </a>'.
|
221 |
' </a>'.
|
220 |
'</li>'.
|
222 |
'</li>'.
|
221 |
"<li>Auteur de l'image : $observateurTxt</li>".
|
223 |
"<li>Auteur de l'image : $observateurTxt</li>".
|
222 |
"<li>Proposition : <em>$proposition</em></li>".
|
224 |
"<li>Observation #$idObs : <em>$proposition</em></li>".
|
223 |
"<li>Protocole : $protocole</li>".
|
225 |
"<li>Protocole : $protocole</li>".
|
224 |
'<li>Valeur : <strong>'.$donnees['valeur'].'</strong>/5</li>'.
|
226 |
'<li>Valeur : <strong>'.$donnees['valeur'].'</strong>/5</li>'.
|
225 |
'<li>Votant : '.$votantTxt.'</li>'.
|
227 |
'<li>Votant : '.$votantTxt.'</li>'.
|
226 |
'</ul>';
|
228 |
'</ul>';
|
Line 247... |
Line 249... |
247 |
* */
|
249 |
* */
|
248 |
private function getDerniersVotesImage() {
|
250 |
private function getDerniersVotesImage() {
|
249 |
$requete = 'SELECT DISTINCT id_vote, ce_image, valeur, divo.date AS date_vote, '.
|
251 |
$requete = 'SELECT DISTINCT id_vote, ce_image, valeur, divo.date AS date_vote, '.
|
250 |
' duo.prenom AS observateur_prenom, duo.nom AS observateur_nom, '.
|
252 |
' duo.prenom AS observateur_prenom, duo.nom AS observateur_nom, '.
|
251 |
' duv.prenom AS votant_prenom, duv.nom AS votant_nom, '.
|
253 |
' duv.prenom AS votant_prenom, duv.nom AS votant_nom, '.
|
252 |
' do.id_observation AS del_obs, do.nom_sel, dip.intitule '.
|
254 |
' do.id_observation, do.nom_sel, dip.intitule '.
|
253 |
'FROM del_image_vote AS divo '.
|
255 |
'FROM del_image_vote AS divo '.
|
254 |
' INNER JOIN del_obs_image AS doi '.
|
256 |
' INNER JOIN del_obs_image AS doi '.
|
255 |
' ON divo.ce_image = doi.id_image '.
|
257 |
' ON divo.ce_image = doi.id_image '.
|
256 |
' INNER JOIN del_observation AS do '.
|
258 |
' INNER JOIN del_observation AS do '.
|
257 |
' ON do.id_observation = doi.id_observation '.
|
259 |
' ON do.id_observation = doi.id_observation '.
|
258 |
' INNER JOIN del_image_protocole AS dip '.
|
260 |
' INNER JOIN del_image_protocole AS dip '.
|
259 |
' ON ce_protocole = id_protocole '.
|
261 |
' ON ce_protocole = id_protocole '.
|
260 |
' LEFT JOIN del_utilisateur AS duo '.
|
262 |
' LEFT JOIN del_utilisateur AS duo '.
|
261 |
' ON do.ce_utilisateur = duo.id_utilisateur '.
|
263 |
' ON do.ce_utilisateur = duo.id_utilisateur '.
|
262 |
' LEFT JOIN del_utilisateur AS duv '.
|
264 |
' LEFT JOIN del_utilisateur AS duv '.
|
263 |
' ON divo.ce_utilisateur = duv.id_utilisateur '.
|
265 |
' ON CAST(divo.ce_utilisateur AS UNSIGNED) = duv.id_utilisateur '.
|
264 |
$this->chargerClauseWhere().' '.
|
266 |
$this->chargerClauseWhere().' '.
|
265 |
'ORDER BY divo.date DESC '.
|
267 |
'ORDER BY divo.date DESC '.
|
266 |
'LIMIT '.$this->navigation->getDepart().','.$this->navigation->getLimite();
|
268 |
'LIMIT '.$this->navigation->getDepart().','.$this->navigation->getLimite();
|
Line 267... |
Line 269... |
267 |
|
269 |
|