Subversion Repositories Applications.bazar

Rev

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

Rev 226 Rev 227
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.79 2007-04-19 14:57:41 alexandre_tb Exp $
22
// CVS : $Id: bazar.fonct.rss.php,v 1.80 2007-04-20 09:57:21 florian 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.79 $
31
*@version       $Revision: 1.80 $
32
// +------------------------------------------------------------------------------------------------------+
32
// +------------------------------------------------------------------------------------------------------+
33
*/
33
*/
Line 34... Line 34...
34
 
34
 
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
Line 686... Line 686...
686
	$xml .= "\r\n  ";
686
	$xml .= "\r\n  ";
687
	$xml .= XML_Util::createStartElement ('rss', array('version' => '2.0')) ;
687
	$xml .= XML_Util::createStartElement ('rss', array('version' => '2.0')) ;
688
	$xml .= "\r\n    ";
688
	$xml .= "\r\n    ";
689
	$xml .= XML_Util::createStartElement ('channel');
689
	$xml .= XML_Util::createStartElement ('channel');
690
	$xml .= "\r\n      ";
690
	$xml .= "\r\n      ";
691
	$xml .= XML_Util::createTag ('title', null, utf8_encode(html_entity_decode($nomflux)));
691
	$xml .= XML_Util::createTag ('title', null, html_entity_decode($nomflux));
692
	$xml .= "\r\n      ";
692
	$xml .= "\r\n      ";
693
	$xml .= XML_Util::createTag ('link', null, BAZ_RSS_ADRESSESITE);
693
	$xml .= XML_Util::createTag ('link', null, BAZ_RSS_ADRESSESITE);
694
	$xml .= "\r\n      ";
694
	$xml .= "\r\n      ";
695
	$xml .= XML_Util::createTag ('description', null, BAZ_RSS_DESCRIPTIONSITE);
695
	$xml .= XML_Util::createTag ('description', null, BAZ_RSS_DESCRIPTIONSITE);
696
	$xml .= "\r\n      ";
696
	$xml .= "\r\n      ";
Line 710... Line 710...
710
	$xml .= "\r\n      ";
710
	$xml .= "\r\n      ";
711
	$xml .= XML_Util::createTag ('ttl', null, '60');
711
	$xml .= XML_Util::createTag ('ttl', null, '60');
712
	$xml .= "\r\n      ";
712
	$xml .= "\r\n      ";
713
	$xml .= XML_Util::createStartElement ('image');
713
	$xml .= XML_Util::createStartElement ('image');
714
	$xml .= "\r\n        ";
714
	$xml .= "\r\n        ";
715
		$xml .= XML_Util::createTag ('title', null, utf8_encode(html_entity_decode(BAZ_RSS_NOMSITE)));
715
		$xml .= XML_Util::createTag ('title', null, BAZ_RSS_NOMSITE);
716
		$xml .= "\r\n        ";
716
		$xml .= "\r\n        ";
717
		$xml .= XML_Util::createTag ('url', null, BAZ_RSS_LOGOSITE);
717
		$xml .= XML_Util::createTag ('url', null, BAZ_RSS_LOGOSITE);
718
		$xml .= "\r\n        ";
718
		$xml .= "\r\n        ";
719
		$xml .= XML_Util::createTag ('link', null, BAZ_RSS_ADRESSESITE);
719
		$xml .= XML_Util::createTag ('link', null, BAZ_RSS_ADRESSESITE);
720
		$xml .= "\r\n      ";
720
		$xml .= "\r\n      ";
Line 723... Line 723...
723
		// Creation des items : titre + lien + description + date de publication
723
		// Creation des items : titre + lien + description + date de publication
724
		while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
724
		while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
725
			$xml .= "\r\n      ";
725
			$xml .= "\r\n      ";
726
			$xml .= XML_Util::createStartElement ('item');
726
			$xml .= XML_Util::createStartElement ('item');
727
			$xml .= "\r\n        ";
727
			$xml .= "\r\n        ";
728
			$xml .= XML_Util::createTag ('title', null, utf8_encode(html_entity_decode(($ligne['bf_titre']))));
728
			$xml .= XML_Util::createTag ('title', null, html_entity_decode(($ligne['bf_titre'])));
729
			$xml .= "\r\n        ";
729
			$xml .= "\r\n        ";
730
			$lien=$GLOBALS['_BAZAR_']['url'];
730
			$lien=$GLOBALS['_BAZAR_']['url'];
731
			$lien->addQueryString('action', BAZ_VOIR_FICHE);
731
			$lien->addQueryString('action', BAZ_VOIR_FICHE);
732
			$lien->addQueryString('id_fiche', $ligne['bf_id_fiche']);
732
			$lien->addQueryString('id_fiche', $ligne['bf_id_fiche']);
733
			$xml .= XML_Util::createTag ('link', null, utf8_encode(html_entity_decode($lien->getURL())));
733
			$xml .= XML_Util::createTag ('link', null, $lien->getURL());
734
			$xml .= "\r\n        ";
