From 0e699432ba7d5b10b24ef5355dbe9b0036ebd248 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Fri, 15 Sep 2017 20:54:24 +0200 Subject: [PATCH] page: write edit includes from common script Enforce on all sites, appending (editable) footer.html instead for site-specific contents. --- foot.inc.php | 15 --------------- page.inc.php | 12 +++++++++++- 2 files changed, 11 insertions(+), 16 deletions(-) delete mode 100644 foot.inc.php 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"; }); -- 2.30.0