Subversion Repositories Applications.papyrus

Rev

Rev 1971 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<!-- SYNDICATION - DEBUT -->
<h1 id="rss_titre_general">La botanique sur la toile</h1>
<?php if ($erreurs) : ?>
        <?php foreach ($erreurs as $erreur) : ?>
                <p class="pap_erreur"><?=$erreur;?></p>
        <?php endforeach; ?>
<?php elseif ($informations) : ?>
        <?php foreach ($informations as $information) : ?>
                <p class="pap_info"><?=$information;?></p>
        <?php endforeach; ?>
<?php else : ?>
  <div class="rss">
  <?php $flux = array(); ?>
  <?php foreach ($sites as $site) : ?>
    <?php foreach ($site['pages'] as $page) : ?>
      <?php array_push ($flux, array ($page['url'], $page['titre'], $site['titre'], strtotime($page['date']))); ?>
    <?php endforeach; ?>
  <?php endforeach; ?>
  
  <?php foreach ($flux as $key=>$row) : ?>
    <?php $date_flux[$key] = $row[3]; ?>
  <?php endforeach; ?>
  
  <?php array_multisort($date_flux, SORT_DESC, $flux); ?>
        
        <?php foreach ($flux as $key=>$news) : ?>
        <h2 class="rss_titre_article"><a href="<?=$news[0];?>" class="lien_ext"><?php echo preg_replace('/^\d+-\d+&nbsp;:/', '', $news[1]);?></a></h2>
        <h1 class="rss_titre_site"><?= $news[2]; ?> - <span class="date"><?php echo $GLOBALS['jours'][date ('w', $news[3])].' '.date('d',$news[3]).
                 ' '.$GLOBALS['mois'][date('n',  $news[3])].' '.date ('Y', $news[3]);  ?></span></h1>
        <?php endforeach; ?>
        </div>
<?php endif; ?>
<!-- SYNDICATION - FIN -->