-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
executable file
·421 lines (291 loc) · 15.7 KB
/
index.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
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
<?php
include_once 'connection.php';
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" class="background-main no-js">
<head>
<title>
<?php
$stmt = $conn->prepare("SELECT * FROM category ORDER by cat_name ASC");
$stmt->execute();
foreach ($stmt as $key => $value) { echo"{$value['cat_name']},";}
?> Programming, Sourcecode, tutorials and doubt clearing with My learning</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no" />
<link href="framework/addons/camera/css/camera.css" rel="stylesheet" />
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<script src="framework/js/html5shiv.js"></script>
<script src="framework/js/respond.min.js"></script>
<![endif]-->
<link href="social-icons.css" rel="stylesheet" />
<link href="style.css" rel="stylesheet" />
<link href="theme-color.css" rel="stylesheet" />
<link href="responsive.css" rel="stylesheet" />
<link href="firefox.css" rel="stylesheet" />
<script src="framework/js/modernizr.js"></script>
</head>
<body>
<!--<canvas id="snowfall"></canvas>-->
<a class="sr-only" href="#content"></a>
<div class="header-background">
<?php
include_once 'top.php';
?>
<!-- Main Menu -->
<nav class="main-menu navbar visible-lg visible-md" data-sticky-header="true">
<h2 class="hidden">Main Navigation</h2>
<div class="container">
<div class="row">
<!-- Collect the nav links, forms, and other content for toggling -->
<div id="main-menu-navbar-collapse" class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-left">
<li class="color-theme active">
<a href="index.php">Home <span class="nav-line"></span></a>
</li>
<li class="dropdown color-3">
<a href="#" class="dropdown-toggle" data-hover="dropdown">Projects
<span class="nav-line"></span></a>
<ul class="dropdown-menu" data-dropdownanimation="true" data-animation="fadeInLeft">
<?php
$stmt = $conn->prepare("SELECT * FROM category ORDER by cat_name ASC");
$stmt->execute();
foreach ($stmt as $key => $value) {
echo"<li><a href=\"projects.php?prj_id={$value['cat_id']} \">{$value['cat_name']}</a></li>";
}
?>
</ul>
</li>
<li class="color-2">
<a href="#" >About<span class="nav-line"></span></a>
</li>
<li class="color-4">
<a href="#" >Contact<span class="nav-line"></span></a>
</li>
<li class="color-1">
<a href="login/" >Login<span class="nav-line"></span></a>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
</div>
</nav>
<!-- Mobile Menu (Pushy Menu) -->
<nav class="mobile-menu pushy pushy-left animated fadeInLeft">
<h2 class="hidden">Mobile Navigation</h2>
<div class="close-button"><i class="icon-close"></i>Close</div>
<ul class="menu-block">
<li class="color-theme active">
<a href="index.php" class="dropdown-toggle" data-hover="dropdown">Home <span class="nav-line"></span></a>
</li>
<li class="dropdown color-3">
<a href="#" class="dropdown-toggle" data-hover="dropdown">Projects<span class="nav-line"></span></a>
<ul class="dropdown-menu animated fadeInLeft">
<?php
$stmt = $conn->prepare("SELECT * FROM category ORDER by cat_name ASC");
$stmt->execute();
foreach ($stmt as $key => $value) {
echo"<li><a href=\"projects.php?prj_id={$value['cat_id']} \">{$value['cat_name']}</a></li>";
}
?>
</ul>
</li>
<li class="color-2">
<a href="#" class="dropdown-toggle" data-hover="dropdown">About<span class="nav-line"></span></a>
</li>
<li class="color-4">
<a href="#" class="dropdown-toggle" data-hover="dropdown">Contact<span class="nav-line"></span></a>
</li>
</ul>
</nav>
<!-- Mobile-Menu (Close) Site Overlay -->
<div class="site-overlay"></div>
</div>
<!-- Main Container -->
<div class="container main-site-container" itemscope itemtype="http://schema.org/CreativeWork">
<div class="row">
<div class="col-md-8">
<!-- Opposite Posts Category -->
<section class="cat-widget wdg-cat-opposite clearfix">
<div class="color-red widget-content clearfix">
<div>
<?php
$stmt = $conn->prepare("SELECT u.up_id, u.up_title, u.up_content, u.up_img, u.u_id, u.cat_id,u.up_date,
c.cat_name ,usr.u_name
FROM upload AS u
LEFT JOIN category AS c
ON u.cat_id = c.cat_id
LEFT JOIN user AS usr
ON u.u_id = usr.u_id
WHERE u.up_status = 1 ORDER by u.up_id DESC LIMIT 4
");
$stmt->execute();
$i=1;
foreach ($stmt as $key => $value) {
//$tem_array[] = $v;
$up_id = $value['up_id'];
$up_title = $value['up_title'];
$up_content = $value['up_content'];
$up_img = $value['up_img'];
$u_id = $value['u_name'];
$cat_id = $value['cat_id'];
$date = $value['up_date'];
if(!($i%2==0))
{
echo "<article class=\"odd-item\" data-showonscroll=\"true\" data-animation=\"fadeIn\">
<figure class=\"sec-image\">
<a class=\"post-thumbnail\">
<img src=\"login/$up_img\" alt=\"$up_img\"/></a>
<div class=\"top-bar\">
<span class=\"btn-srp\"><a href=\"projects.php?prj_id=$cat_id \">{$value['cat_name']}</a></span>
</div>
<div class=\"bottom-bar\">
<span class=\"btn-srp\"><a href=\"post.php?pid=$up_id\">Read More...</a></span>
</div>
</figure>
<div class=\"sec-desc\">
<header class=\"title\">
<h4 class=\"post-title\"><a href=\"post.php?pid=$up_id\">$up_title</a></h4>
</header>
<div class=\"meta-info\">
<span class=\"author\"><i class=\"icon-user3\"></i><a href=\"#\">$u_id</a></span>
<span class=\"date-time\"><i class=\"icon-alarm2\"></i>$date</span>
</div>
<div class=\"post-desc\">
<p>$up_content</p>
</div>
</div>
</article>";
}
else{
echo "<article class=\"even-item\" data-showonscroll=\"true\" data-animation=\"fadeIn\">
<figure class=\"sec-image\">
<a class=\"post-thumbnail\">
<img src=\"login/$up_img\" alt=\"$up_img\"/></a>
<div class=\"top-bar\">
<span class=\"btn-srp\"><a href=\"projects.php?prj_id=$cat_id \">{$value['cat_name']}</a></span>
</div>
<div class=\"bottom-bar\">
<span class=\"btn-srp\"><a href=\"post.php?pid=$up_id\">Read More...</a></span>
</div>
</figure>
<div class=\"sec-desc\">
<header class=\"title\">
<h4 class=\"post-title\"><a href=\"post.php?pid=$up_id\">$up_title</a></h4>
</header>
<div class=\"meta-info\">
<span class=\"author\"><i class=\"icon-user3\"></i><a href=\"#\">$u_id</a></span>
<span class=\"date-time\"><i class=\"icon-alarm2\"></i>$date</span>
</div>
<div class=\"post-desc\">
<p>$up_content</p>
</div>
</div>
</article>";
}
echo"<div class=\"divider\"></div>";
$i++;
}
?>
</div>
</div>
<footer class="blog-pagination">
<ul class="pagination">
<li><a href="#">«</a></li>
<li class="active"><a href="#">1 <span class="sr-only">(current)</span></a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
<li><a href="#">5</a></li>
<li><a href="#">»</a></li>
</ul>
</footer>
</section>
</div>
<section class="col-md-4">
<h2 class="hidden">Sidebar</h2>
<aside class="widget" data-showonscroll="true" data-animation="fadeIn">
<div class="widget-title clearfix">
<h3>Social Counter</h3>
<div class="sep-widget"></div>
</div>
<div class="widget-content clearfix">
<div class="wdg-social-counter clearfix">
<ul class="social-counter clearfix">
<li>
<div class="facebook">
<i class="zoc-facebook border-radius-50-per"></i>
<span class="fans-word">Fans</span>
<span class="fans-count">10,000</span>
<a href="#" class="more"></a>
</div>
</li>
<li>
<div class="twitter">
<i class="zoc-twitter border-radius-50-per"></i>
<span class="fans-word">Followers</span>
<span class="fans-count">2,000</span>
<a href="#" class="more"></a>
</div>
</li>
<li>
<div class="youtube">
<i class="zoc-youtube border-radius-50-per"></i>
<span class="fans-word">Subscribers</span>
<span class="fans-count">150</span>
<a href="#" class="more"></a>
</div>
</li>
<li>
<div class="vimeo">
<i class="zoc-vimeo border-radius-50-per"></i>
<span class="fans-word">Subscribers</span>
<span class="fans-count">4,150</span>
<a href="#" class="more"></a>
</div>
</li>
<li>
<div class="dribbble">
<i class="zoc-dribbble border-radius-50-per"></i>
<span class="fans-word">Followers</span>
<span class="fans-count">200</span>
<a href="#" class="more"></a>
</div>
</li>
<li>
<div class="rss">
<i class="zoc-rss border-radius-50-per"></i>
<span class="fans-word">To RSS Feed</span>
<span class="fans-count">Subscribe</span>
<a href="#" class="more"></a>
</div>
</li>
</ul>
</div>
</div>
</aside>
</section>
</div>
<?php
include_once 'footer.php';
?>
</div>
<div class="btn-goto-top border-radius-2px">
<i class="icon-arrow-up7"></i>
</div>
<!-- Body Scripts -->
<script src="framework/js/jquery-2.0.3.min.js"></script>
<script src="framework/js/jquery-migrate-1.2.1.min.js"></script>
<script src="framework/js/jquery.easing.1.3.js"></script>
<script src="framework/bootstrap/js/bootstrap.min.js"></script>
<!-- Breaking News Ticker -->
<script src="framework/addons/breaking-news-ticker/jquery.ticker.js"></script>
<!-- Mobile Menu -->
<script src="framework/addons/mobile-menu/pushy.js"></script>
<!-- Show On Scroll -->
<script src="framework/addons/show-on-scroll/jquery.appear.js"></script>
<script src="framework/js/serpentsoft-scripts.js"></script>
</body>
</html>