-
Notifications
You must be signed in to change notification settings - Fork 0
/
all_entries.php
39 lines (31 loc) · 919 Bytes
/
all_entries.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
<!-- header -->
<?php require_once "includes/header.php";?>
<!-- sidebar -->
<?php require_once "includes/sidebar.php";?>
<!-- main container -->
<div id="main">
<h1>All entries</h1>
<?php
$entries = find_all_entries();
if (!empty($entries)){
while ($entry = mysqli_fetch_assoc($entries)){
echo "<article class='entry'>"
. "<a href='entry.php?id=" . $entry["ID_ent"] . "'>"
. "<h2>" . ucwords($entry['title_ent']) . "</h2>"
. "<span class='category-date'>"
. ucwords($entry['name_cat'])
. " | "
. date('F j, Y', strtotime(($entry['date_ent'])))
. "</span>"
. "<p>"
. substr($entry['description_ent'], 0, 180) . "..."
. "</p>"
. "</a>"
. "</article>";
}
}
?>
</div>
<!-- end of main container -->
<!-- footer -->
<?php require_once "includes/footer.php"?>