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.57 2006-07-25 13:22:27 alexandre_tb Exp $
|
22 |
// CVS : $Id: bazar.fonct.rss.php,v 1.58 2006-09-15 12:31:40 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.57 $
|
31 |
*@version $Revision: 1.58 $
|
32 |
// +------------------------------------------------------------------------------------------------------+
|
32 |
// +------------------------------------------------------------------------------------------------------+
|
33 |
*/
|
33 |
*/
|
Line 34... |
Line 34... |
34 |
|
34 |
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
Line 533... |
Line 533... |
533 |
* @return string Le code du flux RSS
|
533 |
* @return string Le code du flux RSS
|
534 |
*/
|
534 |
*/
|
535 |
function gen_RSS($typeannonce='', $nbitem='', $emetteur='', $valide=1, $requeteSQL='', $requeteSQLFrom = '', $requeteWhereListe = '', $categorie_nature='') {
|
535 |
function gen_RSS($typeannonce='', $nbitem='', $emetteur='', $valide=1, $requeteSQL='', $requeteSQLFrom = '', $requeteWhereListe = '', $categorie_nature='') {
|
536 |
// generation de la requete MySQL personnalisee
|
536 |
// generation de la requete MySQL personnalisee
|
537 |
$req_where=0;
|
537 |
$req_where=0;
|
538 |
$requete = 'SELECT DISTINCT bf_id_fiche, bf_titre, bf_date_debut_validite_fiche, bf_description '.
|
538 |
$requete = 'SELECT DISTINCT bf_id_fiche, bf_titre, bf_date_debut_validite_fiche, bf_description, bn_label_nature '.
|
539 |
'FROM bazar_fiche, bazar_nature '.$requeteSQLFrom.' WHERE '.$requeteWhereListe;
|
539 |
'FROM bazar_fiche, bazar_nature '.$requeteSQLFrom.' WHERE '.$requeteWhereListe;
|
540 |
if ($valide!=2) {
|
540 |
if ($valide!=2) {
|
541 |
$requete .= 'bf_statut_fiche='.$valide;
|
541 |
$requete .= 'bf_statut_fiche='.$valide;
|
542 |
$req_where=1;
|
542 |
$req_where=1;
|
543 |
}
|
543 |
}
|
Line 545... |
Line 545... |
545 |
if (!is_array ($typeannonce) && $typeannonce!='' and $typeannonce!='toutes') {
|
545 |
if (!is_array ($typeannonce) && $typeannonce!='' and $typeannonce!='toutes') {
|
546 |
if ($req_where==1) {$requete .= ' AND ';}
|
546 |
if ($req_where==1) {$requete .= ' AND ';}
|
547 |
$requete .= 'bf_ce_nature='.$typeannonce;
|
547 |
$requete .= 'bf_ce_nature='.$typeannonce;
|
548 |
$req_where=1;
|
548 |
$req_where=1;
|
549 |
//le nom du flux devient le type d'annonce
|
549 |
//le nom du flux devient le type d'annonce
|
- |
|
550 |
$requete_nom_flux = 'select bn_label_nature from bazar_nature where bn_id_nature='.$typeannonce ;
|
550 |
$nomflux = $typeannonce;
|
551 |
$nomflux = $GLOBALS['_BAZAR_']['db']->getOne($requete_nom_flux) ;
|
551 |
}
|
552 |
}
|
552 |
// Cas où il y plusieurs type d annonce demande
|
553 |
// Cas où il y plusieurs type d annonce demande
|
553 |
if (is_array ($typeannonce)) {
|
554 |
if (is_array ($typeannonce)) {
|
554 |
if ($req_where==1) {$requete .= ' AND ';}
|
555 |
if ($req_where==1) {$requete .= ' AND ';}
|
555 |
$requete .= 'bf_ce_nature IN (' ;
|
556 |
$requete .= 'bf_ce_nature IN (' ;
|
Line 1003... |
Line 1004... |
1003 |
}
|
1004 |
}
|
Line 1004... |
Line 1005... |
1004 |
|
1005 |
|
1005 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
1006 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
1006 |
*
|
1007 |
*
|
- |
|
1008 |
* $Log: not supported by cvs2svn $
|
- |
|
1009 |
* Revision 1.57 2006/07/25 13:22:27 alexandre_tb
|
- |
|
1010 |
* réorganisation du code, sans grand changement
|
1007 |
* $Log: not supported by cvs2svn $
|
1011 |
*
|
1008 |
* Revision 1.56 2006/07/18 14:13:35 alexandre_tb
|
1012 |
* Revision 1.56 2006/07/18 14:13:35 alexandre_tb
|
1009 |
* Ajout d identifiant HTML
|
1013 |
* Ajout d identifiant HTML
|
1010 |
*
|
1014 |
*
|
1011 |
* Revision 1.55 2006/07/04 14:29:18 alexandre_tb
|
1015 |
* Revision 1.55 2006/07/04 14:29:18 alexandre_tb
|