blogPostView.php 552 Bytes
Newer Older
1 2
<?php
	if(!isset($pageName)){
3
		header('Location:/');
4 5 6 7
		exit();
	}
?>

8
	<article>
9
		<h3><a href="/article/<?php echo $blogpost['slug']; ?>"><?php echo $blogpost['title']; ?></a></h3>
10
		<p class="postInfos">
11
			Le <time datetime="<?php echo $blogpost['time']; ?>"><?php echo date_format($blogpost['datetime'], 'd/m/Y à H:i'); ?></time>.
12 13 14
		</p>
		<section>
			<p>
15 16
				<?php
				if(isset($_GET['title']))
17
					echo htmlspecialchars_decode($blogpost['content']);
Corentin Bettiol's avatar
Corentin Bettiol committed
18 19
				else
					echo nl2br($blogpost['shortContent']);
20
				?>
21 22 23
			</p>
		</section>
	</article>