Subversion Repositories Applications.bazar

Rev

Rev 67 | Rev 71 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 67 Rev 68
1
<?php
1
<?php
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */ 
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */ 
3
// +------------------------------------------------------------------------------------------------------+
3
// +------------------------------------------------------------------------------------------------------+
4
// | PHP version 4.1                                                                                      |
4
// | PHP version 4.1                                                                                      |
5
// +------------------------------------------------------------------------------------------------------+
5
// +------------------------------------------------------------------------------------------------------+
6
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
6
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
7
// +------------------------------------------------------------------------------------------------------+
7
// +------------------------------------------------------------------------------------------------------+
8
// | This library is free software; you can redistribute it and/or                                        |
8
// | This library is free software; you can redistribute it and/or                                        |
9
// | modify it under the terms of the GNU Lesser General Public                                           |
9
// | modify it under the terms of the GNU Lesser General Public                                           |
10
// | License as published by the Free Software Foundation; either                                         |
10
// | License as published by the Free Software Foundation; either                                         |
11
// | version 2.1 of the License, or (at your option) any later version.                                   |
11
// | version 2.1 of the License, or (at your option) any later version.                                   |
12
// |                                                                                                      |
12
// |                                                                                                      |
13
// | This library is distributed in the hope that it will be useful,                                      |
13
// | This library is distributed in the hope that it will be useful,                                      |
14
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
14
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
15
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU                                    |
15
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU                                    |
16
// | Lesser General Public License for more details.                                                      |
16
// | Lesser General Public License for more details.                                                      |
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.20 2006-01-05 16:28:25 alexandre_tb Exp $
22
// CVS : $Id: bazar.php,v 1.21 2006-01-13 14:12:52 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.20 $ $Date: 2006-01-05 16:28:25 $
31
*@version       $Revision: 1.21 $ $Date: 2006-01-13 14:12:52 $
32
// +------------------------------------------------------------------------------------------------------+
32
// +------------------------------------------------------------------------------------------------------+
33
*/
33
*/
34
 
34
 
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
36
// |                             LES CONSTANTES DES ACTIONS DE BAZAR                                      |
36
// |                             LES CONSTANTES DES ACTIONS DE BAZAR                                      |
37
// +------------------------------------------------------------------------------------------------------+
37
// +------------------------------------------------------------------------------------------------------+
38
 
38
 
39
define ('BAZ_VOIR_TOUTES_ANNONCES', 1) ;
39
define ('BAZ_VOIR_TOUTES_ANNONCES', 1) ;
40
define ('BAZ_DEPOSER_ANNONCE', 3) ;
40
define ('BAZ_DEPOSER_ANNONCE', 3) ;
41
define ('BAZ_ANNONCES_A_VALIDER', 4) ;
41
define ('BAZ_ANNONCES_A_VALIDER', 4) ;
42
define ('BAZ_GERER_DROITS', 5) ;
42
define ('BAZ_GERER_DROITS', 5) ;
43
define ('BAZ_ADMINISTRER_ANNONCES', 6) ;
43
define ('BAZ_ADMINISTRER_ANNONCES', 6) ;
44
define ('BAZ_MODIFIER_FICHE', 7) ;
44
define ('BAZ_MODIFIER_FICHE', 7) ;
45
if (!defined('BAZ_VOIR_FICHE')) define ('BAZ_VOIR_FICHE', 8) ;
45
if (!defined('BAZ_VOIR_FICHE')) define ('BAZ_VOIR_FICHE', 8) ;
46
define ('BAZ_SUPPRIMER_FICHE', 9) ;
46
define ('BAZ_SUPPRIMER_FICHE', 9) ;
47
define ('BAZ_ACTION_NOUVEAU', 10) ;
47
define ('BAZ_ACTION_NOUVEAU', 10) ;
48
define ('BAZ_ACTION_NOUVEAU_V', 11) ;
48
define ('BAZ_ACTION_NOUVEAU_V', 11) ;
49
define ('BAZ_ACTION_MODIFIER', 12) ;
49
define ('BAZ_ACTION_MODIFIER', 12) ;
50
define ('BAZ_ACTION_MODIFIER_V', 13) ;
50
define ('BAZ_ACTION_MODIFIER_V', 13) ;
51
define ('BAZ_ACTION_SUPPRESSION', 14) ;
51
define ('BAZ_ACTION_SUPPRESSION', 14) ;
52
define ('BAZ_ACTION_PUBLIER', 15) ;
52
define ('BAZ_ACTION_PUBLIER', 15) ;
53
define ('BAZ_ACTION_PAS_PUBLIER', 16) ;
53
define ('BAZ_ACTION_PAS_PUBLIER', 16) ;
54
define ('BAZ_S_INSCRIRE', 17);
54
define ('BAZ_S_INSCRIRE', 17);
55
define ('BAZ_VOIR_FLUX_RSS', 18);
55
define ('BAZ_VOIR_FLUX_RSS', 18);
56
 
