Subversion Repositories Applications.bazar

Rev

Rev 270 | Rev 287 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 270 Rev 276
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.fonct.rss.php,v 1.86 2007-07-04 10:02:42 alexandre_tb Exp $
22
// CVS : $Id: bazar.fonct.rss.php,v 1.87 2007-07-05 08:27:35 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-2006
30
*@copyright     Tela-Botanica 2000-2006
31
*@version       $Revision: 1.86 $
31
*@version       $Revision: 1.87 $
32
// +------------------------------------------------------------------------------------------------------+
32
// +------------------------------------------------------------------------------------------------------+
33
*/
33
*/
Line 34... Line 34...
34
 
34
 
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
Line 176... Line 176...
176
	
176
	
177
	// Si on vient de l applette calendrier, $GLOBALS['_BAZAR_']['id_typeannonce'] est vide ...
177
	// Si on vient de l applette calendrier, $GLOBALS['_BAZAR_']['id_typeannonce'] est vide ...
178
	// mais on dispose de la constante BAZ_NUM_ANNONCE_CALENDRIER
178
	// mais on dispose de la constante BAZ_NUM_ANNONCE_CALENDRIER
Line 179... Line 179...
179
	if ($GLOBALS['_BAZAR_']['id_typeannonce'] == '' && defined('BAZ_NUM_ANNONCE_CALENDRIER'))  $GLOBALS['_BAZAR_']['id_typeannonce'] = BAZ_NUM_ANNONCE_CALENDRIER;
179
	if ($GLOBALS['_BAZAR_']['id_typeannonce'] == '' && defined('BAZ_NUM_ANNONCE_CALENDRIER'))  $GLOBALS['_BAZAR_']['id_typeannonce'] = BAZ_NUM_ANNONCE_CALENDRIER;
180
	
180
	
Line 181... Line 181...
181
	$requete='SELECT bn_id_nature, bn_template, bn_commentaire, bn_label_class FROM bazar_nature ';
181
	$requete='SELECT bn_id_nature, bn_template, bn_commentaire, bn_label_class,bn_label_nature FROM bazar_nature ';
182
	if ($GLOBALS['_BAZAR_']['id_typeannonce'] != 'toutes') $requete .= 'WHERE bn_id_nature='.$GLOBALS['_BAZAR_']['id_typeannonce'];
182
	if ($GLOBALS['_BAZAR_']['id_typeannonce'] != 'toutes') $requete .= 'WHERE bn_id_nature in ('.$GLOBALS['_BAZAR_']['id_typeannonce'].')';
183
	
183
	
184
	$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
184
	$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
Line 203... Line 203...
203
	if (isset ($GLOBALS['_BAZAR_']['image_titre']) && $GLOBALS['_BAZAR_']['image_titre']!='') {
203
	if (isset ($GLOBALS['_BAZAR_']['image_titre']) && $GLOBALS['_BAZAR_']['image_titre']!='') {
204
		$res .= '<img class="BAZ_img_titre" src="client/bazar/images/'.$GLOBALS['_BAZAR_']['image_titre'].'" alt="'.$result['bn_label_nature'].'" />'.'<br />'."\n";
204
		$res .= '<img class="BAZ_img_titre" src="client/bazar/images/'.$GLOBALS['_BAZAR_']['image_titre'].'" alt="'.$result['bn_label_nature'].'" />'.'<br />'."\n";
205
	}
205
	}
206
	//affiche le texte sinon
206
	//affiche le texte sinon
207
	else {
207
	else {
208
		$res .= '<h2 class="BAZ_titre BAZ_titre_'.$GLOBALS['_BAZAR_']['class'].'">'.$GLOBALS['_BAZAR_']['typeannonce'].'</h2>'."\n";
208
		$res .= '<h2 class="BAZ_titre BAZ_titre_'.$GLOBALS['_BAZAR_']['class'].'">'.$result['bn_label_nature'].'</h2>'."\n";
209
	}
209
	}
210
	$GLOBALS['_BAZAR_']['annonceur'] = $ligne['bf_ce_utilisateur'] ;
210
	$GLOBALS['_BAZAR_']['annonceur'] = $ligne['bf_ce_utilisateur'] ;
211
	//si le template existe, on genere le template
211
	//si le template existe, on genere le template
