| | |
| | | |
| | | */ |
| | | |
| | | $REMOTE_REQUEST = TRUE; |
| | | $OUTPUT_TYPE = 'js'; |
| | | |
| | | // is there a sort type for this request? |
| | | if ($sort = get_input_value('_sort', RCUBE_INPUT_GET)) |
| | | { |
| | |
| | | |
| | | // update message count display |
| | | $pages = ceil($count/$IMAP->page_size); |
| | | $commands = sprintf("this.set_env('messagecount', %d);\n", $count); |
| | | $commands .= sprintf("this.set_env('pagecount', %d);\n", $pages); |
| | | $commands .= sprintf("this.set_rowcount('%s');\n", rcmail_get_messagecount_text($count)); |
| | | $OUTPUT->set_env('messagecount', $count); |
| | | $OUTPUT->set_env('pagecount', $pages); |
| | | $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($count)); |
| | | |
| | | // update mailboxlist |
| | | $mbox_name = $IMAP->get_mailbox_name(); |
| | | $commands .= sprintf("this.set_unread_count('%s', %d);\n", addslashes($mbox_name), $unseen); |
| | | $OUTPUT->command('set_unread_count', $IMAP->get_mailbox_name(), $unseen); |
| | | |
| | | |
| | | // add message rows |
| | | if (isset($a_headers) && count($a_headers)) |
| | | $commands .= rcmail_js_message_list($a_headers); |
| | | rcmail_js_message_list($a_headers); |
| | | |
| | | |
| | | // send response |
| | | rcube_remote_response($commands); |
| | | $OUTPUT->send(); |
| | | |
| | | exit; |
| | | ?> |