Subversion Repositories Applications.papyrus

Rev

Rev 1971 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1971 Rev 2072
Line 1... Line 1...
1
<!-- SYNDICATION - DEBUT -->
1
<!-- SYNDICATION - DEBUT -->
-
 
2
	<div class="flux_RSS">
-
 
3
		<?php if ($erreurs || $informations) : ?>
-
 
4
			<h1>Erreur</h1>
-
 
5
			<div class="contenu_RSS">
-
 
6
				<b>Impossible d'afficher le flux.</b><br />
-
 
7
				
2
<h1 id="rss_titre_general">La botanique sur la toile</h1>
8
				<!-- Affichage des erreurs et messages d'information : -->
3
<?php if ($erreurs) : ?>
9
				<?php if ($erreurs) : ?>
4
	<?php foreach ($erreurs as $erreur) : ?>
10
					<?php foreach ($erreurs as $erreur) : ?>
5
		<p class="pap_erreur"><?=$erreur;?></p>
11
						<p class="pap_erreur"><?=$erreur;?></p>
6
	<?php endforeach; ?>
12
					<?php endforeach; ?>
-
 
13
				<?php endif; ?>
-
 
14
				
7
<?php elseif ($informations) : ?>
15
				<?php if ($informations) : ?>
8
	<?php foreach ($informations as $information) : ?>
16
					<?php foreach ($informations as $information) : ?>
9
		<p class="pap_info"><?=$information;?></p>
17
						<p class="pap_info"><?=$information;?></p>
10
	<?php endforeach; ?>
18
					<?php endforeach; ?>
-
 
19
				<?php endif; ?>
-
 
20
			</div>
11
<?php else : ?>
21
		<?php else : ?>
12
  <div class="rss">
22
			<!-- Affichage du flux RSS -->
13
  <?php $flux = array(); ?>
23
			<?php $flux = array(); ?>
14
  <?php foreach ($sites as $site) : ?>
24
  				<?php foreach ($sites as $site) : ?>
-
 
25
  					<h1><a href="<?=$site['url']?>"><?=$site['titre']?></a></h1>
-
 
26
  					<div class="contenu_RSS" <?=($site['id']!="") ? 'id="'.$site["id"].'"' : ""; ?>>
15
    <?php foreach ($site['pages'] as $page) : ?>
27
    				<?php foreach ($site['pages'] as $page) : ?>
-
 
28
    					<?php
-
 
29
							//Traitement spécifique tela
16
      <?php array_push ($flux, array ($page['url'], $page['titre'], $site['titre'], strtotime($page['date']))); ?>
30
							// La ligne ci-dessous sert à enlever les "align=left" dans les images générées par spip
17
    <?php endforeach; ?>
31
							// TODO : enlever du flux RSS 
-
 
32
							$image = substr_replace($page['image'], ' ', strpos($page['image'], 'align='), 12);
-
 
33
						?>
18
  <?php endforeach; ?>
34
    					<?php 
-
 
35
							$date = strtotime($page['date']); 
-
 
36
    						$titre_page = preg_replace('/^\d+-\d+&nbsp;:/', '', $page['titre']); 
19
  
37
    					?>
20
  <?php foreach ($flux as $key=>$row) : ?>
38
    					<div class="actualites1">
-
 
39
							<div class="imageActualites1"><?=$image?></div> 
21
    <?php $date_flux[$key] = $row[3]; ?>
40
								<div class="texteActualites1">
-
 
41
								<?php 
-
 
42
									// Préparation de la variable de date en chaîne de caractères
22
  <?php endforeach; ?>
43
									$date_string = "";
23
  
-
 
-
 
44
									$date_string .= $GLOBALS['jours'][date ('w', $date)];
24
  <?php array_multisort($date_flux, SORT_DESC, $flux); ?>
45
									$date_string .= ' '.date ('d', $date);
25
	
-
 
-
 
46
									$date_string .= ' '.$GLOBALS['mois'][date('n',  $date)];
26
	<?php foreach ($flux as $key=>$news) : ?>
47
									$date_string .= ' '.date ('Y', $date);
-
 
48
								?>
27
  	<h2 class="rss_titre_article"><a href="<?=$news[0];?>" class="lien_ext"><?php echo preg_replace('/^\d+-\d+&nbsp;:/', '', $news[1]);?></a></h2>
49
								<h3><a href="<?=$page['url']?>" class="lien_ext"><?=$titre_page?></a></h3>
-
 
50
								<h4>Mis en ligne <?=$date_string?> par <?=$page['author']?></h4>
-
 
51
								<p><?=$page['description_light']?></p> 
28
  	<h1 class="rss_titre_site"><?= $news[2]; ?> - <span class="date"><?php echo $GLOBALS['jours'][date ('w', $news[3])].' '.date('d',$news[3]).
52
  								<a title="Lire la suite article" href="<?=$page['url']?>"> <span class="vertpetit petitcarre voirSuite">Lire la suite</span></a></p>
-
 
53
							</div>
-
 
54
						</div>
-
 
55
    				<?php endforeach; ?>
-
 
56
  				<?php endforeach; ?>
-
 
57
  				<?php if (isset($site['voirsuite'])) : ?>
29
		 ' '.$GLOBALS['mois'][date('n',  $news[3])].' '.date ('Y', strtotime ($news[3]));  ?></span></h1>
58
  					<span class="lireTout gris puceFleche"><a class="orange" href="<?=$site['url']?>"><?=$site['voirsuite']?></a></span>
-
 
59
  				<?php endif; ?>
-
 
60
				</div>
-
 
61
		<?php endif; ?>
-
 
62
	</div>
30
	  
63
 
31
	<?php endforeach; ?>
-
 
Line 32... Line -...
32
 
-
 
33
	<!--
-
 
34
	<?php foreach ($sites as $site) : ?>
-
 
35
		<?php foreach ($site['pages'] as $page) : ?>
-
 
36
		<h2 class="rss_titre_article"><a href="<?=$page['url'];?>" class="lien_ext"><?php echo preg_replace('/^\d+-\d+&nbsp;:/', '', $page['titre']);?></a></h2>
-
 
37
		<h1 class="rss_titre_site"><?= $site['titre']; ?> - <span class="date"><?php echo $GLOBALS['jours'][date ('w', strtotime ($page['date']))].' '.date('d', strtotime($page['date'])).
-
 
Line 38... Line -...
38
		 ' '.$GLOBALS['mois'][date('n',  strtotime ($page['date']))].' '.date('Y'); ?></span></h1>
-
 
39
 
-
 
40
		<?php endforeach; ?>
-
 
41
	<?php endforeach; ?>
-
 
42
	-->
-
 
43
	</div>
64