| 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.3 2006-03-29 13:05:12 alexandre_tb Exp $
|
22 |
// CVS : $Id: bazar.class.php,v 1.4 2007-03-08 15:12:13 jp_milcent 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.3 $
|
30 |
*@version $Revision: 1.4 $
|
| 31 |
// +------------------------------------------------------------------------------------------------------+
|
31 |
// +------------------------------------------------------------------------------------------------------+
|
| 32 |
*/
|
32 |
*/
|
| Line 33... |
Line 33... |
| 33 |
|
33 |
|
| 34 |
// +------------------------------------------------------------------------------------------------------+
|
34 |
// +------------------------------------------------------------------------------------------------------+
|
| Line 77... |
Line 77... |
| 77 |
|
77 |
|
| 78 |
// On court-circuite si l'utilisateur n'est pas loggué
|
78 |
// On court-circuite si l'utilisateur n'est pas loggué
|
| Line 79... |
Line 79... |
| 79 |
if (!$this->_auth->getAuth()) return false ;
|
79 |
if (!$this->_auth->getAuth()) return false ;
|
| 80 |
|
80 |
|
| 81 |
// Sinon on interroge la base
|
81 |
// Sinon on interroge la base
|
| 82 |
$requete = 'select bd_niveau_droit FROM bazar_droits WHERE bd_id_utilisateur='.
|
82 |
$requete = 'SELECT bd_niveau_droit FROM bazar_droits WHERE bd_id_utilisateur='.
|
| Line 83... |
Line 83... |
| 83 |
$this->_id_utilisateur.
|
83 |
$this->_id_utilisateur.
|
| 84 |
' AND bd_niveau_droit=0';
|
84 |
' AND bd_niveau_droit=0';
|
| Line 119... |
Line 119... |
| 119 |
/** _requeteDroit() - fait une requete sur la table bazar_droit
|
119 |
/** _requeteDroit() - fait une requete sur la table bazar_droit
|
| 120 |
*
|
120 |
*
|
| 121 |
*/
|
121 |
*/
|
| Line 122... |
Line 122... |
| 122 |
|
122 |
|
| 123 |
function _requeteDroit ($id_nature, $niveau) {
|
123 |
function _requeteDroit ($id_nature, $niveau) {
|
| 124 |
$requete = 'select bd_niveau_droit FROM bazar_droits WHERE bd_id_utilisateur='
|
124 |
$requete = 'SELECT bd_niveau_droit FROM bazar_droits WHERE bd_id_utilisateur='
|
| 125 |
.$this->_id_utilisateur.
|
125 |
.$this->_id_utilisateur.
|
| Line 126... |
Line 126... |
| 126 |
' AND bd_id_nature_offre="'.$id_nature.'" and bd_niveau_droit='.$niveau;
|
126 |
' AND bd_id_nature_offre="'.$id_nature.'" and bd_niveau_droit='.$niveau;
|
| 127 |
|
127 |
|
| Line 152... |
Line 152... |
| 152 |
function isSuperAdmin() {
|
152 |
function isSuperAdmin() {
|
| 153 |
// On court-circuite si la question a déjà été posé pour ne pas refaire la requete
|
153 |
// On court-circuite si la question a déjà été posé pour ne pas refaire la requete
|
| 154 |
if (isset ($this->_isSuperAdmin)) return $this->_isSuperAdmin ;
|
154 |
if (isset ($this->_isSuperAdmin)) return $this->_isSuperAdmin ;
|
| Line 155... |
Line 155... |
| 155 |
|
155 |
|
| 156 |
// Sinon on interroge la base
|
156 |
// Sinon on interroge la base
|
| 157 |
$requete = 'select bd_niveau_droit FROM bazar_droits WHERE bd_id_utilisateur='.
|
157 |
$requete = 'SELECT bd_niveau_droit FROM bazar_droits WHERE bd_id_utilisateur='.
|
| 158 |
$this->_id_utilisateur.
|
158 |
$this->_id_utilisateur.
|
| Line 159... |
Line 159... |
| 159 |
' AND bd_niveau_droit=0';
|
159 |
' AND bd_niveau_droit=0';
|
| 160 |
|
160 |
|
| Line 172... |
Line 172... |
| 172 |
|
172 |
|
| 173 |
}
|
173 |
}
|
| 174 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
174 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
| 175 |
*
|
175 |
*
|
| - |
|
176 |
* $Log: not supported by cvs2svn $
|
| - |
|
177 |
* Revision 1.3.2.1 2007/03/07 16:49:21 jp_milcent
|
| - |
|
178 |
* Mise en majuscule de select
|
| - |
|
179 |
*
|
| - |
|
180 |
* Revision 1.3 2006/03/29 13:05:12 alexandre_tb
|
| - |
|
181 |
* ajout de la classe Administrateur_bazar
|
| 176 |
* $Log: not supported by cvs2svn $
|
182 |
*
|
| 177 |
* Revision 1.2 2006/02/09 11:06:12 alexandre_tb
|
183 |
* Revision 1.2 2006/02/09 11:06:12 alexandre_tb
|
| 178 |
* changement dans les id des droit
|
184 |
* changement dans les id des droit
|
| 179 |
* 0 => super administrateur
|
185 |
* 0 => super administrateur
|
| 180 |
* 1 => redacteur
|
186 |
* 1 => redacteur
|