Subversion Repositories Applications.bazar

Rev

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

Rev 228 Rev 269
Line 17... Line 17...
17
// |                                                                                                      |
17
// |                                                                                                      |
18
// | You should have received a copy of the GNU Lesser General Public                                     |
18
// | You should have received a copy of the GNU Lesser 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: bazar.class.php,v 1.6 2007-04-20 09:58:06 neiluj Exp $
22
// CVS : $Id: bazar.class.php,v 1.7 2007-07-04 09:59:09 alexandre_tb Exp $
23
/**
23
/**
24
* 
24
* 
25
*@package bazar
25
*@package bazar
26
//Auteur original :
26
//Auteur original :
27
*@author        Alexandre GRANIER <alexandre@tela-botanica.org>
27
*@author        Alexandre GRANIER <alexandre@tela-botanica.org>
28
*@author        Florian Schmitt <florian@ecole-et-nature.org>
28
*@author        Florian Schmitt <florian@ecole-et-nature.org>
29
*@copyright     Tela-Botanica 2000-2004
29
*@copyright     Tela-Botanica 2000-2004
30
*@version       $Revision: 1.6 $
30
*@version       $Revision: 1.7 $
31
// +------------------------------------------------------------------------------------------------------+
31
// +------------------------------------------------------------------------------------------------------+
32
*/
32
*/
Line 33... Line 33...
33
 
33
 
34
// +------------------------------------------------------------------------------------------------------+
34
// +------------------------------------------------------------------------------------------------------+
35
// |                             LES CONSTANTES DES NIVEAUX DE DROIT                                      |
35
// |                             LES CONSTANTES DES NIVEAUX DE DROIT                                      |
Line -... Line 36...
-
 
36
// +------------------------------------------------------------------------------------------------------+
-
 
37
 
-
 
38
define ('BAZ_DROIT_SUPER_ADMINISTRATEUR', 0);
Line 36... Line 39...
36
// +------------------------------------------------------------------------------------------------------+
39
define ('BAZ_DROIT_ADMINISTRATEUR', 2);
37
 
40
define ('BAZ_DROIT_REDACTEUR', 1);
38
 
41
 
Line -... Line 42...
-
 
42
// +------------------------------------------------------------------------------------------------------+
Line 39... Line 43...
39
// +------------------------------------------------------------------------------------------------------+
43
// |                                            ENTETE du PROGRAMME                                       |
Line 40... Line 44...
40
// |                                            ENTETE du PROGRAMME                                       |
44
// +------------------------------------------------------------------------------------------------------+
Line 181... Line 185...
181
		}
185
		}
182
		return $this->_isSuperAdmin;
186
		return $this->_isSuperAdmin;
183
	}
187
	}
Line 184... Line 188...
184
	
188
	
-
 
189
}
-
 
190
 
-
 
191
 
-
 
192
 
-
 
193
 
-
 
194
class bazar extends PEAR {
-
 
195
	
-
 
196
	/**
-
 
197
	 * 	getMailAdmin	Renvoie un tableau de mail des administrateurs du type 
-
 
198
	 * 					de fiche passe en parametre
-
 
199
	 * 
-
 
200
	 * 	@global DB Un objet DB de PEAR $GLOBALS['_BAZAR_']['db']
-
 
201
	 * 	@param integer L identifiant de la nature
-
 
202
	 */
-
 
203
	function getMailAdmin($id_nature) {
-
 
204
		$requete = 'select '.BAZ_CHAMPS_EMAIL.' from '.BAZ_ANNUAIRE.', bazar_droits ' .
-
 
205
				'where bd_id_nature_offre="'.$id_nature.'" and bd_niveau_droit="'.BAZ_DROIT_ADMINISTRATEUR.'"' .
-
 
206
						' and '.BAZ_CHAMPS_ID.'= bd_id_utilisateur';
-
 
207
		$resultat = $GLOBALS['_BAZAR_']['db']->query($requete);
-
 
208
		if (DB::isError($resultat)) $this->raiseError();
-
 
209
		$tableau_mail = array();
-
 
210
		if ($resultat->numRows() == 0) return false;
-
 
211
		while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
-
 
212
			array_push ($tableau_mail, $ligne[BAZ_CHAMPS_EMAIL]) ;
-
 
213
		}
-
 
214
		return $tableau_mail;
-
 
215
	}
-
 
216
}
185
}
217
 
186
/* +--Fin du code ----------------------------------------------------------------------------------------+
218
/* +--Fin du code ----------------------------------------------------------------------------------------+
187
*
219
*
-
 
220
* $Log: not supported by cvs2svn $
-
 
221
* Revision 1.6  2007/04/20 09:58:06  neiluj
-
 
222
* correction bug $this->_id_utilisateur
188
* $Log: not supported by cvs2svn $
223
*
189
* Revision 1.5  2007/04/11 08:30:12  neiluj
224
* Revision 1.5  2007/04/11 08:30:12  neiluj
190
* remise en état du CVS...
225
* remise en état du CVS...
191
*
226
*
192
* Revision 1.3.2.1  2007/03/07 16:49:21  jp_milcent
227
* Revision 1.3.2.1  2007/03/07 16:49:21  jp_milcent