Some browsers may complain when fomr not present. Corrected.
[squirrelmail.git] / functions / page_header.php
index 2bc875069a79839dff551aa4976ab22349c5367d..0e204eb709c104a66981fc2678301e411ad8e839 100644 (file)
    function displayHtmlHeader ($title="SquirrelMail") {
      global $theme_css;
 
-      echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">';
-      echo "\n\n";
-      echo "<HTML>\n";
-      echo "<HEAD>\n";
-      if ($theme_css != "") {
-        printf ('<LINK REL="stylesheet" TYPE="text/css" HREF="%s">', 
-                $theme_css);
-        echo "\n";
+      echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">' .
+           "\n\n<HTML>\n<HEAD>\n";
+      if ($theme_css != '') {
+        echo "<LINK REL=\"stylesheet\" TYPE=\"text/css\" HREF=\"$theme_css\">\n"; 
       }
       
       do_hook ("generic_header");
       echo "</HEAD>\n\n";
    }
 
-   function displayInternalLink ($path, $text, $target="") {
+   function displayInternalLink ($path, $text, $target='') {
       global $base_uri;
 
-      if ($target != "")
+      if ($target != '')
          $target = " target=\"$target\"";
       
       echo '<a href="'.$base_uri.$path.'"'.$target.'>'.$text.'</a>';
@@ -44,9 +40,7 @@
    function displayPageHeader($color, $mailbox) {
       displayHtmlHeader ();
 
-      printf('<BODY TEXT="%s" BGCOLOR="%s" LINK="%s" VLINK="%s" ALINK="%s">',
-             $color[8], $color[4], $color[7], $color[7], $color[7]);
-      echo "\n\n";
+      echo "<BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\" onLoad='if ( 0 in document.forms && document.forms[0].elements[0].type == \"text\" ) { document.forms[0].elements[0].focus(); }'>\n\n";
 
       /** Here is the header and wrapping table **/
       $shortBoxName = readShortMailboxName($mailbox, ".");
@@ -85,4 +79,4 @@
       echo "   </TR>\n";
       echo "</TABLE>\n\n";
   }
-?>
+?>
\ No newline at end of file