Subversion Repositories Applications.papyrus

Rev

Rev 1688 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1688 Rev 1822
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.9 2007-10-10 13:27:06 alexandre_tb Exp $
22
// CVS : $Id: bazar.class.php,v 1.9.2.1 2008-04-16 12:36:27 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.9 $
30
*@version       $Revision: 1.9.2.1 $
31
// +------------------------------------------------------------------------------------------------------+
31
// +------------------------------------------------------------------------------------------------------+
32
*/
32
*/
Line 33... Line 33...
33
 
33
 
34
// +------------------------------------------------------------------------------------------------------+
34
// +------------------------------------------------------------------------------------------------------+
Line 214... Line 214...
214
		}
214
		}
215
		return $tableau_mail;
215
		return $tableau_mail;
216
	}
216
	}
217
}
217
}
Line -... Line 218...
-
 
218
 
-
 
219
class Bazar_element {
-
 
220
	
-
 
221
	function &factory($type, $options = false)
-
 
222
    {
-
 
223
        
-
 
224
        if (file_exists (BAZ_CHEMIN_APPLI."bibliotheque/elements/{$type}.php")) include_once BAZ_CHEMIN_APPLI."bibliotheque/elements/{$type}.php";
-
 
225
        else return PEAR::raiseError("Impossible d inclure le fichier /{$type}.php", "Impossible d inclure le fichier ".
-
 
226
        							BAZ_CHEMIN_APPLI."bibliotheque/elements/{$type}.php<br />", null, null,
-
 
227
                                    "Impossible d inclure le fichier /{$type}.php"
-
 
228
                                    , 'PEAR_Error', true);;
-
 
229
        $classname = "Bazar_{$type}";
-
 
230
 
-
 
231
        if (!class_exists($classname)) {
-
 
232
            $tmp = PEAR::raiseError(null, -2, null, null,
-
 
233
                                    "la classe $classname n'existe pas"
-
 
234
                                    , 'PEAR_Error', true);
-
 
235
            return $tmp;
-
 
236
        }
-
 
237
 
-
 
238
        @$obj =& new $classname($options);
-
 
239
 
-
 
240
        return $obj;
-
 
241
    }
-
 
242
}
218
 
243
 
219
/* +--Fin du code ----------------------------------------------------------------------------------------+
244
/* +--Fin du code ----------------------------------------------------------------------------------------+
220
*
245
*
-
 
246
* $Log: not supported by cvs2svn $
-
 
247
* Revision 1.9  2007-10-10 13:27:06  alexandre_tb
-
 
248
* encodage et remplacement de die en return
221
* $Log: not supported by cvs2svn $
249
*
222
* Revision 1.8  2007-10-01 10:35:14  alexandre_tb
250
* 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.
251
* petit hack pour tester la presence de $GLOBALS['droit_depot'] qui indique le niveau de droit minimum pour pouvoir deposer une fiche.
224
*
252
*
225
* Revision 1.7  2007-07-04 09:59:09  alexandre_tb
253
* Revision 1.7  2007-07-04 09:59:09  alexandre_tb