add unpolished post viewing
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -56,11 +56,18 @@
|
||||
|
||||
while($post = $posts->fetch()) {
|
||||
$nicetime = nicetime($post["creationdate"]);
|
||||
$postID = $post["postID"];
|
||||
echo "
|
||||
<div class='post platform'>
|
||||
<div class='post platform' onclick='requestPost(this)'>
|
||||
<h2>${post["title"]}</h2>
|
||||
<p>${post["content"]}</p>
|
||||
<p class=\"subscript\">${nicetime} geplaatst.</p>
|
||||
<p class=\"subscript\" title='" . $post["creationdate"] ."'>${nicetime} geplaatst.</p>
|
||||
<form>
|
||||
<input type='hidden'
|
||||
name='postID'
|
||||
value='$postID'
|
||||
/>
|
||||
</form>
|
||||
</div>
|
||||
";
|
||||
}
|
||||
@@ -72,7 +79,9 @@
|
||||
<div class="modal-close">
|
||||
×
|
||||
</div>
|
||||
<?php include("../views/post-view.php"); ?>
|
||||
<div class="modal-response" id="modal-response">
|
||||
Loading...
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user