Subversion Repositories Applications.bazar

Rev

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

Rev 117 Rev 118
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.php,v 1.29 2006-04-24 10:16:22 alexandre_tb Exp $
22
// CVS : $Id: bazar.php,v 1.30 2006-04-28 12:46:14 florian 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
//Autres auteurs :
29
//Autres auteurs :
30
*@copyright     Tela-Botanica 2000-2004
30
*@copyright     Tela-Botanica 2000-2004
31
*@version       $Revision: 1.29 $ $Date: 2006-04-24 10:16:22 $
31
*@version       $Revision: 1.30 $ $Date: 2006-04-28 12:46:14 $
32
// +------------------------------------------------------------------------------------------------------+
32
// +------------------------------------------------------------------------------------------------------+
33
*/
33
*/
Line 34... Line 34...
34
 
34
 
35
// +------------------------------------------------------------------------------------------------------+
-
 
36
// |                             LES CONSTANTES DES ACTIONS DE BAZAR                                      |
-
 
37
// +------------------------------------------------------------------------------------------------------+
-
 
38
 
-
 
39
define ('BAZ_VOIR_TOUTES_ANNONCES', 1) ;
-
 
40
define ('BAZ_DEPOSER_ANNONCE', 3) ;
-
 
41
define ('BAZ_ANNONCES_A_VALIDER', 4) ;
-
 
42
define ('BAZ_GERER_DROITS', 5) ;
-
 
43
define ('BAZ_ADMINISTRER_ANNONCES', 6) ;
-
 
44
define ('BAZ_MODIFIER_FICHE', 7) ;
-
 
45
if (!defined('BAZ_VOIR_FICHE')) define ('BAZ_VOIR_FICHE', 8) ;
-
 
46
define ('BAZ_SUPPRIMER_FICHE', 9) ;
-
 
47
define ('BAZ_ACTION_NOUVEAU', 10) ;
-
 
48
define ('BAZ_ACTION_NOUVEAU_V', 11) ;
-
 
49
define ('BAZ_ACTION_MODIFIER', 12) ;
-
 
50
define ('BAZ_ACTION_MODIFIER_V', 13) ;
-
 
51
define ('BAZ_ACTION_SUPPRESSION', 14) ;
-
 
52
define ('BAZ_ACTION_PUBLIER', 15) ;
-
 
53
define ('BAZ_ACTION_PAS_PUBLIER', 16) ;
-
 
54
define ('BAZ_S_INSCRIRE', 17);
-
 
55
define ('BAZ_VOIR_FLUX_RSS', 18);
-
 
56
 
-
 
57
 
-
 
58
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
59
// |                                            ENTETE du PROGRAMME                                       |
36
// |                                            ENTETE du PROGRAMME                                       |
Line 60... Line 37...
60
// +------------------------------------------------------------------------------------------------------+
37
// +------------------------------------------------------------------------------------------------------+
61
 
38
 
62
error_reporting(E_ALL);
39
error_reporting(E_ALL);
63
require_once 'DB.php' ;
40
require_once PAP_CHEMIN_API_PEAR.'DB.php' ;
64
require_once 'Auth.php' ;
41
require_once PAP_CHEMIN_API_PEAR.'Auth.php' ;
65
require_once 'configuration/baz_config.inc.php'; //fichier de configuration de Bazar
42
require_once 'configuration/baz_config.inc.php'; //fichier de configuration de Bazar
Line 66... Line 43...
66
require_once 'bibliotheque/bazar.class.php';
43
require_once 'bibliotheque/bazar.class.php';
Line 204... Line 181...
204
			case BAZ_SUPPRIMER_FICHE : $res .= baz_suppression().baz_liste('',$GLOBALS['id_user'],''); break;
181
			case BAZ_SUPPRIMER_FICHE : $res .= baz_suppression().baz_liste('',$GLOBALS['id_user'],''); break;
205
			case BAZ_VOIR_FICHE : $res .= baz_voir_fiche(1); break;
182
			case BAZ_VOIR_FICHE : $res .= baz_voir_fiche(1); break;
