Subversion Repositories Applications.bazar

Rev

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

Rev 126 Rev 132
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.31 2006-05-19 13:54:32 florian Exp $
22
// CVS : $Id: bazar.php,v 1.32 2006-06-21 15:40:15 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.31 $ $Date: 2006-05-19 13:54:32 $
31
*@version       $Revision: 1.32 $ $Date: 2006-06-21 15:40:15 $
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
	
-
 
127
		// Mes fiches
-
 
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";
-
 
130
		$GLOBALS['_BAZAR_']['url']->removeQueryString('nature');
126
	
131
		
127
		//partie abonnement aux annonces
132
		//partie abonnement aux annonces
128
		$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_S_INSCRIRE);
133
		$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_S_INSCRIRE);
129
		$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" ;
130
		$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
135
		$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
131
			
136
			
132
		//partie saisie d'annonces
137
		//partie saisie d'annonces
133
		$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_DEPOSER_ANNONCE);
138
		$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_DEPOSER_ANNONCE);
134
		$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";
135
		$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
140
		$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
136
			
141
			
137
		//choix des administrateurs	
142
		//choix des administrateurs	
138
		$utilisateur = new Administrateur_bazar($GLOBALS['AUTH']) ;
143
		$utilisateur = new Administrateur_bazar($GLOBALS['AUTH']) ;
139
		$est_admin=0;
144
		$est_admin=0;
140
		if ($GLOBALS['AUTH']->getAuth()) {
145
		if ($GLOBALS['AUTH']->getAuth()) {
141
			$requete='SELECT bn_id_nature FROM bazar_nature';
146
			$requete='SELECT bn_id_nature FROM bazar_nature';
142
			$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
147
			$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
143
			if (DB::isError($resultat)) {
148
			if (DB::isError($resultat)) {
144
				die ($resultat->getMessage().$resultat->getDebugInfo()) ;
149
				die ($resultat->getMessage().$resultat->getDebugInfo()) ;
145
			}
150
			}
146
			while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
151
			while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
147
				if ($utilisateur->isAdmin ($ligne['bn_id_nature'])) {
152
				if ($utilisateur->isAdmin ($ligne['bn_id_nature'])) {
148
					$est_admin=1;
153
					$est_admin=1;
149
			    }
154
			    }
150
			}
155
			}
151
			if ($est_admin || $utilisateur->isSuperAdmin()) {
156
			if ($est_admin || $utilisateur->isSuperAdmin()) {
152
				//partie administrer
157
				//partie administrer
153
				$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_ANNONCES_A_VALIDER);
158
				$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_ANNONCES_A_VALIDER);
154
				$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";
155
				$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
160
				$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
156
				
161
				
157
				if ($utilisateur->isSuperAdmin()) {
162
				if ($utilisateur->isSuperAdmin()) {
158
					$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_GERER_DROITS);
163
					$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_GERER_DROITS);
159
					$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" ;
160
					$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
165
					$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
161
				}
166
				}
162
			}
167
			}
163
		}	
168
		}	
164
		$res.= '</ul>'."\n";
169
		$res.= '</ul>'."\n";
165
	    return $res ;
170
	    return $res ;
166
	}
171
	}
167
}
172
}
168
    
173
    
