19,7 → 19,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: bazar.class.php,v 1.6 2007-04-20 09:58:06 neiluj Exp $ |
// CVS : $Id: bazar.class.php,v 1.7 2007-07-04 09:59:09 alexandre_tb Exp $ |
/** |
* |
*@package bazar |
27,7 → 27,7 |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
*@author Florian Schmitt <florian@ecole-et-nature.org> |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.6 $ |
*@version $Revision: 1.7 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
35,11 → 35,15 |
// | LES CONSTANTES DES NIVEAUX DE DROIT | |
// +------------------------------------------------------------------------------------------------------+ |
|
define ('BAZ_DROIT_SUPER_ADMINISTRATEUR', 0); |
define ('BAZ_DROIT_ADMINISTRATEUR', 2); |
define ('BAZ_DROIT_REDACTEUR', 1); |
|
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
|
include_once PAP_CHEMIN_API_PEAR.'PEAR.php'; |
|
class Administrateur_bazar { |
|
183,9 → 187,40 |
} |
|
} |
|
|
|
|
class bazar extends PEAR { |
|
/** |
* getMailAdmin Renvoie un tableau de mail des administrateurs du type |
* de fiche passe en parametre |
* |
* @global DB Un objet DB de PEAR $GLOBALS['_BAZAR_']['db'] |
* @param integer L identifiant de la nature |
*/ |
function getMailAdmin($id_nature) { |
$requete = 'select '.BAZ_CHAMPS_EMAIL.' from '.BAZ_ANNUAIRE.', bazar_droits ' . |
'where bd_id_nature_offre="'.$id_nature.'" and bd_niveau_droit="'.BAZ_DROIT_ADMINISTRATEUR.'"' . |
' and '.BAZ_CHAMPS_ID.'= bd_id_utilisateur'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete); |
if (DB::isError($resultat)) $this->raiseError(); |
$tableau_mail = array(); |
if ($resultat->numRows() == 0) return false; |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
array_push ($tableau_mail, $ligne[BAZ_CHAMPS_EMAIL]) ; |
} |
return $tableau_mail; |
} |
} |
|
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.6 2007/04/20 09:58:06 neiluj |
* correction bug $this->_id_utilisateur |
* |
* Revision 1.5 2007/04/11 08:30:12 neiluj |
* remise en état du CVS... |
* |