From 5bbe20e463dc798b73953224f54fd9bbeb5dad29 Mon Sep 17 00:00:00 2001 From: gustavf Date: Tue, 4 Jul 2000 13:23:02 +0000 Subject: [PATCH] Added a new session variable base_uri. Uses this variable when printing the page header. This is needed to be able to print the header in plugins. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@584 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/page_header.php | 30 ++++++++++++++++++++++-------- src/webmail.php | 26 ++++++++++++++++++++------ 2 files changed, 42 insertions(+), 14 deletions(-) diff --git a/functions/page_header.php b/functions/page_header.php index 7a600571..c3a95f49 100644 --- a/functions/page_header.php +++ b/functions/page_header.php @@ -57,6 +57,15 @@ echo "\n\n"; } + function displayInternalLink ($path, $text, $target="") { + global $base_uri; + + if ($target != "") + $target = " target=\"$target\""; + + echo ''.$text.''; + } + function displayPageHeader($color, $mailbox) { displayHtmlHeader ($color); @@ -69,9 +78,9 @@ $shortBoxName = stripslashes($shortBoxName); echo "\n"; echo " \n"; - echo " \n"; echo " \n"; @@ -80,11 +89,16 @@ echo " \n"; echo "
\n"; - echo " " . _("Sign Out") . "\n"; - echo " \n"; + echo " \n"; + displayInternalLink ("src/signout.php", _("Sign Out"), "_top"); + echo " \n"; echo "
" . _("Current Folder: ") . "$shortBoxName 
\n"; echo "
\n"; $urlMailbox = $mailbox; - echo " " . _("Compose") . "  \n"; - echo " " . _("Addresses") . "  \n"; - echo " " . _("Folders") . "  \n"; - echo " " . _("Options") . "  \n"; - echo " " . _("Help") . "  "; + displayInternalLink ("src/compose.php?mailbox=$urlMailbox", _("Compose"), "right"); + echo "  \n"; + displayInternalLink ("src/addressbook.php", _("Addresses"), "right"); + echo "  \n"; + displayInternalLink ("src/folders.php", _("Folders"), "right"); + echo "  \n"; + displayInternalLink ("src/options.php", _("Options"), "right"); + echo "  \n"; + displayInternalLink ("src/webmail.php?right_frame=help.php", _("Help"), "Help Me!"); + echo "  \n"; do_hook("menuline"); diff --git a/src/webmail.php b/src/webmail.php index 6a1eae8d..158c7c42 100644 --- a/src/webmail.php +++ b/src/webmail.php @@ -1,21 +1,35 @@