Subversion Repositories Applications.papyrus

Rev

Rev 1688 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1688 Rev 1750
Line 17... Line 17...
17
// |                                                                                                      |
17
// |                                                                                                      |
18
// | You should have received a copy of the GNU Lesser General Public                                     |
18
// | You should have received a copy of the GNU Lesser General Public                                     |
19
// | License along with this library; if not, write to the Free Software                                  |
19
// | License along with this library; if not, write to the Free Software                                  |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
21
// +------------------------------------------------------------------------------------------------------+
21
// +------------------------------------------------------------------------------------------------------+
22
// CVS : $Id: bazar.php,v 1.49 2007-10-24 13:26:02 alexandre_tb Exp $
22
// CVS : $Id: bazar.php,v 1.49.2.1 2007-12-04 09:01:17 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.49 $ $Date: 2007-10-24 13:26:02 $
31
*@version       $Revision: 1.49.2.1 $ $Date: 2007-12-04 09:01:17 $
32
// +------------------------------------------------------------------------------------------------------+
32
// +------------------------------------------------------------------------------------------------------+
33
*/
33
*/
Line 34... Line 34...
34
 
34
 
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
Line 148... Line 148...
148
		if (strstr(BAZ_VOIR_AFFICHER, strval(BAZ_VOIR_CONSULTER))) {
148
		if (strstr(BAZ_VOIR_AFFICHER, strval(BAZ_VOIR_CONSULTER))) {
149
			$GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_VOIR, BAZ_VOIR_CONSULTER);
149
			$GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_VOIR, BAZ_VOIR_CONSULTER);
150
			$res .= '<li id="consulter"';
150
			$res .= '<li id="consulter"';
151
			if ((isset($_GET[BAZ_VARIABLE_VOIR]) && $_GET[BAZ_VARIABLE_VOIR] == BAZ_VOIR_CONSULTER)) $res .=' class="onglet_actif" ';
151
			if ((isset($_GET[BAZ_VARIABLE_VOIR]) && $_GET[BAZ_VARIABLE_VOIR] == BAZ_VOIR_CONSULTER)) $res .=' class="onglet_actif" ';
152
			$res .='><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_CONSULTER.'</a>'."\n".'</li>'."\n";
152
			$res .='><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_CONSULTER.'</a>'."\n".'</li>'."\n";
153
			//$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_VOIR);
-
 
154
		}
153
		}
Line 155... Line 154...
155
		
154
		
156
		// Mes fiches
155
		// Mes fiches
157
		if (strstr(BAZ_VOIR_AFFICHER, strval(BAZ_VOIR_MES_FICHES))) {
156
		if (strstr(BAZ_VOIR_AFFICHER, strval(BAZ_VOIR_MES_FICHES))) {
158
			$GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_VOIR, BAZ_VOIR_MES_FICHES);
157
			$GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_VOIR, BAZ_VOIR_MES_FICHES);
159
			$res .= '<li id="consulter"';
158
			$res .= '<li id="mes_fiches"';
160
			if (isset($_GET[BAZ_VARIABLE_VOIR]) && $_GET[BAZ_VARIABLE_VOIR] == BAZ_VOIR_MES_FICHES) $res .=' class="onglet_actif" ';
159
			if (isset($_GET[BAZ_VARIABLE_VOIR]) && $_GET[BAZ_VARIABLE_VOIR] == BAZ_VOIR_MES_FICHES) $res .=' class="onglet_actif" ';
161
			$res .= '><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_VOIR_VOS_ANNONCES.'</a>'."\n".'</li>'."\n";
-
 
162
			//$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_VOIR);
160
			$res .= '><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_VOIR_VOS_ANNONCES.'</a>'."\n".'</li>'."\n";
Line 163... Line 161...
163
		}
161
		}
164
		
162
		
165
		//partie abonnement aux annonces
163
		//partie abonnement aux annonces
166
		if (strstr(BAZ_VOIR_AFFICHER, strval(BAZ_VOIR_S_ABONNER))) {
164
		if (strstr(BAZ_VOIR_AFFICHER, strval(BAZ_VOIR_S_ABONNER))) {
167
			$GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_VOIR, BAZ_VOIR_S_ABONNER);
165
			$GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_VOIR, BAZ_VOIR_S_ABONNER);
168
			$res .= '<li id="inscrire"';
166
			$res .= '<li id="inscrire"';
169
			if (isset($_GET[BAZ_VARIABLE_VOIR]) && $_GET[BAZ_VARIABLE_VOIR]==BAZ_VOIR_S_ABONNER) $res .=' class="onglet_actif" ';
-
 
170
			$res .= '><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_S_ABONNER.'</a></li>'."\n" ;
