1,59 → 1,75 |
<?php |
// Réglages de PHP |
setlocale(LC_ALL, 'fr_FR'); |
date_default_timezone_set('Europe/Paris'); |
?> |
<!-- SYNDICATION - DEBUT --> |
<div class="flux_simple"> |
<?php if ($erreurs || $informations) : ?> |
<h1>Erreur</h1> |
<div class="contenu_RSS"> |
<b>Impossible d'afficher le flux.</b><br /> |
|
<!-- Affichage des erreurs et messages d'information : --> |
<?php if ($erreurs) : ?> |
<?php foreach ($erreurs as $erreur) : ?> |
<p class="pap_erreur"><?=$erreur;?></p> |
<?php endforeach; ?> |
<?php endif; ?> |
|
<?php if ($informations) : ?> |
<?php foreach ($informations as $information) : ?> |
<p class="pap_info"><?=$information;?></p> |
<?php endforeach; ?> |
<?php endif; ?> |
</div> |
<?php else : ?> |
<!-- Affichage du flux RSS --> |
<?php $flux = array(); ?> |
<?php foreach ($sites as $site) : ?> |
<h1><?=$site['titre']?></h1> |
<div class="contenu_RSS" id="<?=$site['id']?>"> |
<a href="http://www.tela-botanica.org/eflore/cel2/jrest/CelSyndicationObservation/par-defaut/atom" class="suivre-observations" title="Suivre les observations" onclick="window.open(this.href);return false;">Suivre les observations</a> |
<?php foreach ($site['pages'] as $page) : ?> |
<?php |
// Formatage date |
$timestamp = strtotime($page['date']); |
$page['date'] = strftime('%A %d %B %Y', $timestamp); |
|
// Formatage titre |
$page['titre'] = preg_replace('/^\d+-\d+ :/', '', $page['titre']); |
?> |
<div id="actualites1"> |
<div id="texteActualites1"> |
<h3><a href="<?=$page['url']?>" class="lien_ext"><?=$page['titre']?></a></h3> |
<p class="sous-titre"><?=$page['date']?></p> |
</div> |
</div> |
<br /> |
|
|
<?php endforeach; ?> |
<?php endforeach; ?> |
<div id="cel-observation-contenu"> |
<?php if (isset($erreurs) || isset($informations)) : ?> |
<h1>Erreur & informations</h1> |
<p>Impossible d'afficher le flux.</p> |
<!-- Affichage des erreurs et messages d'information : --> |
<?php if ($erreurs) : ?> |
<?php foreach ($erreurs as $erreur) : ?> |
<p class="erreur"><?=$erreur;?></p> |
<?php endforeach; ?> |
<?php endif; ?> |
|
<?php if ($informations) : ?> |
<?php foreach ($informations as $information) : ?> |
<p class="info"><?=$information;?></p> |
<?php endforeach; ?> |
<?php endif; ?> |
<?php else : ?> |
<h1> |
Dernières observations du |
<a href="http://www.tela-botanica.org/appli:cel" title="Carnet en Ligne" onclick="window.open(this.href);return false;"> |
CEL |
</a> |
<a href="<?=$flux_rss_url?>" id="cel-observation-flux" title="Suivre les observations" |
onclick="window.open(this.href);return false;"> |
<img src="http://www.tela-botanica.org/sites/commun/generique/images/rss.png" alt="Suivre les observations" /> |
</a> |
</h1> |
<div id="cel-liste-observation"> |
<?php foreach ($items as $item) : ?> |
<div id="cel-observation-<?=$item['guid']?>" class="cel-observation" rel="<?=$item['guid']?>" > |
<img id="imPlus-<?=$item['guid']?>" width="10" height="10" |
name="imPlus-<?=$item['guid']?>" title="Voir les informations complémentaires" alt="+" |
src="http://www.tela-botanica.org/sites/commun/generique/images/plus.png" /> |
<img id="imMoins-<?=$item['guid']?>" width="10" height="10" class="imMoins" |
name="imMoins-<?=$item['guid']?>" title="Cacher les informations complémentaires" alt="+" |
src="http://www.tela-botanica.org/sites/commun/generique/images/moins.png" /> |
<strong> |
<a href="<?=$item['eflore_url']?>" onclick="window.open(this.href);return false;" |
title="Cliquez pour accéder à la fiche eFlore"> |
<?=$item['titre']?> |
</a> |
</strong><br /> |
<span class="cel-img-date">Publiée le <?=$item['date']?></span><br /> |
|
<div id="cel-info-<?=$item['guid']?>" class="cel-infos"> |
<?=$item['description']?> |
</div> |
</div> |
<?php endif; ?> |
</div> |
<?php endforeach; ?> |
</div> |
<p id="cel-observation-date-generation" class="discretion nettoyage">Au <?=strftime('%A %d %B %Y à %H:%M:%S')?></p> |
<script type="text/Javascript"> |
// Function pour cacher / afficher le détail des observations |
$(document).ready(function() { |
|
$('.cel-infos').hide(); |
$('.imMoins').hide(); |
$('.cel-observation').hover(function() { |
var id_obs = $(this).attr("rel"); |
$('#cel-info-'+id_obs).show(); |
$('#imPlus-'+id_obs).hide(); |
$('#imMoins-'+id_obs).show(); |
}, |
function() { |
var id_obs = $(this).attr("rel"); |
$('#cel-info-'+id_obs).hide(); |
$('#imPlus-'+id_obs).show(); |
$('#imMoins-'+id_obs).hide(); |
|
}); |
|
|
<!-- SYNDICATION - FIN --> |
}); |
</script> |
<?php endif; ?> |
</div> |