show day and time, else show month day year.
- Fixed error in the way we send the "from" header -- had been sending:
Luke Ehresman <luke@squirrelmail.org> without the quites.. needed them!
- Fixed error when parsing url messages. If it is longer than the word
wrap length, it doesn't wrap it.
- fixed bug reported to list about next/prev not working (needed urlMailbox)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@622
7612ce4b-ef26-0410-bec9-
ea0150e637f0
Version 0.5pre1 -- DEVELOPMENT
------------------------------
+- Date display now is similar to Netscape Messenger
+- Many bugs have been reported to the list, and been squashed
+- Help system developed
- Folder list now shows configurable details about messages
- It is now possible to select multiple subscribes/unsubscribes
- Removed a bunch of annoying "success" screens, improved navigation
+Installing SquirrelMail
+=======================
+
Table of Contents:
1. (PHP4) Configure your webserver to work with PHP4
2. (IMAP) Setting up IMAP (not covered)
}
function getDateString($stamp) {
- return date("M j, Y", $stamp);
+ $now = time();
+ $midnight = $now - ($now % 86400) + 14400;
+
+ if ($midnight < $stamp) {
+ // Today
+ return date("g:i a", $stamp);
+ } else if ($midnight - 604800 < $stamp) {
+ // This week
+ return date("D, g:i a", $stamp);
+ } else {
+ // before this week
+ return date("M j, Y", $stamp);
+ }
}
function getTimeStamp($dateParts) {
if ($target != "")
$target = " target=\"$target\"";
-
+
echo '<a href="'.$base_uri.$path.'"'.$target.'>'.$text.'</a>';
}
echo " \n";
displayInternalLink ("src/options.php", _("Options"), "right");
echo " \n";
- displayInternalLink ("src/webmail.php?right_frame=help.php", _("Help"), "Help Me!");
+ displayInternalLink ("src/help.php", _("Help"), "right");
echo " \n";
do_hook("menuline");
$i = 0;
$line_len = strlen($words[$i])+1;
$line = "";
- while ($i < count($words)) {
- while ($line_len < $wrap) {
- $line = "$line$words[$i] ";
- $i++;
- $line_len = $line_len + strlen($words[$i])+1;
- }
- $line_len = strlen($words[$i])+1;
- if ($line_len < $wrap) {
- if ($i < count($words)) // don't <BR> the last line
- $line = "$line\n";
- } else {
- $endline = $words[$i];
- while ($line_len >= $wrap) {
- $bigline = substr($endline, 0, $wrap);
- $endline = substr($endline, $wrap, strlen($endline));
- $line_len = strlen($endline);
- $line = "$line$bigline<BR>";
+ if (count($words) > 1) {
+ while ($i < count($words)-1) {
+ while ($line_len < $wrap) {
+ $line = "$line$words[$i] ";
+ $i++;
+ $line_len = $line_len + strlen($words[$i])+1;
+ }
+ $line_len = strlen($words[$i])+1;
+ if ($line_len < $wrap) {
+ if ($i < count($words)) // don't <BR> the last line
+ $line = "$line\n";
+ } else {
+ $endline = $words[$i];
+ while ($line_len >= $wrap) {
+ $bigline = substr($endline, 0, $wrap);
+ $endline = substr($endline, $wrap, strlen($endline));
+ $line_len = strlen($endline);
+ $line = "$line$bigline<BR>";
+ }
+ $line = "$line$endline<BR>";
+ $i++;
}
- $line = "$line$endline<BR>";
- $i++;
}
+ } else {
+ $line = $words[0];
}
$line = str_replace(">", ">", $line);
$body = "";
for ($i=0; $i < count($body_ary); $i++) {
if ($i==0 && $forward_id) {
- $tmp = "-------- " . _("Original Message") . " --------";
+ $tmp = "-------- " . _("Original Message") . " --------\n";
$tmp .= _("Subject") . ": " . $orig_header->subject . "\n";
$tmp .= " " . _("From") . ": " . $orig_header->from . "\n";
$tmp .= " " . _("To") . ": " . $orig_header->to[0] . "\n";
echo "// --></SCRIPT>\n\n";
}
- echo "\n<FORM name=compose action=\"compose.php\" METHOD=POST>\n";
+ echo "\n<FORM name=compose action=\"compose.php\" METHOD=POST ENCTYPE=\"multipart/form-data\">\n";
if ($reply_id) {
echo "<input type=hidden name=reply_id value=$reply_id>\n";
}
$subject = decodeHeader(htmlspecialchars(stripslashes($message->header->subject)));
echo "<BR>";
- echo "<TABLE COLS=1 CELLSPACING=0 WIDTH=98% BORDER=0 ALIGN=CENTER CELLPADDING=0>\n";
+ echo "<TABLE COLS=1 CELLSPACING=0 WIDTH=100% BORDER=0 ALIGN=CENTER CELLPADDING=0>\n";
echo " <TR><TD BGCOLOR=\"$color[9]\" WIDTH=100%>";
echo " <TABLE WIDTH=100% CELLSPACING=0 BORDER=0 COLS=2 CELLPADDING=3>";
echo " <TR>";
$prev = findPreviousMessage();
$next = findNextMessage();
if ($prev != -1)
- echo "<a href=\"read_body.php?passed_id=$prev&mailbox=$mailbox&sort=$sort&startMessage=$startMessage&show_more=0\">" . _("Previous") . "</A> | ";
+ echo "<a href=\"read_body.php?passed_id=$prev&mailbox=$urlMailbox&sort=$sort&startMessage=$startMessage&show_more=0\">" . _("Previous") . "</A> | ";
else
echo _("Previous") . " | ";
if ($next != -1)
- echo "<a href=\"read_body.php?passed_id=$next&mailbox=$mailbox&sort=$sort&startMessage=$startMessage&show_more=0\">" . _("Next") . "</A>";
+ echo "<a href=\"read_body.php?passed_id=$next&mailbox=$urlMailbox&sort=$sort&startMessage=$startMessage&show_more=0\">" . _("Next") . "</A>";
else
echo _("Next");
}
}
echo "</TABLE>";
echo " </TD></TR>";
+ echo "</table>";
+ echo "<TABLE COLS=1 CELLSPACING=0 WIDTH=100% BORDER=0 ALIGN=CENTER CELLPADDING=0>\n";
echo " <TR><TD BGCOLOR=\"$color[4]\" WIDTH=100%>\n";
$body = formatBody($imapConnection, $message, $color, $wrap_at);
echo "$body";
echo " </TD></TR>\n";
+ echo "</table>";
+ echo "<TABLE COLS=1 CELLSPACING=0 WIDTH=100% BORDER=0 ALIGN=CENTER CELLPADDING=0>\n";
echo " <TR><TD BGCOLOR=\"$color[9]\"> </TD></TR>";
echo "</TABLE>\n";