Subversion Repositories Applications.bazar

Rev

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

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