-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.php
executable file
·58 lines (45 loc) · 1.93 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
<?php include("konektor.php"); ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Blog Programer PHP</title>
<link rel="icon" href="img/ArdiantaPargo.png" />
<link rel="stylesheet" href="bootstrap/css/bootstrap.css" />
<link rel="stylesheet" href="bootstrap/css/style.css" />
<link rel="stylesheet" href="font-awesome/css/font-awesome.css" />
</head>
<body>
<header>
<?php include("header.php"); ?>
</header>
<nav class="navbar navbar-default"><?php include("menu.php"); ?></nav>
<article>
<div class="container wrap">
<div class="row">
<div class="col-md-12">
<!-- ARTIKEL ------------------->
<?php
$query = mysqli_query($koneksi, "SELECT * FROM artikel ORDER BY tanggal DESC");
// looping Artikel
while($artikel = mysqli_fetch_array($query)){
echo "<div class='artikel-kop'>";
echo "<h2><b>".$artikel['judul']."</b></h2>";
echo "<p class='artikel-tanggal'>Oleh <b>".$artikel['penulis']."</b>, pada ".$artikel['tanggal']."</p>";
echo "</div>";
echo "<div class='artikel-isi'>";
echo substr($artikel['isi'], 0, 255);
echo " [<a href='artikel.php?id=".$artikel['id']."' />Lanjut Baca...</a>]";
echo "</div><hr/>";
}
?>
<!-- END ARTIKEL --------------->
</div>
</div>
</div>
</article>
<footer>
<?php include("footer.php"); ?>
</footer>
</body>
</html>