+ echo '</table>';
+ echo "<table bgcolor=\"$color[9]\" width=100% border=0 cellpadding=1 cellspacing=1>" .
+ "<tr BGCOLOR=\"$color[4]\">" .
+ "<table width=100% BGCOLOR=\"$color[4]\" border=0 cellpadding=1 cellspacing=0><tr><td>$lMore$mMore$rMore</td>".
+ "<td align=right>$Message</td></tr></table>".
+ "</tr>".
+ "</table>";
+ /** End of message-list table */
+
+ do_hook('mailbox_index_after');
+ echo "</TABLE></FORM>\n";
+ }
+
+ /* Displays the standard message list header.
+ * To finish the table, you need to do a "</table></table>";
+ * $moveURL is the URL to submit the delete/move form to
+ * $mailbox is the current mailbox
+ * $sort is the current sorting method (-1 for no sorting available [searches])
+ * $Message is a message that is centered on top of the list
+ * $More is a second line that is left aligned
+ */
+ function mail_message_listing_beginning
+ ($imapConnection, $moveURL, $mailbox = '', $sort = -1,
+ $Message = '', $More = '', $startMessage = 1) {
+ global $color, $index_order, $auto_expunge, $move_to_trash;
+ global $checkall, $sent_folder, $draft_folder;
+ $urlMailbox = urlencode($mailbox);
+
+ /** This is the beginning of the message list table. It wraps around all messages */
+ echo "<center>$Message</center>" .
+ '<TABLE WIDTH="100%" BORDER="0" CELLPADDING="1" CELLSPACING="0">';
+
+ echo "<TR BGCOLOR=\"$color[9]\"><TD>";
+
+ echo "<table bgcolor=\"$color[4]\" cellpadding=2".
+ ' width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td>' .
+ "$More</td><td align=right>";
+ ShowSelectAllLink($startMessage, $sort);
+ echo "</td></tr></table>\n</td></tr>";
+
+ /** The delete and move options */
+ echo "<TD BGCOLOR=\"$color[0]\">";
+
+ echo "\n<FORM name=messageList method=post action=\"$moveURL\">\n";
+ echo "<TABLE BGCOLOR=\"$color[0]\" COLS=2 BORDER=0 cellpadding=0 cellspacing=0 width=100%>\n";
+
+ echo " <TR>\n" .
+ " <TD ALIGN=LEFT VALIGN=CENTER NOWRAP>\n" .
+ ' <SMALL> ' . _("Move selected to:") . "</SMALL>\n" .
+ " </TD>\n" .
+ " <TD ALIGN=RIGHT NOWRAP>\n" .
+ ' <SMALL> ' . _("Transform Selected Messages") . ": </SMALL><BR>\n" .
+ " </TD>\n" .
+ " </TR>\n" .
+ " <TR>\n" .
+ " <TD ALIGN=LEFT VALIGN=CENTER NOWRAP>\n" .
+ ' <SMALL> <TT><SELECT NAME="targetMailbox">';
+
+ $boxes = sqimap_mailbox_list($imapConnection);
+ for ($i = 0; $i < count($boxes); $i++) {
+ if (!in_array("noselect", $boxes[$i]['flags'])) {
+ $box = $boxes[$i]['unformatted'];
+ $box2 = str_replace(' ', ' ', $boxes[$i]['formatted']);
+ echo " <OPTION VALUE=\"$box\">$box2</option>\n";
+ }
+ }
+ echo ' </SELECT></TT></SMALL>';
+ echo " <SMALL><INPUT TYPE=SUBMIT NAME=\"moveButton\" VALUE=\"" . _("Move") . "\"></SMALL>\n";
+ echo " </TD>\n";
+ echo " <TD ALIGN=RIGHT NOWRAP> \n";
+ if (!$auto_expunge) {
+ echo ' <INPUT TYPE=SUBMIT NAME="expungeButton" VALUE="'. _("Expunge") .'"> '. _("mailbox") ." \n";
+ }
+ echo " <INPUT TYPE=SUBMIT NAME=\"markRead\" VALUE=\"". _("Read")."\">\n";
+ echo " <INPUT TYPE=SUBMIT NAME=\"markUnread\" VALUE=\"". _("Unread")."\">\n";
+ echo " <INPUT TYPE=SUBMIT VALUE=\"". _("Delete") . "\"> \n";
+ echo " </TD>\n";
+ echo " </TR>\n";