/* 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'])) {
}
global $theme_css, $custom_css;
- echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">' .
+ echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">' .
"\n\n<HTML>\n<HEAD>\n";
if ( !isset( $custom_css ) || $custom_css == 'none' ) {
do_hook("generic_header");
}
- echo "\n<title>$title</title>$xtra</head>\n\n";
+ echo "\n<title>$title</title>$xtra\n";
+
+ /* work around IE6's scrollbar bug */
+ echo <<<ECHO
+<style type="text/css">
+<!--
+ /* avoid stupid IE6 bug with frames and scrollbars */
+ body {
+ voice-family: "\"}\"";
+ voice-family: inherit;
+ width: expression(document.documentElement.clientWidth - 30);
+ }
+-->
+</style>
+
+ECHO;
+
+ echo "\n</head>\n\n";
}
function displayInternalLink($path, $text, $target='') {
- if ( (float)substr(PHP_VERSION,0,3) < 4.1 ) {
+ if ( !check_php_version(4,1) ) {
global $_SESSION;
}
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;
}
$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';
"</script>\n";
}
- displayHtmlHeader ('Squirrelmail', $js);
+ displayHtmlHeader ('SquirrelMail', $js);
$onload = $xtra;
break;
case 'src/compose.php':
$js .= "// -->\n".
"</script>\n";
$onload = "onLoad=\"checkForm();\"";
- displayHtmlHeader ('Squirrelmail', $js);
+ displayHtmlHeader ('SquirrelMail', $js);
break;
default:
$onload = "onLoad=\"checkForm();\"";
- displayHtmlHeader ('Squirrelmail', $js);
+ displayHtmlHeader ('SquirrelMail', $js);
break;
}
echo " </td>\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 ? ' ' :
- '<a href="http://www.squirrelmail.org/" target="_blank">SquirrelMail</a>');
+ '<a href="'.$provider_uri.'" target="_blank">'.$provider_name.'</a>');
echo "</td>\n".
" </tr>\n".
"</table><br>\n\n";
/* 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 );