From: Mischa POSLAWSKY Date: Fri, 15 Sep 2017 18:54:24 +0000 (+0200) Subject: page: write edit includes from common script X-Git-Tag: v2.2~10 X-Git-Url: http://git.shiar.net/minimedit.git/commitdiff_plain/0e699432ba7d5b10b24ef5355dbe9b0036ebd248 page: write edit includes from common script Enforce on all sites, appending (editable) footer.html instead for site-specific contents. --- diff --git a/foot.inc.php b/foot.inc.php deleted file mode 100644 index b3d6e6a..0000000 --- a/foot.inc.php +++ /dev/null @@ -1,15 +0,0 @@ - -'.N; - echo ''.N; - - echo ''.N; -} - diff --git a/page.inc.php b/page.inc.php index 4cc6939..654f37f 100644 --- a/page.inc.php +++ b/page.inc.php @@ -24,8 +24,18 @@ print "\n\n"; print $body; +$footinc = realpath('footer.html'); # cwd lost during shutdown register_shutdown_function(function () { - include 'foot.inc.php'; + print '\n"; + + global $User; + if (isset($User) and $User['admin']) { + print ''."\n"; + print ''."\n"; + } + print "\n"; });