X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fpage_header.php;h=ae0a104677b85b0b26b58c6643405eef11c4040f;hb=e4b5f9d1937e37dc3c3151d67e09cfd54d96214e;hp=dd04c2d17586506bc222b06353f703b0d3f58ee3;hpb=0b97a708e71c931153cd1ceee1495c9f4e1e209b;p=squirrelmail.git
diff --git a/functions/page_header.php b/functions/page_header.php
index dd04c2d1..ae0a1046 100644
--- a/functions/page_header.php
+++ b/functions/page_header.php
@@ -19,7 +19,7 @@ require_once(SM_PATH . 'functions/global.php');
/* Always set up the language before calling these functions */
function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE ) {
- if ( (float)substr(PHP_VERSION,0,3) < 4.1 ) {
+ if ( !check_php_version(4,1) ) {
global $_SESSION;
}
if (isset($_SESSION['base_uri'])) {
@@ -30,7 +30,7 @@ function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE
}
global $theme_css, $custom_css;
- echo '' .
+ echo '' .
"\n\n\n
\n";
if ( !isset( $custom_css ) || $custom_css == 'none' ) {
@@ -46,12 +46,29 @@ function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE
do_hook("generic_header");
}
- echo "\n$title$xtra\n\n";
+ echo "\n$title$xtra\n";
+
+ /* work around IE6's scrollbar bug */
+ echo <<
+
+
+
+ECHO;
+
+ echo "\n\n\n";
}
function displayInternalLink($path, $text, $target='') {
- if ( (float)substr(PHP_VERSION,0,3) < 4.1 ) {
+ if ( !check_php_version(4,1) ) {
global $_SESSION;
}
@@ -65,10 +82,10 @@ function displayInternalLink($path, $text, $target='') {
function displayPageHeader($color, $mailbox, $xtra='', $session=false) {
global $hide_sm_attributions, $PHP_SELF, $frame_top,
- $compose_new_win, $username, $datadir, $compose_width, $compose_height,
- $attachemessages, $session;
+ $compose_new_win, $compose_width, $compose_height,
+ $attachemessages, $provider_name, $provider_uri;
- if ( (float)substr(PHP_VERSION,0,3) < 4.1 ) {
+ if ( !check_php_version(4,1) ) {
global $_SESSION;
}
@@ -82,7 +99,7 @@ function displayPageHeader($color, $mailbox, $xtra='', $session=false) {
$frame_top = '_top';
}
- if ($session != false) {
+ if ($session) {
$compose_uri = $base_uri.'src/compose.php?mailbox='. urlencode($mailbox).'&attachedmessages=true&session='."$session";
} else {
$compose_uri = $base_uri.'src/compose.php?newmessage=1';
@@ -121,7 +138,7 @@ function displayPageHeader($color, $mailbox, $xtra='', $session=false) {
"\n";
}
- displayHtmlHeader ('Squirrelmail', $js);
+ displayHtmlHeader ('SquirrelMail', $js);
$onload = $xtra;
break;
case 'src/compose.php':
@@ -150,7 +167,7 @@ function displayPageHeader($color, $mailbox, $xtra='', $session=false) {
$js .= "// -->\n".
"\n";
$onload = "onLoad=\"checkForm();\"";
- displayHtmlHeader ('Squirrelmail', $js);
+ displayHtmlHeader ('SquirrelMail', $js);
break;
default:
@@ -199,7 +216,7 @@ function displayPageHeader($color, $mailbox, $xtra='', $session=false) {
$onload = "onLoad=\"checkForm();\"";
- displayHtmlHeader ('Squirrelmail', $js);
+ displayHtmlHeader ('SquirrelMail', $js);
break;
}
@@ -250,8 +267,10 @@ function displayPageHeader($color, $mailbox, $xtra='', $session=false) {
echo " \n"
. html_tag( 'td', '', 'right' ) ."\n";
+ if (!isset($provider_uri)) $provider_uri= 'http://www.squirrelmail.org/';
+ if (!isset($provider_name)) $provider_name= 'SquirrelMail';
echo ($hide_sm_attributions ? ' ' :
- 'SquirrelMail');
+ ''.$provider_name.'');
echo "\n".
" \n".
"
\n\n";
@@ -260,7 +279,8 @@ function displayPageHeader($color, $mailbox, $xtra='', $session=false) {
/* blatently copied/truncated/modified from the above function */
function compose_Header($color, $mailbox) {
- global $delimiter, $hide_sm_attributions, $base_uri, $PHP_SELF, $frame_top, $compose_new_win;
+ global $delimiter, $hide_sm_attributions, $base_uri, $PHP_SELF,
+ $data_dir, $username, $frame_top, $compose_new_win;
$module = substr( $PHP_SELF, ( strlen( $PHP_SELF ) - strlen( $base_uri ) ) * -1 );