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 333... |
Line 333... |
333 |
if ( $est_admin || $GLOBALS['_BAZAR_']['annonceur']==$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID) ) {
|
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";
|
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";
|
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 |
}
|
336 |
}
|
337 |
$res .= '</div>'."\n";
|
337 |
$res .= '</div>'."\n";
|
- |
|
338 |
|
338 |
if ( $est_admin || $GLOBALS['_BAZAR_']['annonceur']==$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID) ) {
|
339 |
if ( $est_admin || $GLOBALS['_BAZAR_']['annonceur']==$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID) ) {
|
339 |
$res .='<div class="BAZ_actions_fiche BAZ_actions_fiche_'.$GLOBALS['_BAZAR_']['class'].'">'."\n";
|
340 |
$res .='<div class="BAZ_actions_fiche BAZ_actions_fiche_'.$GLOBALS['_BAZAR_']['class'].'">'."\n";
|
340 |
if ( $est_admin ) {
|
341 |
if ( $est_admin ) {
|
341 |
$res .= '<ul>'."\n";
|
342 |
$res .= '<ul>'."\n";
|
342 |
$lien_publie = &$GLOBALS['_BAZAR_']['url'];
|
343 |
$lien_publie = &$GLOBALS['_BAZAR_']['url'];
|
Line 367... |
Line 368... |
367 |
$res .= '<li class="BAZ_liste_supprimer"><a href="'.$lien_supprimer->getURL().'" id="supprimer_fiche">'.BAZ_SUPPRIMER_LA_FICHE.'</a></li>'."\n";
|
368 |
$res .= '<li class="BAZ_liste_supprimer"><a href="'.$lien_supprimer->getURL().'" id="supprimer_fiche">'.BAZ_SUPPRIMER_LA_FICHE.'</a></li>'."\n";
|
368 |
$res .= '</ul>'."\n";
|
369 |
$res .= '</ul>'."\n";
|
369 |
$res .= '</div>'."\n";
|
370 |
$res .= '</div>'."\n";
|
370 |
}
|
371 |
}
|
371 |
}
|
372 |
}
|
372 |
|
- |
|
- |
|
373 |
$res .= '</div>'."\n";
|
373 |
$res .= '</div>'."\n";
|
374 |
$res .= '</div>'."\n";
|
374 |
}
|
375 |
}
|
375 |
$res .= '</div>'."\n";
|
376 |
$res .= '</div>'."\n";
|
Line 376... |
Line 377... |
376 |
|
377 |
|
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
|