212
	if ((file_exists(BAZ_CHEMIN_APPLI.'templates/'.$GLOBALS['_BAZAR_']['typeannonce'].'-fiche.php'))) {
212
	if ((file_exists(BAZ_CHEMIN_APPLI.'templates/'.$GLOBALS['_BAZAR_']['typeannonce'].'-fiche.php'))) {
213
		include_once(BAZ_CHEMIN_APPLI.'templates/'.$GLOBALS['_BAZAR_']['typeannonce'].'-fiche.php');
213
		include_once(BAZ_CHEMIN_APPLI.'templates/'.$GLOBALS['_BAZAR_']['typeannonce'].'-fiche.php');
Line 270... Line 270...
270
			}
270
			}
271
			elseif ( $tableau[$i]['type']=='wikini' ) {
271
			elseif ( $tableau[$i]['type']=='wikini' ) {
272
				$res .= '<div class="BAZ_lien_wikini BAZ_lien_wikini_'.$GLOBALS['_BAZAR_']['class'].'"><a href="wikini/'.genere_nom_wiki2($ligne["bf_titre"], TRUE).'">'.BAZ_ENTRER_PROJET.'</a></div>'."\n";
272
				$res .= '<div class="BAZ_lien_wikini BAZ_lien_wikini_'.$GLOBALS['_BAZAR_']['class'].'"><a href="wikini/'.genere_nom_wiki2($ligne["bf_titre"], TRUE).'">'.BAZ_ENTRER_PROJET.'</a></div>'."\n";
273
			}
273
			}
274
		}
274
		}
275
	//afficher les liens pour l'annonce
275
		//afficher les liens pour l'annonce
276
	$requete = 'SELECT  bu_url, bu_descriptif_url FROM bazar_url WHERE bu_ce_fiche='.$GLOBALS['_BAZAR_']['id_fiche'];
276
		$requete = 'SELECT  bu_url, bu_descriptif_url FROM bazar_url WHERE bu_ce_fiche='.$GLOBALS['_BAZAR_']['id_fiche'];
277
	$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
277
		$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
278
	if (DB::isError($resultat)) {
278
		if (DB::isError($resultat)) {
279
		die ($resultat->getMessage().$resultat->getDebugInfo()) ;
279
			die ($resultat->getMessage().$resultat->getDebugInfo()) ;
280
	}
-
 
281
	if ($resultat->numRows()>0) {
-
 
282
		$res .= '<span class="BAZ_label BAZ_label_'.$GLOBALS['_BAZAR_']['class'].'">'.BAZ_LIEN_INTERNET.':</span>'."\n";
-
 
283
		$res .= '<span class="BAZ_description BAZ_description_'.$GLOBALS['_BAZAR_']['class'].'">'."\n";
-
 
284
		$res .= '<ul class="BAZ_liste BAZ_liste_'.$GLOBALS['_BAZAR_']['class'].'">'."\n";
-
 
285
		while ($ligne1 = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
-
 
286
			$res .= '<li class="BAZ_liste_lien BAZ_liste_lien_'.$GLOBALS['_BAZAR_']['class'].'"><a href="'.$ligne1['bu_url'].'" class="BAZ_lien" target="_blank">'.$ligne1['bu_descriptif_url'].'</a></li>'."\n";
-
 
287
		}
280
		}
288
		$res .= '</ul></span>'."\n";
-
 
289
	}
-
 
290
	
-
 
291
	//afficher les fichiers pour l'annonce
-
 
292
	$requete = 'SELECT  bfj_description, bfj_fichier FROM bazar_fichier_joint WHERE bfj_ce_fiche='.$GLOBALS['_BAZAR_']['id_fiche'];
-
 
293
	$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
-
 
294
	if (DB::isError($resultat)) {
-
 
295
		die ($resultat->getMessage().$resultat->getDebugInfo()) ;
-
 
296
	}
-
 
