Subversion Repositories eFlore/Applications.cel

Rev

Rev 900 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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