<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>
- <?php mail_message_listing_beginning($imapConnection, $mailbox, $sort,
+ <?php mail_message_listing_beginning($imapConnection, $mbxresponse, $mailbox, $sort,
$msg_cnt_str, $paginator_str, $start_msg); ?>
</td>
</tr>
* you need to do a "</table></table>";
*
* $moveURL is the URL to submit the delete/move form to
+ * $mbxresponse is the array with the results of SELECT against the current mailbox
* $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
*/
function mail_message_listing_beginning ($imapConnection,
+ $mbxresponse,
$mailbox = '', $sort = -1,
$msg_cnt_str = '',
$paginator = ' ',
$start_msg = 1) {
- global $color, $auto_expunge, $base_uri,
+ global $color, $auto_expunge, $base_uri, $show_flag_buttons,
$allow_server_sort, $server_sort_order,
$PHP_SELF, $allow_thread_sort, $thread_sort_messages;
*/
$safe_name = preg_replace("/[^0-9A-Za-z_]/", '_', $mailbox);
$form_name = "FormMsgs" . $safe_name;
+
echo '<form name="' . $form_name . '" method="post" action="move_messages.php">' ."\n"
. $moveFields;
?>
<tr>
<td align="left">
<small><?php
+
+ // display flag buttons only if supported
+ if ($show_flag_buttons && $mbxresponse != NULL &&
+ strpos($mbxresponse['PERMANENTFLAGS'], '\Flagged') !== FALSE) {
+ echo getButton('SUBMIT', 'markFlagged',_("Flag"));
+ echo ' ';
+ echo getButton('SUBMIT', 'markUnflagged',_("Unflag"));
+ echo ' ';
+ }
echo getButton('SUBMIT', 'markRead',_("Read"));
echo ' ';
echo getButton('SUBMIT', 'markUnread',_("Unread"));
foreach ($index_order as $item) {
switch ($item) {
case 1: /* checkbox */
- echo html_tag( 'td',get_selectall_link($start_msg, $sort) , '', '', 'width="1%"' );
+ echo html_tag( 'td',get_selectall_link($start_msg, $sort, $mailbox) , '', '', 'width="1%"' );
break;
case 5: /* flags */
echo html_tag( 'td','' , '', '', 'width="1%"' );
. _("Click here to change the sorting of the message list") .'"></a>';
}
-function get_selectall_link($start_msg, $sort) {
- global $checkall, $what, $where, $mailbox, $javascript_on;
+function get_selectall_link($start_msg, $sort, $mailbox) {
+ global $checkall, $what, $where, $javascript_on;
global $PHP_SELF, $PG_SHOWNUM;
$result = '';