56
 
57
 
57
 
58
// +------------------------------------------------------------------------------------------------------+
58
// +------------------------------------------------------------------------------------------------------+
59
// |                                            ENTETE du PROGRAMME                                       |
59
// |                                            ENTETE du PROGRAMME                                       |
60
// +------------------------------------------------------------------------------------------------------+
60
// +------------------------------------------------------------------------------------------------------+
61
 
61
 
62
error_reporting(E_ALL);
62
error_reporting(E_ALL);
63
require_once 'DB.php' ;
63
require_once 'DB.php' ;
64
require_once 'Auth.php' ;
64
require_once 'Auth.php' ;
65
require_once 'configuration/baz_config.inc.php'; //fichier de configuration de Bazar
65
require_once 'configuration/baz_config.inc.php'; //fichier de configuration de Bazar
66
require_once 'bibliotheque/bazar.fonct.php'; //fichier des fonctions de Bazar
66
require_once 'bibliotheque/bazar.fonct.php'; //fichier des fonctions de Bazar
67
 
67
 
68
if (defined('PAP_VERSION')) { //si on est dans Papyrus
68
if (defined('PAP_VERSION')) { //si on est dans Papyrus
69
	GEN_stockerStyleExterne( 'bazar_interne', 'client/bazar/bazar.interne.css');
69
	GEN_stockerStyleExterne( 'bazar_interne', 'client/bazar/bazar.interne.css');
70
}
70
}
71
//initialisation de l'id user
-
 
72
$GLOBALS['id_user']=$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID);
-
 
-
 
71
 
-
 
72
//**********************************************************************************************************
-
 
73
//initialisation des paramêtres papyrus
73
 
74
//**********************************************************************************************************
74
//si un parametre est précisé dans le gestionnaire de menus papyrus, on le prends en compte
75
//si un parametre est précisé dans le gestionnaire de menus papyrus, on le prends en compte
75
//parametre action pour lancer directement l'action indiquée  
76
//parametre action pour lancer directement l'action indiquée  
76
if (!isset($_GET['action'])and(isset($GLOBALS['_GEN_commun']['info_application']->action))) {
77
if (!isset($_GET['action'])and(isset($GLOBALS['_GEN_commun']['info_application']->action))) {
77
	$_GET['action']=$GLOBALS['_GEN_commun']['info_application']->action;
78
	$_GET['action']=$GLOBALS['_GEN_commun']['info_application']->action;
78
}
79
}
79
//parametre voir_menu pour afficher le menu ou pas (par défaut, il l'affiche)
80
//parametre voir_menu pour afficher le menu ou pas (par défaut, il l'affiche)
80
if ((isset($GLOBALS['_GEN_commun']['info_application']->voir_menu))and($GLOBALS['_GEN_commun']['info_application']->voir_menu==0)) {
81
if ((isset($GLOBALS['_GEN_commun']['info_application']->voir_menu))and($GLOBALS['_GEN_commun']['info_application']->voir_menu==0)) {
81
	$GLOBALS['_BAZAR_']['affiche_menu']=0;
82
	$GLOBALS['_BAZAR_']['affiche_menu']=0;
82
}
83
}
83
else $GLOBALS['_BAZAR_']['affiche_menu']=1;
84
else $GLOBALS['_BAZAR_']['affiche_menu']=1;
84
//parametre categorie_nature pour préciser quels types de fiches sont montrees (par défaut, il affiche les id_menu=0)
85
//parametre categorie_nature pour préciser quels types de fiches sont montrees (par défaut, il affiche les id_menu=0)
85
if (isset($GLOBALS['_GEN_commun']['info_application']->categorie_nature)) {
86
if (isset($GLOBALS['_GEN_commun']['info_application']->categorie_nature)) {
86
	$GLOBALS['_BAZAR_']['categorie_nature']=$GLOBALS['_GEN_commun']['info_application']->categorie_nature;
87
	$GLOBALS['_BAZAR_']['categorie_nature']=$GLOBALS['_GEN_commun']['info_application']->categorie_nature;
87
}
88
}
88
else $GLOBALS['_BAZAR_']['categorie_nature']=0;
89
else $GLOBALS['_BAZAR_']['categorie_nature']=0;
89
//parametre id_nature pour afficher un certain type de fiche (par défaut, tous les types de fiches)
90
//parametre id_nature pour afficher un certain type de fiche (par défaut, tous les types de fiches)
90
if (isset($GLOBALS['_GEN_commun']['info_application']->id_nature)) {
91
if (isset($GLOBALS['_GEN_commun']['info_application']->id_nature)) {
91
	$GLOBALS['_BAZAR_']['id_nature']=$GLOBALS['_GEN_commun']['info_application']->id_nature;
92
	$GLOBALS['_BAZAR_']['id_typeannonce']=$GLOBALS['_GEN_commun']['info_application']->id_nature;
-
 
93
}
-
 
94
elseif (!isset($GLOBALS['_BAZAR_']['typeannonce'])) $GLOBALS['_BAZAR_']['typeannonce']='toutes';
-
 
95
 
-
 
96
//**********************************************************************************************************
-
 
97
//initialisation de la variable globale de bazar
-
 
98
//**********************************************************************************************************
-
 
99
$GLOBALS['id_user']=$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID);
-
 
