+ echo '</table>';
+
+ echo html_tag( 'table',
+ html_tag( 'tr',
+ html_tag( 'td',
+ html_tag( 'table',
+ html_tag( 'tr',
+ html_tag( 'td', $paginator_str ) .
+ html_tag( 'td', $msg_cnt_str, 'right' )
+ )
+ , '', $color[4], 'width="100%" cellpadding="1" cellspacing="1"' )
+ )
+ , '', $color[4] )
+ , '', $color[9], 'width="100%" cellpadding="1" cellspacing="1"' );
+
+ /* 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,
+ $msg_cnt_str = '',
+ $paginator = ' ',
+ $start_msg = 1) {
+ global $color, $index_order, $auto_expunge, $move_to_trash, $base_uri,
+ $checkall, $sent_folder, $draft_folder, $thread_sort_messages,
+ $allow_thread_sort, $allow_server_sort, $server_sort_order,
+ $lastTargetMailbox;
+
+ $urlMailbox = urlencode($mailbox);
+
+ /*
+ * This is the beginning of the message list table.
+ * It wraps around all messages
+ */
+ echo "<FORM name=\"messageList\" method=post action=\"$moveURL\">\n"
+ . html_tag( 'table' ,'' , '', '', 'border="0" width="100%" cellpadding="1" cellspacing="0"' ) .
+ html_tag( 'tr',
+ html_tag( 'td' ,
+ html_tag( 'table' ,
+ html_tag( 'tr',
+ html_tag( 'td', $paginator, 'left' ) .
+ html_tag( 'td', $msg_cnt_str, 'right' )
+ )
+ , '', $color[4], 'border="0" width="100%" cellpadding="2" cellspacing="0"' )
+ , 'left', '', '' )
+ , '', $color[0] )
+ . html_tag( 'tr' ) . "\n"
+ . html_tag( 'td' ,'' , 'left', $color[0], '' )
+ . html_tag( 'table' ,'' , '', $color[0], 'border="0" width="100%" cellpadding="0" cellspacing="0"' )
+ . html_tag( 'tr',
+ html_tag( 'td',
+ '<small> ' . _("Move Selected To:") . '</small>',
+ 'left',
+ '',
+ 'valign="middle" nowrap' ) .
+ html_tag( 'td',
+ '<small>' . _("Transform Selected Messages") . ': </small>',
+ 'right',
+ '',
+ 'nowrap' )
+ )
+ . html_tag( 'tr' ) ."\n"
+ . html_tag( 'td', '', 'left', '', 'valign="middle" nowrap' )
+ . ' <small> <tt><select name="targetMailbox">';
+
+ $boxes = sqimap_mailbox_list($imapConnection);
+ foreach ($boxes as $boxes_part) {
+ if (!in_array('noselect', $boxes_part['flags'])) {
+ $box = $boxes_part['unformatted'];
+ $box2 = str_replace(' ', ' ', imap_utf7_decode_local($boxes_part['unformatted-disp']));
+ if( $box2 == 'INBOX' ) {
+ $box2 = _("INBOX");
+ }
+ echo ' <option value="' . $box . '"';
+ if ($lastTargetMailbox == $box) {
+ echo ' selected';
+ }
+ echo '>' . $box2 . '</option>' . "\n";
+ }
+ }
+ echo ' </select></tt> '
+ . '<input type="submit" name="moveButton" value="' . _("Move") . '"> '
+ . '<input type="submit" name="attache" value="' . _("Forward")
+ . "\"> \n" . "</small>\n";
+
+ echo " </td>\n"
+ . html_tag( 'td', '', 'right', '', 'nowrap' );
+ if (!$auto_expunge) {
+ echo '<input type="submit" name="expungeButton" value="' . _("Expunge")
+ . '"> ' . _("mailbox") . ' ';
+ }
+ echo '<input type="submit" name="markRead" value="' . _("Read") . '">'
+ . '<input type="submit" name="markUnread" value="' . _("Unread") . '">'
+ . '<input type="submit" value="' . _("Delete") . '"> '
+ . "</td>\n"
+ . " </tr>\n";
+
+ /* draws thread sorting links */
+ if ($allow_thread_sort == TRUE) {
+ if ($thread_sort_messages == 1 ) {
+ $set_thread = 2;
+ $thread_name = _("Unthread View");
+ }
+ elseif ($thread_sort_messages == 0) {
+ $set_thread = 1;
+ $thread_name = _("Thread View");
+ }
+ echo html_tag( 'tr' ,
+ html_tag( 'td' ,
+ ' <a href=' . "$base_uri" . 'src/right_main.php?sort='
+ . "$sort" . '&start_messages=1&set_thread=' . "$set_thread"
+ . '&mailbox=' . urlencode($mailbox) . '><small>' . $thread_name
+ . '</a></small> '
+ , '', '', '' )
+ , '', '', '' );
+ }