734
			$xml .= "\r\n        ";
735
			$xml .= XML_Util::createTag ('guid', null, utf8_encode(html_entity_decode($lien->getURL())));
735
			$xml .= XML_Util::createTag ('guid', null, $lien->getURL());
736
			$xml .= "\r\n        ";
736
			$xml .= "\r\n        ";
737
			$xml .= XML_Util::createStartElement ('description');
737
			$xml .= XML_Util::createStartElement ('description');
738
			$xml .= "\r\n          ";
738
			$xml .= "\r\n          ";
739
			if ($_GET['action'] != BAZ_VOIR_TOUTES_ANNONCES) {
739
			if ($_GET['action'] != BAZ_VOIR_TOUTES_ANNONCES) {
740
				$xml .= XML_Util::createCDataSection ( utf8_encode(html_entity_decode(($ligne['bf_description']))));
740
				$xml .= XML_Util::createCDataSection ( html_entity_decode(($ligne['bf_description'])));
741
			}
741
			}
742
			$xml .= "\r\n        ";
742
			$xml .= "\r\n        ";
743
			$xml .= XML_Util::createEndElement ('description');
743
			$xml .= XML_Util::createEndElement ('description');
744
			$xml .= "\r\n        ";
744
			$xml .= "\r\n        ";
745
			if ($ligne['bf_date_debut_validite_fiche'] != '0000-00-00' && 
745
			if ($ligne['bf_date_debut_validite_fiche'] != '0000-00-00' && 
Line 1014... Line 1014...
1014
    	if (!isset($_REQUEST['recherche_effectuee'])) {
1014
    	if (!isset($_REQUEST['recherche_effectuee'])) {
1015
        	$res .= '<p class="zone_info">'.BAZ_ENTRER_VOS_CRITERES_DE_RECHERCHE.'</p>'."\n";
1015
        	$res .= '<p class="zone_info">'.BAZ_ENTRER_VOS_CRITERES_DE_RECHERCHE.'</p>'."\n";
1016
        	$GLOBALS['_BAZAR_']['url']->addQueryString('action',BAZ_VOIR_FLUX_RSS);
1016
        	$GLOBALS['_BAZAR_']['url']->addQueryString('action',BAZ_VOIR_FLUX_RSS);
1017
        	$GLOBALS['_BAZAR_']['url']->addQueryString('annonce',$GLOBALS['_BAZAR_']['id_typeannonce']);
1017
        	$GLOBALS['_BAZAR_']['url']->addQueryString('annonce',$GLOBALS['_BAZAR_']['id_typeannonce']);
1018
	        if ($GLOBALS['_BAZAR_']['categorie_nature']!=0) $GLOBALS['_BAZAR_']['url']->addQueryString('categorie_nature',$GLOBALS['_BAZAR_']['categorie_nature']);
1018
	        if ($GLOBALS['_BAZAR_']['categorie_nature']!=0) $GLOBALS['_BAZAR_']['url']->addQueryString('categorie_nature',$GLOBALS['_BAZAR_']['categorie_nature']);
1019
        	$res .= '{{Syndication titre="Derni&egrave;res actualit&eacute;s" url="'.$GLOBALS['_BAZAR_']['url']->getURL().'" nb=10 nouvellefenetre=0 formatdate="'.BAZ_FORMAT_DATE_DEFAUT.'"}}';
1019
        	$res .= '{{Syndication titre="Derni&egrave;res actualit&eacute;s" url="'.$GLOBALS['_BAZAR_']['url']->getURL().'" nb=10 nouvellefenetre=0 formatdate="'.BAZ_TYPE_AFFICHAGE_LISTE.'"}}';
-
 
1020
        	echo '{{Syndication titre="Derni&egrave;res actualit&eacute;s" url="'.$GLOBALS['_BAZAR_']['url']->getURL().'" nb=10 nouvellefenetre=0 formatdate="'.BAZ_TYPE_AFFICHAGE_LISTE.'"}}';
1020
    	}
1021
    	}
1021
	}
1022
	}
Line 1174... Line 1175...
1174
	return $res ;
1175
	return $res ;
1175
}
1176
}
Line 1176... Line 1177...
1176
 
1177
 
1177
/* +--Fin du code ----------------------------------------------------------------------------------------+
1178
/* +--Fin du code ----------------------------------------------------------------------------------------+
1178
*
1179
*
-
 
1180
* $Log: not supported by cvs2svn $
-
 
1181
* Revision 1.79  2007/04/19 14:57:41  alexandre_tb
-
 
1182
* merge
1179
* $Log: not supported by cvs2svn $
1183
*
1180
* Revision 1.77  2007/04/04 15:15:22  neiluj
1184
* Revision 1.77  2007/04/04 15:15:22  neiluj
1181
* débug pour nom wiki
1185
* débug pour nom wiki
1182
*
1186
*
1183
* Revision 1.76  2007/04/04 15:09:59  florian
1187
* Revision 1.76  2007/04/04 15:09:59  florian