100
 
-
 
101
//Recuperer les eventuelles variables passees en GET ou en POST
-
 
102
if (isset($_REQUEST['id_fiche'])) $GLOBALS['_BAZAR_']['id_fiche']=$_REQUEST['id_fiche'];		
-
 
103
if (isset($_REQUEST['typeannonce'])) {
-
 
104
	$GLOBALS['_BAZAR_']['id_typeannonce']=$_REQUEST['typeannonce'];
-
 
105
}
-
 
106
 
-
 
107
if ((isset($GLOBALS['_BAZAR_']['id_typeannonce']))and($GLOBALS['_BAZAR_']['id_typeannonce']!='toutes')) {
-
 
108
	$requete = 'SELECT bn_label_nature, bn_condition, bn_template, bn_commentaire, bn_appropriation, bn_image_titre, bn_image_logo FROM bazar_nature WHERE bn_id_nature='.$GLOBALS['_BAZAR_']['id_typeannonce'];
-
 
109
	$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
-
 
110
	if (DB::isError($resultat)) {
-
 
111
		die ($resultat->getMessage().$resultat->getDebugInfo()) ;
-
 
112
	}
-
 
113
	$ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC);
-
 
114
	$GLOBALS['_BAZAR_']['typeannonce']=$ligne['bn_label_nature'];
-
 
115
	$GLOBALS['_BAZAR_']['condition']=$ligne['bn_condition'];
-
 
116
    $GLOBALS['_BAZAR_']['template']=$ligne['bn_template'];
-
 
117
	$GLOBALS['_BAZAR_']['commentaire']=$ligne['bn_commentaire'];
-
 
118
	$GLOBALS['_BAZAR_']['appropriation']=$ligne['bn_appropriation'];
-
 
119
	$GLOBALS['_BAZAR_']['nb_consultations']=$ligne['bf_nb_consultations'];
-
 
120
	$GLOBALS['_BAZAR_']['image_titre']=$ligne['bn_image_titre'];
-
 
121
	$GLOBALS['_BAZAR_']['image_logo']=$ligne['bn_image_logo'];		
92
}
122
}
93
else $GLOBALS['_BAZAR_']['id_nature']='toutes';
-
 
94
 
123
 
