forked from michel929/TeamSensivityWebseite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblog.php
118 lines (102 loc) · 3.64 KB
/
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
<?php
include "templates/head.html";
require_once("inc/config.inc.php");
require_once("inc/functions.inc.php");
?>
<body>
<?php
include "templates/header.html";
?>
<!-- Content -->
<div class="metaportal_fn_content">
<div class="metaportal_fn_pagetitle">
<div class="container small">
<div class="pagetitle">
<h3 class="fn__maintitle big" data-text="Blog Articles" data-align="center">Blog Articles</h3>
<p>
<a href="index.html">Home</a>
<span class="divider">/</span>
<span class="text">Blog Articles</span>
</p>
</div>
</div>
</div>
<!-- Section Divider -->
<div class="fn_cs_section_divider">
<div class="divider">
<span class="short"></span>
<span class="long"></span>
<span class="short"></span>
</div>
</div>
<!-- !Section Divider -->
<div class="metaportal_fn_bloglist">
<div class="container small">
<div class="bloglist">
<ul class="fn-isotope">
<?php
$stmt = $pdo->query("SELECT * FROM news ORDER BY datum DESC");
$i = 1;
while ($row = $stmt->fetch()) {
$tags = $row["tags"];
$arr = getTagArray($tags);
$tags = "s";
foreach ($arr as $argument) {
if ($tags != "s") {
$tags = $tags . ", " . getTagName($argument);
} else {
$tags = getTagName($argument);
}
}
echo '<li class="isotope-item">
<div class="blog__item">
<div class="counter">
<span class="cc"><span>' . $i . '</span></span>
</div>
<div class="meta">
<p>' . $row["datum"] . ' / '.$tags.' / 4 Comments</p>
</div>
<div class="title">
<h3><a href="/blog-single.php?id=' . $row["id"] . '">' . $row["titel"] . '</a></h3>
</div>
<div class="image">
<a href="blog-single.php">
<img src="' . $row["banner"] . '" alt="">
</a>
</div>
<div class="read_more">
<a href="/blog-single.php?id=' . $row["id"] . '"><span>Read More</span></a>
</div>
</div>
</li>';
$i++;
}
?>
</ul>
</div>
<div class="metaportal_fn_pagination">
<ul>
<li>
<span>1</span>
</li>
<li>
<a href="#">2</a>
</li>
<li>
<a href="#">3</a>
</li>
<li>
<span>...</span>
</li>
<li>
<a href="#">4</a>
</li>
</ul>
</div>
</div>
</div>
<?php
include "templates/footer.html";
?>
</body>
</html>