-
Notifications
You must be signed in to change notification settings - Fork 0
/
dashboard.php
62 lines (50 loc) · 1.28 KB
/
dashboard.php
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
require_once 'core/init.php';
$user = new User();
require_once 'core/checkLogin.php';
include 'includes/header.php';
$blogger = $user->blogger();
$posts = $blogger->getPost();
?>
<div class="header-wrapper">
<div class="header-container">
<h3>Dashboard</h3>
</div>
</div>
<div class="row">
<div class="large-12 columns">
<?php
if(Session::exists('home')){
flashMessage(Session::flash('home'));
}
?>
<div class="row">
<div class="large-2 columns">
<?php
include 'includes/Menu/sidebar.php';
?>
</div>
<div class="large-10 columns">
<?php
if(empty($posts)){
echo '<h5>You currently don\'t have any post!</h5>';
}else{
foreach($posts as $post){
?>
<h3><a href="post.php?id=<?= $post->id; ?>"><?= display($post->title); ?></a></h3>
<h6><a href="category.php?id=<?= $post->cat_id; ?>"><?= $post->cat_name; ?></a> /
<span style="color:#8A8989"><?= date('M j, Y h:i a', strtotime($post->date_posted)); ?></span>
</h6>
<div><?= truncateHtml(display($post->contents), 300); ?></div>
<hr>
<?php
}
}
?>
</div>
</div>
</div>
</div>
<?php
include 'includes/footer.php';
?>