Subversion Repositories Applications.bazar

Rev

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

Rev 118 Rev 126
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.30 2006-04-28 12:46:14 florian Exp $
22
// CVS : $Id: bazar.php,v 1.31 2006-05-19 13:54:32 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.30 $ $Date: 2006-04-28 12:46:14 $
31
*@version       $Revision: 1.31 $ $Date: 2006-05-19 13:54:32 $
32
// +------------------------------------------------------------------------------------------------------+
32
// +------------------------------------------------------------------------------------------------------+
33
*/
33
*/
34
 
34
 
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
36
// |                                            ENTETE du PROGRAMME                                       |
36
// |                                            ENTETE du PROGRAMME                                       |
37
// +------------------------------------------------------------------------------------------------------+
37
// +------------------------------------------------------------------------------------------------------+
38
 
38
 
39
error_reporting(E_ALL);
39
error_reporting(E_ALL);
40
require_once PAP_CHEMIN_API_PEAR.'DB.php' ;
40
require_once PAP_CHEMIN_API_PEAR.'DB.php' ;
41
require_once PAP_CHEMIN_API_PEAR.'Auth.php' ;
41
require_once PAP_CHEMIN_API_PEAR.'Auth.php' ;
42
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
43
require_once 'bibliotheque/bazar.class.php';
43
require_once 'bibliotheque/bazar.class.php';
44
require_once 'bibliotheque/bazar.fonct.php'; //fichier des fonctions de Bazar
44
require_once 'bibliotheque/bazar.fonct.php'; //fichier des fonctions de Bazar
45
 
45
 
46
if (defined('PAP_VERSION')) { //si on est dans Papyrus
46
if (defined('PAP_VERSION')) { //si on est dans Papyrus
47
	GEN_stockerStyleExterne( 'bazar_interne', 'client/bazar/bazar.interne.css');
47
	GEN_stockerStyleExterne( 'bazar_interne', 'client/bazar/bazar.interne.css');
48
}
48
}
49
 
49
 