169
function afficherContenuCorps() {	
174
function afficherContenuCorps() {	
170
	$res = '';
175
	$res = '';
171
	$res.='<h1>'.$GLOBALS['_GEN_commun']['info_menu']->gm_titre.'</h1>'."\n";
176
	$res.='<h1>'.$GLOBALS['_GEN_commun']['info_menu']->gm_titre.'</h1>'."\n";
172
 
177
 
173
	if (isset($_GET['action'])) {
178
	if (isset($_GET['action'])) {
174
		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']);
175
		switch ($_GET['action']) {
180
		switch ($_GET['action']) {
176
			case BAZ_VOIR_VOS_ANNONCES : $res .= mes_fiches(); break;
181
			case BAZ_VOIR_VOS_ANNONCES : $res .= mes_fiches(); break;
177
			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;
178
			case BAZ_DEPOSER_ANNONCE : $res .= baz_formulaire(BAZ_DEPOSER_ANNONCE); break;
183
			case BAZ_DEPOSER_ANNONCE : $res .= baz_formulaire(BAZ_DEPOSER_ANNONCE); break;
179
			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;
180
			case BAZ_ADMINISTRER_ANNONCES : $res .= baz_administrer_annonces(); break;
185
			case BAZ_ADMINISTRER_ANNONCES : $res .= baz_administrer_annonces(); break;
181
			case BAZ_MODIFIER_FICHE : $res .= baz_formulaire(BAZ_ACTION_MODIFIER); break;
186
			case BAZ_MODIFIER_FICHE : $res .= baz_formulaire(BAZ_ACTION_MODIFIER); break;
182
			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;
183
			case BAZ_VOIR_FICHE : $res .= baz_voir_fiche(1); break;
188
			case BAZ_VOIR_FICHE : $res .= baz_voir_fiche(1); break;
184
			case BAZ_ACTION_NOUVEAU : $res .= baz_formulaire(BAZ_ACTION_NOUVEAU); break;
189
			case BAZ_ACTION_NOUVEAU : $res .= baz_formulaire(BAZ_ACTION_NOUVEAU); break;
185
			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;
186
			case BAZ_ACTION_MODIFIER : $res .= baz_formulaire(BAZ_ACTION_MODIFIER); break;
191
			case BAZ_ACTION_MODIFIER : $res .= baz_formulaire(BAZ_ACTION_MODIFIER); break;
187
			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;
188
			case BAZ_ACTION_SUPPRESSION : $res .= baz_suppression().mes_fiches(); break;
193
			case BAZ_ACTION_SUPPRESSION : $res .= baz_suppression().mes_fiches(); break;
189
			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;
190
			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;
191
			case BAZ_GERER_DROITS : $res .= baz_gestion_droits(); break;
196
			case BAZ_GERER_DROITS : $res .= baz_gestion_droits(); break;
192
			case BAZ_S_INSCRIRE : $res .= baz_s_inscrire(); break;
197
			case BAZ_S_INSCRIRE : $res .= baz_s_inscrire(); break;
193
			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;
194
			default : $res .= baz_liste($GLOBALS['_BAZAR_']['id_typeannonce']) ;
199
			default : $res .= baz_liste($GLOBALS['_BAZAR_']['id_typeannonce']) ;
195
		}
200
		}
196
	}
201
	}
197
	else {
202
	else {
198
		$res .= baz_liste($GLOBALS['_BAZAR_']['id_typeannonce']);
203
		$res .= baz_liste($GLOBALS['_BAZAR_']['id_typeannonce']);
199
	}
204
	}
200
	return $res ;
205
	return $res ;
201
}
206
}
202
 
207
 
203
 
208
 
