19,7 → 19,7 |
// | License along with this library; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: bazar.fonct.rss.php,v 1.99.2.13 2008-04-16 12:39:56 alexandre_tb Exp $ |
// CVS : $Id: bazar.fonct.rss.php,v 1.99.2.14 2008-11-19 09:30:18 aperonnet Exp $ |
/** |
* |
*@package bazar |
28,7 → 28,7 |
*@author Florian Schmitt <florian@ecole-et-nature.org> |
//Autres auteurs : |
*@copyright Tela-Botanica 2000-2006 |
*@version $Revision: 1.99.2.13 $ |
*@version $Revision: 1.99.2.14 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
617,7 → 617,7 |
function gen_RSS($typeannonce='', $nbitem='', $emetteur='', $valide=1, $requeteSQL='', $requeteSQLFrom = '', $requeteWhereListe = '', $categorie_nature='', $order = '') { |
// generation de la requete MySQL personnalisee |
$req_where=0; |
$requete = 'SELECT DISTINCT bf_id_fiche, bf_titre, bf_date_debut_validite_fiche, bf_description, bn_label_nature, bf_date_creation_fiche '. |
$requete = 'SELECT DISTINCT bf_id_fiche, bf_titre, bf_date_debut_validite_fiche, bf_description, bn_label_nature, bf_date_creation_fiche, bf_ce_utilisateur '. |
'FROM bazar_fiche, bazar_nature '.$requeteSQLFrom.' WHERE '.$requeteWhereListe; |
if ($valide!=2) { |
$requete .= 'bf_statut_fiche='.$valide; |
735,6 → 735,15 |
if ($resultat->numRows() > 0) { |
// Creation des items : titre + lien + description + date de publication |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
|
$requetenom = 'SELECT '.BAZ_CHAMPS_NOM.', '.BAZ_CHAMPS_PRENOM.' FROM '. |
BAZ_ANNUAIRE.' WHERE '.BAZ_CHAMPS_ID.'='.$ligne['bf_ce_utilisateur']; |
$res = $GLOBALS['_BAZAR_']['db']->query($requetenom) ; |
if (DB::isError($res)) { |
die ($res->getMessage().$res->getDebugInfo()) ; |
} |
$nomprenom = $res->fetchRow(DB_FETCHMODE_ASSOC); |
|
$xml .= "\r\n "; |
$xml .= XML_Util::createStartElement ('item'); |
$xml .= "\r\n "; |
747,6 → 756,10 |
$xml .= "\r\n "; |
$xml .= XML_Util::createTag ('guid', null, $lien->getURL()); |
$xml .= "\r\n "; |
$xml .= XML_Util::createTag ('category', null, encoder_en_utf8($ligne['bn_label_nature'])); |
$xml .= "\r\n "; |
$xml .= XML_Util::createTag ('author', null, encoder_en_utf8($nomprenom[BAZ_CHAMPS_NOM].' '.$nomprenom[BAZ_CHAMPS_PRENOM])); |
$xml .= "\r\n "; |
$xml .= XML_Util::createStartElement ('description'); |
$xml .= "\r\n "; |
if ($_GET[BAZ_VARIABLE_ACTION] != BAZ_VOIR_TOUTES_ANNONCES) { |
1228,6 → 1241,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.99.2.13 2008-04-16 12:39:56 alexandre_tb |
* simplification du code en utilisant la classe Bazar_element |
* |
* Revision 1.99.2.12 2008-03-17 14:02:53 jp_milcent |
* Ajout d'un message demandant de s'identifiez pour poser des commentaires. |
* Amélioration du XHTML (me prévenir en cas de pb). |