| 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.99 2007-11-05 10:17:19 alexandre_tb Exp $
|
22 |
// CVS : $Id: bazar.fonct.rss.php,v 1.100 2007-11-30 14:17:31 jp_milcent 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.99 $
|
31 |
*@version $Revision: 1.100 $
|
| 32 |
// +------------------------------------------------------------------------------------------------------+
|
32 |
// +------------------------------------------------------------------------------------------------------+
|
| 33 |
*/
|
33 |
*/
|
| Line 34... |
Line 34... |
| 34 |
|
34 |
|
| 35 |
// +------------------------------------------------------------------------------------------------------+
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
| Line 764... |
Line 764... |
| 764 |
// Creation des items : titre + lien + description + date de publication
|
764 |
// Creation des items : titre + lien + description + date de publication
|
| 765 |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
|
765 |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
|
| 766 |
$xml .= "\r\n ";
|
766 |
$xml .= "\r\n ";
|
| 767 |
$xml .= XML_Util::createStartElement ('item');
|
767 |
$xml .= XML_Util::createStartElement ('item');
|
| 768 |
$xml .= "\r\n ";
|
768 |
$xml .= "\r\n ";
|
| 769 |
$xml .= XML_Util::createTag ('title', null, utf8_encode(html_entity_decode(($ligne['bf_titre']))));
|
769 |
$xml .= XML_Util::createTag('title', null, encoder_en_utf8($ligne['bf_titre']));
|
| 770 |
$xml .= "\r\n ";
|
770 |
$xml .= "\r\n ";
|
| 771 |
$lien=$GLOBALS['_BAZAR_']['url'];
|
771 |
$lien=$GLOBALS['_BAZAR_']['url'];
|
| 772 |
$lien->addQueryString('action', BAZ_VOIR_FICHE);
|
772 |
$lien->addQueryString('action', BAZ_VOIR_FICHE);
|
| 773 |
$lien->addQueryString('id_fiche', $ligne['bf_id_fiche']);
|
773 |
$lien->addQueryString('id_fiche', $ligne['bf_id_fiche']);
|
| 774 |
$xml .= XML_Util::createTag ('link', null, $lien->getURL());
|
774 |
$xml .= XML_Util::createTag ('link', null, $lien->getURL());
|
| Line 776... |
Line 776... |
| 776 |
$xml .= XML_Util::createTag ('guid', null, $lien->getURL());
|
776 |
$xml .= XML_Util::createTag ('guid', null, $lien->getURL());
|
| 777 |
$xml .= "\r\n ";
|
777 |
$xml .= "\r\n ";
|
| 778 |
$xml .= XML_Util::createStartElement ('description');
|
778 |
$xml .= XML_Util::createStartElement ('description');
|
| 779 |
$xml .= "\r\n ";
|
779 |
$xml .= "\r\n ";
|
| 780 |
if ($_GET['action'] != BAZ_VOIR_TOUTES_ANNONCES) {
|
780 |
if ($_GET['action'] != BAZ_VOIR_TOUTES_ANNONCES) {
|
| 781 |
$xml .= XML_Util::createCDataSection ( utf8_encode(html_entity_decode(($ligne['bf_description']))));
|
781 |
$xml .= XML_Util::createCDataSection(encoder_en_utf8($ligne['bf_description']));
|
| 782 |
}
|
782 |
}
|
| 783 |
$xml .= "\r\n ";
|
783 |
$xml .= "\r\n ";
|
| 784 |
$xml .= XML_Util::createEndElement ('description');
|
784 |
$xml .= XML_Util::createEndElement ('description');
|
| 785 |
$xml .= "\r\n ";
|
785 |
$xml .= "\r\n ";
|
| 786 |
if ($ligne['bf_date_debut_validite_fiche'] != '0000-00-00' &&
|
786 |
if ($ligne['bf_date_debut_validite_fiche'] != '0000-00-00' &&
|
| Line 1238... |
Line 1238... |
| 1238 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('recherche_avancee');
|
1238 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('recherche_avancee');
|
| Line 1239... |
Line 1239... |
| 1239 |
|
1239 |
|
| 1240 |
return $res ;
|
1240 |
return $res ;
|
| Line -... |
Line 1241... |
| - |
|
1241 |
}
|
| - |
|
1242 |
|
| - |
|
1243 |
function encoder_en_utf8($txt) {
|
| - |
|
1244 |
// Nous remplaçons l'apostrophe de type RIGHT SINGLE QUOTATION MARK
|
| - |
|
1245 |
$cp1252_map = array("\xc2\x92" => "\xe2\x80\x99" /* RIGHT SINGLE QUOTATION MARK */);
|
| - |
|
1246 |
return strtr(mb_convert_encoding($txt, 'UTF-8','HTML-ENTITIES'), $cp1252_map);
|
| 1241 |
}
|
1247 |
}
|
| 1242 |
|
1248 |
|
| 1243 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
1249 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
| - |
|
1250 |
*
|
| - |
|
1251 |
* $Log: not supported by cvs2svn $
|
| - |
|
1252 |
* Revision 1.99.2.1 2007-11-30 14:14:36 jp_milcent
|
| - |
|
1253 |
* Ajout d'un décodage des apostrophes de type RIGHT SINGLE QUOTATION MARK.
|
| - |
|
1254 |
*
|
| - |
|
1255 |
* Revision 1.99 2007-11-05 10:17:19 alexandre_tb
|
| 1244 |
*
|
1256 |
* correction bug: retrait inorportun de la variable menu dans la globale URL
|
| 1245 |
* $Log: not supported by cvs2svn $
|
1257 |
*
|
| 1246 |
* Revision 1.98 2007-10-24 13:27:45 alexandre_tb
|
1258 |
* Revision 1.98 2007-10-24 13:27:45 alexandre_tb
|
| 1247 |
* bug d'affichage multiple lorsqu'il y a +sieurs langues
|
1259 |
* bug d'affichage multiple lorsqu'il y a +sieurs langues
|
| 1248 |
*
|
1260 |
*
|