-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheditorials.php
More file actions
41 lines (32 loc) · 1.04 KB
/
editorials.php
File metadata and controls
41 lines (32 loc) · 1.04 KB
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
<!DOCTYPE html>
<?php $thisPage="Editorials";
require_once 'php/Dao.php'; ?>
<html>
<head>
<title>NILR: All Articles</title>
<link rel="icon" href="images/favicon.ico" />
<link rel="stylesheet" href="css/styles.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</head>
<body>
<?php include 'header.php';
$dao = new Dao();
$conn = $dao->getConnection();
$stmt = $conn->query("SELECT * from article where metatag like 'editorial' order by ID desc limit 15;'");
?>
<article class="articles-fade" id="articleList">
<h1>Editorials</h1>
<?php while($row = $stmt->fetch()) { ?>
<article class="article-post" id="article">
<h4> <a <?php echo "href=article-editorial.php?id=" . $row['id'];?>> <?php echo $row['title'] ?></a> </h4>
<p> <?php echo $row['subtitle']; ?> </p>
</article>
<?php } ?>
</article>
<?php include 'footer.php';?>
<script>
$(document).ready(function() {
$('#articleList').fadeIn(3000);
});
</script>
</body>