297
	if ($resultat->numRows()>0) {
281
		if ($resultat->numRows()>0) {
298
		$res .= '<span class="BAZ_label BAZ_label_'.$GLOBALS['_BAZAR_']['class'].'">'.BAZ_LISTE_FICHIERS_JOINTS.':</span>'."\n";
282
			$res .= '<span class="BAZ_label BAZ_label_'.$GLOBALS['_BAZAR_']['class'].'">'.BAZ_LIEN_INTERNET.':</span>'."\n";
299
		$res .= '<span class="BAZ_description BAZ_description_'.$GLOBALS['_BAZAR_']['class'].'">'."\n";
283
			$res .= '<span class="BAZ_description BAZ_description_'.$GLOBALS['_BAZAR_']['class'].'">'."\n";
300
		$res .= '<ul class="BAZ_liste BAZ_liste_'.$GLOBALS['_BAZAR_']['class'].'">'."\n";
284
			$res .= '<ul class="BAZ_liste BAZ_liste_'.$GLOBALS['_BAZAR_']['class'].'">'."\n";
301
		while ($ligne2 = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
285
			while ($ligne1 = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
302
			$res .= '<li class="BAZ_liste_fichier BAZ_liste_fichier_'.$GLOBALS['_BAZAR_']['class'].'"><a href="client/bazar/upload/'.$ligne2['bfj_fichier'].'">'.$ligne2['bfj_description'].'</a></li>'."\n";
286
				$res .= '<li class="BAZ_liste_lien BAZ_liste_lien_'.$GLOBALS['_BAZAR_']['class'].'"><a href="'.$ligne1['bu_url'].'" class="BAZ_lien" target="_blank">'.$ligne1['bu_descriptif_url'].'</a></li>'."\n";
303
		}
287
			}
304
		$res .= '</ul></span>'."\n";
288
			$res .= '</ul></span>'."\n";
305
	}
-
 
306
	$res .= '<div class="BAZ_bulle_corps BAZ_bulle_corps_'.$GLOBALS['_BAZAR_']['class'].'">'."\n";
-
 
307
	$res .= '<div class="BAZ_infos_fiche BAZ_infos_fiche_'.$GLOBALS['_BAZAR_']['class'].'">'."\n";
-
 
308
	$res .= '<span class="BAZ_nb_vues BAZ_nb_vues_'.$GLOBALS['_BAZAR_']['class'].'">'.BAZ_NB_VUS.$ligne['bf_nb_consultations'].BAZ_FOIS.'</span><br />'."\n";
-
 
309
	//affichage du redacteur de la fiche
-
 
310
	$requete = 'SELECT '.BAZ_CHAMPS_NOM.', '.BAZ_CHAMPS_PRENOM.', '.BAZ_CHAMPS_EMAIL.
-
 
311
					' FROM '.BAZ_ANNUAIRE.' WHERE '.BAZ_CHAMPS_ID.'='.$ligne['bf_ce_utilisateur'];
-
 
312
	$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
-
 
313
	if (DB::isError($resultat)) {
-
 
314
		die ($resultat->getMessage().$resultat->getDebugInfo()) ;
-
 
315
	}
-
 
316
	while ($redacteur = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
-
 
317
		$res .= BAZ_FICHE_NUMERO.$GLOBALS['_BAZAR_']['id_fiche'].BAZ_ECRITE.'<a href="mailto:'.$redacteur[BAZ_CHAMPS_EMAIL].'">'.$redacteur[BAZ_CHAMPS_PRENOM].' '.$redacteur[BAZ_CHAMPS_NOM].'</a><br />'."\n";
-
 
318
	}
-
 
319
	
-
 
320
	//informations complementaires (id fiche, etat publication,... )
-
 
321
	if ($danslappli==1) {
-
 
322
		if ($GLOBALS['_BAZAR_']['fiche_valide']==1 && $GLOBALS['_BAZAR_']['appropriation']!=1) {
-
 
323
			if ($ligne['bf_date_debut_validite_fiche'] != '0000-00-00' && $ligne['bf_date_fin_validite_fiche'] != '0000-00-00') {
-
 
324
			$res .= '<span class="BAZ_rubrique BAZ_rubrique_'.$GLOBALS['_BAZAR_']['class'].'">'.BAZ_PUBLIEE.':</span> '.BAZ_DU.
-
 
325
					' '.strftime('%d.%m.%Y',strtotime($ligne['bf_date_debut_validite_fiche'])).' '.
-
 
326
					BAZ_AU.' '.strftime('%d.%m.%Y',strtotime($ligne['bf_date_fin_validite_fiche'])).'<br />'."\n";
-
 
327
			}
-
 
328
		}
-
 
329
		elseif ($GLOBALS['_BAZAR_']['appropriation']!=1 || $GLOBALS['_BAZAR_']['fiche_valide']!=1) {
-
 
330
			$res .= '<span class="BAZ_rubrique  BAZ_rubrique_'.$GLOBALS['_BAZAR_']['class'].'">'.BAZ_PUBLIEE.':</span> '.BAZ_NON.'<br />'."\n";
-
 
331
		}
-
 
332
		//affichage des infos et du lien pour la mise a jour de la fiche
-
 
333
		if ( $est_admin || $GLOBALS['_BAZAR_']['annonceur']==$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID) ) {			
-
 
334
			$res .= '<span class="BAZ_rubrique BAZ_rubrique_'.$GLOBALS['_BAZAR_']['class'].'" id="date_creation">'.BAZ_DATE_CREATION.'</span> '.strftime('%d.%m.%Y %H:%M',strtotime($ligne['bf_date_creation_fiche']))."\n";
-
 
335
			$res .= '<span class="BAZ_rubrique BAZ_rubrique_'.$GLOBALS['_BAZAR_']['class'].'" id="date_mise_a_jour">'.BAZ_DATE_MAJ.'</span> '.strftime('%d.%m.%Y %H:%M',strtotime($ligne['bf_date_maj_fiche']))."\n";
-
 
336
		}
289
		}
