$g = 0;
for ($i = 0; $i < count($read); $i++) {
if (eregi ("^to:", $read[$i])) {
- $to = sqimap_find_displayable_name(substr($read[$i], 3));
- }
- if (eregi ("^from:", $read[$i])) {
- $from = sqimap_find_displayable_name(substr($read[$i], 5));
- }
- if (eregi ("^x-priority:", $read[$i])) {
+ //$to = sqimap_find_displayable_name(substr($read[$i], 3));
+ $to = substr($read[$i], 3);
+ } else if (eregi ("^from:", $read[$i])) {
+ //$from = sqimap_find_displayable_name(substr($read[$i], 5));
+ $from = substr($read[$i], 5);
+ } else if (eregi ("^x-priority:", $read[$i])) {
$priority = trim(substr($read[$i], 11));
- }
- if (eregi ("^message-id:", $read[$i])) {
+ } else if (eregi ("^message-id:", $read[$i])) {
$messageid = trim(substr($read[$i], 11));
- }
- if (eregi ("^date:", $read[$i])) {
+ } else if (eregi ("^date:", $read[$i])) {
$date = substr($read[$i], 5);
} else if (eregi ("^subject:", $read[$i])) {
$subject = htmlspecialchars(eregi_replace ("^subject: ", "", $read[$i]));
$msg = $msgs[$key];
- $senderName = $msg["FROM"];
+ $senderName = sqimap_find_displayable_name($msg["FROM"]);
$urlMailbox = urlencode($mailbox);
$subject = trim(stripslashes($msg["SUBJECT"]));
echo "<TR>\n";
$body = translateText($body, $wrap_at, $charset);
}
- $body .= "<BR><SMALL><CENTER><A HREF=\"../src/download.php?absolute_dl=true&passed_id=$id&passed_ent_id=$ent_num&mailbox=$urlmailbox\">". _("Download this as a file") ."</A></CENTER><BR></SMALL>";
+ $body .= "<SMALL><CENTER><A HREF=\"../src/download.php?absolute_dl=true&passed_id=$id&passed_ent_id=$ent_num&mailbox=$urlmailbox\">". _("Download this as a file") ."</A></CENTER><BR></SMALL>";
/** Display the ATTACHMENTS: message if there's more than one part **/
if ($message->entities) {
$num_max++;
for ($p = 0; $p < count($boxes) && $count_special_folders < $num_max; $p++) {
- if (strtolower($boxes[$i]["unformatted"]) == "inbox")
+ if (strtolower($boxes[$p]["unformatted"]) == "inbox")
$count_special_folders++;
- else if ($boxes[$i]["unformatted"] == $trash_folder)
+ else if ($boxes[$p]["unformatted"] == $trash_folder && $trash_folder)
$count_special_folders++;
- else if ($boxes[$i]["unformatted"] == $sent_folder)
+ else if ($boxes[$p]["unformatted"] == $sent_folder && $sent_folder)
$count_special_folders++;
}
/** Load up the Signature file **/
if ($use_signature == true) {
- $signature = getSig($data_dir, $username);
+ $signature_abs = $signature = getSig($data_dir, $username);
} else {
+ $signature_abs = getSig($data_dir, $username);
}
/** Load up the Language preference **/
$message_highlight_list[$i]["value"] = $ary[2];
$message_highlight_list[$i]["match_type"] = $ary[3];
}
+
?>
include("../functions/array.php");
if (!isset($i18n_php))
include("../functions/i18n.php");
+ if (!isset($auth_php))
+ include ("../functions/auth.php");
- include("../src/load_prefs.php");
-
-
- $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort);
- $boxes = sqimap_mailbox_list($imapConnection, $boxes);
- fputs($imapConnection, "1 logout\n");
-
- displayPageHeader($color, "None");
-
- /** load up some of the values from the pref file **/
- $fullname = getPref($data_dir, $username, "full_name");
- $replyto = getPref($data_dir, $username, "reply_to");
- $email_address = getPref($data_dir, $username, "email_address");
- $chosen_language = getPref($data_dir, $username, "language");
-
- echo "<TABLE WIDTH=100% COLS=1 ALIGN=CENTER>\n";
- echo " <TR><TD BGCOLOR=\"$color[0]\" ALIGN=CENTER>\n";
- echo _("Options");
- echo " </TD></TR>\n";
- echo "</TABLE>\n";
-
- echo "<FORM action=\"options_submit.php\" METHOD=POST>\n";
- echo "<TABLE WIDTH=100% COLS=2 ALIGN=CENTER>\n";
- // FULL NAME
- echo " <TR>";
- echo " <TD WIDTH=20% ALIGN=RIGHT>";
- echo _("Full Name:");
- echo " </TD>";
- echo " <TD WIDTH=80% ALIGN=LEFT>";
- echo " <INPUT TYPE=TEXT NAME=full_name VALUE=\"$fullname\" SIZE=50><BR>";
- echo " </TD>";
- echo " </TR>";
- // FROM-ADDRESS
- echo " <TR>";
- echo " <TD WIDTH=20% ALIGN=RIGHT>";
- echo _("E-mail address:");
- echo " </TD>";
- echo " <TD WIDTH=80% ALIGN=LEFT>";
- echo " <INPUT TYPE=TEXT NAME=email_address VALUE=\"$email_address\" SIZE=50><BR>";
- echo " </TD>";
- echo " </TR>";
- // REPLY-TO
- echo " <TR>";
- echo " <TD WIDTH=20% ALIGN=RIGHT>";
- echo _("Reply-to:");
- echo " </TD>";
- echo " <TD WIDTH=80% ALIGN=LEFT>";
- echo " <INPUT TYPE=TEXT NAME=reply_to VALUE=\"$replyto\" SIZE=50><BR>";
- echo " </TD>";
- echo " </TR>";
- // DEFAULT FOLDERS
- if ($show_prefix_option == true) {
- echo " <TR>";
- echo " <TD WIDTH=20% ALIGN=RIGHT>";
- echo _("Folder path:");
- echo " </TD>";
- echo " <TD WIDTH=80% ALIGN=LEFT>";
- if (isset ($folder_prefix))
- echo " <INPUT TYPE=TEXT NAME=folderprefix VALUE=\"$folder_prefix\" SIZE=50><BR>";
- else
- echo " <INPUT TYPE=TEXT NAME=folderprefix VALUE=\"$default_folder_prefix\" SIZE=50><BR>";
- echo " </TD>";
- echo " </TR>";
+ if ($language) {
+ setcookie("squirrelmail_language", $language, time()+2592000);
+ $squirrelmail_language = $language;
}
- // THEME
- echo " <TR>";
- echo " <TD WIDTH=20% ALIGN=RIGHT>";
- echo _("Theme:");
- echo " </TD>";
- echo " <TD WIDTH=80% ALIGN=LEFT>";
-
- echo " <TT><SELECT NAME=chosentheme>\n";
- for ($i = 0; $i < count($theme); $i++) {
- if ($theme[$i]["PATH"] == $chosen_theme)
- echo " <OPTION SELECTED VALUE=\"".$theme[$i]["PATH"]."\">".$theme[$i]["NAME"]."\n";
- else
- echo " <OPTION VALUE=\"".$theme[$i]["PATH"]."\">".$theme[$i]["NAME"]."\n";
- }
- echo " </SELECT></TT>";
- echo " </TD>";
- echo " </TR>";
- // LANGUAGE
- echo " <TR>";
- echo " <TD WIDTH=20% ALIGN=RIGHT>";
- echo _("Language:");
- echo " </TD>";
- echo " <TD WIDTH=80% ALIGN=LEFT>";
-
- echo " <TT><SELECT NAME=language>\n";
- reset ($languages);
- while (list($code, $name)=each($languages)) {
- if ($code==$chosen_language)
- echo " <OPTION SELECTED VALUE=\"".$code."\">".$languages[$code]["NAME"]."\n";
- else
- echo " <OPTION VALUE=\"".$code."\">".$languages[$code]["NAME"]."\n";
-
- }
- echo " </SELECT></TT>";
-
- echo " </TD>";
- echo " </TR>";
-
-
- // TRASH FOLDER
- echo "<tr><td align=right>";
- echo _("Trash Folder:");
- echo "</td><td>";
- echo "<TT><SELECT NAME=trash>\n";
- if ($move_to_trash == true)
- echo "<option value=none>" . _("Don't use Trash");
- else
- echo "<option value=none selected>" . _("Do not use Trash");
-
- for ($i = 0; $i < count($boxes); $i++) {
- $use_folder = true;
- if (strtolower($boxes[$i]["unformatted"]) == "inbox") {
- $use_folder = false;
- }
- if ($use_folder == true) {
- $box = $boxes[$i]["unformatted-dm"];
- $box2 = replace_spaces($boxes[$i]["formatted"]);
- if (($boxes[$i]["unformatted"] == $trash_folder) && ($move_to_trash == true))
- echo " <OPTION SELECTED VALUE=\"$box\">$box2\n";
- else
- echo " <OPTION VALUE=\"$box\">$box2\n";
- }
- }
- echo "</SELECT></TT>\n";
- echo "</td></tr>";
-
- // SENT FOLDER
- echo "<tr><td align=right>";
- echo _("Sent Folder:");
- echo "</td><td>";
- echo "<TT><SELECT NAME=sent>\n";
- if ($move_to_sent == true)
- echo "<option value=none>" . _("Don't use Sent");
- else
- echo "<option value=none selected>" . _("Do not use Sent");
- for ($i = 0; $i < count($boxes); $i++) {
- $use_folder = true;
- if (strtolower($boxes[$i]["unformatted"]) == "inbox") {
- $use_folder = false;
- }
- if ($use_folder == true) {
- $box = $boxes[$i]["unformatted-dm"];
- $box2 = replace_spaces($boxes[$i]["formatted"]);
- if (($boxes[$i]["unformatted"] == $sent_folder) && ($move_to_sent == true))
- echo " <OPTION SELECTED VALUE=\"$box\">$box2\n";
- else
- echo " <OPTION VALUE=\"$box\">$box2\n";
- }
- }
- echo "</SELECT></TT>\n";
- echo "</td></tr>";
-
-
- echo "</TABLE>";
-
- echo "<table width=1% cols=2 align=center>\n";
- echo " <tr>\n";
- echo " <td nowrap align=center>\n";
- echo " " . _("Use javascript version of address book?") . "\n";
- echo " </td>\n";
- echo " </tr>\n";
- echo " <tr>\n";
- echo " <td align=left>\n";
- if ($use_javascript_addr_book == true) {
- echo " <input type=radio name=javascript_abook value=1 checked> " . _("Yes") . "<br>";
- echo " <input type=radio name=javascript_abook value=0> " . _("No") . "<br>";
- } else {
- echo " <input type=radio name=javascript_abook value=1> " . _("Yes") . "<br>";
- echo " <input type=radio name=javascript_abook value=0 checked> " . _("No") . "<br>";
- }
- echo " </td>\n";
- echo " </tr>\n";
- echo "</table>\n";
-
- echo "<TABLE WIDTH=100% COLS=2 ALIGN=CENTER>\n";
-
- // SHOW_NUM
- echo " <TR>";
- echo " <TD WIDTH=60% ALIGN=RIGHT>";
- echo _("Number of Messages to Index:");
- echo " </TD>";
- echo " <TD WIDTH=40% ALIGN=LEFT>";
- if (isset($wrap_at))
- echo " <TT><INPUT TYPE=TEXT SIZE=5 NAME=shownum VALUE=\"$show_num\"></TT><BR>";
- else
- echo " <TT><INPUT TYPE=TEXT SIZE=5 NAME=shownum VALUE=\"25\"></TT><BR>";
- echo " </TD>";
- echo " </TR>";
-
- // WRAP_AT
- echo " <TR>";
- echo " <TD WIDTH=60% ALIGN=RIGHT>";
- echo _("Wrap incoming text at:");
- echo " </TD>";
- echo " <TD WIDTH=40% ALIGN=LEFT>";
- if (isset($wrap_at))
- echo " <TT><INPUT TYPE=TEXT SIZE=5 NAME=wrapat VALUE=\"$wrap_at\"></TT><BR>";
- else
- echo " <TT><INPUT TYPE=TEXT SIZE=5 NAME=wrapat VALUE=\"86\"></TT><BR>";
- echo " </TD>";
- echo " </TR>";
-
- // EDITOR_SIZE
- echo " <TR>";
- echo " <TD WIDTH=60% ALIGN=RIGHT>";
- echo _("Size of editor window (in characters):");
- echo " </TD>";
- echo " <TD WIDTH=40% ALIGN=LEFT>";
- if ($editor_size >= 5)
- echo " <TT><INPUT TYPE=TEXT SIZE=5 NAME=editorsize VALUE=\"$editor_size\"></TT><BR>";
- else
- echo " <TT><INPUT TYPE=TEXT SIZE=5 NAME=editorsize VALUE=\"76\"></TT><BR>";
- echo " </TD>";
- echo " </TR>";
+ include("../src/load_prefs.php");
+ displayPageHeader($color, "None");
+ is_logged_in();
+?>
- // LEFT_SIZE
- echo " <TR>";
- echo " <td width=60% align=right>";
- echo _("Width of left folder list:");
- echo " </td>";
- echo " <td width=60% align=left>\n";
- echo " <select name=leftsize>\n";
- if ($left_size == 100)
- echo "<option value=100 selected>100 pixels\n";
- else
- echo "<option value=100>100 pixels\n";
-
- if ($left_size == 125)
- echo "<option value=125 selected>125 pixels\n";
- else
- echo "<option value=125>125 pixels\n";
-
- if ($left_size == 150)
- echo "<option value=150 selected>150 pixels\n";
- else
- echo "<option value=150>150 pixels\n";
-
- if ($left_size == 175)
- echo "<option value=175 selected>175 pixels\n";
- else
- echo "<option value=175>175 pixels\n";
-
- if (($left_size == 200) || ($left_size == ""))
- echo "<option value=200 selected>200 pixels\n";
- else
- echo "<option value=200>200 pixels\n";
-
- if (($left_size == 225))
- echo "<option value=225 selected>225 pixels\n";
- else
- echo "<option value=225>225 pixels\n";
-
- if (($left_size == 250))
- echo "<option value=250 selected>250 pixels\n";
- else
- echo "<option value=250>250 pixels\n";
-
- if ($left_size == 275)
- echo "<option value=275 selected>275 pixels\n";
- else
- echo "<option value=275>275 pixels\n";
+<table width=100% cellpadding=2 cellspacing=2 border=0>
+<tr><td bgcolor="<? echo $color[0] ?>">
+ <center><b><? echo _("Options") ?></b></center>
+</td></tr></table>
+<br>
+
+<?
+ if ($submit_personal) {
+ # Save personal information
+ if (isset($full_name)) setPref($data_dir, $username, "full_name", stripslashes($full_name));
+ if (isset($email_address)) setPref($data_dir, $username, "email_address", stripslashes($email_address));
+ if (isset($reply_to)) setPref($data_dir, $username, "reply_to", stripslashes($reply_to));
+ setPref($data_dir, $username, "use_signature", stripslashes($usesignature));
+ if (isset($signature_edit)) setSig($data_dir, $username, stripslashes($signature_edit));
- if (($left_size == 300))
- echo "<option value=300 selected>300 pixels\n";
- else
- echo "<option value=300>300 pixels\n";
-
- echo " </select>";
- echo " </td>";
- echo " </TR>";
-
-
- // LEFT_REFRESH
- echo " <TR>";
- echo " <TD WIDTH=60% ALIGN=RIGHT>";
- echo _("Time between auto refresh of folder list:");
- echo " </TD>";
- echo " <TD WIDTH=40% ALIGN=LEFT>";
- echo " <SELECT name=leftrefresh>";
- if (($left_refresh == "None") || ($left_refresh == ""))
- echo " <OPTION VALUE=None SELECTED>None";
- else
- echo " <OPTION VALUE=None>None";
-
- if (($left_refresh == "10"))
- echo " <OPTION VALUE=10 SELECTED>10 Seconds";
- else
- echo " <OPTION VALUE=10>10 Seconds";
-
- if (($left_refresh == "20"))
- echo " <OPTION VALUE=20 SELECTED>20 Seconds";
- else
- echo " <OPTION VALUE=20>20 Seconds";
-
- if (($left_refresh == "30"))
- echo " <OPTION VALUE=30 SELECTED>30 Seconds";
- else
- echo " <OPTION VALUE=30>30 Seconds";
-
- if (($left_refresh == "60"))
- echo " <OPTION VALUE=60 SELECTED>1 Minute";
- else
- echo " <OPTION VALUE=60>1 Minute";
-
- if (($left_refresh == "120"))
- echo " <OPTION VALUE=120 SELECTED>2 Minutes";
- else
- echo " <OPTION VALUE=120>2 Minutes";
-
- if (($left_refresh == "180"))
- echo " <OPTION VALUE=180 SELECTED>3 Minutes";
- else
- echo " <OPTION VALUE=180>3 Minutes";
-
- if (($left_refresh == "240"))
- echo " <OPTION VALUE=240 SELECTED>4 Minutes";
- else
- echo " <OPTION VALUE=240>4 Minutes";
-
- if (($left_refresh == "300"))
- echo " <OPTION VALUE=300 SELECTED>5 Minutes";
- else
- echo " <OPTION VALUE=300>5 Minutes";
-
- if (($left_refresh == "420"))
- echo " <OPTION VALUE=420 SELECTED>7 Minutes";
- else
- echo " <OPTION VALUE=420>7 Minutes";
-
- if (($left_refresh == "600"))
- echo " <OPTION VALUE=600 SELECTED>10 Minutes";
- else
- echo " <OPTION VALUE=600>10 Minutes";
-
- if (($left_refresh == "720"))
- echo " <OPTION VALUE=720 SELECTED>12 Minutes";
- else
- echo " <OPTION VALUE=720>12 Minutes";
-
- if (($left_refresh == "900"))
- echo " <OPTION VALUE=900 SELECTED>15 Minutes";
- else
- echo " <OPTION VALUE=900>15 Minutes";
-
- if (($left_refresh == "1200"))
- echo " <OPTION VALUE=1200 SELECTED>20 Minutes";
- else
- echo " <OPTION VALUE=1200>20 Minutes";
-
- if (($left_refresh == "1500"))
- echo " <OPTION VALUE=1500 SELECTED>25 Minutes";
- else
- echo " <OPTION VALUE=1500>25 Minutes";
-
- if (($left_refresh == "1800"))
- echo " <OPTION VALUE=1800 SELECTED>30 Minutes";
- else
- echo " <OPTION VALUE=1800>30 Minutes";
-
- echo " </SELECT>";
- echo " </TD>";
- echo " </TR>";
- echo "</TABLE>";
-
- // SIGNATURE
- echo "<CENTER>";
- if ($use_signature == true)
- echo "<INPUT TYPE=CHECKBOX VALUE=\"1\" NAME=usesignature CHECKED> Use a signature?<BR>";
- else {
- echo "<INPUT TYPE=CHECKBOX VALUE=\"1\" NAME=usesignature> ";
- echo _("Use a signature?");
- echo "<BR>";
- }
-
- if ($editor_size < 5)
- $sig_size = 76;
- else
- $sig_size = $editor_size;
-
- echo "<BR>Signature:<BR><TEXTAREA NAME=signature_edit ROWS=5 COLS=\"$sig_size\">$signature</TEXTAREA><BR>";
- echo "</CENTER>";
-
- // MESSAGE HIGHLIGHTING
- echo "<br>\n";
- echo "<center><b>" . _("Message Highlighting") . "</b> - [<a href=\"msg_highlight.php\">" . _("Edit") . "</a>]</center><br>\n";
- if (count($message_highlight_list) >= 1) {
- echo "<table border=0 cellpadding=2 cellspacing=0 align=center width=75%>\n";
- for ($i=0; $i < count($message_highlight_list); $i++) {
- echo "<tr>\n";
- echo " <td bgcolor=" . $message_highlight_list[$i]["color"] . ">\n";
- echo " " . $message_highlight_list[$i]["name"];
- echo " </td>\n";
- echo " <td bgcolor=" . $message_highlight_list[$i]["color"] . ">\n";
- echo " ".$message_highlight_list[$i]["match_type"]." = " . $message_highlight_list[$i]["value"];
- echo " </td>\n";
- echo "</tr>\n";
+ echo "<center><b>"._("Successfully saved personal information!")."</b></center><br>";
+ } else if ($submit_display) {
+ # Save display preferences
+ setPref($data_dir, $username, "chosen_theme", $chosentheme);
+ setPref($data_dir, $username, "show_num", $shownum);
+ setPref($data_dir, $username, "wrap_at", $wrapat);
+ setPref($data_dir, $username, "editor_size", $editorsize);
+ setPref($data_dir, $username, "left_refresh", $leftrefresh);
+ setPref($data_dir, $username, "language", $language);
+ setPref($data_dir, $username, "left_size", $leftsize);
+ setPref($data_dir, $username, "use_javascript_addr_book", $javascript_abook);
+
+ echo "<center><b>"._("Successfully saved display preferences!")."</b><br>";
+ echo "<a href=\"webmail.php?right_frame=options.php\" target=_top>"._("Refresh Page")."</a></center><br>";
+ } else if ($submit_folder) {
+ # Save folder preferences
+ if ($trash != "none") {
+ setPref($data_dir, $username, "move_to_trash", true);
+ setPref($data_dir, $username, "trash_folder", $trash);
+ } else {
+ setPref($data_dir, $username, "move_to_trash", false);
+ setPref($data_dir, $username, "trash_folder", "");
}
- echo "</table>\n";
- } else {
- echo "<center>" . _("No highlighting is defined") . "</center><br>\n";
+ if ($sent != "none") {
+ setPref($data_dir, $username, "move_to_sent", true);
+ setPref($data_dir, $username, "sent_folder", $sent);
+ } else {
+ setPref($data_dir, $username, "move_to_sent", false);
+ setPref($data_dir, $username, "sent_folder", "");
+ }
+ setPref($data_dir, $username, "folder_prefix", $folderprefix);
+ echo "<center><b>"._("Successfully saved folder preferences!")."</b><br>";
+ echo "<a href=\"left_main.php\" target=left>"._("Refresh Folders")."</a></center><br>";
}
- echo "<br>\n";
+?>
- // SUBMIT BUTTON
- echo "<BR><CENTER><INPUT TYPE=SUBMIT VALUE=\"";
- echo _("Submit");
- echo "\"></CENTER>\n";
- echo "</FORM>";
- echo "</BODY></HTML>";
+<table width=90% cellpadding=0 cellspacing=10 border=0 align=center>
+<tr>
+ <td valign=top>
+ <table width=100% cellpadding=3 cellspacing=0 border=0>
+ <tr>
+ <td bgcolor="<? echo $color[9] ?>">
+ <a href="options_personal.php"><? echo _("Personal Information"); ?></a>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="<? echo $color[0] ?>">
+ <? echo _("This contains personal information about yourself such as your name, your email address, etc.") ?>
+ </td>
+ </tr>
+ </table><br>
+ <table width=100% cellpadding=3 cellspacing=0 border=0>
+ <tr>
+ <td bgcolor="<? echo $color[9] ?>">
+ <a href="options_highlight.php"><? echo _("Message Highlighting"); ?></a>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="<? echo $color[0] ?>">
+ <? echo _("Based upon given criteria, incoming messages can have different background colors in the message list. This helps to easily distinguish who the messages are from, especially for mailing lists.") ?>
+ </td>
+ </tr>
+ </table><br>
+ </td>
+ <td valign=top>
+ <table width=100% cellpadding=3 cellspacing=0 border=0>
+ <tr>
+ <td bgcolor="<? echo $color[9] ?>">
+ <a href="options_display.php"><? echo _("Display Preferences"); ?></a>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="<? echo $color[0] ?>">
+ <? echo _("You can change the way that SquirrelMail looks and displays information to you, such as the colors, the language, and other settings.") ?>
+ </td>
+ </tr>
+ </table><br>
+ <table width=100% cellpadding=3 cellspacing=0 border=0>
+ <tr>
+ <td bgcolor="<? echo $color[9] ?>">
+ <a href="options_folder.php"><? echo _("Folder Preferences"); ?></a>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="<? echo $color[0] ?>">
+ <? echo _("These settings change the way your folders are displayed and manipulated.") ?>
+ </td>
+ </tr>
+ </table><br>
+ </td>
+</tr>
+</table>
+<?
?>
+</body></html>
--- /dev/null
+<?php
+ /**
+ ** options_display.php
+ **
+ ** Copyright (c) 1999-2000 The SquirrelMail development team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
+ ** Displays all optinos about display preferences
+ **
+ **/
+
+ session_start();
+
+ if (!isset($config_php))
+ include("../config/config.php");
+ if (!isset($strings_php))
+ include("../functions/strings.php");
+ if (!isset($page_header_php))
+ include("../functions/page_header.php");
+ if (!isset($display_messages_php))
+ include("../functions/display_messages.php");
+ if (!isset($imap_php))
+ include("../functions/imap.php");
+ if (!isset($array_php))
+ include("../functions/array.php");
+ if (!isset($i18n_php))
+ include("../functions/i18n.php");
+
+ include("../src/load_prefs.php");
+ displayPageHeader($color, "None");
+ $chosen_language = getPref($data_dir, $username, "language");
+?>
+ <table width=100% align=center border=0 cellpadding=2 cellspacing=0><tr><td bgcolor="<? echo $color[0] ?>">
+ <center><b><? echo _("Options") . " - " . _("Display Preferences"); ?></b></center>
+ </td></tr></table>
+
+ <form action="options.php" method=post>
+ <table width=100% cellpadding=0 cellspacing=2 border=0>
+ <tr>
+ <td align=right nowrap><? echo _("Theme"); ?>:
+ </td><td>
+<?
+ echo " <tt><select name=chosentheme>\n";
+ for ($i = 0; $i < count($theme); $i++) {
+ if ($theme[$i]["PATH"] == $chosen_theme)
+ echo " <option selected value=\"".$theme[$i]["PATH"]."\">".$theme[$i]["NAME"]."\n";
+ else
+ echo " <option value=\"".$theme[$i]["PATH"]."\">".$theme[$i]["NAME"]."\n";
+ }
+ echo " </select></tt>";
+?>
+ </td>
+ </tr>
+ <tr>
+ <td align=right nowrap><? echo _("Language"); ?>:
+ </td><td>
+<?
+ echo " <tt><select name=language>\n";
+ reset ($languages);
+ while (list($code, $name)=each($languages)) {
+ if ($code==$chosen_language)
+ echo " <OPTION SELECTED VALUE=\"".$code."\">".$languages[$code]["NAME"]."\n";
+ else
+ echo " <OPTION VALUE=\"".$code."\">".$languages[$code]["NAME"]."\n";
+
+ }
+ echo " </select></tt>";
+?>
+ </td>
+ <tr>
+ <td align=right nowrap>
+ </td><td>
+ <? echo _("Use Javascript or HTML addressbook?") . "<br>";
+ if ($use_javascript_addr_book == true) {
+ echo " <input type=radio name=javascript_abook value=1 checked> " . _("JavaScript") . " ";
+ echo " <input type=radio name=javascript_abook value=0> " . _("HTML");
+ } else {
+ echo " <input type=radio name=javascript_abook value=1> " . _("JavaScript") . " ";
+ echo " <input type=radio name=javascript_abook value=0 checked> " . _("HTML");
+ }
+ ?>
+ </td>
+ </tr>
+ <tr>
+ <td align=right nowrap><? echo _("Number of Messages to Index"); ?>:
+ </td><td>
+<?
+ if (isset($show_num))
+ echo " <tt><input type=text size=5 name=shownum value=\"$show_num\"></tt><br>";
+ else
+ echo " <tt><input type=text size=5 name=shownum value=\"25\"></tt><br>";
+?>
+ </td>
+ </tr>
+ <tr>
+ <td align=right nowrap><? echo _("Wrap incoming text at"); ?>:
+ </td><td>
+<?
+ if (isset($wrap_at))
+ echo " <tt><input type=text size=5 name=wrapat value=\"$wrap_at\"></tt><br>";
+ else
+ echo " <tt><input type=text size=5 name=wrapat value=\"86\"></tt><br>";
+?>
+ </td>
+ </tr>
+ <tr>
+ <td align=right nowrap><? echo _("Size of editor window"); ?>:
+ </td><td>
+<?
+ if ($editor_size >= 10 && $editor_size <= 255)
+ echo " <tt><input type=text size=5 name=editorsize value=\"$editor_size\"></tt><br>";
+ else
+ echo " <tt><input type=text size=5 name=editorsize value=\"76\"></tt><br>";
+?>
+ </td>
+ </tr>
+ <tr>
+ <td align=right nowrap><? echo _("Width of left folder list"); ?>:
+ </td><td>
+<?
+ echo " <select name=leftsize>\n";
+ if ($left_size == 100)
+ echo "<option value=100 selected>100 pixels\n";
+ else
+ echo "<option value=100>100 pixels\n";
+
+ if ($left_size == 125)
+ echo "<option value=125 selected>125 pixels\n";
+ else
+ echo "<option value=125>125 pixels\n";
+
+ if ($left_size == 150)
+ echo "<option value=150 selected>150 pixels\n";
+ else
+ echo "<option value=150>150 pixels\n";
+
+ if ($left_size == 175)
+ echo "<option value=175 selected>175 pixels\n";
+ else
+ echo "<option value=175>175 pixels\n";
+
+ if (($left_size == 200) || ($left_size == ""))
+ echo "<option value=200 selected>200 pixels\n";
+ else
+ echo "<option value=200>200 pixels\n";
+
+ if (($left_size == 225))
+ echo "<option value=225 selected>225 pixels\n";
+ else
+ echo "<option value=225>225 pixels\n";
+
+ if (($left_size == 250))
+ echo "<option value=250 selected>250 pixels\n";
+ else
+ echo "<option value=250>250 pixels\n";
+
+ if ($left_size == 275)
+ echo "<option value=275 selected>275 pixels\n";
+ else
+ echo "<option value=275>275 pixels\n";
+
+ if (($left_size == 300))
+ echo "<option value=300 selected>300 pixels\n";
+ else
+ echo "<option value=300>300 pixels\n";
+
+ echo " </select>";
+?>
+ </td>
+ </tr>
+ <tr>
+ <td align=right nowrap><? echo _("Auto refresh folder list"); ?>:
+ </td><td>
+<?
+ echo " <SELECT name=leftrefresh>";
+ if (($left_refresh == "None") || ($left_refresh == ""))
+ echo " <OPTION VALUE=None SELECTED>None";
+ else
+ echo " <OPTION VALUE=None>None";
+
+ if (($left_refresh == "10"))
+ echo " <OPTION VALUE=10 SELECTED>10 Seconds";
+ else
+ echo " <OPTION VALUE=10>10 Seconds";
+
+ if (($left_refresh == "20"))
+ echo " <OPTION VALUE=20 SELECTED>20 Seconds";
+ else
+ echo " <OPTION VALUE=20>20 Seconds";
+
+ if (($left_refresh == "30"))
+ echo " <OPTION VALUE=30 SELECTED>30 Seconds";
+ else
+ echo " <OPTION VALUE=30>30 Seconds";
+
+ if (($left_refresh == "60"))
+ echo " <OPTION VALUE=60 SELECTED>1 Minute";
+ else
+ echo " <OPTION VALUE=60>1 Minute";
+
+ if (($left_refresh == "120"))
+ echo " <OPTION VALUE=120 SELECTED>2 Minutes";
+ else
+ echo " <OPTION VALUE=120>2 Minutes";
+
+ if (($left_refresh == "180"))
+ echo " <OPTION VALUE=180 SELECTED>3 Minutes";
+ else
+ echo " <OPTION VALUE=180>3 Minutes";
+
+ if (($left_refresh == "240"))
+ echo " <OPTION VALUE=240 SELECTED>4 Minutes";
+ else
+ echo " <OPTION VALUE=240>4 Minutes";
+
+ if (($left_refresh == "300"))
+ echo " <OPTION VALUE=300 SELECTED>5 Minutes";
+ else
+ echo " <OPTION VALUE=300>5 Minutes";
+
+ if (($left_refresh == "420"))
+ echo " <OPTION VALUE=420 SELECTED>7 Minutes";
+ else
+ echo " <OPTION VALUE=420>7 Minutes";
+
+ if (($left_refresh == "600"))
+ echo " <OPTION VALUE=600 SELECTED>10 Minutes";
+ else
+ echo " <OPTION VALUE=600>10 Minutes";
+
+ if (($left_refresh == "720"))
+ echo " <OPTION VALUE=720 SELECTED>12 Minutes";
+ else
+ echo " <OPTION VALUE=720>12 Minutes";
+
+ if (($left_refresh == "900"))
+ echo " <OPTION VALUE=900 SELECTED>15 Minutes";
+ else
+ echo " <OPTION VALUE=900>15 Minutes";
+
+ if (($left_refresh == "1200"))
+ echo " <OPTION VALUE=1200 SELECTED>20 Minutes";
+ else
+ echo " <OPTION VALUE=1200>20 Minutes";
+
+ if (($left_refresh == "1500"))
+ echo " <OPTION VALUE=1500 SELECTED>25 Minutes";
+ else
+ echo " <OPTION VALUE=1500>25 Minutes";
+
+ if (($left_refresh == "1800"))
+ echo " <OPTION VALUE=1800 SELECTED>30 Minutes";
+ else
+ echo " <OPTION VALUE=1800>30 Minutes";
+
+ echo " </SELECT>";
+?>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ </td><td>
+ <input type="submit" value="Submit" name="submit_display">
+ </td>
+ </tr>
+ </table>
+ </form>
+</body></html>
--- /dev/null
+<?php
+ /**
+ ** options_folder.php
+ **
+ ** Copyright (c) 1999-2000 The SquirrelMail development team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
+ ** Displays all options relating to folders
+ **
+ **/
+
+ session_start();
+
+ if (!isset($config_php))
+ include("../config/config.php");
+ if (!isset($strings_php))
+ include("../functions/strings.php");
+ if (!isset($page_header_php))
+ include("../functions/page_header.php");
+ if (!isset($display_messages_php))
+ include("../functions/display_messages.php");
+ if (!isset($imap_php))
+ include("../functions/imap.php");
+ if (!isset($array_php))
+ include("../functions/array.php");
+ if (!isset($i18n_php))
+ include("../functions/i18n.php");
+
+ include("../src/load_prefs.php");
+ displayPageHeader($color, "None");
+
+ $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
+ $boxes = sqimap_mailbox_list($imapConnection, $boxes);
+ fputs($imapConnection, "1 logout\n");
+
+?>
+ <table width=100% align=center border=0 cellpadding=2 cellspacing=0><tr><td bgcolor="<? echo $color[0] ?>">
+ <center><b><? echo _("Options") . " - " . _("Folder Preferences"); ?></b></center>
+ </td></tr></table>
+
+ <form action="options.php" method=post>
+ <table width=100% cellpadding=0 cellspacing=2 border=0>
+
+<? if ($show_prefix_option == true) { ?>
+ <tr>
+ <td align=right nowrap><? echo _("Folder Path"); ?>:
+ </td><td>
+<? if (isset ($folder_prefix))
+ echo " <input type=text name=folderprefix value=\"$folder_prefix\" size=50><br>";
+ else
+ echo " <input type=text name=folderprefix value=\"$default_folder_prefix\" size=50><br>";
+?>
+ </td>
+ </tr>
+<? }
+
+ // TRASH FOLDER
+ echo "<tr><td nowrap align=right>";
+ echo _("Trash Folder:");
+ echo "</td><td>";
+ echo "<TT><SELECT NAME=trash>\n";
+ if ($move_to_trash == true)
+ echo "<option value=none>" . _("Don't use Trash");
+ else
+ echo "<option value=none selected>" . _("Do not use Trash");
+
+ for ($i = 0; $i < count($boxes); $i++) {
+ $use_folder = true;
+ if (strtolower($boxes[$i]["unformatted"]) == "inbox") {
+ $use_folder = false;
+ }
+ if ($use_folder == true) {
+ $box = $boxes[$i]["unformatted-dm"];
+ $box2 = replace_spaces($boxes[$i]["formatted"]);
+ if (($boxes[$i]["unformatted"] == $trash_folder) && ($move_to_trash == true))
+ echo " <OPTION SELECTED VALUE=\"$box\">$box2\n";
+ else
+ echo " <OPTION VALUE=\"$box\">$box2\n";
+ }
+ }
+ echo "</SELECT></TT>\n";
+ echo "</td></tr>";
+
+
+ // SENT FOLDER
+ echo "<tr><td nowrap align=right>";
+ echo _("Sent Folder:");
+ echo "</td><td>";
+ echo "<TT><SELECT NAME=sent>\n";
+ if ($move_to_sent == true)
+ echo "<option value=none>" . _("Don't use Sent");
+ else
+ echo "<option value=none selected>" . _("Do not use Sent");
+
+ for ($i = 0; $i < count($boxes); $i++) {
+ $use_folder = true;
+ if (strtolower($boxes[$i]["unformatted"]) == "inbox") {
+ $use_folder = false;
+ }
+ if ($use_folder == true) {
+ $box = $boxes[$i]["unformatted-dm"];
+ $box2 = replace_spaces($boxes[$i]["formatted"]);
+ if (($boxes[$i]["unformatted"] == $sent_folder) && ($move_to_sent == true))
+ echo " <OPTION SELECTED VALUE=\"$box\">$box2\n";
+ else
+ echo " <OPTION VALUE=\"$box\">$box2\n";
+ }
+ }
+ echo "</SELECT></TT>\n";
+ echo "</td></tr>";
+?>
+ <tr>
+ <td>
+ </td><td>
+ <input type="submit" value="Submit" name="submit_folder">
+ </td>
+ </tr>
+ </table>
+ </form>
+</body></html>
<?php
/**
- ** msg_highlight.php
+ ** options_highlight.php
**
** Copyright (c) 1999-2000 The SquirrelMail development team
** Licensed under the GNU GPL. For full terms see the file COPYING.
**
- ** Called from the options page, this script presents the user with
- ** the available choices and entry fields associated with the
- ** highlighting option.
+ ** Displays message highlighting options
+ **
**/
-
session_start();
if (!isset($config_php))
include("../functions/strings.php");
if (!isset($page_header_php))
include("../functions/page_header.php");
+ if (!isset($display_messages_php))
+ include("../functions/display_messages.php");
+ if (!isset($imap_php))
+ include("../functions/imap.php");
+ if (!isset($array_php))
+ include("../functions/array.php");
if (!isset($i18n_php))
include("../functions/i18n.php");
$name = ereg_replace(",", " ", $name);
if ($color_type == 1) $newcolor = $newcolor_choose;
else $newcolor = $newcolor_input;
-
+
$newcolor = ereg_replace(",", "", $newcolor);
$newcolor = ereg_replace("#", "", $newcolor);
$newcolor = "$newcolor";
$message_highlight_list[$id]["color"] = $newcolor;
$message_highlight_list[$id]["value"] = $value;
$message_highlight_list[$id]["match_type"] = $match_type;
- }
+ }
include("../src/load_prefs.php");
displayPageHeader($color, "None");
- echo "<br><center><b>" . _("Message Highlighting") . "</b> - [<a href=\"msg_highlight.php?action=add\">" . _("New") . "</a>]</center><br>\n";
+?>
+ <table width=100% align=center border=0 cellpadding=2 cellspacing=0><tr><td bgcolor="<? echo $color[0] ?>">
+ <center><b><? echo _("Options") . " - " . _("Message Highlighting"); ?></b></center>
+ </td></tr></table>
+
+<?
+ echo "<br><center>[<a href=\"options_highlight.php?action=add\">" . _("New") . "</a>]";
+ echo " - [<a href=\"options.php\">"._("Done")."</a>]</center><br>\n";
if (count($message_highlight_list) >= 1) {
echo "<table border=0 cellpadding=3 cellspacing=0 align=center width=80%>\n";
for ($i=0; $i < count($message_highlight_list); $i++) {
echo "<tr>\n";
echo " <td width=1% bgcolor=" . $color[4] . ">\n";
- echo "<nobr><small>[<a href=\"msg_highlight.php?action=edit&id=$i\">" . _("Edit") . "</a>] [<a href=\"msg_highlight.php?action=delete&id=$i\">"._("Delete")."</a>]</small></nobr>\n";
+ echo "<nobr><small>[<a href=\"options_highlight.php?action=edit&id=$i\">" . _("Edit") . "</a>] [<a href=\"options_highlight.php?action=delete&id=$i\">"._("Delete")."</a>]</small></nobr>\n";
echo " </td>";
echo " <td bgcolor=" . $message_highlight_list[$i]["color"] . ">\n";
echo " " . $message_highlight_list[$i]["name"];
}
if ($action == "edit" || $action == "add") {
if (!isset($id)) $id = count($message_highlight_list);
-
+
$color_list[0] = "4444aa";
$color_list[1] = "44aa44";
$color_list[2] = "aaaa44";
$color_list[10] = "aaaaaa";
$color_list[11] = "bfbfbf";
$color_list[12] = "dfdfdf";
- $color_list[13] = "ffffff";
-
+ $color_list[13] = "ffffff";
for ($i=0; $i < 14; $i++) {
if ($color_list[$i] == $message_highlight_list[$id]["color"]) {
$selected_choose = " checked";
}
if (!$message_highlight_list[$id]["color"])
$selected_choose = " checked";
- else if (!$selected_choose)
+ else if (!$selected_choose)
$selected_input = " checked";
-
- echo "<form action=\"msg_highlight.php\">\n";
+
+ echo "<form action=\"options_highlight.php\">\n";
echo "<input type=\"hidden\" value=\"save\" name=\"action\">\n";
echo "<input type=\"hidden\" value=\"$id\" name=\"id\">\n";
echo "<table width=80% align=center cellpadding=2 cellspacing=0 border=0>\n";
echo " <option value=\"$color_list[12]\"$selected12>" . _("Light Gray") . "\n";
echo " <option value=\"$color_list[13]\"$selected13>" . _("White") . "\n";
echo " </select><br>\n";
- echo " <input type=\"radio\" name=color_type value=2$selected_input> ". _("Other:") ."<input type=\"text\" value=\"";
+ echo " <input type=\"radio\" name=color_type value=2$selected_input> ". _("Other:") ."<input type=\"text\" value=\"";
if ($selected_input) echo $message_highlight_list[$id]["color"];
echo "\" name=\"newcolor_input\" size=7> "._("Ex: 63aa7f")."<br>\n";
echo " </td>\n";
echo " </td>\n";
echo " <td width=75%>\n";
echo " <select name=match_type>\n";
- if ($message_highlight_list[$id]["match_type"] == "from") echo " <option value=\"from\" selected>From\n";
- else echo " <option value=\"from\">From\n";
- if ($message_highlight_list[$id]["match_type"] == "to") echo " <option value=\"to\" selected>To\n";
- else echo " <option value=\"to\">To\n";
- if ($message_highlight_list[$id]["match_type"] == "subject") echo " <option value=\"subject\" selected>Subject\n";
- else echo " <option value=\"subject\">Subject\n";
+ if ($message_highlight_list[$id]["match_type"] == "from") echo " <option value=\"from\" selected>From\n";
+ else echo " <option value=\"from\">From\n";
+ if ($message_highlight_list[$id]["match_type"] == "to") echo " <option value=\"to\" selected>To\n";
+ else echo " <option value=\"to\">To\n";
+ if ($message_highlight_list[$id]["match_type"] == "subject") echo " <option value=\"subject\" selected>Subject\n";
+ else echo " <option value=\"subject\">Subject\n";
echo " </select>\n";
echo " <nobr><input type=\"text\" value=\"".$message_highlight_list[$id]["value"]."\" name=\"value\"> (";
echo _("Regular Expression");
echo "</table>\n";
echo "<center><input type=\"submit\" value=\"" . _("Submit") . "\"></center>\n";
echo "</form>\n";
- }
- echo "</BODY></HTML>";
+ }
?>
+</body></html>
--- /dev/null
+<?php
+ /**
+ ** options_personal.php
+ **
+ ** Copyright (c) 1999-2000 The SquirrelMail development team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
+ ** Displays all options relating to personal information
+ **
+ **/
+
+ session_start();
+
+ if (!isset($config_php))
+ include("../config/config.php");
+ if (!isset($strings_php))
+ include("../functions/strings.php");
+ if (!isset($page_header_php))
+ include("../functions/page_header.php");
+ if (!isset($display_messages_php))
+ include("../functions/display_messages.php");
+ if (!isset($imap_php))
+ include("../functions/imap.php");
+ if (!isset($array_php))
+ include("../functions/array.php");
+ if (!isset($i18n_php))
+ include("../functions/i18n.php");
+
+ include("../src/load_prefs.php");
+ displayPageHeader($color, "None");
+
+ $fullname = getPref($data_dir, $username, "full_name");
+ $replyto = getPref($data_dir, $username, "reply_to");
+ $email_address = getPref($data_dir, $username, "email_address");
+
+?>
+ <table width=100% align=center border=0 cellpadding=2 cellspacing=0><tr><td bgcolor="<? echo $color[0] ?>">
+ <center><b><? echo _("Options") . " - " . _("Personal Information"); ?></b></center>
+ </td></tr></table>
+
+ <form action="options.php" method=post>
+ <table width=100% cellpadding=0 cellspacing=2 border=0>
+ <tr>
+ <td align=right nowrap><? echo _("Full Name"); ?>:
+ </td><td>
+ <input size=50 type=text value="<? echo $fullname ?>" name=full_name>
+ </td>
+ </tr>
+ <tr>
+ <td align=right nowrap><? echo _("E-Mail Address"); ?>:
+ </td><td>
+ <input size=50 type=text value="<? echo $email_address ?>" name=email_address>
+ </td>
+ </tr>
+ <tr>
+ <td align=right nowrap><? echo _("Reply To"); ?>:
+ </td><td>
+ <input size=50 type=text value="<? echo $replyto ?>" name=reply_to>
+ </td>
+ </tr>
+ <tr>
+ <td align=right nowrap valign=top><br><? echo _("Signature"); ?>:
+ </td><td>
+<?
+ if ($use_signature == true)
+ echo "<input type=checkbox value=\"0\" name=usesignature checked> " . _("Use a signature") . "?<BR>";
+ else {
+ echo "<input type=checkbox value=\"1\" name=usesignature> ";
+ echo _("Use a signature?");
+ echo "<BR>";
+ }
+ echo "\n<textarea name=signature_edit rows=5 cols=50>$signature_abs</textarea><br>";
+?>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ </td><td>
+ <input type="submit" value="Submit" name="submit_personal">
+ </td>
+ </tr>
+ </table>
+ </form>
+</body></html>
+++ /dev/null
-<?php
- /**
- ** options_submit.php
- **
- ** Copyright (c) 1999-2000 The SquirrelMail development team
- ** Licensed under the GNU GPL. For full terms see the file COPYING.
- **
- ** This script saves all the options to the proper file when the
- ** submit button is pressed. Also displays conformation message.
- **/
-
-
- session_start();
-
- if (!isset($config_php))
- include("../config/config.php");
- if (!isset($strings_php))
- include("../functions/strings.php");
- if (!isset($page_header_php))
- include("../functions/page_header.php");
- if (!isset($dipslay_messages_php))
- include("../functions/display_messages.php");
- if (!isset($array_php))
- include("../functions/array.php");
- if (!isset($auth_php))
- include ("../functions/auth.php");
-
- include("../src/load_prefs.php");
-
- is_logged_in();
-
- setPref($data_dir, $username, "full_name", stripslashes($full_name));
- setPref($data_dir, $username, "email_address", stripslashes($email_address));
- setPref($data_dir, $username, "reply_to", stripslashes($reply_to));
- setPref($data_dir, $username, "chosen_theme", $chosentheme);
- setPref($data_dir, $username, "show_num", $shownum);
- setPref($data_dir, $username, "wrap_at", $wrapat);
- setPref($data_dir, $username, "editor_size", $editorsize);
- setPref($data_dir, $username, "use_signature", $usesignature);
- setPref($data_dir, $username, "left_refresh", $leftrefresh);
- setPref($data_dir, $username, "language", $language);
- setPref($data_dir, $username, "left_size", $leftsize);
- setPref($data_dir, $username, "folder_prefix", $folderprefix);
- setPref($data_dir, $username, "use_javascript_addr_book", $javascript_abook);
-
- if ($trash != "none") {
- setPref($data_dir, $username, "move_to_trash", true);
- setPref($data_dir, $username, "trash_folder", $trash);
- } else {
- setPref($data_dir, $username, "move_to_trash", false);
- setPref($data_dir, $username, "trash_folder", "");
- }
-
- if ($sent != "none") {
- setPref($data_dir, $username, "move_to_sent", true);
- setPref($data_dir, $username, "sent_folder", $sent);
- } else {
- setPref($data_dir, $username, "move_to_sent", false);
- setPref($data_dir, $username, "sent_folder", "");
- }
-
- setSig($data_dir, $username, stripslashes($signature_edit));
-
- setcookie("squirrelmail_language", $language, time()+2592000);
- $squirrelmail_language = $language;
-
- displayPageHeader($color, "None");
- echo "<BR><BR><BR><CENTER><B>";
- echo _("Options Saved!");
- echo "</B><BR><BR>";
- echo _("Your options have been saved.");
- echo "<BR><A HREF=\"webmail.php\" TARGET=_top>";
- echo _("Click here");
- echo "</A> ";
- echo _("to continue.");
- echo "</CENTER>";
- echo "</BODY></HTML>";
-?>
if (!isset($date_php))
include("../functions/date.php");
+ include("../src/load_prefs.php");
+ $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
+ sqimap_mailbox_select($imapConnection, $mailbox);
+ displayPageHeader($color, $mailbox);
+
+ if ($view_hdr) {
+ fputs ($imapConnection, "a003 FETCH $passed_id BODY[HEADER]\r\n");
+ $read = sqimap_read_data ($imapConnection, "a003", true, $a, $b);
+
+ echo "<br>";
+ echo "<table width=95% cellpadding=2 cellspacing=0 border=0 align=center>\n";
+ echo " <TR><TD BGCOLOR=\"$color[9]\" WIDTH=100%><center><b>" . _("Viewing full header") . "</b> - ";
+ echo "<a href=\"read_body.php?mailbox=".urlencode($mailbox)."&passed_id=$passed_id&startMessage=$startMessage&show_more=$show_more\">";
+ echo ""._("View message") . "</a></b></center></td></tr>\n";
+ echo "<tr><td><pre>";
+ for ($i=1; $i < count($read)-1; $i++) {
+ $read[$i] = htmlspecialchars($read[$i]);
+ if (substr($read[$i], 0, 1) != "\t" &&
+ substr($read[$i], 0, 1) != " " &&
+ substr($read[$i], 0, 1) != "&" &&
+ trim($read[$i])) {
+ $pre = substr($read[$i], 0, strpos($read[$i], ":"));
+ $read[$i] = str_replace("$pre", "<b>$pre</b>", $read[$i]);
+ }
+ echo "$read[$i]";
+ }
+ echo "</pre></td></tr></table>\n";
+ echo "</body></html>";
+ exit;
+ }
+
// given an IMAP message id number, this will look it up in the cached and sorted msgs array and
// return the index. used for finding the next and previous messages
$msgs[$i]["FLAG_SEEN"] = true;
}
- include("../src/load_prefs.php");
- $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
- sqimap_mailbox_select($imapConnection, $mailbox);
-
// $message contains all information about the message
// including header and body
$message = sqimap_get_message($imapConnection, $passed_id, $mailbox);
- displayPageHeader($color, $mailbox);
-
/** translate the subject and mailbox into url-able text **/
$url_subj = urlencode(trim(stripslashes($message->header->subject)));
$urlMailbox = urlencode($mailbox);
echo "<BR>";
echo "<TABLE COLS=1 CELLSPACING=0 WIDTH=98% BORDER=0 ALIGN=CENTER CELLPADDING=0>\n";
- echo " <TR><TD BGCOLOR=\"$color[0]\" WIDTH=100%>";
+ echo " <TR><TD BGCOLOR=\"$color[9]\" WIDTH=100%>";
echo " <TABLE WIDTH=100% CELLSPACING=0 BORDER=0 COLS=2 CELLPADDING=3>";
echo " <TR>";
echo " <TD ALIGN=LEFT WIDTH=33%>";
echo " <TABLE COLS=2 WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=3>\n";
echo " <TR>\n";
/** subject **/
- echo " <TD BGCOLOR=\"$color[4]\" WIDTH=15% ALIGN=RIGHT>\n";
+ echo " <TD BGCOLOR=\"$color[0]\" WIDTH=15% ALIGN=RIGHT>\n";
echo _("Subject:");
- echo " </TD><TD BGCOLOR=\"$color[4]\" WIDTH=85%>\n";
+ echo " </TD><TD BGCOLOR=\"$color[0]\" WIDTH=84%>\n";
echo " <B>$subject</B>\n";
echo " </TD>\n";
+ echo " <TD WIDTH=1% bgcolor=\"$color[0]\" nowrap align=right><small><a href=\"read_body.php?mailbox=$urlMailbox&passed_id=$passed_id&startMessage=$startMessage&show_more=$show_more&view_hdr=1\">" . _("View full header") . "</a></small> </td>";
echo " </TR>\n";
/** from **/
echo " <TR>\n";
- echo " <TD BGCOLOR=\"$color[4]\" WIDTH=15% ALIGN=RIGHT>\n";
+ echo " <TD BGCOLOR=\"$color[0]\" WIDTH=15% ALIGN=RIGHT>\n";
echo _("From:");
- echo " </TD><TD BGCOLOR=\"$color[4]\" WIDTH=85%>\n";
+ echo " </TD><TD BGCOLOR=\"$color[0]\" WIDTH=85% colspan=2>\n";
echo " <B>$from_name</B>\n";
echo " </TD>\n";
echo " </TR>\n";
/** date **/
echo " <TR>\n";
- echo " <TD BGCOLOR=\"$color[4]\" WIDTH=15% ALIGN=RIGHT>\n";
+ echo " <TD BGCOLOR=\"$color[0]\" WIDTH=15% ALIGN=RIGHT>\n";
echo _("Date:");
- echo " </TD><TD BGCOLOR=\"$color[4]\" WIDTH=85%>\n";
+ echo " </TD><TD BGCOLOR=\"$color[0]\" WIDTH=85% colspan=2>\n";
echo " <B>$dateString</B>\n";
echo " </TD>\n";
echo " </TR>\n";
/** to **/
echo " <TR>\n";
- echo " <TD BGCOLOR=\"$color[4]\" WIDTH=15% ALIGN=RIGHT VALIGN=TOP>\n";
+ echo " <TD BGCOLOR=\"$color[0]\" WIDTH=15% ALIGN=RIGHT VALIGN=TOP>\n";
echo _("To:");
- echo " </TD><TD BGCOLOR=\"$color[4]\" WIDTH=85% VALIGN=TOP>\n";
+ echo " </TD><TD BGCOLOR=\"$color[0]\" WIDTH=85% VALIGN=TOP colspan=2>\n";
echo " <B>$to_string</B>\n";
echo " </TD>\n";
echo " </TR>\n";
/** cc **/
if ($message->header->cc) {
echo " <TR>\n";
- echo " <TD BGCOLOR=\"$color[4]\" WIDTH=15% ALIGN=RIGHT VALIGN=TOP>\n";
+ echo " <TD BGCOLOR=\"$color[0]\" WIDTH=15% ALIGN=RIGHT VALIGN=TOP>\n";
echo " Cc:\n";
- echo " </TD><TD BGCOLOR=\"$color[4]\" WIDTH=85% VALIGN=TOP>\n";
+ echo " </TD><TD BGCOLOR=\"$color[0]\" WIDTH=85% VALIGN=TOP colspan=2>\n";
echo " <B>$cc_string</B>\n";
echo " </TD>\n";
echo " </TR>\n";
$urlMailbox = urlencode($mailbox);
echo "<FRAME SRC=\"left_main.php\" NAME=\"left\">";
echo "<FRAME SRC=\"right_main.php?mailbox=$urlMailbox&sort=$sort&startMessage=$startMessage\" NAME=\"right\">";
+ } else if ($right_frame == "options.php") {
+ echo "<FRAME SRC=\"left_main.php\" NAME=\"left\">";
+ echo "<FRAME SRC=\"options.php\" NAME=\"right\">";
} else if ($right_frame == "folders.php") {
$urlMailbox = urlencode($mailbox);
echo "<FRAME SRC=\"left_main.php\" NAME=\"left\">";