50
//**********************************************************************************************************
50
//**********************************************************************************************************
51
//initialisation des paramêtres papyrus
51
//initialisation des paramêtres papyrus
52
//**********************************************************************************************************
52
//**********************************************************************************************************
53
//si un parametre est précisé dans le gestionnaire de menus papyrus, on le prends en compte
53
//si un parametre est précisé dans le gestionnaire de menus papyrus, on le prends en compte
54
//parametre action pour lancer directement l'action indiquée  
54
//parametre action pour lancer directement l'action indiquée  
55
if (!isset($_GET['action'])and(isset($GLOBALS['_GEN_commun']['info_application']->action))) {
55
if (!isset($_GET['action'])and(isset($GLOBALS['_GEN_commun']['info_application']->action))) {
56
	$_GET['action']=$GLOBALS['_GEN_commun']['info_application']->action;
56
	$_GET['action']=$GLOBALS['_GEN_commun']['info_application']->action;
57
}
57
}
58
//parametre voir_menu pour afficher le menu ou pas (par défaut, il l'affiche)
58
//parametre voir_menu pour afficher le menu ou pas (par défaut, il l'affiche)
59
if ((isset($GLOBALS['_GEN_commun']['info_application']->voir_menu))and($GLOBALS['_GEN_commun']['info_application']->voir_menu==0)) {
59
if ((isset($GLOBALS['_GEN_commun']['info_application']->voir_menu))and($GLOBALS['_GEN_commun']['info_application']->voir_menu==0)) {
60
	$GLOBALS['_BAZAR_']['affiche_menu']=0;
60
	$GLOBALS['_BAZAR_']['affiche_menu']=0;
61
}
61
}
62
else $GLOBALS['_BAZAR_']['affiche_menu']=1;
62
else $GLOBALS['_BAZAR_']['affiche_menu']=1;
63
//parametre categorie_nature pour préciser quels types de fiches sont montrees (par défaut, il affiche les id_menu=0)
63
//parametre categorie_nature pour préciser quels types de fiches sont montrees (par défaut, il affiche les id_menu=0)
64
if (isset($GLOBALS['_GEN_commun']['info_application']->categorie_nature)) {
64
if (isset($GLOBALS['_GEN_commun']['info_application']->categorie_nature)) {
65
	$GLOBALS['_BAZAR_']['categorie_nature']=$GLOBALS['_GEN_commun']['info_application']->categorie_nature;
65
	$GLOBALS['_BAZAR_']['categorie_nature']=$GLOBALS['_GEN_commun']['info_application']->categorie_nature;
-
 
66
}
-
 
67
elseif (isset($_REQUEST['categorie_nature'])) {
66
	$GLOBALS['_BAZAR_']['filtre'] = $GLOBALS['_BAZAR_']['categorie_nature'] ;
68
	$GLOBALS['_BAZAR_']['categorie_nature']=$_REQUEST['categorie_nature'];
67
}
69
}
68
else $GLOBALS['_BAZAR_']['categorie_nature']=0;
70
else $GLOBALS['_BAZAR_']['categorie_nature']=0;
69
//parametre id_nature pour afficher un certain type de fiche (par défaut, tous les types de fiches)
71
//parametre id_nature pour afficher un certain type de fiche (par défaut, tous les types de fiches)
70
if (isset($GLOBALS['_GEN_commun']['info_application']->id_nature)) {
72
if (isset($GLOBALS['_GEN_commun']['info_application']->id_nature)) {
71
	$GLOBALS['_BAZAR_']['id_typeannonce']=$GLOBALS['_GEN_commun']['info_application']->id_nature;
73
	$GLOBALS['_BAZAR_']['id_typeannonce']=$GLOBALS['_GEN_commun']['info_application']->id_nature;
72
}
74
}
73
elseif (!isset($GLOBALS['_BAZAR_']['typeannonce'])) $GLOBALS['_BAZAR_']['typeannonce']='toutes';
75
elseif (!isset($GLOBALS['_BAZAR_']['typeannonce'])) $GLOBALS['_BAZAR_']['typeannonce']='toutes';
74
 
76
 
75
//**********************************************************************************************************
77
//**********************************************************************************************************
76
//initialisation de la variable globale de bazar
78
//initialisation de la variable globale de bazar
77
//**********************************************************************************************************
79
//**********************************************************************************************************
78
$GLOBALS['id_user']=$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID);
80
$GLOBALS['id_user']=$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID);
79
 
81
 
80
//Recuperer les eventuelles variables passees en GET ou en POST
82
//Recuperer les eventuelles variables passees en GET ou en POST
81
if (isset($_REQUEST['id_fiche'])) {
83
if (isset($_REQUEST['id_fiche'])) {
82
	$GLOBALS['_BAZAR_']['id_fiche']=$_REQUEST['id_fiche'];
84
	$GLOBALS['_BAZAR_']['id_fiche']=$_REQUEST['id_fiche'];
83
	// récupération du type d'annonce à partir de la fiche
85
	// récupération du type d'annonce à partir de la fiche
84
	$requete = 'select bf_ce_nature from bazar_fiche where bf_id_fiche='.$GLOBALS['_BAZAR_']['id_fiche'] ;
86
	$requete = 'select bf_ce_nature from bazar_fiche where bf_id_fiche='.$GLOBALS['_BAZAR_']['id_fiche'] ;
85
	$resultat = $GLOBALS['_BAZAR_']['db']->query ($requete) ;
87
	$resultat = $GLOBALS['_BAZAR_']['db']->query ($requete) ;
86
	if (DB::isError($resultat)) {
88
	if (DB::isError($resultat)) {
87
		echo $resultat->getMessage().'<br />'.$resultat->getInfoDebug();	
89
		echo $resultat->getMessage().'<br />'.$resultat->getInfoDebug();	
88
	}
90
	}
89
	$ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT) ;
91
	$ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT) ;
