16,7 → 16,7 |
// | License along with this library; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: participe.class.php,v 1.5 2007-10-10 13:56:23 alexandre_tb Exp $ |
// CVS : $Id: participe.class.php,v 1.6 2008-08-25 15:11:56 alexandre_tb Exp $ |
/** |
* Application projet |
* |
29,7 → 29,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.5 $ |
*@version $Revision: 1.6 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
98,6 → 98,12 |
} |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ORDERED)) { |
array_push ($tableau_resultat, $ligne) ; |
$id = $ligne[0]; |
$inscrits[$id]['nom'] = $ligne[1]; |
$inscrits[$id]['prenom'] = $ligne[2]; |
$inscrits[$id]['mail'] = $ligne[3]; |
$inscrits[$id]['date'] = $ligne[4]; |
$inscrits[$id]['id_statut'] = $ligne[5]; |
} |
$resultat->free() ; |
return $tableau_resultat ; |
169,12 → 175,13 |
*/ |
function getStatutSurProjetCourant( $id_utilisateur, $id_projet, &$dbObject ) |
{ |
|
if (participe::isAdministrateur($id_utilisateur, $dbObject)) return PROJET_DROIT_ADMINISTRATEUR; |
$requete = 'select psu_id_statut from projet_statut_utilisateurs'. |
' where psu_id_utilisateur="'.$id_utilisateur.'" and psu_id_projet ='.$id_projet ; |
$resultat = $dbObject->query ($requete) ; |
if (DB::isError ($resultat)) { |
echo ('Echec de la requete : '.$requete.'<br />'.$resultat->getMessage()) ; |
return; |
return DB::raiseError('Echec de la requete : '.$requete.'<br />'.$resultat->getMessage()) ; |
} |
$ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT) ; |
if (!$resultat->numRows()) { |
363,5 → 370,36 |
$resultat->free() ; |
return $tableau_resultat ; |
} // end of member function getCoordinateurs |
|
/** |
* Renvoie la constante de statut d un utilisateur |
* |
* define ('PROJET_DROIT_ADMINISTRATEUR', 1) ; |
* define ('PROJET_DROIT_COORDINATEUR', 2) ; |
* define ('PROJET_DROIT_PROPRIETAIRE', 4) ; |
* define ('PROJET_DROIT_CONTRIBUTEUR', 8) ; |
* define ('PROJET_DROIT_AUCUN', 16) ; |
* define ('PROJET_DROIT_EN_ATTENTE', 32); |
* |
* @access public |
* @return int La constante de statut |
*/ |
|
function getStatut($id_utilisateur, $id_projet) |
{ |
$statut = $this->getStatutSurProjetCourant($id_utilisateur, $id_projet, $this->_db); |
switch ($statut) |
{ |
case 0 : return PROJET_DROIT_ADMINISTRATEUR; |
break; |
case 1 : return PROJET_DROIT_COORDINATEUR; |
break; |
case 2 : return PROJET_DROIT_CONTRIBUTEUR; |
break; |
case 3 : return PROJET_DROIT_EN_ATTENTE; |
break; |
default : return PROJET_DROIT_AUCUN; |
} |
} |
} // end of participe |
?> |