167
			if (isset($_GET[BAZ_VARIABLE_VOIR]) && $_GET[BAZ_VARIABLE_VOIR]==BAZ_VOIR_S_ABONNER) $res .=' class="onglet_actif" ';
Line 171... Line 168...
171
			//$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_VOIR);
168
			$res .= '><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_S_ABONNER.'</a></li>'."\n" ;
172
		}
169
		}
173
		
170
		
174
		//partie saisie d'annonces
171
		//partie saisie d'annonces
175
		if (strstr(BAZ_VOIR_AFFICHER, strval(BAZ_VOIR_SAISIR))) {
172
		if (strstr(BAZ_VOIR_AFFICHER, strval(BAZ_VOIR_SAISIR))) {
176
			$GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_VOIR, BAZ_VOIR_SAISIR);
173
			$GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_VOIR, BAZ_VOIR_SAISIR);
177
			$res .= '<li id="deposer"';
-
 
178
			if (isset($_GET[BAZ_VARIABLE_VOIR]) && ($_GET[BAZ_VARIABLE_VOIR]==BAZ_VOIR_SAISIR )) $res .=' class="onglet_actif" ';
174
			$res .= '<li id="deposer"';
Line 179... Line 175...
179
			$res .='><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_SAISIR.'</a>'."\n".'</li>'."\n";
175
			if (isset($_GET[BAZ_VARIABLE_VOIR]) && ($_GET[BAZ_VARIABLE_VOIR]==BAZ_VOIR_SAISIR )) $res .=' class="onglet_actif" ';
180
			//$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_VOIR);
176
			$res .='><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_SAISIR.'</a>'."\n".'</li>'."\n";
181
		}
177
		}
Line 199... Line 195...
199
				if (strstr(BAZ_VOIR_AFFICHER, strval(BAZ_VOIR_ADMIN))) {
195
				if (strstr(BAZ_VOIR_AFFICHER, strval(BAZ_VOIR_ADMIN))) {
200
					$GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_VOIR, BAZ_VOIR_ADMIN);
196
					$GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_VOIR, BAZ_VOIR_ADMIN);
201
					$res .= '<li id="administrer"';
197
					$res .= '<li id="administrer"';
202
					if (isset($_GET[BAZ_VARIABLE_VOIR]) && $_GET[BAZ_VARIABLE_VOIR]==BAZ_VOIR_ADMIN) $res .=' class="onglet_actif" ';
198
					if (isset($_GET[BAZ_VARIABLE_VOIR]) && $_GET[BAZ_VARIABLE_VOIR]==BAZ_VOIR_ADMIN) $res .=' class="onglet_actif" ';
203
					$res .='><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_ADMINISTRER.'</a></li>'."\n";
199
					$res .='><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_ADMINISTRER.'</a></li>'."\n";
204
					//$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_VOIR);
-
 
205
				}
200
				}
Line 206... Line 201...
206
				
201
				
207
				if ($utilisateur->isSuperAdmin()) {
202
				if ($utilisateur->isSuperAdmin()) {
208
					if (strstr(BAZ_VOIR_AFFICHER, strval(BAZ_VOIR_GESTION_DROITS))) {
203
					if (strstr(BAZ_VOIR_AFFICHER, strval(BAZ_VOIR_GESTION_DROITS))) {
209
						$GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_VOIR, BAZ_VOIR_GESTION_DROITS);
204
						$GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_VOIR, BAZ_VOIR_GESTION_DROITS);
210
						$res .= '<li id="gerer"';
205
						$res .= '<li id="gerer"';
211
						if (isset($_GET[BAZ_VARIABLE_VOIR]) && $_GET[BAZ_VARIABLE_VOIR]==BAZ_VOIR_GESTION_DROITS) $res .=' class="onglet_actif" ';
206
						if (isset($_GET[BAZ_VARIABLE_VOIR]) && $_GET[BAZ_VARIABLE_VOIR]==BAZ_VOIR_GESTION_DROITS) $res .=' class="onglet_actif" ';
212
						$res .='><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_GESTION_DES_DROITS.'</a></li>'."\n" ;
-
 
213
						//$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_VOIR);
207
						$res .='><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_GESTION_DES_DROITS.'</a></li>'."\n" ;
214
					}
208
					}
215
				}
209
				}
216
			}
210
			}
217
		}	
211
		}	
Line 231... Line 225...
231
	
225
	
