+ displayMessageArray($imapConnection, $numMessages, $startMessage, $msgs, $msort, $mailbox, $sort, $color,$show_num);
+ }
+
+ // generic function to convert the msgs array into an HTML table
+ function displayMessageArray($imapConnection, $numMessages, $startMessage, &$msgs, $msort, $mailbox, $sort, $color,$show_num) {
+ global $folder_prefix, $sent_folder;
+ global $imapServerAddress;
+
+ // do a check to see if the config stuff has already been included or not
+// if (!isset($imapServerAddress))
+// include("../config/config.php");
+
+ // if cache isn't already set, do it now
+ if (!session_is_registered("msgs"))
+ session_register("msgs");
+ if (!session_is_registered("msort"))
+ session_register("msort");