Subversion Repositories Applications.projet

Rev

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

Rev 249 Rev 262
Line 17... Line 17...
17
// |                                                                                                      |
17
// |                                                                                                      |
18
// | You should have received a copy of the GNU General Public                                            |
18
// | You should have received a copy of the GNU General Public                                            |
19
// | License along with this library; if not, write to the Free Software                                  |
19
// | License along with this library; if not, write to the Free Software                                  |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
21
// +------------------------------------------------------------------------------------------------------+
21
// +------------------------------------------------------------------------------------------------------+
22
// CVS : $Id: telechargement.php,v 1.2 2007-06-25 12:15:06 alexandre_tb Exp $
22
// CVS : $Id: telechargement.php,v 1.3 2007-10-10 13:58:04 alexandre_tb Exp $
23
/**
23
/**
24
* Application projet
24
* Application projet
25
*
25
*
26
* Service de telechargement recoie un id de document et renvoie le document
26
* Service de telechargement recoie un id de document et renvoie le document
27
*
27
*
Line 29... Line 29...
29
//Auteur original :
29
//Auteur original :
30
*@author        Alexandre Granier <alexandre@tela-botanica.org>
30
*@author        Alexandre Granier <alexandre@tela-botanica.org>
31
//Autres auteurs :
31
//Autres auteurs :
32
*@author        Aucun
32
*@author        Aucun
33
*@copyright     Tela-Botanica 2000-2004
33
*@copyright     Tela-Botanica 2000-2004
34
*@version       $Revision: 1.2 $
34
*@version       $Revision: 1.3 $
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
36
*/
36
*/
Line 37... Line 37...
37
 
37
 
38
// +------------------------------------------------------------------------------------------------------+
38
// +------------------------------------------------------------------------------------------------------+
Line 65... Line 65...
65
	// On teste le login
65
	// On teste le login
66
	if ($GLOBALS['projet_auth']->getAuth()) {
66
	if ($GLOBALS['projet_auth']->getAuth()) {
67
		include_once PROJET_CHEMIN_CLASSES.'participe.class.php' ;
67
		include_once PROJET_CHEMIN_CLASSES.'participe.class.php' ;
68
		$id_utilisateur = $GLOBALS['projet_auth']->getAuthData(PROJET_CHAMPS_ID);
68
		$id_utilisateur = $GLOBALS['projet_auth']->getAuthData(PROJET_CHAMPS_ID);
69
		$participant = new participe($GLOBALS['projet_db']) ;
69
		$participant = new participe($GLOBALS['projet_db']) ;
70
		if ($participant->isAdministrateur($id_utilisateur) || $participant->isCoordinateur($id_utilisateur) 
70
		if ($participant->isAdministrateur($id_utilisateur) || $participant->isCoordinateur($id_utilisateur, $document->_id_projet) 
71
								|| $participant->isContributeur($id_utilisateur)) {
71
								|| $participant->isContributeur($id_utilisateur, $document->_id_projet)) {
72
		    $ok = true ;
72
		    $ok = true ;
73
		} else {
73
		} else {
74
		    $ok = false ;
74
		    $ok = false ;
-
 
75
		    return '<h1>'.$projet->getTitre($document->_id_projet).'</h1>'.
75
		    return 'Vous devez participer &agrave; ce projet pour acc&eacuteder &agrave; ce document';
76
		    		'<p class="information">Vous devez participer &agrave; ce projet pour acc&eacute;der &agrave; ce document</p>';
76
		}
77
		}
-
 
78
	} else {
-
 
79
		return '<h1>'.$projet->getTitre($document->_id_projet).'</h1>'.
-
 
80
				'<p class="information">Vous devez participer &agrave; ce projet pour acc&eacute;der &agrave; ce document</p>';
77
	}	
81
	}
78
} else {
82
} else {
79
	$ok = true ;
83
	$ok = true ;
80
}
84
}
Line 81... Line 85...
81
 
85