-
 
290
		
-
 
291
		//afficher les fichiers pour l'annonce
-
 
292
		$requete = 'SELECT  bfj_description, bfj_fichier FROM bazar_fichier_joint WHERE bfj_ce_fiche='.$GLOBALS['_BAZAR_']['id_fiche'];
-
 
293
		$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
-
 
294
		if (DB::isError($resultat)) {
-
 
295
			die ($resultat->getMessage().$resultat->getDebugInfo()) ;
-
 
296
		}
337
		$res .= '</div>'."\n";
297
		if ($resultat->numRows()>0) {
338
		if ( $est_admin || $GLOBALS['_BAZAR_']['annonceur']==$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID) ) {	
298
			$res .= '<span class="BAZ_label BAZ_label_'.$GLOBALS['_BAZAR_']['class'].'">'.BAZ_LISTE_FICHIERS_JOINTS.':</span>'."\n";
-
 
299
			$res .= '<span class="BAZ_description BAZ_description_'.$GLOBALS['_BAZAR_']['class'].'">'."\n";
339
			$res .='<div class="BAZ_actions_fiche BAZ_actions_fiche_'.$GLOBALS['_BAZAR_']['class'].'">'."\n";
300
			$res .= '<ul class="BAZ_liste BAZ_liste_'.$GLOBALS['_BAZAR_']['class'].'">'."\n";
340
			if ( $est_admin ) {
301
			while ($ligne2 = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
-
 
302
				$res .= '<li class="BAZ_liste_fichier BAZ_liste_fichier_'.$GLOBALS['_BAZAR_']['class'].'"><a href="client/bazar/upload/'.$ligne2['bfj_fichier'].'">'.$ligne2['bfj_description'].'</a></li>'."\n";
-
 
303
			}
341
				$res .= '<ul>'."\n";
304
			$res .= '</ul></span>'."\n";
-
 
305
		}
342
				$lien_publie = &$GLOBALS['_BAZAR_']['url'];
306
		$res .= '<div class="BAZ_bulle_corps BAZ_bulle_corps_'.$GLOBALS['_BAZAR_']['class'].'">'."\n";
-
 
307
		$res .= '<div class="BAZ_infos_fiche BAZ_infos_fiche_'.$GLOBALS['_BAZAR_']['class'].'">'."\n";
-
 
308
		$res .= '<span class="BAZ_nb_vues BAZ_nb_vues_'.$GLOBALS['_BAZAR_']['class'].'">'.BAZ_NB_VUS.$ligne['bf_nb_consultations'].BAZ_FOIS.'</span><br />'."\n";
343
				$lien_publie->addQueryString('action', BAZ_VOIR_FICHE);
309
		//affichage du redacteur de la fiche
344
				$lien_publie->addQueryString('id_fiche', $GLOBALS['_BAZAR_']['id_fiche']);
310
		$requete = 'SELECT '.BAZ_CHAMPS_NOM.', '.BAZ_CHAMPS_PRENOM.', '.BAZ_CHAMPS_EMAIL.
345
				$lien_publie->addQueryString('typeannonce', $ligne['bf_ce_nature']);
311
						' FROM '.BAZ_ANNUAIRE.' WHERE '.BAZ_CHAMPS_ID.'='.$ligne['bf_ce_utilisateur'];
346
				if ($GLOBALS['_BAZAR_']['fiche_valide']==0||$GLOBALS['_BAZAR_']['fiche_valide']==2) {
312
		$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
-
 
313
		if (DB::isError($resultat)) {
347
					$lien_publie->addQueryString('publiee', 1);
314
			die ($resultat->getMessage().$resultat->getDebugInfo()) ;
-
 
315
		}
348
					$label_publie=BAZ_VALIDER_LA_FICHE;
316
		while ($redacteur = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
-
 
317
			$res .= BAZ_FICHE_NUMERO.$GLOBALS['_BAZAR_']['id_fiche'].BAZ_ECRITE.'<a href="mailto:'.$redacteur[BAZ_CHAMPS_EMAIL].'">'.$redacteur[BAZ_CHAMPS_PRENOM].' '.$redacteur[BAZ_CHAMPS_NOM].'</a><br />'."\n";
-
 
318
		}
-
 
319
		
-
 
320
		//informations complementaires (id fiche, etat publication,... )
349
					$class_publie='_valider';
321
		if ($danslappli==1) {
350
				} elseif ($GLOBALS['_BAZAR_']['fiche_valide']==1) {
322
			if ($GLOBALS['_BAZAR_']['fiche_valide']==1 && $GLOBALS['_BAZAR_']['appropriation']!=1) {
351
					$lien_publie->addQueryString('publiee', 0);
323
				if ($ligne['bf_date_debut_validite_fiche'] != '0000-00-00' && $ligne['bf_date_fin_validite_fiche'] != '0000-00-00') {
-
 
324
				$res .= '<span class="BAZ_rubrique BAZ_rubrique_'.$GLOBALS['_BAZAR_']['class'].'">'.BAZ_PUBLIEE.':</span> '.BAZ_DU.
352
					$label_publie=BAZ_INVALIDER_LA_FICHE;
325
						' '.strftime('%d.%m.%Y',strtotime($ligne['bf_date_debut_validite_fiche'])).' '.
353
					$class_publie='_invalider';
326
						BAZ_AU.' '.strftime('%d.%m.%Y',strtotime($ligne['bf_date_fin_validite_fiche'])).'<br />'."\n";
354
				}
327
				}
355
				$res .= '<li class="BAZ_liste'.$class_publie.'"><a href="'.$lien_publie->getURL().'">'.$label_publie.'</a></li>'."\n";				
-
 
356
				$lien_publie->removeQueryString('publiee');
-
 
357
			}
328
			}
358
			$lien_modifier=$GLOBALS['_BAZAR_']['url'];
-
 
359
			$lien_modifier->addQueryString('action', BAZ_ACTION_MODIFIER);
-
 
360
			$lien_modifier->addQueryString('id_fiche', $GLOBALS['_BAZAR_']['id_fiche']);
329
			elseif ($GLOBALS['_BAZAR_']['appropriation']!=1 || $GLOBALS['_BAZAR_']['fiche_valide']!=1) {
361
			$lien_modifier->addQueryString('typeannonce', $ligne['bf_ce_nature']);
-
 
362
			$res .= '<li class="BAZ_liste_modifier"><a href="'.$lien_modifier->getURL().'" id="modifier_fiche">'.BAZ_MODIFIER_LA_FICHE.'</a></li>'."\n";
330
				$res .= '<span class="BAZ_rubrique  BAZ_rubrique_'.$GLOBALS['_BAZAR_']['class'].'">'.BAZ_PUBLIEE.':</span> '.BAZ_NON.'<br />'."\n";
363
			$lien_supprimer=$GLOBALS['_BAZAR_']['url'];
331
			}
364
			$lien_supprimer->addQueryString('action', BAZ_ACTION_SUPPRESSION);
332
			//affichage des infos et du lien pour la mise a jour de la fiche
365
			$lien_supprimer->addQueryString('id_fiche', $GLOBALS['_BAZAR_']['id_fiche']);
333
			if ( $est_admin || $GLOBALS['_BAZAR_']['annonceur']==$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID) ) {			
366
			$lien_supprimer->addQueryString('typeannonce', $ligne['bf_ce_nature']);
334
				$res .= '<span class="BAZ_rubrique BAZ_rubrique_'.$GLOBALS['_BAZAR_']['class'].'" id="date_creation">'.BAZ_DATE_CREATION.'</span> '.strftime('%d.%m.%Y %H:%M',strtotime($ligne['bf_date_creation_fiche']))."\n";
367
			$res .= '<li class="BAZ_liste_supprimer"><a href="'.$lien_supprimer->getURL().'" id="supprimer_fiche">'.BAZ_SUPPRIMER_LA_FICHE.'</a></li>'."\n";
335
				$res .= '<span class="BAZ_rubrique BAZ_rubrique_'.$GLOBALS['_BAZAR_']['class'].'" id="date_mise_a_jour">'.BAZ_DATE_MAJ.'</span> '.strftime('%d.%m.%Y %H:%M',strtotime($ligne['bf_date_maj_fiche']))."\n";
368
			$res .= '</ul>'."\n";
336
			}
