- $out .= "</tr>\n";
-
- if (sizeof($js_row_arr))
- $a_js_message_arr[$header->uid] = $js_row_arr;
- }
-
- // complete message table
- $out .= "</tbody></table>\n";
-
- $message_count = $IMAP->messagecount();
-
- // set client env
- $OUTPUT->add_gui_object('mailcontframe', 'mailcontframe');
- $OUTPUT->add_gui_object('messagelist', $attrib['id']);
- $OUTPUT->set_env('messagecount', $message_count);
- $OUTPUT->set_env('current_page', $IMAP->list_page);
- $OUTPUT->set_env('pagecount', ceil($message_count/$IMAP->page_size));
- $OUTPUT->set_env('sort_col', $sort_col);
- $OUTPUT->set_env('sort_order', $sort_order);
-
- if ($attrib['messageicon'])
- $OUTPUT->set_env('messageicon', $skin_path . $attrib['messageicon']);
- if ($attrib['deletedicon'])
- $OUTPUT->set_env('deletedicon', $skin_path . $attrib['deletedicon']);
- if ($attrib['unreadicon'])
- $OUTPUT->set_env('unreadicon', $skin_path . $attrib['unreadicon']);
- if ($attrib['repliedicon'])
- $OUTPUT->set_env('repliedicon', $skin_path . $attrib['repliedicon']);
- if ($attrib['forwardedicon'])
- $OUTPUT->set_env('forwardedicon', $skin_path . $attrib['forwardedicon']);
- if ($attrib['forwardedrepliedicon'])
- $OUTPUT->set_env('forwardedrepliedicon', $skin_path . $attrib['forwardedrepliedicon']);
- if ($attrib['attachmenticon'])
- $OUTPUT->set_env('attachmenticon', $skin_path . $attrib['attachmenticon']);
- if ($attrib['flaggedicon'])
- $OUTPUT->set_env('flaggedicon', $skin_path . $attrib['flaggedicon']);
- if ($attrib['unflaggedicon'])
- $OUTPUT->set_env('unflaggedicon', $skin_path . $attrib['unflaggedicon']);
-
- $OUTPUT->set_env('messages', $a_js_message_arr);
- $OUTPUT->set_env('coltypes', $a_show_cols);
-
- $OUTPUT->include_script('list.js');
-
- return $out;
- }