Subversion Repositories eFlore/Applications.cel

Rev

Rev 1391 | Rev 2446 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1391 Rev 1765
Line 27... Line 27...
27
	 * @param string $uid[1] identifiant numérique de l'utilisateur
27
	 * @param string $uid[1] identifiant numérique de l'utilisateur
28
	 */
28
	 */
29
	function getElement($uid){
29
	function getElement($uid){
Line 30... Line 30...
30
 
30
 
31
        $requete_obs_liee_images = 'SELECT * FROM cel_obs'.
31
        $requete_obs_liee_images = 'SELECT * FROM cel_obs'.
32
        		' WHERE ce_utilisateur = '.$this->proteger($uid[1]).
32
        		' WHERE ce_utilisateur = '.Cel::db()->proteger($uid[1]).
33
        		' AND id_observation IN (SELECT id_observation
33
        		' AND id_observation IN (SELECT id_observation
34
								FROM cel_obs_images
34
								FROM cel_obs_images
35
								WHERE id_utilisateur = '.$this->proteger($uid[1]).' )'.
35
								WHERE id_utilisateur = '.Cel::db()->proteger($uid[1]).' )'.
36
				' AND transmission =  0'.
36
				' AND transmission =  0'.
Line 37... Line 37...
37
				' ORDER BY date_modification DESC LIMIT 0,5';
37
				' ORDER BY date_modification DESC LIMIT 0,5';
Line 38... Line 38...
38
 
38
 
Line 39... Line 39...
39
        $html = '<div id="resume_cel">';
39
        $html = '<div id="resume_cel">';
Line 40... Line 40...
40
        
40
        
41
        $obs_liees_images = array();
41
        $obs_liees_images = array();
42
        
42
        
Line 53... Line 53...
53
            $requete_img_liees = 'SELECT * FROM cel_images WHERE id_image '.
53
            $requete_img_liees = 'SELECT * FROM cel_images WHERE id_image '.
54
						   'IN (SELECT id_image FROM cel_obs_images '.
54
						   'IN (SELECT id_image FROM cel_obs_images '.
55
						   'WHERE id_observation = "'.$obs['id_observation'].'") '.
55
						   'WHERE id_observation = "'.$obs['id_observation'].'") '.
56
						   'AND ce_utilisateur = "'.$obs['ce_utilisateur'].'"' ;
56
						   'AND ce_utilisateur = "'.$obs['ce_utilisateur'].'"' ;
Line 57... Line 57...
57
 
57
 
Line 58... Line 58...
58
			$resultat_requete_img_liees = $this->requeter($requete_img_liees);
58
			$resultat_requete_img_liees = Cel::db()->requeter($requete_img_liees);
Line 59... Line 59...
59
 
59