summaryrefslogtreecommitdiff
path: root/index.php
blob: 9813128fe50837dccb72af7544d701de633e0c1b (plain) (blame)
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
<?php
include('./includes/head.php');
?>

<header>
	<noscript>
		JavaScript? Where we're going we don't need JavaScript.
	</noscript>
</header>

<h1 style="text-align: center">
	The World Wide Web pages of Adam Carpenter (53hornet)
</h1>
<ul>
	<?php
	if ($posts = glob('./posts/*.php')) {
		$early = true;

		foreach (array_reverse($posts) as $post) {
			if (!empty($post) && $post != '.' && $post != '..') {
				$post_name = explode('/', $post)[2];
				$date = implode('-', array_slice(explode('-', $post_name), 0, 3));
				include($post);
				printf('<li> <code>%s</code> <a href="/%s">%s</a> </li>', $date, $post, $title);
			}
		}
	}
	?>
	<li><a href="https://www.53hor.net/posts/?C=M&O=A">All posts...</a></li>
</ul>
</article>