From a1fd8eea11a6ea7e449f671ed55a875a06839439 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 10 Jul 2005 06:48:56 +0000 Subject: [PATCH] r294: Preparing global templates; removing header code from global.php. --- global.php | 13 +++++-------- templates/doctype.tpl | 3 +-- templates/footer.tpl | 4 ++++ templates/header.tpl | 15 +++++++++++++++ templates/headinclude.tpl | 1 + 5 files changed, 26 insertions(+), 10 deletions(-) diff --git a/global.php b/global.php index bd2cb6c..17ac248 100755 --- a/global.php +++ b/global.php @@ -18,14 +18,6 @@ $bugsys->load('template_fs'); $template->extension = 'tpl'; $template->templatedir = $bugsys->fetch_sourcepath('templates/'); -// ################################################################### -// check for userinfo -- temp -// #*# remove -if ($bugsys->userinfo['userid']) -{ - echo '
You are logged in as ' . construct_user_display($bugsys->userinfo) . ' | [Home] | [New Bug]' . ((can_perform('canadminpanel')) ? ' | [Admin]' : '') . ' | [Logout]

' . "\n\n\n\n"; -} - // ################################################################### // cache templates $globaltemplates = array( @@ -46,6 +38,11 @@ $globaltemplates = array( $template->cache(array_merge($globaltemplates, (array)$fetchtemplates)); +eval('$header = "' . $template->fetch('header') . '";'); +eval('$doctype = "' . $template->fetch('doctype') . '";'); +eval('$headinclude = "' . $template->fetch('headinclude') . '";'); +eval('$footer = "' . $template->fetch('footer') . '";'); + // ################################################################### // initialize template variables $show = array(); diff --git a/templates/doctype.tpl b/templates/doctype.tpl index c642479..f38b71c 100644 --- a/templates/doctype.tpl +++ b/templates/doctype.tpl @@ -1,2 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/templates/footer.tpl b/templates/footer.tpl index e69de29..6c663b9 100644 --- a/templates/footer.tpl +++ b/templates/footer.tpl @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/templates/header.tpl b/templates/header.tpl index e69de29..ab2e099 100644 --- a/templates/header.tpl +++ b/templates/header.tpl @@ -0,0 +1,15 @@ + +
+ You are logged in as {$bugsys->userinfo['displayname']} ({$bugsys->userinfo['email']}) | + [Home] | + [New Bug] + + [Admin] + + [Logout] +
+
+ + + +
\ No newline at end of file diff --git a/templates/headinclude.tpl b/templates/headinclude.tpl index e69de29..b92793d 100644 --- a/templates/headinclude.tpl +++ b/templates/headinclude.tpl @@ -0,0 +1 @@ + \ No newline at end of file -- 2.22.5