369
			$res .= '</div>'."\n";
337
			$res .= '</div>'."\n";
-
 
338
			
-
 
339
			if ( $est_admin || $GLOBALS['_BAZAR_']['annonceur']==$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID) ) {	
-
 
340
				$res .='<div class="BAZ_actions_fiche BAZ_actions_fiche_'.$GLOBALS['_BAZAR_']['class'].'">'."\n";
-
 
341
				if ( $est_admin ) {
-
 
342
					$res .= '<ul>'."\n";
-
 
343
					$lien_publie = &$GLOBALS['_BAZAR_']['url'];
-
 
344
					$lien_publie->addQueryString('action', BAZ_VOIR_FICHE);
-
 
345
					$lien_publie->addQueryString('id_fiche', $GLOBALS['_BAZAR_']['id_fiche']);
-
 
346
					$lien_publie->addQueryString('typeannonce', $ligne['bf_ce_nature']);
-
 
347
					if ($GLOBALS['_BAZAR_']['fiche_valide']==0||$GLOBALS['_BAZAR_']['fiche_valide']==2) {
-
 
348
						$lien_publie->addQueryString('publiee', 1);
-
 
349
						$label_publie=BAZ_VALIDER_LA_FICHE;
-
 
350
						$class_publie='_valider';
-
 
351
					} elseif ($GLOBALS['_BAZAR_']['fiche_valide']==1) {
-
 
352
						$lien_publie->addQueryString('publiee', 0);
-
 
353
						$label_publie=BAZ_INVALIDER_LA_FICHE;
-
 
354
						$class_publie='_invalider';
-
 
355
					}
-
 
356
					$res .= '<li class="BAZ_liste'.$class_publie.'"><a href="'.$lien_publie->getURL().'">'.$label_publie.'</a></li>'."\n";				
-
 
357
					$lien_publie->removeQueryString('publiee');
-
 
358
				}
-
 
359
				$lien_modifier=$GLOBALS['_BAZAR_']['url'];
-
 
360
				$lien_modifier->addQueryString('action', BAZ_ACTION_MODIFIER);
-
 
361
				$lien_modifier->addQueryString('id_fiche', $GLOBALS['_BAZAR_']['id_fiche']);
-
 
362
				$lien_modifier->addQueryString('typeannonce', $ligne['bf_ce_nature']);
-
 
363
				$res .= '<li class="BAZ_liste_modifier"><a href="'.$lien_modifier->getURL().'" id="modifier_fiche">'.BAZ_MODIFIER_LA_FICHE.'</a></li>'."\n";
-
 
364
				$lien_supprimer=$GLOBALS['_BAZAR_']['url'];
-
 
365
				$lien_supprimer->addQueryString('action', BAZ_ACTION_SUPPRESSION);
-
 
366
				$lien_supprimer->addQueryString('id_fiche', $GLOBALS['_BAZAR_']['id_fiche']);
-
 
367
				$lien_supprimer->addQueryString('typeannonce', $ligne['bf_ce_nature']);
-
 
368
				$res .= '<li class="BAZ_liste_supprimer"><a href="'.$lien_supprimer->getURL().'" id="supprimer_fiche">'.BAZ_SUPPRIMER_LA_FICHE.'</a></li>'."\n";
-
 
369
				$res .= '</ul>'."\n";
-
 
370
				$res .= '</div>'."\n";
-
 
371
			}
