2016-01-27 13:14:19 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
require 'lib/database.php';
|
|
|
|
require 'lib/project.php';
|
|
|
|
|
|
|
|
if (!isset($_GET['id'])) {
|
|
|
|
include '404.php';
|
|
|
|
die;
|
|
|
|
}
|
|
|
|
|
|
|
|
$id = (int) $_GET['id'];
|
|
|
|
|
|
|
|
$project = getProject($id);
|
|
|
|
|
|
|
|
if (false === $project) {
|
|
|
|
include '404.php';
|
|
|
|
die;
|
|
|
|
}
|
|
|
|
|
|
|
|
$comments = getCommentsByProject($project[''])
|
|
|
|
|
|
|
|
?>
|
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<link rel="stylesheet" href="style.css" />
|
|
|
|
<title>
|
|
|
|
Mon super portfolio - <?php echo $project['title'] ?>
|
|
|
|
</title>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<h1>
|
|
|
|
<?php echo $project['title'] ?>
|
|
|
|
</h1>
|
|
|
|
|
|
|
|
<section>
|
|
|
|
<article>
|
|
|
|
<figure>
|
|
|
|
<img src="images/<?php echo $project['illustration'] ?>" alt="" width="130px" />
|
|
|
|
</figure>
|
|
|
|
|
|
|
|
<p class="description">
|
|
|
|
<?php echo $project['description'] ?>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<?php $date = new DateTime($project['date']); ?>
|
|
|
|
|
|
|
|
<p class="date">
|
|
|
|
<time datetime="<?php echo $date->format(DateTime::W3C) ?>">
|
|
|
|
<?php echo $date->format('d/m/Y') ?>
|
|
|
|
</time>
|
|
|
|
</p>
|
|
|
|
</article>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<h2>Commentaires</h2>
|
2016-01-27 13:30:06 +01:00
|
|
|
|
|
|
|
<!--
|
|
|
|
Afficher la liste des commentaires
|
|
|
|
|
|
|
|
Un commentaire est composé de :
|
|
|
|
- son auteur
|
|
|
|
- le site web de l'auteur
|
|
|
|
- l'email de l'auteur
|
|
|
|
- sa date de publication
|
|
|
|
- son contenu
|
|
|
|
|
|
|
|
Il faudra afficher l'avatar de l'auteur en utilisant gravatar : https://fr.gravatar.com/site/implement/images/php/
|
|
|
|
Attention : ne pas utiliser cette fonction, il faut écrire la votre !
|
|
|
|
-->
|
2016-01-27 13:14:19 +01:00
|
|
|
</body>
|
|
|
|
</html>
|