232
	if (isset($_GET['action'])) {
226
	if (isset($_GET['action'])) {
233
		if (($_GET['action']!=BAZ_ACTION_NOUVEAU_V)and($_GET['action']!=BAZ_ACTION_MODIFIER_V)) unset($_SESSION['formulaire_annonce_valide']);
227
		if (($_GET['action']!=BAZ_ACTION_NOUVEAU_V)and($_GET['action']!=BAZ_ACTION_MODIFIER_V)) unset($_SESSION['formulaire_annonce_valide']);
234
		switch ($_GET['action']) {
228
		switch ($_GET['action']) {
235
			case BAZ_ACTION_VOIR_VOS_ANNONCES : $res .= mes_fiches(); break;
-
 
236
			//case BAZ_VOIR_TOUTES_ANNONCES : $res .= baz_liste($GLOBALS['_BAZAR_']['id_typeannonce']); break;
-
 
237
			//case BAZ_DEPOSER_ANNONCE : $res .= baz_formulaire(BAZ_DEPOSER_ANNONCE); break;
229
			case BAZ_ACTION_VOIR_VOS_ANNONCES : $res .= mes_fiches(); break;
238
			case BAZ_ANNONCES_A_VALIDER : $res .= fiches_a_valider(); break;
230
			case BAZ_ANNONCES_A_VALIDER : $res .= fiches_a_valider(); break;
239
			case BAZ_ADMINISTRER_ANNONCES : $res .= baz_administrer_annonces(); break;
-
 
240
			//case BAZ_MODIFIER_FICHE : $res .= baz_formulaire(BAZ_ACTION_MODIFIER); break;
231
			case BAZ_ADMINISTRER_ANNONCES : $res .= baz_administrer_annonces(); break;
241
			case BAZ_SUPPRIMER_FICHE : $res .= baz_suppression().baz_liste('',$GLOBALS['id_user'],''); break;
232
			case BAZ_SUPPRIMER_FICHE : $res .= baz_suppression().baz_liste('',$GLOBALS['id_user'],''); break;
242
			case BAZ_VOIR_FICHE : $res .= baz_voir_fiche(1); break;
-
 
243
			//case BAZ_ACTION_NOUVEAU : $res .= baz_formulaire(BAZ_ACTION_NOUVEAU); break;
233
			case BAZ_VOIR_FICHE : $res .= baz_voir_fiche(1); break;
244
			case BAZ_ACTION_NOUVEAU_V : $res .= baz_formulaire(BAZ_ACTION_NOUVEAU_V).mes_fiches(); break;
-
 
245
			//case BAZ_ACTION_MODIFIER : $res .= baz_formulaire(BAZ_ACTION_MODIFIER); break;
-
 
246
			//case BAZ_ACTION_MODIFIER_V : $res .= baz_formulaire(BAZ_ACTION_MODIFIER_V).baz_voir_fiche(1); break;
234
			case BAZ_ACTION_NOUVEAU_V : $res .= baz_formulaire(BAZ_ACTION_NOUVEAU_V).mes_fiches(); break;
247
			case BAZ_ACTION_SUPPRESSION : $res .= baz_suppression(); unset ($_GET['action']); break;
235
			case BAZ_ACTION_SUPPRESSION : $res .= baz_suppression(); unset ($_GET['action']); break;
248
			case BAZ_ACTION_PUBLIER : publier_fiche(1) ; break;
236
			case BAZ_ACTION_PUBLIER : publier_fiche(1) ; break;
249
			case BAZ_ACTION_PAS_PUBLIER : publier_fiche(0) ;$res .= fiches_a_valider(); break;
-
 
250
			//case BAZ_GERER_DROITS : $res .= baz_gestion_droits(); break;
237
			case BAZ_ACTION_PAS_PUBLIER : publier_fiche(0) ;$res .= fiches_a_valider(); break;
251
			case BAZ_S_INSCRIRE : $res .= baz_s_inscrire(); break;
238
			case BAZ_S_INSCRIRE : $res .= baz_s_inscrire(); break;
252
			case BAZ_VOIR_FLUX_RSS : header('Content-type: text/xml; charset=UTF-8');include("bazarRSS.php");exit(0);break;
-
 
253
			//default : $res .= baz_liste($GLOBALS['_BAZAR_']['id_typeannonce']) ;
239
			case BAZ_VOIR_FLUX_RSS : header('Content-type: text/xml; charset=UTF-8');include("bazarRSS.php");exit(0);break;
Line 254... Line 240...
254
		}
240
		}
255
		
241
		
256
	}
242
	}
Line 284... Line 270...
284
 
270
 
285
 
271
 
286
/* +--Fin du code ----------------------------------------------------------------------------------------+
272
/* +--Fin du code ----------------------------------------------------------------------------------------+
-
 
273
*
-
 
274
* $Log: not supported by cvs2svn $
-
 
275
* Revision 1.49  2007-10-24 13:26:02  alexandre_tb
287
*
276
* bug : double saisie d url
288
* $Log: not supported by cvs2svn $
277
*
289
* Revision 1.48  2007-10-17 08:24:59  alexandre_tb
278
* Revision 1.48  2007-10-17 08:24:59  alexandre_tb
290
* correction multilinguisme
279
* correction multilinguisme
291
*
280
*