90
	$GLOBALS['_BAZAR_']['id_typeannonce'] = $ligne->bf_ce_nature ;
92
	$GLOBALS['_BAZAR_']['id_typeannonce'] = $ligne->bf_ce_nature ;
91
	$resultat->free();
93
	$resultat->free();
92
}		
94
}		
93
if (isset($_REQUEST['typeannonce'])) {
95
if (isset($_REQUEST['typeannonce'])) {
94
	$GLOBALS['_BAZAR_']['id_typeannonce']=$_REQUEST['typeannonce'];
96
	$GLOBALS['_BAZAR_']['id_typeannonce']=$_REQUEST['typeannonce'];
95
}
97
}
96
 
98
 
97
if ((isset($GLOBALS['_BAZAR_']['id_typeannonce']))and($GLOBALS['_BAZAR_']['id_typeannonce']!='toutes')) {
99
if ((isset($GLOBALS['_BAZAR_']['id_typeannonce']))and($GLOBALS['_BAZAR_']['id_typeannonce']!='toutes')) {
98
	$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'];
100
	$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'];
99
	$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
101
	$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
100
	if (DB::isError($resultat)) {
102
	if (DB::isError($resultat)) {
101
		die ($resultat->getMessage().$resultat->getDebugInfo()) ;
103
		die ($resultat->getMessage().$resultat->getDebugInfo()) ;
102
	}
104
	}
103
	$ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC);
105
	$ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC);
104
	$GLOBALS['_BAZAR_']['typeannonce']=$ligne['bn_label_nature'];
106
	$GLOBALS['_BAZAR_']['typeannonce']=$ligne['bn_label_nature'];
105
	$GLOBALS['_BAZAR_']['condition']=$ligne['bn_condition'];
107
	$GLOBALS['_BAZAR_']['condition']=$ligne['bn_condition'];
106
    $GLOBALS['_BAZAR_']['template']=$ligne['bn_template'];
108
    $GLOBALS['_BAZAR_']['template']=$ligne['bn_template'];
107
	$GLOBALS['_BAZAR_']['commentaire']=$ligne['bn_commentaire'];
109
	$GLOBALS['_BAZAR_']['commentaire']=$ligne['bn_commentaire'];
108
	$GLOBALS['_BAZAR_']['appropriation']=$ligne['bn_appropriation'];
110
	$GLOBALS['_BAZAR_']['appropriation']=$ligne['bn_appropriation'];
109
	$GLOBALS['_BAZAR_']['image_titre']=$ligne['bn_image_titre'];
111
	$GLOBALS['_BAZAR_']['image_titre']=$ligne['bn_image_titre'];
110
	$GLOBALS['_BAZAR_']['image_logo']=$ligne['bn_image_logo'];	
112
	$GLOBALS['_BAZAR_']['image_logo']=$ligne['bn_image_logo'];	
111
}
113
}
112
if (!isset($GLOBALS['_BAZAR_']['id_typeannonce'])) $GLOBALS['_BAZAR_']['id_typeannonce'] = 'toutes' ;
114
if (!isset($GLOBALS['_BAZAR_']['id_typeannonce'])) $GLOBALS['_BAZAR_']['id_typeannonce'] = 'toutes' ;
113
// +------------------------------------------------------------------------------------------------------+
115
// +------------------------------------------------------------------------------------------------------+
114
// |                                           LISTE de FONCTIONS                                         |
116
// |                                           LISTE de FONCTIONS                                         |
115
// +------------------------------------------------------------------------------------------------------+
117
// +------------------------------------------------------------------------------------------------------+
116
if ($GLOBALS['_BAZAR_']['affiche_menu']) {
118
if ($GLOBALS['_BAZAR_']['affiche_menu']) {
117
	//---------------le menu de l'appli-----------
119
	//---------------le menu de l'appli-----------
118
	function afficherContenuNavigation () {
120
	function afficherContenuNavigation () {
119
		$res ='<ul id="BAZ_menu">'."\n";
121
		$res ='<ul id="BAZ_menu">'."\n";
120
		$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_VOIR_TOUTES_ANNONCES);
122
		$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_VOIR_TOUTES_ANNONCES);
121
		$GLOBALS['_BAZAR_']['url']->addQueryString('nature', 'toutes');
-
 
122
		//partie consultation d'annonces
123
		//partie consultation d'annonces
123
		$res .= '<li id="consulter"><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_CONSULTER.'</a>'."\n".'</li>'."\n";
124
		$res .= '<li id="consulter"><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_CONSULTER.'</a>'."\n".'</li>'."\n";
124
		$GLOBALS['_BAZAR_']['url']->removeQueryString('nature');
125
		$GLOBALS['_BAZAR_']['url']->removeQueryString('nature');
125
	
126
	
126
		//partie abonnement aux annonces
127
		//partie abonnement aux annonces
127
		$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_S_INSCRIRE);
128
		$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_S_INSCRIRE);