95
// +------------------------------------------------------------------------------------------------------+
124
// +------------------------------------------------------------------------------------------------------+
96
// |                                           LISTE de FONCTIONS                                         |
125
// |                                           LISTE de FONCTIONS                                         |
97
// +------------------------------------------------------------------------------------------------------+
126
// +------------------------------------------------------------------------------------------------------+
98
if ($GLOBALS['_BAZAR_']['affiche_menu']) {
127
if ($GLOBALS['_BAZAR_']['affiche_menu']) {
99
	//---------------le menu de l'appli-----------
128
	//---------------le menu de l'appli-----------
100
	function afficherContenuNavigation () {
129
	function afficherContenuNavigation () {
101
		$res ='<ul>'."\n";
130
		$res ='<ul>'."\n";
102
		$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_VOIR_TOUTES_ANNONCES);
131
		$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_VOIR_TOUTES_ANNONCES);
103
		$GLOBALS['_BAZAR_']['url']->addQueryString('nature', 'toutes');
132
		$GLOBALS['_BAZAR_']['url']->addQueryString('nature', 'toutes');
104
		//partie consultation d'annonces
133
		//partie consultation d'annonces
105
		$res .= '<li><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_CONSULTER.'</a>'."\n".'</li>'."\n";
134
		$res .= '<li><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_CONSULTER.'</a>'."\n".'</li>'."\n";
106
		$GLOBALS['_BAZAR_']['url']->removeQueryString('nature');
135
		$GLOBALS['_BAZAR_']['url']->removeQueryString('nature');
107
	
136
	
108
		//partie abonnement aux annonces
137
		//partie abonnement aux annonces
109
		$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_S_INSCRIRE);
138
		$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_S_INSCRIRE);
110
		$res .= '<li><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_S_ABONNER.'</a></li>'."\n" ;
139
		$res .= '<li><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_S_ABONNER.'</a></li>'."\n" ;
111
		$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
140
		$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
112
			
141
			
113
		//partie saisie d'annonces
142
		//partie saisie d'annonces
114
		$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_DEPOSER_ANNONCE);
143
		$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_DEPOSER_ANNONCE);
115
		$res .= '<li><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_SAISIR.'</a>'."\n".'</li>'."\n";
144
		$res .= '<li><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_SAISIR.'</a>'."\n".'</li>'."\n";
116
		$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
145
		$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
117
			
146
			
118
		//choix des administrateurs	
147
		//choix des administrateurs	
119
		$est_admin=0;
148
		$est_admin=0;
120
		if ($GLOBALS['AUTH']->getAuth()) {
149
		if ($GLOBALS['AUTH']->getAuth()) {
121
			$requete='SELECT bn_id_nature FROM bazar_nature';
150
			$requete='SELECT bn_id_nature FROM bazar_nature';
122
			$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
151
			$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
123
			if (DB::isError($resultat)) {
152
			if (DB::isError($resultat)) {
124
				die ($resultat->getMessage().$resultat->getDebugInfo()) ;
153
				die ($resultat->getMessage().$resultat->getDebugInfo()) ;
125
			}
154
			}
126
			while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
155
			while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
127
				if ((niveau_droit($ligne['bn_id_nature'],$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID)))=='administrateur') {
156
				if ((niveau_droit($ligne['bn_id_nature'],$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID)))=='administrateur') {
128
					$est_admin=1;
157
					$est_admin=1;
129
			    }
158
			    }
130
			}
159
			}
131
			if (($est_admin)or(niveau_droit($id_nature_offre='0',$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID))=='superadministrateur')) {
160
			if (($est_admin)or(niveau_droit($id_nature_offre='0',$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID))=='superadministrateur')) {
132
				//partie administrer
161
				//partie administrer
133
				$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_ANNONCES_A_VALIDER);
162
				$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_ANNONCES_A_VALIDER);
134
				$res .= '<li><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_ADMINISTRER.'</a></li>'."\n";
163
				$res .= '<li><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_ADMINISTRER.'</a></li>'."\n";
135
				$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
164
				$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
136
				
165
				
137
				if (niveau_droit($id_nature_offre='0',$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID))=='superadministrateur') {
166
				if (niveau_droit($id_nature_offre='0',$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID))=='superadministrateur') {
138
					$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_GERER_DROITS);
167
					$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_GERER_DROITS);
139
					$res .= '<li><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_GESTION_DES_DROITS.'</a></li>'."\n" ;
168
					$res .= '<li><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_GESTION_DES_DROITS.'</a></li>'."\n" ;
140
					$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
169
					$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
141
				}
170
				}
142
			}
171
			}
143
		}	
172
		}	
144
		$res.= '</ul>'."\n";
173
		$res.= '</ul>'."\n";
145
	    return $res ;
174
	    return $res ;