370
		}
372
		}
371
	}
373
		$res .= '</div>'."\n";
372
	
-
 
373
	$res .= '</div>'."\n";
374
		$res .= '</div>'."\n";
374
	}
375
	}
375
	$res .= '</div>'."\n";
376
	$res .= '</div>'."\n";
Line 376... Line 377...
376
	
377
	
377
	//on ajoute les appropriations, s'il le faut
378
	//on ajoute les appropriations, s'il le faut
Line 730... Line 731...
730
		// Creation des items : titre + lien + description + date de publication
731
		// Creation des items : titre + lien + description + date de publication
731
		while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
732
		while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
732
			$xml .= "\r\n      ";
733
			$xml .= "\r\n      ";
733
			$xml .= XML_Util::createStartElement ('item');
734
			$xml .= XML_Util::createStartElement ('item');
734
			$xml .= "\r\n        ";
735
			$xml .= "\r\n        ";
735
			$xml .= XML_Util::createTag ('title', null, html_entity_decode(($ligne['bf_titre'])));
736
			$xml .= XML_Util::createTag ('title', null, utf8_encode(html_entity_decode(($ligne['bf_titre']))));
736
			$xml .= "\r\n        ";
737
			$xml .= "\r\n        ";
737
			$lien=$GLOBALS['_BAZAR_']['url'];
