"
- . '"
- . "";
- /* if using server sort we highjack the
- * the $sort var and use $server_sort_order
- * instead. but here we reset sort for a bit
- * since its easy
- */
- if ($allow_server_sort == TRUE) {
- $sort = $server_sort_order;
- }
- /* Print the headers. */
- for ($i=1; $i <= count($index_order); $i++) {
- switch ($index_order[$i]) {
- case 1: /* checkbox */
- case 5: /* flags */
- echo ' | ';
- break;
- case 2: /* from */
- if (handleAsSent($mailbox)) {
- echo ' ' . _("To") . '';
- } else {
- echo ' | ' . _("From") . '';
- }
- if ($allow_thread_sort != TRUE || $thread_sort_messages != 1) {
- ShowSortButton($sort, $mailbox, 2, 3);
- }
- echo " | \n";
- break;
- case 3: /* date */
- echo ' ' . _("Date") . '';
- if ($allow_thread_sort != TRUE || $thread_sort_messages != 1) {
- ShowSortButton($sort, $mailbox, 0, 1);
- }
- echo " | \n";
- break;
- case 4: /* subject */
- echo ' ' . _("Subject") . ' ';
- if ($allow_thread_sort != TRUE || $thread_sort_messages != 1) {
- ShowSortButton($sort, $mailbox, 4, 5);
- }
- echo " | \n";
- break;
- case 6: /* size */
- echo ' ' . _("Size") . " | \n";
- break;
+
+ $moveFields = addHidden('msg', $msg).
+ addHidden('mailbox', $aMailbox['NAME']).
+ addHidden('startMessage', $aMailbox['PAGEOFFSET']).
+ addHidden('location', $location);
+
+ /* build thread sorting links */
+
+ if ($aMailbox['ALLOW_THREAD']) {
+ if ($aMailbox['SORT_METHOD'] == 'THREAD') {
+ $set_thread = 2;
+ $thread_name = _("Unthread View");
+ } else {
+ $set_thread = 1;
+ $thread_name = _("Thread View");
+ }
+ $thread_link_str = '[' . $thread_name
+ . ']';
+ } else {
+ $thread_link_str ='';
}
- }
- /* if using server-sorting,
- * send sort back to 6
- */
- if ($allow_server_sort == TRUE) {
- $sort = 6;
- }
- echo " \n";
+ /*
+ * This is the beginning of the message list table.
+ * It wraps around all messages
+ */
+ $safe_name = preg_replace("/[^0-9A-Za-z_]/", '_', $aMailbox['NAME']);
+ $form_name = "FormMsgs" . $safe_name;
+
+ echo ' |