b53202db59
Moved personal social/contact links from /links to /about Other minor changes to /links Added some PHP code to every blog post that automatically pulls the publish and update dates from the Atom feed Added a button to /etc Added a new webgarden Updated /stats Wording changes to /uses
18 lines
No EOL
541 B
PHP
18 lines
No EOL
541 B
PHP
<?php
|
|
$cwd = preg_replace('/^.*\//', '', getcwd());
|
|
$feed = simplexml_load_file($_SERVER['DOCUMENT_ROOT']."/blog/blog.atom");
|
|
$pdate = "";
|
|
$udate = "";
|
|
foreach($feed->entry as $entry) {
|
|
if($entry->id == $cwd) {
|
|
$pdate = preg_replace('/T.*$/', ' ', $entry->published);
|
|
$udate = preg_replace('/T.*$/', ' ', $entry->updated);
|
|
break;
|
|
}
|
|
}
|
|
echo("<p style='text-align: center;'><em>Posted on $pdate");
|
|
if($pdate != $udate) {
|
|
echo(" | Updated on $udate");
|
|
}
|
|
echo("</em></p>");
|
|
?>
|