206
			case BAZ_ACTION_NOUVEAU : $res .= baz_formulaire(BAZ_ACTION_NOUVEAU); break;
183
			case BAZ_ACTION_NOUVEAU : $res .= baz_formulaire(BAZ_ACTION_NOUVEAU); break;
207
			case BAZ_ACTION_NOUVEAU_V : $res .= baz_formulaire(BAZ_ACTION_NOUVEAU_V).mes_fiches(); break;
184
			case BAZ_ACTION_NOUVEAU_V : $res .= baz_formulaire(BAZ_ACTION_NOUVEAU_V).mes_fiches(); break;
208
			case BAZ_ACTION_MODIFIER : $res .= baz_formulaire(BAZ_ACTION_MODIFIER); break;
185
			case BAZ_ACTION_MODIFIER : $res .= baz_formulaire(BAZ_ACTION_MODIFIER); break;
209
			case BAZ_ACTION_MODIFIER_V : $res .= baz_formulaire(BAZ_ACTION_MODIFIER_V).baz_formulaire(BAZ_DEPOSER_ANNONCE); break;
186
			case BAZ_ACTION_MODIFIER_V : $res .= baz_formulaire(BAZ_ACTION_MODIFIER_V).mes_fiches(); break;
210
			case BAZ_ACTION_SUPPRESSION : $res .= baz_suppression().baz_formulaire(BAZ_DEPOSER_ANNONCE); break;
187
			case BAZ_ACTION_SUPPRESSION : $res .= baz_suppression().mes_fiches(); break;
211
			case BAZ_ACTION_PUBLIER : publier_fiche(1) ;$res .= fiches_a_valider(); break;
188
			case BAZ_ACTION_PUBLIER : publier_fiche(1) ;$res .= fiches_a_valider(); break;
212
			case BAZ_ACTION_PAS_PUBLIER : publier_fiche(0) ;$res .= fiches_a_valider(); break;
189
			case BAZ_ACTION_PAS_PUBLIER : publier_fiche(0) ;$res .= fiches_a_valider(); break;
213
			case BAZ_GERER_DROITS : $res .= baz_gestion_droits(); break;
190
			case BAZ_GERER_DROITS : $res .= baz_gestion_droits(); break;
214
			case BAZ_S_INSCRIRE : $res .= baz_s_inscrire(); break;
191
			case BAZ_S_INSCRIRE : $res .= baz_s_inscrire(); break;
215
			case BAZ_VOIR_FLUX_RSS : header('Content-type: text/xml; charset=ISO-8859-1');include("bazarRSS.php");exit(0);break;
192
			case BAZ_VOIR_FLUX_RSS : header('Content-type: text/xml; charset=ISO-8859-1');include("bazarRSS.php");exit(0);break;
216
			default : $res .= accueil() ;
193
			default : $res .= baz_liste($GLOBALS['_BAZAR_']['id_typeannonce']) ;
217
		}
194
		}
218
	}
195
	}
219
	else {
196
	else {
220
		$res .= baz_liste();
197
		$res .= baz_liste($GLOBALS['_BAZAR_']['id_typeannonce']);
221
	}
198
	}
222
	return $res ;
199
	return $res ;
223
}
200
}
Line 224... Line 201...
224
 
201
 
225
 
202
 
226
/* +--Fin du code ----------------------------------------------------------------------------------------+
203
/* +--Fin du code ----------------------------------------------------------------------------------------+
-
 
204
*
-
 
205
* $Log: not supported by cvs2svn $
-
 
206
* Revision 1.29  2006/04/24 10:16:22  alexandre_tb
-
 
207
* ajout de la globale filtre.
227
*
208
* elle remplace (à terme) catégorie nature
228
* $Log: not supported by cvs2svn $
209
*
229
* Revision 1.28  2006/03/29 13:05:41  alexandre_tb
210
* Revision 1.28  2006/03/29 13:05:41  alexandre_tb
230
* utilisation de la classe Administrateur_bazar
211
* utilisation de la classe Administrateur_bazar
231
*
212
*