-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathview_post.php
More file actions
36 lines (30 loc) · 1006 Bytes
/
view_post.php
File metadata and controls
36 lines (30 loc) · 1006 Bytes
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
26
27
28
29
30
31
32
33
34
35
36
<?php
require_once './header.php';
$post = Post::findPostById($connection, $_GET['id']);
?>
<div class="row">
<div class="col-12">
<div class="card mb-0">
<div class="card-body">
<h4 class="m-0">View Post</h4>
</div>
</div>
</div>
</div>
<div class="row mt-4">
<div class="col-12">
<div class="card card-primary">
<div class="card-header">
<h4><?php echo $post->title; ?> <span style="font-size: 10px;" class="badge ml-2 badge-info"><?php echo $post->category; ?></span></h4>
</div>
<div class="card-body">
<p class="text-muted">Author : <?php echo $post->author; ?> </p>
<?php echo $post->body; ?>
</div>
<div class="card-footer">
<?php echo "Created : " . date_format(date_create($post->created_at), "M d Y"); ?>
</div>
</div>
</div>
</div>
<?php include './footer.php'; ?>