204
/* +--Fin du code ----------------------------------------------------------------------------------------+
209
/* +--Fin du code ----------------------------------------------------------------------------------------+
205
*
210
*
206
* $Log: not supported by cvs2svn $
211
* $Log: not supported by cvs2svn $
-
 
212
* Revision 1.31  2006/05/19 13:54:32  florian
-
 
213
* stabilisation du moteur de recherche, corrections bugs, lien recherche avancee
-
 
214
*
207
* Revision 1.30  2006/04/28 12:46:14  florian
215
* Revision 1.30  2006/04/28 12:46:14  florian
208
* integration des liens vers annuaire
216
* integration des liens vers annuaire
209
*
217
*
210
* Revision 1.29  2006/04/24 10:16:22  alexandre_tb
218
* Revision 1.29  2006/04/24 10:16:22  alexandre_tb
211
* ajout de la globale filtre.
219
* ajout de la globale filtre.
212
* elle remplace (à terme) catégorie nature
220
* elle remplace (à terme) catégorie nature
213
*
221
*
214
* Revision 1.28  2006/03/29 13:05:41  alexandre_tb
222
* Revision 1.28  2006/03/29 13:05:41  alexandre_tb
215
* utilisation de la classe Administrateur_bazar
223
* utilisation de la classe Administrateur_bazar
216
*
224
*
217
* Revision 1.27  2006/02/07 11:08:36  alexandre_tb
225
* Revision 1.27  2006/02/07 11:08:36  alexandre_tb
218
* utilisation de la classe Utilisateur_bazar pour la vérification des droits
226
* utilisation de la classe Utilisateur_bazar pour la vérification des droits
219
*
227
*
220
* Revision 1.26  2006/02/06 09:33:53  alexandre_tb
228
* Revision 1.26  2006/02/06 09:33:53  alexandre_tb
221
* modification de l'affichage lors de la saisie de fiche
229
* modification de l'affichage lors de la saisie de fiche
222
*
230
*
223
* Revision 1.25  2006/01/30 17:25:38  alexandre_tb
231
* Revision 1.25  2006/01/30 17:25:38  alexandre_tb
224
* correction de bugs
232
* correction de bugs
225
*
233
*
226
* Revision 1.24  2006/01/26 11:06:43  alexandre_tb
234
* Revision 1.24  2006/01/26 11:06:43  alexandre_tb
227
* ajout d'une requete pour recupere l'id_nature si un id_fiche est passé dans l'url
235
* ajout d'une requete pour recupere l'id_nature si un id_fiche est passé dans l'url
228
*
236
*
229
* Revision 1.23  2006/01/17 10:07:36  alexandre_tb
237
* Revision 1.23  2006/01/17 10:07:36  alexandre_tb
230
* en cours
238
* en cours
231
*
239
*
232
* Revision 1.22  2006/01/16 15:11:28  alexandre_tb
240
* Revision 1.22  2006/01/16 15:11:28  alexandre_tb
233
* simplification code
241
* simplification code
234
*
242
*
235
* Revision 1.21  2006/01/13 14:12:52  florian
243
* Revision 1.21  2006/01/13 14:12:52  florian
236
* utilisation des temlates dans la table bazar_nature
244
* utilisation des temlates dans la table bazar_nature
237
*
245
*
238
* Revision 1.20  2006/01/05 16:28:25  alexandre_tb
246
* Revision 1.20  2006/01/05 16:28:25  alexandre_tb
239
* prise en chage des checkbox, reste la mise à jour à gérer
247
* prise en chage des checkbox, reste la mise à jour à gérer
240
*
248
*
241
* Revision 1.19  2006/01/03 10:19:31  florian
249
* Revision 1.19  2006/01/03 10:19:31  florian
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...
250
* 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...
243
*
251
*
244
* Revision 1.18  2005/12/02 10:57:03  florian
252
* Revision 1.18  2005/12/02 10:57:03  florian
245
* MAJ pour paramétrage dans gestion de menus papyrus
253
* MAJ pour paramétrage dans gestion de menus papyrus
246
*
254
*
247
* Revision 1.17  2005/12/01 16:05:41  florian
255
* Revision 1.17  2005/12/01 16:05:41  florian
248
* changement des chemins pour appli Pear
256
* changement des chemins pour appli Pear
249
*
257
*
250
* Revision 1.16  2005/12/01 15:31:30  florian
258
* Revision 1.16  2005/12/01 15:31:30  florian
251
* correction bug modifs et saisies
259
* correction bug modifs et saisies
252
*
260
*
253
* Revision 1.15  2005/11/30 13:58:45  florian
261
* Revision 1.15  2005/11/30 13:58:45  florian
254
* ajouts graphisme (logos, boutons), changement structure SQL bazar_fiche
262
* ajouts graphisme (logos, boutons), changement structure SQL bazar_fiche
255
*
263
*
256
* Revision 1.14  2005/11/24 16:17:13  florian
264
* Revision 1.14  2005/11/24 16:17:13  florian
257
* corrections bugs, ajout des cases à cocher
265
* corrections bugs, ajout des cases à cocher
258
*
266
*
259
* Revision 1.13  2005/11/14 16:04:54  florian
267
* Revision 1.13  2005/11/14 16:04:54  florian
260
* maj bug affichage flux
268
* maj bug affichage flux
261
*
269
*
262
* Revision 1.12  2005/11/07 17:05:46  florian
270
* Revision 1.12  2005/11/07 17:05:46  florian
263
* amélioration validation conditions de saisie, ajout des règles spécifiques de saisie des formulaires
271
* amélioration validation conditions de saisie, ajout des règles spécifiques de saisie des formulaires
264
*
272
*
265
* Revision 1.11  2005/10/21 16:15:04  florian
273
* Revision 1.11  2005/10/21 16:15:04  florian
266
* mise a jour appropriation
274
* mise a jour appropriation
267
*
275
*
268
* Revision 1.10  2005/10/12 17:20:33  ddelon
276
* Revision 1.10  2005/10/12 17:20:33  ddelon
269
* Reorganisation calendrier + applette
277
* Reorganisation calendrier + applette
270
*
278
*
271
* Revision 1.9  2005/10/12 13:35:07  florian
279
* Revision 1.9  2005/10/12 13:35:07  florian
272
* amélioration de l'interface de bazar, de manière a simplifier les consultations, et à harmoniser par rapport aux Ressources
280
* amélioration de l'interface de bazar, de manière a simplifier les consultations, et à harmoniser par rapport aux Ressources
273
*
281
*
274
* Revision 1.8  2005/09/30 13:00:05  ddelon
282
* Revision 1.8  2005/09/30 13:00:05  ddelon
275
* Fiche bazar generique
283
* Fiche bazar generique
276
*
284
*
277
* Revision 1.7  2005/09/30 12:34:44  ddelon
285
* Revision 1.7  2005/09/30 12:34:44  ddelon
278
* petite modification pour integration bazar dans papyrus
286
* petite modification pour integration bazar dans papyrus
279
*
287
*
280
* Revision 1.6  2005/09/30 12:22:54  florian
288
* Revision 1.6  2005/09/30 12:22:54  florian
281
* Ajouts commentaires pour fiche, modifications graphiques, maj SQL
289
* Ajouts commentaires pour fiche, modifications graphiques, maj SQL
282
*
290
*
283
* Revision 1.4  2005/07/21 19:03:12  florian
291
* Revision 1.4  2005/07/21 19:03:12  florian
284
* nouveautés bazar: templates fiches, correction de bugs, ...
292
* nouveautés bazar: templates fiches, correction de bugs, ...
285
*
293
*
286
* Revision 1.2  2005/02/22 15:33:32  florian
294
* Revision 1.2  2005/02/22 15:33:32  florian
287
* integration dans Papyrus
295
* integration dans Papyrus
288
*
296
*
289
* Revision 1.1.1.1  2005/02/17 18:05:11  florian
297
* Revision 1.1.1.1  2005/02/17 18:05:11  florian
290
* Import initial de Bazar
298
* Import initial de Bazar
291
*
299
*
292
* Revision 1.1.1.1  2005/02/17 11:09:50  florian
300
* Revision 1.1.1.1  2005/02/17 11:09:50  florian
293
* Import initial
301
* Import initial
294
*
302
*
295
* Revision 1.1.1.1  2005/02/16 18:06:35  florian
303
* Revision 1.1.1.1  2005/02/16 18:06:35  florian
296
* import de la nouvelle version
304
* import de la nouvelle version
297
*
305
*
298
* Revision 1.3  2004/07/05 15:10:14  florian
306
* Revision 1.3  2004/07/05 15:10:14  florian
299
* changement interface de saisie
307
* changement interface de saisie
300
*
308
*
301
* Revision 1.2  2004/07/01 10:13:41  florian
309
* Revision 1.2  2004/07/01 10:13:41  florian
302
* modif Florian
310
* modif Florian
303
*
311
*
304
* Revision 1.1  2004/06/23 09:58:32  alex
312
* Revision 1.1  2004/06/23 09:58:32  alex
305
* version initiale
313
* version initiale
306
*
314
*
307
* Revision 1.1  2004/06/18 09:00:07  alex
315
* Revision 1.1  2004/06/18 09:00:07  alex
308
* version initiale
316
* version initiale
309
*
317
*
310
*
318
*
311
* +-- Fin du code ----------------------------------------------------------------------------------------+
319
* +-- Fin du code ----------------------------------------------------------------------------------------+
312
*/
320
*/
313
?>
321
?>