128
		$res .= '<li id="inscrire"><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_S_ABONNER.'</a></li>'."\n" ;
129
		$res .= '<li id="inscrire"><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_S_ABONNER.'</a></li>'."\n" ;
129
		$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
130
		$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
130
			
131
			
131
		//partie saisie d'annonces
132
		//partie saisie d'annonces
132
		$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_DEPOSER_ANNONCE);
133
		$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_DEPOSER_ANNONCE);
133
		$res .= '<li id="deposer"><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_SAISIR.'</a>'."\n".'</li>'."\n";
134
		$res .= '<li id="deposer"><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_SAISIR.'</a>'."\n".'</li>'."\n";
134
		$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
135
		$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
135
			
136
			
136
		//choix des administrateurs	
137
		//choix des administrateurs	
137
		$utilisateur = new Administrateur_bazar($GLOBALS['AUTH']) ;
138
		$utilisateur = new Administrateur_bazar($GLOBALS['AUTH']) ;
138
		$est_admin=0;
139
		$est_admin=0;
139
		if ($GLOBALS['AUTH']->getAuth()) {
140
		if ($GLOBALS['AUTH']->getAuth()) {
140
			$requete='SELECT bn_id_nature FROM bazar_nature';
141
			$requete='SELECT bn_id_nature FROM bazar_nature';
141
			$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
142
			$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
142
			if (DB::isError($resultat)) {
143
			if (DB::isError($resultat)) {
143
				die ($resultat->getMessage().$resultat->getDebugInfo()) ;
144
				die ($resultat->getMessage().$resultat->getDebugInfo()) ;
144
			}
145
			}
145
			while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
146
			while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
146
				if ($utilisateur->isAdmin ($ligne['bn_id_nature'])) {
147
				if ($utilisateur->isAdmin ($ligne['bn_id_nature'])) {
147
					$est_admin=1;
148
					$est_admin=1;
148
			    }
149
			    }
149
			}
150
			}
150
			if ($est_admin || $utilisateur->isSuperAdmin()) {
151
			if ($est_admin || $utilisateur->isSuperAdmin()) {
151
				//partie administrer
152
				//partie administrer
152
				$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_ANNONCES_A_VALIDER);
153
				$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_ANNONCES_A_VALIDER);
153
				$res .= '<li id="administrer"><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_ADMINISTRER.'</a></li>'."\n";
154
				$res .= '<li id="administrer"><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_ADMINISTRER.'</a></li>'."\n";
154
				$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
155
				$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
155
				
156
				
156
				if ($utilisateur->isSuperAdmin()) {
157
				if ($utilisateur->isSuperAdmin()) {
157
					$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_GERER_DROITS);
158
					$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_GERER_DROITS);
158
					$res .= '<li id="gerer"><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_GESTION_DES_DROITS.'</a></li>'."\n" ;
159
					$res .= '<li id="gerer"><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_GESTION_DES_DROITS.'</a></li>'."\n" ;
159
					$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
160
					$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
160
				}
161
				}
161
			}
162
			}
162
		}	
163
		}	
