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.82.2.2 2007-05-24 15:12:12 neiluj Exp $ |
// CVS : $Id: bazar.fonct.rss.php,v 1.82.2.3 2007-05-24 15:33:57 neiluj 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.82.2.2 $ |
*@version $Revision: 1.82.2.3 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
956,7 → 956,7 |
$case_coche = false ; |
$nb_jointures=0; |
$requeteFrom = '' ; |
$requeteWhere = ' bn_ce_id_menu IN ('.$GLOBALS['_BAZAR_']['categorie_nature'].') AND bn_id_nature=\''.$GLOBALS['_BAZAR_']['id_typeannonce'].'\' AND bn_id_nature=bf_ce_nature AND ' ; |
$requeteWhere = ' bn_ce_id_menu IN ('.$GLOBALS['_BAZAR_']['categorie_nature'].') '. ($GLOBALS['_BAZAR_']['id_typeannonce'] == 'toutes' ? '' : 'AND bn_id_nature=\''.$GLOBALS['_BAZAR_']['id_typeannonce'].'\'') .' AND bn_id_nature=bf_ce_nature AND ' ; |
$requeteWhereListe = '' ; |
|
if ( isset($tableau) ) { |
1017,23 → 1017,23 |
$GLOBALS['_BAZAR_']['url']->addQueryString('annonce',$GLOBALS['_BAZAR_']['id_typeannonce']); |
if ($GLOBALS['_BAZAR_']['categorie_nature']!=0) $GLOBALS['_BAZAR_']['url']->addQueryString('categorie_nature',$GLOBALS['_BAZAR_']['categorie_nature']); |
// $res .= '{{Syndication titre="'.BAZ_DERNIERES_FICHES.'" url="'.$GLOBALS['_BAZAR_']['url']->getURL().'" nb=10 nouvellefenetre=0 formatdate="'.BAZ_TYPE_AFFICHAGE_LISTE.'"}}'; |
$requete = 'SELECT DISTINCT bf_id_fiche, bf_titre, bf_date_debut_validite_fiche, bf_description, bn_label_nature, bf_date_creation_fiche FROM bazar_fiche, bazar_nature WHERE bn_id_nature=bf_ce_nature AND bn_ce_id_menu='.$GLOBALS['_BAZAR_']['categorie_nature'].' AND (bf_date_debut_validite_fiche<=NOW() or bf_date_debut_validite_fiche="0000-00-00") AND (bf_date_fin_validite_fiche>=NOW() or bf_date_fin_validite_fiche="0000-00-00") |
$requete = 'SELECT DISTINCT bf_id_fiche, bf_titre, bf_date_debut_validite_fiche, bf_description, bn_label_nature, bf_date_creation_fiche FROM bazar_fiche, bazar_nature WHERE bn_id_nature=bf_ce_nature AND bn_ce_id_menu="'.$GLOBALS['_BAZAR_']['categorie_nature'].'" AND (bf_date_debut_validite_fiche<=NOW() or bf_date_debut_validite_fiche="0000-00-00") AND (bf_date_fin_validite_fiche>=NOW() or bf_date_fin_validite_fiche="0000-00-00") |
ORDER BY bf_date_creation_fiche DESC, bf_date_fin_validite_fiche DESC, bf_date_maj_fiche DESC'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete); |
if (DB::isError($resultat)) { |
return ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
if($resultat->numRows() != 0) { |
$res .= '<h2>'.BAZ_DERNIERES_FICHES.'</h2>'; |
if($resultat->numRows() != 0) { |
$res .= '<h2>'.BAZ_DERNIERES_FICHES.'</h2>'; |
$res .= '<ul class="liste_rss">'; |
while($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) |
{ |
$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_VOIR_FICHE); |
$GLOBALS['_BAZAR_']['url']->addQueryString('id_fiche', $ligne['bf_id_fiche']); |
$res .= '<li class="titre_rss"><a class="lien_rss" href="'. $GLOBALS['_BAZAR_']['url']->getURL() .'" alt="lire la fiche">'. $ligne['bf_titre'].'</a></li>'; |
$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_VOIR_FICHE); |
$GLOBALS['_BAZAR_']['url']->addQueryString('id_fiche', $ligne['bf_id_fiche']); |
$res .= '<li class="titre_rss"><a class="lien_rss" href="'. $GLOBALS['_BAZAR_']['url']->getURL() .'" alt="lire la fiche">'. $ligne['bf_titre'].'</a></li>'; |
} |
$res .= '</ul>'; |
} |
} |
} |
} |
|
1121,7 → 1121,8 |
return $resultat->getMessage().'<br /><br />'.$resultat->getDebugInfo() ; |
} |
$res = '<br /><h4>'.BAZ_IL_Y_A.($resultat->numRows()).' '.BAZ_FICHES_CORRESPONDANTES.'</h4><br />'."\n"; |
//$res .= 'requete: '. $requete. '<br />'; |
// $res .= 'requete: '. $requete. '<br />'; |
|
$res .= '<ul>' ; |
$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_VOIR_FICHE); |
|
1193,10 → 1194,7 |
|
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.82.2.1 2007-05-24 14:52:16 neiluj |
* update bug lorsque pas de dernieres fiches |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.82 2007/04/20 12:47:42 florian |
* correction bugs suite au merge |
* |