-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle-blog.php
191 lines (170 loc) · 9.3 KB
/
single-blog.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<?php
$BLOGID = isset($_GET['id']) ? $_GET['id'] :"";
if ($BLOGID=="") {
# code...
redirect("index.php");
}
$sql = "SELECT * FROM `tblannouncement` WHERE ANNOUNCEMENTID='{$BLOGID}'";
$mydb->setQuery($sql);
$blog = $mydb->loadSingleResult();
?>
<div class="hero-wrap hero-bread" style="background-image: url('images/bg_6.jpg');">
<div class="container">
<div class="row no-gutters slider-text align-items-center justify-content-center">
<div class="col-md-9 ftco-animate text-center">
<p class="breadcrumbs"><span class="mr-2"><a href="index.html">Home</a></span> <span>Blog</span></p>
<h1 class="mb-0 bread"><?php echo $blog->ANNOUNCEMENT_TEXT ;?></h1>
</div>
</div>
</div>
</div>
<section class="ftco-section ftco-degree-bg">
<div class="container">
<div class="row">
<div class="col-lg-8 ftco-animate">
<h2 class="mb-3"><?php echo $blog->ANNOUNCEMENT_TEXT ;?></h2>
<p> <?php echo $blog->ANNOUNCEMENT_WHAT;?></p>
<div class="about-author d-flex p-4 bg-light">
<div class="bio align-self-md-center mr-4">
<img src="images/person_1.jpg" alt="Image placeholder" class="img-fluid mb-4">
</div>
<div class="desc align-self-md-center">
<h3><?php echo $blog->AUTHOR;?></h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ducimus itaque, autem necessitatibus voluptate quod mollitia delectus aut, sunt placeat nam vero culpa sapiente consectetur similique, inventore eos fugit cupiditate numquam!</p>
</div>
</div>
<div class="pt-5 mt-5">
<h3 class="mb-5">6 Comments</h3>
<ul class="comment-list">
<li class="comment">
<div class="vcard bio">
<img src="images/person_1.jpg" alt="Image placeholder">
</div>
<div class="comment-body">
<h3>John Doe</h3>
<div class="meta">June 27, 2018 at 2:21pm</div>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Pariatur quidem laborum necessitatibus, ipsam impedit vitae autem, eum officia, fugiat saepe enim sapiente iste iure! Quam voluptas earum impedit necessitatibus, nihil?</p>
<p><a href="#" class="reply">Reply</a></p>
</div>
</li>
<li class="comment">
<div class="vcard bio">
<img src="images/person_1.jpg" alt="Image placeholder">
</div>
<div class="comment-body">
<h3>John Doe</h3>
<div class="meta">June 27, 2018 at 2:21pm</div>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Pariatur quidem laborum necessitatibus, ipsam impedit vitae autem, eum officia, fugiat saepe enim sapiente iste iure! Quam voluptas earum impedit necessitatibus, nihil?</p>
<p><a href="#" class="reply">Reply</a></p>
</div>
<ul class="children">
<li class="comment">
<div class="vcard bio">
<img src="images/person_1.jpg" alt="Image placeholder">
</div>
<div class="comment-body">
<h3>John Doe</h3>
<div class="meta">June 27, 2018 at 2:21pm</div>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Pariatur quidem laborum necessitatibus, ipsam impedit vitae autem, eum officia, fugiat saepe enim sapiente iste iure! Quam voluptas earum impedit necessitatibus, nihil?</p>
<p><a href="#" class="reply">Reply</a></p>
</div>
<ul class="children">
<li class="comment">
<div class="vcard bio">
<img src="images/person_1.jpg" alt="Image placeholder">
</div>
<div class="comment-body">
<h3>John Doe</h3>
<div class="meta">June 27, 2018 at 2:21pm</div>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Pariatur quidem laborum necessitatibus, ipsam impedit vitae autem, eum officia, fugiat saepe enim sapiente iste iure! Quam voluptas earum impedit necessitatibus, nihil?</p>
<p><a href="#" class="reply">Reply</a></p>
</div>
<ul class="children">
<li class="comment">
<div class="vcard bio">
<img src="images/person_1.jpg" alt="Image placeholder">
</div>
<div class="comment-body">
<h3>John Doe</h3>
<div class="meta">June 27, 2018 at 2:21pm</div>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Pariatur quidem laborum necessitatibus, ipsam impedit vitae autem, eum officia, fugiat saepe enim sapiente iste iure! Quam voluptas earum impedit necessitatibus, nihil?</p>
<p><a href="#" class="reply">Reply</a></p>
</div>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class="comment">
<div class="vcard bio">
<img src="images/person_1.jpg" alt="Image placeholder">
</div>
<div class="comment-body">
<h3>John Doe</h3>
<div class="meta">June 27, 2018 at 2:21pm</div>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Pariatur quidem laborum necessitatibus, ipsam impedit vitae autem, eum officia, fugiat saepe enim sapiente iste iure! Quam voluptas earum impedit necessitatibus, nihil?</p>
<p><a href="#" class="reply">Reply</a></p>
</div>
</li>
</ul>
<!-- END comment-list -->
<div class="comment-form-wrap pt-5">
<h3 class="mb-5">Leave a comment</h3>
<form action="#" class="p-5 bg-light">
<div class="form-group">
<label for="name">Name *</label>
<input type="text" class="form-control" id="name">
</div>
<div class="form-group">
<label for="email">Email *</label>
<input type="email" class="form-control" id="email">
</div>
<div class="form-group">
<label for="website">Website</label>
<input type="url" class="form-control" id="website">
</div>
<div class="form-group">
<label for="message">Message</label>
<textarea name="" id="message" cols="30" rows="10" class="form-control"></textarea>
</div>
<div class="form-group">
<input type="submit" value="Post Comment" class="btn py-3 px-4 btn-primary">
</div>
</form>
</div>
</div>
</div> <!-- .col-md-8 -->
<div class="col-lg-4 sidebar ftco-animate">
<div class="sidebar-box">
<form action="#" class="search-form">
<div class="form-group">
<span class="icon ion-ios-search"></span>
<input type="text" class="form-control" placeholder="Type a keyword and hit enter">
</div>
</form>
</div>
<?php
$sql = "SELECT * FROM `tblannouncement` ORDER BY `DATEPOSTED` DESC";
$mydb->setQuery($sql);
$blog = $mydb->loadResultList();
foreach ($blog as $result) {
// // `BLOGS`, `BLOG_WHAT`, `BLOG_WHEN`, `BLOG_WHERE`, `DATEPOSTED`
?>
<div class="block-21 mb-4 d-flex">
<a class="blog-img mr-4" style="background-image: url(images/image_1.jpg);"></a>
<div class="text">
<h3 class="heading-1"><a href="index.php?q=singleblog&id=<?php echo $result->ANNOUNCEMENTID; ?>"><?php echo $result->ANNOUNCEMENT_TEXT ;?></a></h3>
<div class="meta">
<div><a href="#"><span class="icon-calendar"></span> <?php echo date_format(date_create($result->DATEPOSTED),'M d, Y'); ?></a></div>
<div><a href="#"><span class="icon-person"></span> <?php echo $result->AUTHOR; ?></a></div>
<div><a href="#"><span class="icon-chat"></span> 19</a></div>
</div>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
</section> <!-- .section -->