add unpolished post viewing

This commit is contained in:
Hendrik
2017-01-25 13:28:47 +01:00
parent b9fc016f7d
commit db333b6e98
7 changed files with 114 additions and 16 deletions

View File

@@ -1,19 +1,20 @@
<?php
// $postID = $_GET['postID'];
$postID = 1;
$postID = 10;
$post = selectPostById($postID)->fetch(PDO::FETCH_ASSOC);
$fullname = $post['fname'] . " " . $post['lname'] . " (" . $post['username'] . ")";
?>
<div class="post-header">
<h4><?php echo $post['title'];?></h4>
<span class="postinfo">
gepost door <?php echo $fullname;?>,
<span class="posttime" title="<?php echo $post['creationdate']?>">
<?php echo nicetime($post['creationdate']); ?>
echo "
<div class='post-header'>
<h4>" . $post['title'] . "</h4>
<span class='postinfo'>
gepost door $fullname,
<span class='posttime' title='" . $post['creationdate'] . "'>
" . nicetime($post['creationdate']) . "
</span>
</span>
</div>
</div>"
?>
<div class="post-content">
<p><?php echo $post['content']; ?></p>