diff options
author | Nathan Lasseter <nathan@4574.co.uk> | 2012-10-10 20:03:21 +0100 |
---|---|---|
committer | Nathan Lasseter <nathan@4574.co.uk> | 2012-10-10 20:03:21 +0100 |
commit | 94c589ed55b20a581810e126b20fdc2d67c68221 (patch) | |
tree | 7d3d84aa3cc291417f667ee48a3fc120b95b2e43 /archives.php |
Initial commit
Diffstat (limited to 'archives.php')
-rw-r--r-- | archives.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/archives.php b/archives.php new file mode 100644 index 0000000..3f29067 --- /dev/null +++ b/archives.php @@ -0,0 +1,22 @@ +<?php + require("top.php"); + + $ls = explode("\n", `ls -1t {$blogPosts}/`); + foreach($ls as $file) { + if (preg_match('/^\./', $file)) continue; + if ($file === "") continue; + + echo "<a id=\"$file\">"; + echo "<div>\n"; + echo "<a class=\"title\" href=\"{$blogRoot}post/" . urlencode($file) . "\">$file</a>\n"; + + $stat = stat("{$blogPosts}$file"); + $date = date('d-m-Y H:i T', $stat['mtime']); + echo "<span class=\"date\">$date</span>\n"; + echo "</div>\n</a>\n\n"; + } +?> + +</body> + +</html> |