Got reply and forward working
[squirrelmail.git] / src / read_body.php
index b660fefdb1aeec9f7507a671228e16fb1682ddea..053bcb3f3385261c780fe249217b3cc06a6504a2 100644 (file)
    getMessageHeaders($imapConnection, $passed_id, $passed_id, $f, $s, $d);
 
    $subject = $s[0];
+   $url_subj = urlencode(trim($subject));
+
    $d[0] = ereg_replace("  ", " ", $d[0]);
-//   $date = explode(" ", trim($d[0]));
-//   $date = getDateString($date);
    $date = $d[0];
    $from_name = getSenderName($f[0]);
+   $urlMailbox = urlencode($mailbox);
 
-   echo "<TABLE COLS=1 WIDTH=95% BORDER=0 ALIGN=CENTER>\n";
-   echo "   <TR><TD BGCOLOR=DCDCDC>&nbsp;</TD></TR>";
-   echo "   <TR><TD BGCOLOR=FFFFFF>";
+   $url_from = trim(decodeEmailAddr($f[0]));
+   $url_from = urlencode($url_from);
+
+   echo "<BR>";
+   echo "<TABLE COLS=1 WIDTH=95% BORDER=0 ALIGN=CENTER CELLPADDING=2>\n";
+   echo "   <TR><TD BGCOLOR=DCDCDC WIDTH=100%>";
+   echo "      <TABLE WIDTH=100% BORDER=0 COLS=2>";
+   echo "         <TR>";
+   echo "            <TD ALIGN=LEFT WIDTH=50%>";
+   echo "               <FONT FACE=\"Arial,Helvetica\" SIZE=2>";
+   echo "               <A HREF=\"right_main.php?sort=$sort&startMessage=$startMessage&mailbox=$urlMailbox\">Message List</A>&nbsp;&nbsp;";
+   echo "               <A HREF=\"delete_message.php?mailbox=$urlMailbox&message=$passed_id&sort=$sort&startMessage=1\">Delete</A>&nbsp;&nbsp;";
+   echo "               </FONT>";
+   echo "            </TD><TD WIDTH=50% ALIGN=RIGHT>";
+   echo "               <FONT FACE=\"Arial,Helvetica\" SIZE=2>";
+   echo "               <A HREF=\"compose.php?forward_id=$passed_id&forward_subj=$url_subj&mailbox=$urlMailbox\">Forward</A>&nbsp;&nbsp;";
+   echo "               <A HREF=\"compose.php?send_to=$url_from&reply_subj=$url_subj&reply_id=$passed_id&mailbox=$urlMailbox\">Reply</A>&nbsp;&nbsp;";
+   echo "               </FONT>";
+   echo "            </TD>";
+   echo "         </TR>";
+   echo "      </TABLE>";
+   echo "   </TD></TR>";
+   echo "   <TR><TD BGCOLOR=FFFFFF WIDTH=100%>";
    echo "   <TABLE COLS=2 WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=2>\n";
    echo "      <TR>\n";
    /** subject **/
@@ -52,7 +73,7 @@
 
    echo "   </TABLE></TD></TR>\n";
 
-   echo "   <TR><TD BGCOLOR=FFFFFF><BR>\n";
+   echo "   <TR><TD BGCOLOR=FFFFFF WIDTH=100%><BR>\n";
    $i = 0;
    while ($i < count($body)) {
       echo "$body[$i]";