Subversion Repositories Sites.tela-botanica.org

Compare Revisions

Ignore whitespace Rev 531 → Rev 532

/trunk/actu/lettre_info.html
61,15 → 61,28
* L'applette syndication de papyrus ne convenant pas pour ce type d'affichage
*/
 
echo '<h2>Les prochains &eacute;v&egrave;nements</h2>'."\n";
echo '<div class="rss">';
// on récupère tous les types de natures et leurs identifiants
$requete = 'SELECT bn_id_nature, bn_label_nature FROM bazar_nature ' ;
$resultat = $GLOBALS['db']->query ($requete);
if (DB::isError($resultat)) {
echo $resultat->getMessage().'<br />'.$resultat->getDebugInfo().'<br />'.$requete;
}
 
$liste_nat = array() ;
 
while($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
$liste_nat[$ligne['bn_id_nature']] = $ligne['bn_label_nature'] ;
}
 
$nat_en_cours = '' ;
 
$requete = 'select * from bazar_fiche where '.
'bf_statut_fiche=1 and '. // La fiche doit être validée
'bf_date_creation_fiche <= now() '.
'and dayofyear(bf_date_creation_fiche) >= (dayofyear(now()) - 7) '.
'and year(bf_date_creation_fiche) = year(now()) '.
'and dayofyear(bf_date_creation_fiche) >= (dayofyear(now()) - 7) '.
'and year(bf_date_creation_fiche) = year(now()) '.
//'group by bf_titre '. // à rajouter si on doit éviter d'afficher les fiches qui ont le même titre
'order by bf_date_creation_fiche ' ; // on presente les évènements les plus proches en premier'
'order by bf_ce_nature ASC , bf_date_debut_evenement ASC ' ; // on presente les évènements les plus proches en premier'
 
$resultat = $GLOBALS['db']->query ($requete);
 
84,7 → 97,19
12 => 'décembre') ;
 
 
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) { ?>
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) {
 
if($ligne->bf_ce_nature != $nat_en_cours) {
 
if($nat_en_cours != '') {
echo '</div>';
}
echo '<h2>'.$liste_nat[$ligne->bf_ce_nature].'</h2>'."\n";
echo '<div class="rss">';
$nat_en_cours = $ligne->bf_ce_nature ;
}
 
?>
<b class="intituler_rubrique"><font color="#0227e1"><?php echo $ligne->bf_titre; ?></font></b><br />
<font size="-2">
Aura lieu