146
	}
175
	}
147
}
176
}
148
    
177
    
149
function afficherContenuCorps() {	
178
function afficherContenuCorps() {	
150
	$res = '';
179
	$res = '';
151
	$res.='<h1>'.$GLOBALS['_GEN_commun']['info_menu']->gm_titre.'</h1>'."\n";
180
	$res.='<h1>'.$GLOBALS['_GEN_commun']['info_menu']->gm_titre.'</h1>'."\n";
152
 
181
 
153
	if (isset($_GET['action'])) {
182
	if (isset($_GET['action'])) {
-
 
183
		if (($_GET['action']!=BAZ_ACTION_NOUVEAU_V)and($_GET['action']!=BAZ_ACTION_MODIFIER_V)) unset($_SESSION['formulaire_annonce_valide']);
154
		switch ($_GET['action']) {
184
		switch ($_GET['action']) {
155
			case BAZ_VOIR_VOS_ANNONCES : $res .= mes_fiches(); break;
185
			case BAZ_VOIR_VOS_ANNONCES : $res .= mes_fiches(); break;
156
			case BAZ_VOIR_TOUTES_ANNONCES : $res .= baz_liste($GLOBALS['_BAZAR_']['id_nature']); break;
186
			case BAZ_VOIR_TOUTES_ANNONCES : $res .= baz_liste($GLOBALS['_BAZAR_']['id_nature']); break;
157
			case BAZ_DEPOSER_ANNONCE : $res .= baz_formulaire(BAZ_DEPOSER_ANNONCE); break;
187
			case BAZ_DEPOSER_ANNONCE : $res .= baz_formulaire(BAZ_DEPOSER_ANNONCE); break;
158
			case BAZ_ANNONCES_A_VALIDER : $res .= fiches_a_valider(); break;
188
			case BAZ_ANNONCES_A_VALIDER : $res .= fiches_a_valider(); break;
159
			case BAZ_ADMINISTRER_ANNONCES : $res .= baz_administrer_annonces(); break;
189
			case BAZ_ADMINISTRER_ANNONCES : $res .= baz_administrer_annonces(); break;
160
			case BAZ_MODIFIER_FICHE : $res .= baz_formulaire(BAZ_ACTION_MODIFIER); break;
190
			case BAZ_MODIFIER_FICHE : $res .= baz_formulaire(BAZ_ACTION_MODIFIER); break;
161
			case BAZ_SUPPRIMER_FICHE : $res .= baz_suppression().baz_liste('',$GLOBALS['id_user'],''); break;
191
			case BAZ_SUPPRIMER_FICHE : $res .= baz_suppression().baz_liste('',$GLOBALS['id_user'],''); break;
162
			case BAZ_VOIR_FICHE : $res .= baz_voir_fiche(1); break;
192
			case BAZ_VOIR_FICHE : $res .= baz_voir_fiche(1); break;
163
			case BAZ_ACTION_NOUVEAU : $res .= baz_formulaire(BAZ_ACTION_NOUVEAU); break;
193
			case BAZ_ACTION_NOUVEAU : $res .= baz_formulaire(BAZ_ACTION_NOUVEAU); break;
164
			case BAZ_ACTION_NOUVEAU_V : $res .= baz_formulaire(BAZ_ACTION_NOUVEAU_V).mes_fiches(); break;
194
			case BAZ_ACTION_NOUVEAU_V : $res .= baz_formulaire(BAZ_ACTION_NOUVEAU_V).baz_formulaire(BAZ_DEPOSER_ANNONCE); break;
165
			case BAZ_ACTION_MODIFIER : $res .= baz_formulaire(BAZ_ACTION_MODIFIER); break;
195
			case BAZ_ACTION_MODIFIER : $res .= baz_formulaire(BAZ_ACTION_MODIFIER); break;
166
			case BAZ_ACTION_MODIFIER_V : $res .= baz_formulaire(BAZ_ACTION_MODIFIER_V).mes_fiches(); break;
196
			case BAZ_ACTION_MODIFIER_V : $res .= baz_formulaire(BAZ_ACTION_MODIFIER_V).baz_formulaire(BAZ_DEPOSER_ANNONCE); break;
167
			case BAZ_ACTION_SUPPRESSION : $res .= baz_suppression().mes_fiches(); break;
197
			case BAZ_ACTION_SUPPRESSION : $res .= baz_suppression().baz_formulaire(BAZ_DEPOSER_ANNONCE); break;
168
			case BAZ_ACTION_PUBLIER : publier_fiche(1) ;$res .= fiches_a_valider(); break;
198
			case BAZ_ACTION_PUBLIER : publier_fiche(1) ;$res .= fiches_a_valider(); break;
169
			case BAZ_ACTION_PAS_PUBLIER : publier_fiche(0) ;$res .= fiches_a_valider(); break;
199
			case BAZ_ACTION_PAS_PUBLIER : publier_fiche(0) ;$res .= fiches_a_valider(); break;
170
			case BAZ_GERER_DROITS : $res .= baz_formulaire(BAZ_GERER_DROITS); break;
200
			case BAZ_GERER_DROITS : $res .= baz_gestion_droits(); break;
171
			case BAZ_S_INSCRIRE : $res .= baz_s_inscrire(); break;
201
			case BAZ_S_INSCRIRE : $res .= baz_s_inscrire(); break;
172
			case BAZ_VOIR_FLUX_RSS : header('Content-type: text/xml; charset=ISO-8859-1');include("bazarRSS.php");exit(0);break;
202
			case BAZ_VOIR_FLUX_RSS : header('Content-type: text/xml; charset=ISO-8859-1');include("bazarRSS.php");exit(0);break;
173
			default : $res .= accueil() ;
203
			default : $res .= accueil() ;
174
		}
204
		}
175
	}
205
	}
176
	else {
206
	else {
177
		$res .= baz_liste($GLOBALS['_BAZAR_']['id_nature']);
207
		$res .= baz_liste($GLOBALS['_BAZAR_']['id_nature']);
178
	}
208
	}
179
	return $res ;
209
	return $res ;
180
}
210
}
181
 
