-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmanage_post.php
281 lines (207 loc) · 8.88 KB
/
manage_post.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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
<?php
include_once('resources/init.php');
//$posts = (isset($_GET['id'])) ? get_posts($_GET['id']) : get_posts();
$posts = get_posts((isset($_GET['id']))? $_GET['id'] : null);
?>
<!DOCTYPE html>
<!--[if lt IE 8 ]><html class="no-js ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="no-js ie ie8" lang="en"> <![endif]-->
<!--[if IE 9 ]><html class="no-js ie ie9" lang="en"> <![endif]-->
<!--[if (gte IE 8)|!(IE)]><!--><html class="no-js" lang="en"> <!--<![endif]-->
<head>
<!--- Basic Page Needs
================================================== -->
<meta charset="utf-8">
<title>WEBMED</title>
<meta name="description" content="">
<meta name="author" content="">
<!-- mobile specific metas
================================================== -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<!-- CSS
================================================== -->
<link rel="stylesheet" href="css/default.css">
<link rel="stylesheet" href="css/layout.css">
<link rel="stylesheet" href="css/media-queries.css">
<!-- Script
================================================== -->
<script src="js/modernizr.js"></script>
<!-- Favicons
================================================== -->
<link rel="shortcut icon" href="images/favicon.png" />
<script type="text/javascript">
function confirm_delete()
{
return confirm("Are you sure you want to delete this record?");
}
</script>
</head>
<body>
<!-- Header
================================================== -->
<header id="top">
<div class="row">
<div class="header-content twelve columns" >
<h1 id="logo-text"><a href="index.php" title="">WEBMED</a></h1>
<p id="intro" >Your Health is our first priority!</p>
</div>
</div>
<nav id="nav-wrap" style="z-index:9999;">
<a class="mobile-btn" href="#nav-wrap" title="Show navigation">Show Menu</a>
<a class="mobile-btn" href="#" title="Hide navigation">Hide Menu</a>
<div class="row">
<ul id="nav" class="nav">
<li><a href="index.php">Home</a>
</li>
<li><a class="fixed-navbar" href="medi.php">Medicines</a></li>
<li>
<a class="fixed-navbar" href="doctor.php">Primary Doctors</a>
<ul>
<li><a href="CardioDoctor.php">Cardiologists</a></li>
<li><a href="DermaDoctor.php">Dermatologists</a></li>
<li><a href="EndoDoctor.php">Endocrinologists</a>
<li><a href="GastroDoctor.php">Gastroenterologists</a></li>
<li><a href="GyneDoctor.php">Gynecologists</a></li>
<li><a href="MediDoctor.php">Medicine doctors</a></li>
<li><a href="NeuroDoctor.php">Neurologists</a></li>
<li><a href="Pedidoctor.php">Peditricians</a></li>
</ul>
</li>
<li><a class="fixed-navbar" href="blog.php">Blog</a></li>
<!-- <li><a class="fixed-navbar" href="#">Surgical specialists</a>
<ul>
<li><a href="#">Cardiothoracic surgery</a></li>
<li><a href="#">General surgery</a></li>
<li><a href="#">Neuro surgery</a></li>
<li><a href="#">Paediatric surgery</a></li>
<li><a href="#">plastic surgery</a></li>
<li><a href="#">Urological surgery</a></li>
</ul>
</li> -->
<!-- <li><a class="fixed-navbar" href="#">Others</a>
<ul>
<li><a href="#">Blog</a></li>
<li><a href="#">Research</a></li>
<li><a href="#">Weekly health advice</a></li>
</ul>
</li> -->
<li><a class="fixed-navbar" href="#contact">Contact</a></li>
</ul> <!-- end #nav -->
</div>
</nav> <!-- end #nav-wrap -->
</header> <!-- Header End -->
<!-- Content
================================================== -->
<div id="content-wrap">
<div class="row">
<div id="main" class="eight columns">
<article class="entry">
<?php
foreach($posts as $post){
?>
<header class="entry-header">
<h2 class="entry-title">
<h2><a href='index.php?id=<?php echo $post['post_id']; ?>' ><?php echo $post['title']; ?></a></h2>
</h2>
<div class="entry-meta">
<ul>
<li> <?php echo date('d-m-y h:i:s',strtotime($post['date_posted'])); ?></li>
<span class="meta-sep">•</span>
<li><a href="#" title="" rel="category tag">In <a href='manage_category.php?id=<?php echo $post['category_id']; ?>' ><?php echo "<font color='green'>".$post['name']."</font>"; ?></a></li>
<span class="meta-sep">•</span>
<li><a href='delete_post.php?id=<?php echo $post['post_id']; ?>' onclick='return confirm_delete()'><font color="red">Delete This Post</font></a></li> ||
<li><a href='edit_post.php?id=<?php echo $post['post_id']; ?>' ><font color="blue">Edit This Post</font></a></li>
</ul>
</div>
</header>
<div class="entry-content">
<p><?php echo nl2br($post['contents']); ?></p>
</div>
<?php
}
?>
</article> <!-- end entry -->
</div> <!-- end main -->
<div id="sidebar" class="four columns">
<div class="widget widget_categories group">
<h3>Categories</h3>
<?php
foreach(get_categories() as $category){
?>
<p><a href="manage_category.php?id=<?php echo $category['id'];?>"><?php echo $category['name']; ?></a>
<?php
}
?>
</div>
<div class="widget widget_text group">
<h3>Daily Quote of the Day</h3>
<p>What is success?</p><br/>
<p>"Success is not final; failure is not fatal: It is the courage to continue that counts." - Winston S. Churchill</p>
</div>
<!-- <div class="widget widget_popular">
<h3>Popular Post.</h3>
<ul class="link-list">
<li><a href="#">insert here</a></li>
<li><a href="#">insert here</a></li>
<li><a href="#">insert here</a></li>
</ul>
</div> -->
</div> <!-- end sidebar -->
</div> <!-- end row -->
</div> <!-- end content-wrap -->
<!-- Footer
================================================== -->
<footer>
<div class="row">
<!--<div class="twelve columns">
<ul class="social-links">
<li><a href="#"><i class="fa fa-facebook"></i></a></li>
<li><a href="#"><i class="fa fa-twitter"></i></a></li>
<li><a href="#"><i class="fa fa-google-plus"></i></a></li>
<li><a href="#"><i class="fa fa-github-square"></i></a></li>
<li><a href="#"><i class="fa fa-instagram"></i></a></li>
<li><a href="#"><i class="fa fa-flickr"></i></a></li>
<li><a href="#"><i class="fa fa-skype"></i></a></li>
</ul>
</div> -->
<!--
<div class="six columns info">
<h3>About The Blog</h3>
<p>Just Keep it Simple!
</p>
</div> -->
<!-- <div class="four columns">
<h3>Photostream</h3>
<ul class="photostream group">
<li><a href="#"><img alt="thumbnail" src="images/thumb.jpg"></a></li>
<li><a href="#"><img alt="thumbnail" src="images/thumb.jpg"></a></li>
<li><a href="#"><img alt="thumbnail" src="images/thumb.jpg"></a></li>
<li><a href="#"><img alt="thumbnail" src="images/thumb.jpg"></a></li>
<li><a href="#"><img alt="thumbnail" src="images/thumb.jpg"></a></li>
<li><a href="#"><img alt="thumbnail" src="images/thumb.jpg"></a></li>
<li><a href="#"><img alt="thumbnail" src="images/thumb.jpg"></a></li>
<li><a href="#"><img alt="thumbnail" src="images/thumb.jpg"></a></li>
</ul>
</div> -->
<!-- <div class="two columns">
<h3 class="social">Navigate</h3>
<ul class="navigate group">
<li><a href="#">Home</a></li>
<li><a href="#">Blog</a></li>
<li><a href="#">Demo</a></li>
<li><a href="#">Archives</a></li>
<li><a href="#">About</a></li>
</ul>
</div> -->
<p class="copyright">Copyright © 2021, webMed</p>
</div> <!-- End row -->
<div id="go-top"><a class="smoothscroll" title="Back to Top" href="#top"><i class="fa fa-chevron-up"></i></a></div>
</footer> <!-- End Footer-->
<!-- Java Script
================================================== -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/jquery-1.10.2.min.js"><\/script>')</script>
<script type="text/javascript" src="js/jquery-migrate-1.2.1.min.js"></script>
<script src="js/main.js"></script>
</body>
</html>