blogView.php 459 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
<?php
	if($blogposts == false){
		?>
		<article>
			<h3>Pas de post</h3>

			<p>Aucun billet n'a encore été publié, patience !</p>
		</article>
		<?php
	}
	
	else{
		$hr = false;
		foreach ($blogposts as $blogpost){
			$blogpost['link'] = str_replace(" ", "-", $blogpost['title']);
			if(!$hr)
				$hr = true;
			else
				echo "<hr />";
			$blogpost['datetime'] = new DateTime($blogpost['time']);
			include("site/view/public/blogPostView.php");
		}
	}

?>