211
 
182
 
212
 
183
/* +--Fin du code ----------------------------------------------------------------------------------------+
213
/* +--Fin du code ----------------------------------------------------------------------------------------+
184
*
214
*
185
* $Log: not supported by cvs2svn $
215
* $Log: not supported by cvs2svn $
-
 
216
* Revision 1.20  2006/01/05 16:28:25  alexandre_tb
-
 
217
* prise en chage des checkbox, reste la mise à jour à gérer
-
 
218
*
186
* Revision 1.19  2006/01/03 10:19:31  florian
219
* Revision 1.19  2006/01/03 10:19:31  florian
187
* Mise à jour pour accepter des parametres dans papyrus: faire apparaitre ou non le menu, afficher qu'un type de fiches, définir l'action par défaut...
220
* Mise à jour pour accepter des parametres dans papyrus: faire apparaitre ou non le menu, afficher qu'un type de fiches, définir l'action par défaut...
188
*
221
*
189
* Revision 1.18  2005/12/02 10:57:03  florian
222
* Revision 1.18  2005/12/02 10:57:03  florian
190
* MAJ pour paramétrage dans gestion de menus papyrus
223
* MAJ pour paramétrage dans gestion de menus papyrus
191
*
224
*
192
* Revision 1.17  2005/12/01 16:05:41  florian
225
* Revision 1.17  2005/12/01 16:05:41  florian
193
* changement des chemins pour appli Pear
226
* changement des chemins pour appli Pear
194
*
227
*
195
* Revision 1.16  2005/12/01 15:31:30  florian
228
* Revision 1.16  2005/12/01 15:31:30  florian
196
* correction bug modifs et saisies
229
* correction bug modifs et saisies
197
*
230
*
198
* Revision 1.15  2005/11/30 13:58:45  florian
231
* Revision 1.15  2005/11/30 13:58:45  florian
199
* ajouts graphisme (logos, boutons), changement structure SQL bazar_fiche
232
* ajouts graphisme (logos, boutons), changement structure SQL bazar_fiche
200
*
233
*
201
* Revision 1.14  2005/11/24 16:17:13  florian
234
* Revision 1.14  2005/11/24 16:17:13  florian
202
* corrections bugs, ajout des cases à cocher
235
* corrections bugs, ajout des cases à cocher
203
*
236
*
204
* Revision 1.13  2005/11/14 16:04:54  florian
237
* Revision 1.13  2005/11/14 16:04:54  florian
205
* maj bug affichage flux
238
* maj bug affichage flux
206
*
239
*
207
* Revision 1.12  2005/11/07 17:05:46  florian
240
* Revision 1.12  2005/11/07 17:05:46  florian
208
* amélioration validation conditions de saisie, ajout des règles spécifiques de saisie des formulaires
241
* amélioration validation conditions de saisie, ajout des règles spécifiques de saisie des formulaires
209
*
242
*
210
* Revision 1.11  2005/10/21 16:15:04  florian
243
* Revision 1.11  2005/10/21 16:15:04  florian
211
* mise a jour appropriation
244
* mise a jour appropriation
212
*
245
*
213
* Revision 1.10  2005/10/12 17:20:33  ddelon
246
* Revision 1.10  2005/10/12 17:20:33  ddelon
214
* Reorganisation calendrier + applette
247
* Reorganisation calendrier + applette
215
*
248
*
216
* Revision 1.9  2005/10/12 13:35:07  florian
249
* Revision 1.9  2005/10/12 13:35:07  florian
217
* amélioration de l'interface de bazar, de manière a simplifier les consultations, et à harmoniser par rapport aux Ressources
250
* amélioration de l'interface de bazar, de manière a simplifier les consultations, et à harmoniser par rapport aux Ressources
218
*
251
*
219
* Revision 1.8  2005/09/30 13:00:05  ddelon
252
* Revision 1.8  2005/09/30 13:00:05  ddelon
220
* Fiche bazar generique
253
* Fiche bazar generique
221
*
254
*
222
* Revision 1.7  2005/09/30 12:34:44  ddelon
255
* Revision 1.7  2005/09/30 12:34:44  ddelon
223
* petite modification pour integration bazar dans papyrus
256
* petite modification pour integration bazar dans papyrus
224
*
257
*
225
* Revision 1.6  2005/09/30 12:22:54  florian
258
* Revision 1.6  2005/09/30 12:22:54  florian
226
* Ajouts commentaires pour fiche, modifications graphiques, maj SQL
259
* Ajouts commentaires pour fiche, modifications graphiques, maj SQL
227
*
260
*
228
* Revision 1.4  2005/07/21 19:03:12  florian
261
* Revision 1.4  2005/07/21 19:03:12  florian
229
* nouveautés bazar: templates fiches, correction de bugs, ...
262
* nouveautés bazar: templates fiches, correction de bugs, ...
230
*
263
*
231
* Revision 1.2  2005/02/22 15:33:32  florian
264
* Revision 1.2  2005/02/22 15:33:32  florian
232
* integration dans Papyrus
265
* integration dans Papyrus
233
*
266
*
234
* Revision 1.1.1.1  2005/02/17 18:05:11  florian
267
* Revision 1.1.1.1  2005/02/17 18:05:11  florian
235
* Import initial de Bazar
268
* Import initial de Bazar
236
*
269
*
237
* Revision 1.1.1.1  2005/02/17 11:09:50  florian
270
* Revision 1.1.1.1  2005/02/17 11:09:50  florian
238
* Import initial
271
* Import initial
239
*
272
*
240
* Revision 1.1.1.1  2005/02/16 18:06:35  florian
273
* Revision 1.1.1.1  2005/02/16 18:06:35  florian
241
* import de la nouvelle version
274
* import de la nouvelle version
242
*
275
*
243
* Revision 1.3  2004/07/05 15:10:14  florian
276
* Revision 1.3  2004/07/05 15:10:14  florian
244
* changement interface de saisie
277
* changement interface de saisie
245
*
278
*
246
* Revision 1.2  2004/07/01 10:13:41  florian
279
* Revision 1.2  2004/07/01 10:13:41  florian
247
* modif Florian
280
* modif Florian
248
*
281
*
249
* Revision 1.1  2004/06/23 09:58:32  alex
282
* Revision 1.1  2004/06/23 09:58:32  alex
250
* version initiale
283
* version initiale
251
*
284
*
252
* Revision 1.1  2004/06/18 09:00:07  alex
285
* Revision 1.1  2004/06/18 09:00:07  alex
253
* version initiale
286
* version initiale
254
*
287
*
255
*
288
*
256
* +-- Fin du code ----------------------------------------------------------------------------------------+
289
* +-- Fin du code ----------------------------------------------------------------------------------------+
257
*/
290
*/
258
?>
291
?>