| Line 14... |
Line 14... |
| 14 |
// | |
|
14 |
// | |
|
| 15 |
// | You should have received a copy of the GNU General Public |
|
15 |
// | You should have received a copy of the GNU General Public |
|
| 16 |
// | License along with this library; if not, write to the Free Software |
|
16 |
// | License along with this library; if not, write to the Free Software |
|
| 17 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
17 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
| 18 |
// +------------------------------------------------------------------------------------------------------+
|
18 |
// +------------------------------------------------------------------------------------------------------+
|
| 19 |
// CVS : $Id: participe.class.php,v 1.1 2005-09-22 14:02:47 ddelon Exp $
|
19 |
// CVS : $Id: participe.class.php,v 1.2 2005-09-27 16:42:00 alexandre_tb Exp $
|
| 20 |
/**
|
20 |
/**
|
| 21 |
* Application projet
|
21 |
* Application projet
|
| 22 |
*
|
22 |
*
|
| 23 |
* La classe partiicpe assure la jointure entre projet et Auth
|
23 |
* La classe partiicpe assure la jointure entre projet et Auth
|
| 24 |
* Elle se base sur la table projet_statut_utilisateur
|
24 |
* Elle se base sur la table projet_statut_utilisateur
|
| Line 27... |
Line 27... |
| 27 |
//Auteur original :
|
27 |
//Auteur original :
|
| 28 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
28 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
| 29 |
//Autres auteurs :
|
29 |
//Autres auteurs :
|
| 30 |
*@author Aucun
|
30 |
*@author Aucun
|
| 31 |
*@copyright Tela-Botanica 2000-2004
|
31 |
*@copyright Tela-Botanica 2000-2004
|
| 32 |
*@version $Revision: 1.1 $
|
32 |
*@version $Revision: 1.2 $
|
| 33 |
// +------------------------------------------------------------------------------------------------------+
|
33 |
// +------------------------------------------------------------------------------------------------------+
|
| 34 |
*/
|
34 |
*/
|
| Line 35... |
Line 35... |
| 35 |
|
35 |
|
| Line 191... |
Line 191... |
| 191 |
* @return bool
|
191 |
* @return bool
|
| 192 |
* @access public
|
192 |
* @access public
|
| 193 |
*/
|
193 |
*/
|
| 194 |
function isAdministrateur( $id_utilisateur, $objetDB = "" )
|
194 |
function isAdministrateur( $id_utilisateur, $objetDB = "" )
|
| 195 |
{
|
195 |
{
|
| 196 |
//$id_utilisateur=0;
|
- |
|
| 197 |
// La table projet_statut_utilisateurs possède une entré avec psu_id_projet = 0
|
196 |
// La table projet_statut_utilisateurs possède une entré avec psu_id_projet = 0
|
| 198 |
// pour indiquer un administrateur
|
197 |
// pour indiquer un administrateur
|
| 199 |
$requete = "select psu_id_statut from projet_statut_utilisateurs where psu_id_utilisateur=$id_utilisateur".
|
198 |
$requete = "select psu_id_statut from projet_statut_utilisateurs where psu_id_utilisateur=$id_utilisateur".
|
| 200 |
" and psu_id_projet=0" ;
|
199 |
" and psu_id_projet=0" ;
|
| 201 |
if ($objetDB != "") {
|
200 |
if ($objetDB != "") {
|
| 202 |
$resultat = $objetDB->query ($requete) ;
|
201 |
$resultat = $objetDB->query ($requete) ;
|
| 203 |
} else {
|
202 |
} else {
|
| 204 |
$resultat = $this->_db->query ($requete) ;
|
203 |
$resultat = $this->_db->query ($requete) ;
|
| 205 |
}
|
204 |
}
|
| 206 |
if (DB::isError ($resultat)) {
|
- |
|
| 207 |
die ('Echec de la requete : '.$requete.'<br />'.$resultat->getMessage()) ;
|
- |
|
| 208 |
}
|
- |
|
| 209 |
if ($resultat->numRows () != 0) {
|
205 |
if ($resultat->numRows () != 0) {
|
| 210 |
return true;
|
206 |
return true;
|
| 211 |
}
|
207 |
}
|
| 212 |
return false ;
|
208 |
return false ;
|
| 213 |
} // end of member function isAdministrateur
|
209 |
} // end of member function isAdministrateur
|