ehh, hmm: include -> require
[squirrelmail.git] / functions / page_header.php
index 3302c3ad88627610c0450f3e6b86cd29dd77bb67..c84f83978c15d8c910033cbffd38b92bca2bd4ca 100644 (file)
  * $Id$
  */
 
+require_once('../functions/strings.php');
+
 // Always set up the language before calling these functions
 function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE ) {
 
-    global $theme_css, $custom_css;
-    
+    global $theme_css, $custom_css, $base_uri;
+
     echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">' .
          "\n\n<HTML>\n<HEAD>\n";
-    
-    if ( $custom_css == 'none' ) {
+
+    if ( !isset( $custom_css ) || $custom_css == 'none' ) {
         if ($theme_css != '') {
             echo "<LINK REL=\"stylesheet\" TYPE=\"text/css\" HREF=\"$theme_css\">\n";
         }
     } else {
-        echo "<LINK REL=\"stylesheet\" TYPE=\"text/css\" HREF=\"../themes/css/$custom_css\">\n";
+        echo '<LINK REL="stylesheet" TYPE="text/css" HREF="' .
+             $base_uri . "themes/css/$custom_css\">\n";
     }
     
     if( $do_hook ) {
@@ -81,12 +84,11 @@ function checkForm() {
         i++;
     }
     if( pos >= 0 ) {
-        // document.write( "Si tio" );
         document.forms[i-1].elements[pos].focus();
     }
     
 }
--->
+// -->
 </script>
         ';
         $onload = "onLoad=\"checkForm();\"";
@@ -134,4 +136,4 @@ function checkForm() {
         "</TABLE>\n\n";
 }
 
-?>
\ No newline at end of file
+?>