163
		$res.= '</ul>'."\n";
164
		$res.= '</ul>'."\n";
164
	    return $res ;
165
	    return $res ;
165
	}
166
	}
166
}
167
}
167
    
168
    
168
function afficherContenuCorps() {	
169
function afficherContenuCorps() {	
169
	$res = '';
170
	$res = '';
170
	$res.='<h1>'.$GLOBALS['_GEN_commun']['info_menu']->gm_titre.'</h1>'."\n";
171
	$res.='<h1>'.$GLOBALS['_GEN_commun']['info_menu']->gm_titre.'</h1>'."\n";
171
 
172
 
172
	if (isset($_GET['action'])) {
173
	if (isset($_GET['action'])) {
173
		if (($_GET['action']!=BAZ_ACTION_NOUVEAU_V)and($_GET['action']!=BAZ_ACTION_MODIFIER_V)) unset($_SESSION['formulaire_annonce_valide']);
174
		if (($_GET['action']!=BAZ_ACTION_NOUVEAU_V)and($_GET['action']!=BAZ_ACTION_MODIFIER_V)) unset($_SESSION['formulaire_annonce_valide']);
174
		switch ($_GET['action']) {
175
		switch ($_GET['action']) {
175
			case BAZ_VOIR_VOS_ANNONCES : $res .= mes_fiches(); break;
176
			case BAZ_VOIR_VOS_ANNONCES : $res .= mes_fiches(); break;
176
			case BAZ_VOIR_TOUTES_ANNONCES : $res .= baz_liste($GLOBALS['_BAZAR_']['id_typeannonce']); break;
177
			case BAZ_VOIR_TOUTES_ANNONCES : $res .= baz_liste($GLOBALS['_BAZAR_']['id_typeannonce']); break;
177
			case BAZ_DEPOSER_ANNONCE : $res .= baz_formulaire(BAZ_DEPOSER_ANNONCE); break;
178
			case BAZ_DEPOSER_ANNONCE : $res .= baz_formulaire(BAZ_DEPOSER_ANNONCE); break;
178
			case BAZ_ANNONCES_A_VALIDER : $res .= fiches_a_valider().baz_liste(); break;
179
			case BAZ_ANNONCES_A_VALIDER : $res .= fiches_a_valider().baz_liste(); break;
179
			case BAZ_ADMINISTRER_ANNONCES : $res .= baz_administrer_annonces(); break;
180
			case BAZ_ADMINISTRER_ANNONCES : $res .= baz_administrer_annonces(); break;
180
			case BAZ_MODIFIER_FICHE : $res .= baz_formulaire(BAZ_ACTION_MODIFIER); break;
181
			case BAZ_MODIFIER_FICHE : $res .= baz_formulaire(BAZ_ACTION_MODIFIER); break;
181
			case BAZ_SUPPRIMER_FICHE : $res .= baz_suppression().baz_liste('',$GLOBALS['id_user'],''); break;
182
			case BAZ_SUPPRIMER_FICHE : $res .= baz_suppression().baz_liste('',$GLOBALS['id_user'],''); break;
182
			case BAZ_VOIR_FICHE : $res .= baz_voir_fiche(1); break;
183
			case BAZ_VOIR_FICHE : $res .= baz_voir_fiche(1); break;
183
			case BAZ_ACTION_NOUVEAU : $res .= baz_formulaire(BAZ_ACTION_NOUVEAU); break;
184
			case BAZ_ACTION_NOUVEAU : $res .= baz_formulaire(BAZ_ACTION_NOUVEAU); break;
184
			case BAZ_ACTION_NOUVEAU_V : $res .= baz_formulaire(BAZ_ACTION_NOUVEAU_V).mes_fiches(); break;
185
			case BAZ_ACTION_NOUVEAU_V : $res .= baz_formulaire(BAZ_ACTION_NOUVEAU_V).mes_fiches(); break;
185
			case BAZ_ACTION_MODIFIER : $res .= baz_formulaire(BAZ_ACTION_MODIFIER); break;
186
			case BAZ_ACTION_MODIFIER : $res .= baz_formulaire(BAZ_ACTION_MODIFIER); break;
186
			case BAZ_ACTION_MODIFIER_V : $res .= baz_formulaire(BAZ_ACTION_MODIFIER_V).mes_fiches(); break;
187
			case BAZ_ACTION_MODIFIER_V : $res .= baz_formulaire(BAZ_ACTION_MODIFIER_V).mes_fiches(); break;
187
			case BAZ_ACTION_SUPPRESSION : $res .= baz_suppression().mes_fiches(); break;
188
			case BAZ_ACTION_SUPPRESSION : $res .= baz_suppression().mes_fiches(); break;
188
			case BAZ_ACTION_PUBLIER : publier_fiche(1) ;$res .= fiches_a_valider(); break;
189
			case BAZ_ACTION_PUBLIER : publier_fiche(1) ;$res .= fiches_a_valider(); break;
189
			case BAZ_ACTION_PAS_PUBLIER : publier_fiche(0) ;$res .= fiches_a_valider(); break;
190
			case BAZ_ACTION_PAS_PUBLIER : publier_fiche(0) ;$res .= fiches_a_valider(); break;
190
			case BAZ_GERER_DROITS : $res .= baz_gestion_droits(); break;
191
			case BAZ_GERER_DROITS : $res .= baz_gestion_droits(); break;
191
			case BAZ_S_INSCRIRE : $res .= baz_s_inscrire(); break;
192
			case BAZ_S_INSCRIRE : $res .= baz_s_inscrire(); break;
192
			case BAZ_VOIR_FLUX_RSS : header('Content-type: text/xml; charset=ISO-8859-1');include("bazarRSS.php");exit(0);break;
193
			case BAZ_VOIR_FLUX_RSS : header('Content-type: text/xml; charset=ISO-8859-1');include("bazarRSS.php");exit(0);break;
193
			default : $res .= baz_liste($GLOBALS['_BAZAR_']['id_typeannonce']) ;
194
			default : $res .= baz_liste($GLOBALS['_BAZAR_']['id_typeannonce']) ;
194
		}
195
		}
195
	}
196
	}
196
	else {
197
	else {
197
		$res .= baz_liste($GLOBALS['_BAZAR_']['id_typeannonce']);
198
		$res .= baz_liste($GLOBALS['_BAZAR_']['id_typeannonce']);
198
	}
199
	}
199
	return $res ;
200
	return $res ;
200
}
201
}
201
 
