chiro-canto/public/articles/archive.php

43 lines
1.3 KiB
PHP

<?php
session_start();
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Explore | Chiro - Canto</title>
<link rel="stylesheet" type="text/css" href="/styles/style.css">
</head>
<?php
include("$root/analytics/matomo.php");
?>
<body>
<?php include("$root/menu.php");?>
<?php include("$root/header.php");?>
<h2>Articles Archive</h2>
<ul id="headlines" class="arcive">
<?php
foreach ($results['articles'] as $article) {
?>
<li>
<h2><span class="pub-date"><?=date('j F Y', $article->publication_date)?></span>
<a href="?action=view&article=<?=$article->id?>"><?=htmlspecialchars($article->title)?></a>
</h2>
<p class="summary"><?php echo htmlspecialchars($article->summary)?></p>
</li>
<?php
}
?>
</ul>
<p><a href="?action=archive">Article Archive</a></p>
<?php include("$root/footer.php");?>
</body>
<script src="/scripts/script.js"></script>
</html>