| 416 |
aurelien |
1 |
<?php
|
| 863 |
aurelien |
2 |
// ATTENTION ! Classe compatible uniquement avec nouveau format de bdd du cel //
|
| 416 |
aurelien |
3 |
|
| 863 |
aurelien |
4 |
/**
|
|
|
5 |
* PHP Version 5
|
|
|
6 |
*
|
|
|
7 |
* @category PHP
|
|
|
8 |
* @package papyrus_bp
|
|
|
9 |
* @author aurelien <aurelien@tela-botanica.org>
|
|
|
10 |
* @copyright 2010 Tela-Botanica
|
|
|
11 |
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
|
|
|
12 |
* @version SVN: <svn_id>
|
|
|
13 |
* @link /doc/
|
|
|
14 |
*/
|
| 416 |
aurelien |
15 |
|
| 863 |
aurelien |
16 |
/**
|
| 900 |
aurelien |
17 |
* Classe renvoyant fragment html constitué à partir d'une liste très succinte des contributions de l'utilisateur
|
| 863 |
aurelien |
18 |
*
|
|
|
19 |
*/
|
|
|
20 |
class InventoryContributionList extends Cel {
|
| 416 |
aurelien |
21 |
|
|
|
22 |
function getRessource() {
|
|
|
23 |
echo '';
|
|
|
24 |
}
|
|
|
25 |
|
|
|
26 |
function getElement($uid){
|
|
|
27 |
|
|
|
28 |
if(!isset($uid[0])) {
|
|
|
29 |
echo '';
|
|
|
30 |
}
|
|
|
31 |
|
| 863 |
aurelien |
32 |
$requete_contributions = "SELECT * FROM cel_obs ".
|
| 1765 |
raphael |
33 |
"WHERE ce_utilisateur = ".Cel::db()->proteger($uid[0])." ".
|
| 416 |
aurelien |
34 |
"ORDER BY date_modification DESC LIMIT 0,5";
|
|
|
35 |
|
| 1765 |
raphael |
36 |
$resultat_contributions = Cel::db()->requeter($requete_contributions);
|
| 863 |
aurelien |
37 |
|
|
|
38 |
$resume = '';
|
| 416 |
aurelien |
39 |
|
| 863 |
aurelien |
40 |
if (is_array($resultat_contributions)) {
|
| 416 |
aurelien |
41 |
|
| 863 |
aurelien |
42 |
foreach ($resultat_contributions as $ligne) {
|
|
|
43 |
$ligne['nom_sel'] = htmlspecialchars($ligne['nom_sel']);
|
|
|
44 |
$ligne['ce_utilisateur'] = htmlspecialchars($ligne['ce_utilisateur']);
|
| 900 |
aurelien |
45 |
$ligne['zone_geo'] = htmlspecialchars($ligne['zone_geo']);
|
|
|
46 |
$ligne['id_zone_geo'] = htmlspecialchars($this->convertirCodeZoneGeoVersDepartement($ligne['ce_zone_geo']));
|
| 863 |
aurelien |
47 |
$ligne['station'] = htmlspecialchars($ligne['station']);
|
|
|
48 |
$ligne['milieu'] = htmlspecialchars($ligne['milieu']);
|
|
|
49 |
$ligne['commentaire'] = htmlspecialchars($ligne['commentaire']);
|
|
|
50 |
$ligne['transmission'] = htmlspecialchars($ligne['transmission']);
|
|
|
51 |
|
|
|
52 |
$resume.= '<p>'.$ligne['nom_sel'] ." (".$ligne['nom_sel_nn'].") ".
|
| 900 |
aurelien |
53 |
'Location : '. $ligne['zone_geo']." (".$ligne['id_zone_geo']."),". $ligne['station'] . "," .
|
| 863 |
aurelien |
54 |
$ligne['milieu'] . "," . $ligne['commentaire'] . "," . $ligne['transmission'] .
|
|
|
55 |
'</p>';
|
|
|
56 |
}
|
| 416 |
aurelien |
57 |
}
|
|
|
58 |
|
|
|
59 |
header("Content-Type: text/html; charset=ISO-8859-1");
|
|
|
60 |
print $resume;
|
|
|
61 |
exit;
|
|
|
62 |
}
|
|
|
63 |
}
|
|
|
64 |
/* +--Fin du code ---------------------------------------------------------------------------------------+
|
|
|
65 |
* $Log$
|
|
|
66 |
* Revision 1.5 2008-11-13 11:29:12 ddelon
|
|
|
67 |
* Reecriture gwt-ext
|
|
|
68 |
*
|
|
|
69 |
* Revision 1.4 2007-06-06 13:31:16 ddelon
|
|
|
70 |
* v0.09
|
|
|
71 |
*
|
|
|
72 |
* Revision 1.3 2007-05-22 12:54:09 ddelon
|
|
|
73 |
* Securisation acces utilisateur
|
|
|
74 |
*
|
|
|
75 |
*/
|
|
|
76 |
?>
|