738
			$lien=$GLOBALS['_BAZAR_']['url'];
738
			$lien->addQueryString('action', BAZ_VOIR_FICHE);
739
			$lien->addQueryString('action', BAZ_VOIR_FICHE);
739
			$lien->addQueryString('id_fiche', $ligne['bf_id_fiche']);
740
			$lien->addQueryString('id_fiche', $ligne['bf_id_fiche']);
740
			$xml .= XML_Util::createTag ('link', null, $lien->getURL());
741
			$xml .= XML_Util::createTag ('link', null, $lien->getURL());
Line 742... Line 743...
742
			$xml .= XML_Util::createTag ('guid', null, $lien->getURL());
743
			$xml .= XML_Util::createTag ('guid', null, $lien->getURL());
743
			$xml .= "\r\n        ";
744
			$xml .= "\r\n        ";
744
			$xml .= XML_Util::createStartElement ('description');
745
			$xml .= XML_Util::createStartElement ('description');
745
			$xml .= "\r\n          ";
746
			$xml .= "\r\n          ";
746
			if ($_GET['action'] != BAZ_VOIR_TOUTES_ANNONCES) {
747
			if ($_GET['action'] != BAZ_VOIR_TOUTES_ANNONCES) {
747
				$xml .= XML_Util::createCDataSection ( html_entity_decode(($ligne['bf_description'])));
748
				$xml .= XML_Util::createCDataSection ( utf8_encode(html_entity_decode(($ligne['bf_description']))));
748
			}
749
			}
749
			$xml .= "\r\n        ";
750
			$xml .= "\r\n        ";
750
			$xml .= XML_Util::createEndElement ('description');
751
			$xml .= XML_Util::createEndElement ('description');
751
			$xml .= "\r\n        ";
752
			$xml .= "\r\n        ";
752
			if ($ligne['bf_date_debut_validite_fiche'] != '0000-00-00' && 
753
			if ($ligne['bf_date_debut_validite_fiche'] != '0000-00-00' && 
Line 1202... Line 1203...
1202
}
1203
}
Line 1203... Line 1204...
1203
 
1204
 
1204
/* +--Fin du code ----------------------------------------------------------------------------------------+
1205
/* +--Fin du code ----------------------------------------------------------------------------------------+
1205
*
1206
*
-
 
1207
* $Log: not supported by cvs2svn $
-
 
1208
* Revision 1.86  2007-07-04 10:02:42  alexandre_tb
-
 
1209
* deplacement d une balise <ul> dans la liste des resultats pour conformite xhtml
1206
* $Log: not supported by cvs2svn $
1210
*
1207
* Revision 1.85  2007-06-25 12:15:06  alexandre_tb
1211
* Revision 1.85  2007-06-25 12:15:06  alexandre_tb
1208
* merge from narmer
1212
* merge from narmer
1209
*
1213
*
1210
* Revision 1.84  2007-06-25 09:56:55  alexandre_tb
1214
* Revision 1.84  2007-06-25 09:56:55  alexandre_tb