Jelajahi Sumber

Moved some output, so that page_header.php can send headers.

gustavf 25 tahun lalu
induk
melakukan
bf00a72aca
3 mengubah file dengan 10 tambahan dan 6 penghapusan
  1. 1 1
      functions/i18n.php
  2. 4 0
      functions/page_header.php
  3. 5 5
      src/right_main.php

+ 1 - 1
functions/i18n.php

@@ -17,7 +17,7 @@
       // All HTML special characters are 7 bit and can be replaced first
       $string = htmlspecialchars ($string);
 
-      $charset = strolower($charset);
+      $charset = strtolower($charset);
 
       if (ereg("iso-8859-(.*)", $charset, $res)) {
          if ($res[1] == "1")

+ 4 - 0
functions/page_header.php

@@ -6,6 +6,10 @@
     **
     **/
 
+   // This is done to ensure that the character set is correct when
+   // receiving input from HTTP forms
+   header ("Content-Type: text/html; charset=iso-8859-1");
+
    function displayPageHeader($color, $mailbox) {
       /** Here is the header and wrapping table **/
       $shortBoxName = readShortMailboxName($mailbox, ".");

+ 5 - 5
src/right_main.php

@@ -19,10 +19,7 @@
       echo _("You need a valid user and password to access this page!");
       exit;
    }
-?>
-<HTML>
-<FONT FACE="Arial,Helvetica">
-<?
+
    include("../config/config.php");
    include("../functions/imap.php");
    include("../functions/strings.php");
@@ -32,7 +29,10 @@
    include("../functions/mime.php");
    include("../functions/mailbox_display.php");
    include("../functions/display_messages.php");
-
+?>
+<HTML>
+<FONT FACE="Arial,Helvetica">
+<?
    /////////////////////////////////////////////////////////////////////////////////
    //
    // incoming variables from URL: