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.82.2.2 2007-05-24 15:12:12 neiluj Exp $
|
22 |
// CVS : $Id: bazar.fonct.rss.php,v 1.82.2.3 2007-05-24 15:33:57 neiluj 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.82.2.2 $
|
31 |
*@version $Revision: 1.82.2.3 $
|
32 |
// +------------------------------------------------------------------------------------------------------+
|
32 |
// +------------------------------------------------------------------------------------------------------+
|
33 |
*/
|
33 |
*/
|
Line 34... |
Line 34... |
34 |
|
34 |
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
Line 954... |
Line 954... |
954 |
|
954 |
|
955 |
// Ajout de la table bazar_fiche_liste_valeur dans le from de la requete
|
955 |
// Ajout de la table bazar_fiche_liste_valeur dans le from de la requete
|
956 |
$case_coche = false ;
|
956 |
$case_coche = false ;
|
957 |
$nb_jointures=0;
|
957 |
$nb_jointures=0;
|
958 |
$requeteFrom = '' ;
|
958 |
$requeteFrom = '' ;
|
959 |
$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 ' ;
|
959 |
$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 ' ;
|
Line 960... |
Line 960... |
960 |
$requeteWhereListe = '' ;
|
960 |
$requeteWhereListe = '' ;
|
961 |
|
961 |
|
962 |
if ( isset($tableau) ) {
|
962 |
if ( isset($tableau) ) {
|
Line 1015... |
Line 1015... |
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="'.BAZ_DERNIERES_FICHES.'" url="'.$GLOBALS['_BAZAR_']['url']->getURL().'" nb=10 nouvellefenetre=0 formatdate="'.BAZ_TYPE_AFFICHAGE_LISTE.'"}}';
|
1019 |
// $res .= '{{Syndication titre="'.BAZ_DERNIERES_FICHES.'" url="'.$GLOBALS['_BAZAR_']['url']->getURL().'" nb=10 nouvellefenetre=0 formatdate="'.BAZ_TYPE_AFFICHAGE_LISTE.'"}}';
|
1020 |
$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")
|
1020 |
$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")
|
1021 |
ORDER BY bf_date_creation_fiche DESC, bf_date_fin_validite_fiche DESC, bf_date_maj_fiche DESC';
|
1021 |
ORDER BY bf_date_creation_fiche DESC, bf_date_fin_validite_fiche DESC, bf_date_maj_fiche DESC';
|
1022 |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete);
|
1022 |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete);
|
1023 |
if (DB::isError($resultat)) {
|
1023 |
if (DB::isError($resultat)) {
|
1024 |
return ($resultat->getMessage().$resultat->getDebugInfo()) ;
|
1024 |
return ($resultat->getMessage().$resultat->getDebugInfo()) ;
|
1025 |
}
|
1025 |
}
|
1026 |
if($resultat->numRows() != 0) {
|
1026 |
if($resultat->numRows() != 0) {
|
1027 |
$res .= '<h2>'.BAZ_DERNIERES_FICHES.'</h2>';
|
1027 |
$res .= '<h2>'.BAZ_DERNIERES_FICHES.'</h2>';
|
1028 |
$res .= '<ul class="liste_rss">';
|
1028 |
$res .= '<ul class="liste_rss">';
|
1029 |
while($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC))
|
1029 |
while($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC))
|
1030 |
{
|
1030 |
{
|
1031 |
$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_VOIR_FICHE);
|
1031 |
$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_VOIR_FICHE);
|
1032 |
$GLOBALS['_BAZAR_']['url']->addQueryString('id_fiche', $ligne['bf_id_fiche']);
|
1032 |
$GLOBALS['_BAZAR_']['url']->addQueryString('id_fiche', $ligne['bf_id_fiche']);
|
1033 |
$res .= '<li class="titre_rss"><a class="lien_rss" href="'. $GLOBALS['_BAZAR_']['url']->getURL() .'" alt="lire la fiche">'. $ligne['bf_titre'].'</a></li>';
|
1033 |
$res .= '<li class="titre_rss"><a class="lien_rss" href="'. $GLOBALS['_BAZAR_']['url']->getURL() .'" alt="lire la fiche">'. $ligne['bf_titre'].'</a></li>';
|
1034 |
}
|
1034 |
}
|
1035 |
$res .= '</ul>';
|
1035 |
$res .= '</ul>';
|
1036 |
}
|
1036 |
}
|
1037 |
}
|
1037 |
}
|
1038 |
}
|
1038 |
}
|
Line 1119... |
Line 1119... |
1119 |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
|
1119 |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
|
1120 |
if (DB::isError($resultat)) {
|
1120 |
if (DB::isError($resultat)) {
|
1121 |
return $resultat->getMessage().'<br /><br />'.$resultat->getDebugInfo() ;
|
1121 |
return $resultat->getMessage().'<br /><br />'.$resultat->getDebugInfo() ;
|
1122 |
}
|
1122 |
}
|
1123 |
$res = '<br /><h4>'.BAZ_IL_Y_A.($resultat->numRows()).' '.BAZ_FICHES_CORRESPONDANTES.'</h4><br />'."\n";
|
1123 |
$res = '<br /><h4>'.BAZ_IL_Y_A.($resultat->numRows()).' '.BAZ_FICHES_CORRESPONDANTES.'</h4><br />'."\n";
|
1124 |
//$res .= 'requete: '. $requete. '<br />';
|
1124 |
// $res .= 'requete: '. $requete. '<br />';
|
- |
|
1125 |
|
1125 |
$res .= '<ul>' ;
|
1126 |
$res .= '<ul>' ;
|
1126 |
$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_VOIR_FICHE);
|
1127 |
$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_VOIR_FICHE);
|
Line 1127... |
Line 1128... |
1127 |
|
1128 |
|
1128 |
$donnees = array();
|
1129 |
$donnees = array();
|
Line 1191... |
Line 1192... |
1191 |
return $res ;
|
1192 |
return $res ;
|
1192 |
}
|
1193 |
}
|
Line 1193... |
Line 1194... |
1193 |
|
1194 |
|
1194 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
1195 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
1195 |
*
|
1196 |
*
|
1196 |
* $Log: not supported by cvs2svn $
|
- |
|
1197 |
* Revision 1.82.2.1 2007-05-24 14:52:16 neiluj
|
- |
|
1198 |
* update bug lorsque pas de dernieres fiches
|
- |
|
1199 |
*
|
1197 |
* $Log: not supported by cvs2svn $
|
1200 |
* Revision 1.82 2007/04/20 12:47:42 florian
|
1198 |
* Revision 1.82 2007/04/20 12:47:42 florian
|
1201 |
* correction bugs suite au merge
|
1199 |
* correction bugs suite au merge
|
1202 |
*
|
1200 |
*
|
1203 |
* Revision 1.81 2007/04/20 09:59:41 florian
|
1201 |
* Revision 1.81 2007/04/20 09:59:41 florian
|