202
 
202
 
203
 
203
/* +--Fin du code ----------------------------------------------------------------------------------------+
204
/* +--Fin du code ----------------------------------------------------------------------------------------+
204
*
205
*
205
* $Log: not supported by cvs2svn $
206
* $Log: not supported by cvs2svn $
-
 
207
* Revision 1.30  2006/04/28 12:46:14  florian
-
 
208
* integration des liens vers annuaire
-
 
209
*
206
* Revision 1.29  2006/04/24 10:16:22  alexandre_tb
210
* Revision 1.29  2006/04/24 10:16:22  alexandre_tb
207
* ajout de la globale filtre.
211
* ajout de la globale filtre.
208
* elle remplace (à terme) catégorie nature
212
* elle remplace (à terme) catégorie nature
209
*
213
*
210
* Revision 1.28  2006/03/29 13:05:41  alexandre_tb
214
* Revision 1.28  2006/03/29 13:05:41  alexandre_tb
211
* utilisation de la classe Administrateur_bazar
215
* utilisation de la classe Administrateur_bazar
212
*
216
*
213
* Revision 1.27  2006/02/07 11:08:36  alexandre_tb
217
* Revision 1.27  2006/02/07 11:08:36  alexandre_tb
214
* utilisation de la classe Utilisateur_bazar pour la vérification des droits
218
* utilisation de la classe Utilisateur_bazar pour la vérification des droits
215
*
219
*
216
* Revision 1.26  2006/02/06 09:33:53  alexandre_tb
220
* Revision 1.26  2006/02/06 09:33:53  alexandre_tb
217
* modification de l'affichage lors de la saisie de fiche
221
* modification de l'affichage lors de la saisie de fiche
218
*
222
*
219
* Revision 1.25  2006/01/30 17:25:38  alexandre_tb
223
* Revision 1.25  2006/01/30 17:25:38  alexandre_tb
220
* correction de bugs
224
* correction de bugs
221
*
225
*
222
* Revision 1.24  2006/01/26 11:06:43  alexandre_tb
226
* Revision 1.24  2006/01/26 11:06:43  alexandre_tb
223
* ajout d'une requete pour recupere l'id_nature si un id_fiche est passé dans l'url
227
* ajout d'une requete pour recupere l'id_nature si un id_fiche est passé dans l'url
224
*
228
*
225
* Revision 1.23  2006/01/17 10:07:36  alexandre_tb
229
* Revision 1.23  2006/01/17 10:07:36  alexandre_tb
226
* en cours
230
* en cours
227
*
231
*
228
* Revision 1.22  2006/01/16 15:11:28  alexandre_tb
232
* Revision 1.22  2006/01/16 15:11:28  alexandre_tb
229
* simplification code
233
* simplification code
230
*
234
*
231
* Revision 1.21  2006/01/13 14:12:52  florian
235
* Revision 1.21  2006/01/13 14:12:52  florian
232
* utilisation des temlates dans la table bazar_nature
236
* utilisation des temlates dans la table bazar_nature
233
*
237
*
234
* Revision 1.20  2006/01/05 16:28:25  alexandre_tb
238
* Revision 1.20  2006/01/05 16:28:25  alexandre_tb
235
* prise en chage des checkbox, reste la mise à jour à gérer
239
* prise en chage des checkbox, reste la mise à jour à gérer
236
*
240
*
237
* Revision 1.19  2006/01/03 10:19:31  florian
241
* Revision 1.19  2006/01/03 10:19:31  florian
238
* 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...
242
* 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...
239
*
243
*
240
* Revision 1.18  2005/12/02 10:57:03  florian
244
* Revision 1.18  2005/12/02 10:57:03  florian
241
* MAJ pour paramétrage dans gestion de menus papyrus
245
* MAJ pour paramétrage dans gestion de menus papyrus
242
*
246
*
243
* Revision 1.17  2005/12/01 16:05:41  florian
247
* Revision 1.17  2005/12/01 16:05:41  florian
244
* changement des chemins pour appli Pear
248
* changement des chemins pour appli Pear
245
*
249
*
246
* Revision 1.16  2005/12/01 15:31:30  florian
250
* Revision 1.16  2005/12/01 15:31:30  florian
247
* correction bug modifs et saisies
251
* correction bug modifs et saisies
248
*
252
*
249
* Revision 1.15  2005/11/30 13:58:45  florian
253
* Revision 1.15  2005/11/30 13:58:45  florian
250
* ajouts graphisme (logos, boutons), changement structure SQL bazar_fiche
254
* ajouts graphisme (logos, boutons), changement structure SQL bazar_fiche
251
*
255
*
252
* Revision 1.14  2005/11/24 16:17:13  florian
256
* Revision 1.14  2005/11/24 16:17:13  florian
253
* corrections bugs, ajout des cases à cocher
257
* corrections bugs, ajout des cases à cocher
254
*
258
*
255
* Revision 1.13  2005/11/14 16:04:54  florian
259
* Revision 1.13  2005/11/14 16:04:54  florian
256
* maj bug affichage flux
260
* maj bug affichage flux
257
*
261
*
258
* Revision 1.12  2005/11/07 17:05:46  florian
262
* Revision 1.12  2005/11/07 17:05:46  florian
259
* amélioration validation conditions de saisie, ajout des règles spécifiques de saisie des formulaires
263
* amélioration validation conditions de saisie, ajout des règles spécifiques de saisie des formulaires
260
*
264
*
261
* Revision 1.11  2005/10/21 16:15:04  florian
265
* Revision 1.11  2005/10/21 16:15:04  florian
262
* mise a jour appropriation
266
* mise a jour appropriation
263
*
267
*
264
* Revision 1.10  2005/10/12 17:20:33  ddelon
268
* Revision 1.10  2005/10/12 17:20:33  ddelon
265
* Reorganisation calendrier + applette
269
* Reorganisation calendrier + applette
266
*
270
*
267
* Revision 1.9  2005/10/12 13:35:07  florian
271
* Revision 1.9  2005/10/12 13:35:07  florian
268
* amélioration de l'interface de bazar, de manière a simplifier les consultations, et à harmoniser par rapport aux Ressources
272
* amélioration de l'interface de bazar, de manière a simplifier les consultations, et à harmoniser par rapport aux Ressources
269
*
273
*
270
* Revision 1.8  2005/09/30 13:00:05  ddelon
274
* Revision 1.8  2005/09/30 13:00:05  ddelon
271
* Fiche bazar generique
275
* Fiche bazar generique
272
*
276
*
273
* Revision 1.7  2005/09/30 12:34:44  ddelon
277
* Revision 1.7  2005/09/30 12:34:44  ddelon
274
* petite modification pour integration bazar dans papyrus
278
* petite modification pour integration bazar dans papyrus
275
*
279
*
276
* Revision 1.6  2005/09/30 12:22:54  florian
280
* Revision 1.6  2005/09/30 12:22:54  florian
277
* Ajouts commentaires pour fiche, modifications graphiques, maj SQL
281
* Ajouts commentaires pour fiche, modifications graphiques, maj SQL
278
*
282
*
279
* Revision 1.4  2005/07/21 19:03:12  florian
283
* Revision 1.4  2005/07/21 19:03:12  florian
280
* nouveautés bazar: templates fiches, correction de bugs, ...
284
* nouveautés bazar: templates fiches, correction de bugs, ...
281
*
285
*
282
* Revision 1.2  2005/02/22 15:33:32  florian
286
* Revision 1.2  2005/02/22 15:33:32  florian
283
* integration dans Papyrus
287
* integration dans Papyrus
284
*
288
*
285
* Revision 1.1.1.1  2005/02/17 18:05:11  florian
289
* Revision 1.1.1.1  2005/02/17 18:05:11  florian
286
* Import initial de Bazar
290
* Import initial de Bazar
287
*
291
*
288
* Revision 1.1.1.1  2005/02/17 11:09:50  florian
292
* Revision 1.1.1.1  2005/02/17 11:09:50  florian
289
* Import initial
293
* Import initial
290
*
294
*
291
* Revision 1.1.1.1  2005/02/16 18:06:35  florian
295
* Revision 1.1.1.1  2005/02/16 18:06:35  florian
292
* import de la nouvelle version
296
* import de la nouvelle version
293
*
297
*
294
* Revision 1.3  2004/07/05 15:10:14  florian
298
* Revision 1.3  2004/07/05 15:10:14  florian
295
* changement interface de saisie
299
* changement interface de saisie
296
*
300
*
297
* Revision 1.2  2004/07/01 10:13:41  florian
301
* Revision 1.2  2004/07/01 10:13:41  florian
298
* modif Florian
302
* modif Florian
299
*
303
*
300
* Revision 1.1  2004/06/23 09:58:32  alex
304
* Revision 1.1  2004/06/23 09:58:32  alex
301
* version initiale
305
* version initiale
302
*
306
*
303
* Revision 1.1  2004/06/18 09:00:07  alex
307
* Revision 1.1  2004/06/18 09:00:07  alex
304
* version initiale
308
* version initiale
305
*
309
*
306
*
310
*
307
* +-- Fin du code ----------------------------------------------------------------------------------------+
311
* +-- Fin du code ----------------------------------------------------------------------------------------+
308
*/
312
*/
309
?>
313
?>