Some small HTML fixes/improvements
[squirrelmail.git] / functions / page_header.php
index ceea10b213ed773b2ff3a652d0fcbc0bb90f1289..50957d603e9444bbdec6e1614667b22b212f9719 100644 (file)
@@ -26,7 +26,7 @@ function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE
     global $theme_css, $custom_css, $pageheader_sent;
 
     echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">' .
-         "\n\n" . html_tag( 'html' ,'' , '', '', '' ) . "\n<head>\n";
+         "\n\n" . html_tag( 'html' ,'' , '', '', 'lang="'.$squirrelmail_language.'"' ) . "\n<head>\n";
 
     if ( !isset( $custom_css ) || $custom_css == 'none' ) {
         if ($theme_css != '') {
@@ -39,7 +39,7 @@ function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE
     
     if ($squirrelmail_language == 'ja_JP') {
         echo "<!-- \xfd\xfe -->\n";
-        echo '<meta http-equuiv="Content-type" content="text/html; charset=euc-jp">' . "\n";
+        echo '<meta http-equiv="Content-type" content="text/html; charset=euc-jp">' . "\n";
     }
     
     if ($do_hook) {
@@ -74,6 +74,9 @@ function makeInternalLink($path, $text, $target='') {
     if ($target != '') {
         $target = " target=\"$target\"";
     }
+    $hooktext = do_hook_function('internal_link',$text);
+    if ($hooktext != '')
+        $text = $hooktext;
     return '<a href="'.$base_uri.$path.'"'.$target.'>'.$text.'</a>';
 }
 
@@ -254,7 +257,9 @@ function displayPageHeader($color, $mailbox, $xtra='', $session=false) {
     echo "</b></td>\n"
         . "   </tr>\n"
         . html_tag( 'tr', '', '', $color[4] ) ."\n"
-        . html_tag( 'td', '', 'left' ) ."\n";
+        . ($hide_sm_attributions ? html_tag( 'td', '', 'left', '', 'colspan="2"' )
+                                 : html_tag( 'td', '', 'left' ) )
+        . "\n";
     $urlMailbox = urlencode($mailbox);
     echo makeComposeLink('src/compose.php?mailbox='.$urlMailbox);
     echo "&nbsp;&nbsp;\n";
@@ -271,14 +276,17 @@ function displayPageHeader($color, $mailbox, $xtra='', $session=false) {
 
     do_hook('menuline');
 
-    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 ? '&nbsp;' :
-            '<a href="'.$provider_uri.'" target="_blank">'.$provider_name.'</a>');
-    echo "</td>\n".
-        "   </tr>\n".
+    echo "      </td>\n";
+
+    if (!$hide_sm_attributions)
+    {
+        echo html_tag( 'td', '', 'right' ) ."\n";
+        if (!isset($provider_uri)) $provider_uri= 'http://www.squirrelmail.org/';
+        if (!isset($provider_name)) $provider_name= 'SquirrelMail';
+        echo '<a href="'.$provider_uri.'" target="_blank">'.$provider_name.'</a>';
+        echo "</td>\n";
+    }
+    echo "   </tr>\n".
         "</table><br>\n\n";
 }