| 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.8 2007-10-01 10:35:14 alexandre_tb Exp $
|
22 |
// CVS : $Id: bazar.class.php,v 1.9 2007-10-10 13:27:06 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.8 $
|
30 |
*@version $Revision: 1.9 $
|
| 31 |
// +------------------------------------------------------------------------------------------------------+
|
31 |
// +------------------------------------------------------------------------------------------------------+
|
| 32 |
*/
|
32 |
*/
|
| Line 33... |
Line 33... |
| 33 |
|
33 |
|
| 34 |
// +------------------------------------------------------------------------------------------------------+
|
34 |
// +------------------------------------------------------------------------------------------------------+
|
| Line 91... |
Line 91... |
| 91 |
$this->_id_utilisateur.
|
91 |
$this->_id_utilisateur.
|
| 92 |
' AND bd_niveau_droit=0';
|
92 |
' AND bd_niveau_droit=0';
|
| Line 93... |
Line 93... |
| 93 |
|
93 |
|
| 94 |
$resultat = $GLOBALS['_BAZAR_']['db']->query ($requete) ;
|
94 |
$resultat = $GLOBALS['_BAZAR_']['db']->query ($requete) ;
|
| 95 |
if (DB::isError($resultat)) {
|
95 |
if (DB::isError($resultat)) {
|
| 96 |
die ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ;
|
96 |
return ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ;
|
| 97 |
}
|
97 |
}
|
| 98 |
if ($resultat->numRows() != 0) {
|
98 |
if ($resultat->numRows() != 0) {
|
| 99 |
$this->_isSuperAdmin = true ;
|
99 |
$this->_isSuperAdmin = true ;
|
| 100 |
} else {
|
100 |
} else {
|
| Line 114... |
Line 114... |
| 114 |
if (!$this->_auth->getAuth()) return false ;
|
114 |
if (!$this->_auth->getAuth()) return false ;
|
| Line 115... |
Line 115... |
| 115 |
|
115 |
|
| 116 |
return $this->_requeteDroit ($id_nature, 2) ;
|
116 |
return $this->_requeteDroit ($id_nature, 2) ;
|
| Line 117... |
Line 117... |
| 117 |
}
|
117 |
}
|
| 118 |
|
118 |
|
| 119 |
/** isRedacteur() - Renvoie true si l'utilisateur est rédacteur du type de fiche spécifié
|
119 |
/** isRedacteur() - Renvoie true si l'utilisateur est redacteur du type de fiche specifie
|
| Line 120... |
Line 120... |
| 120 |
*
|
120 |
*
|
| 121 |
*/
|
121 |
*/
|
| Line 138... |
Line 138... |
| 138 |
.$this->_id_utilisateur.
|
138 |
.$this->_id_utilisateur.
|
| 139 |
' AND bd_id_nature_offre="'.$id_nature.'" and bd_niveau_droit='.$niveau;
|
139 |
' AND bd_id_nature_offre="'.$id_nature.'" and bd_niveau_droit='.$niveau;
|
| Line 140... |
Line 140... |
| 140 |
|
140 |
|
| 141 |
$resultat = $GLOBALS['_BAZAR_']['db']->query ($requete) ;
|
141 |
$resultat = $GLOBALS['_BAZAR_']['db']->query ($requete) ;
|
| 142 |
if (DB::isError($resultat)) {
|
142 |
if (DB::isError($resultat)) {
|
| 143 |
die ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ;
|
143 |
return ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ;
|
| 144 |
}
|
144 |
}
|
| 145 |
if ($resultat->numRows() != 0) {
|
145 |
if ($resultat->numRows() != 0) {
|
| 146 |
return true ;
|
146 |
return true ;
|
| 147 |
}
|
147 |
}
|
| Line 175... |
Line 175... |
| 175 |
$this->_id_utilisateur.
|
175 |
$this->_id_utilisateur.
|
| 176 |
' AND bd_niveau_droit=0';
|
176 |
' AND bd_niveau_droit=0';
|
| Line 177... |
Line 177... |
| 177 |
|
177 |
|
| 178 |
$resultat = $GLOBALS['_BAZAR_']['db']->query ($requete) ;
|
178 |
$resultat = $GLOBALS['_BAZAR_']['db']->query ($requete) ;
|
| 179 |
if (DB::isError($resultat)) {
|
179 |
if (DB::isError($resultat)) {
|
| 180 |
die ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ;
|
180 |
return ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ;
|
| 181 |
}
|
181 |
}
|
| 182 |
if ($resultat->numRows() != 0) {
|
182 |
if ($resultat->numRows() != 0) {
|
| 183 |
$this->_isSuperAdmin = true ;
|
183 |
$this->_isSuperAdmin = true ;
|
| 184 |
} else {
|
184 |
} else {
|
| Line 217... |
Line 217... |
| 217 |
}
|
217 |
}
|
| Line 218... |
Line 218... |
| 218 |
|
218 |
|
| 219 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
219 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
| 220 |
*
|
220 |
*
|
| - |
|
221 |
* $Log: not supported by cvs2svn $
|
| - |
|
222 |
* Revision 1.8 2007-10-01 10:35:14 alexandre_tb
|
| - |
|
223 |
* petit hack pour tester la presence de $GLOBALS['droit_depot'] qui indique le niveau de droit minimum pour pouvoir deposer une fiche.
|
| 221 |
* $Log: not supported by cvs2svn $
|
224 |
*
|
| 222 |
* Revision 1.7 2007-07-04 09:59:09 alexandre_tb
|
225 |
* Revision 1.7 2007-07-04 09:59:09 alexandre_tb
|
| 223 |
* ajout de la classe bazar, premices d une structuration du code
|
226 |
* ajout de la classe bazar, premices d une structuration du code
|
| 224 |
*
|
227 |
*
|
| 225 |
* Revision 1.6 2007/04/20 09:58:06 neiluj
|
228 |
* Revision 1.6 2007/04/20 09:58:06 neiluj
|