Initial add of csv import file. No error checking present yet for some things but...
[squirrelmail.git] / functions / mailbox_display.php
index afdbdb5c2201678ec430761fa22617b0709f20c9..bc0fb56a56bddede3cba3917abc0e76006527000 100644 (file)
@@ -8,7 +8,7 @@
     **
     **/
 
-   $mailbox_info = true;
+   $mailbox_display_php = true;
 
    function printMessageInfo($imapConnection, $t, $i, $key, $mailbox, $sort, $startMessage) {
       global $color, $msgs, $msort;
@@ -27,7 +27,7 @@
                if ($mailbox == $sent_folder) { $italic = "<i>"; $italic_end = "</i>"; }
       
       for ($i=0; $i < count($message_highlight_list); $i++) {
-         if (eregi($message_highlight_list[$i]["value"],$msg["FROM"])) {
+         if (eregi($message_highlight_list[$i]["value"],$msg[strtoupper($message_highlight_list[$i]["match_type"])])) {
             $hlt_color = $message_highlight_list[$i]["color"];
             continue;
          }   
@@ -39,6 +39,7 @@
       echo "   <td width=30% bgcolor=$hlt_color>$italic$bold$flag$senderName$flag_end$bold_end$italic_end</td>\n";
       echo "   <td nowrap width=1% bgcolor=$hlt_color><center>$bold$flag".$msg["DATE_STRING"]."$flag_end$bold_end</center></td>\n";
                if ($msg["FLAG_ANSWERED"] == true) echo "   <td bgcolor=$hlt_color width=1%><b><small>A</small></b></td>";
+               elseif (ereg("(1|2)",substr($msg["PRIORITY"],0,1))) echo "   <td bgcolor=$hlt_color width=1%><b><small><font color=$color[1]>!</font></small></b></td>";
                else    echo "   <td bgcolor=$hlt_color width=1%>&nbsp;</td>";
       echo "   <td bgcolor=$hlt_color width=%>$bold<a href=\"read_body.php?mailbox=$urlMailbox&passed_id=".$msg["ID"]."&startMessage=$startMessage&show_more=0\">$flag$subject$flag_end</a>$bold_end</td>\n";
 
@@ -64,6 +65,8 @@
                                        $from[$q] = $hdr->from;
                                        $date[$q] = $hdr->date;
                                        $subject[$q] = $hdr->subject;
+               $to[$q] = $hdr->to;
+               $priority[$q] = $hdr->priority;
 
                $flags[$q] = sqimap_get_flags ($imapConnection, $q+1);
             }
@@ -79,6 +82,8 @@
             $messages[$j]["ID"] = $j+1;
             $messages[$j]["FROM"] = decodeHeader($from[$j]);
             $messages[$j]["SUBJECT"] = decodeHeader($subject[$j]);
+            $messages[$j]["TO"] = decodeHeader($to[$j]);
+                               $messages[$j]["PRIORITY"] = $priority[$j];
    
             $num = 0;
             while ($num < count($flags[$j])) {
             next($msort);
             $k++;
          } while (isset ($key) && ($k < $i));
+       echo $key;
          printMessageInfo($imapConnection, $t, $i, $key, $mailbox, $sort, $startMessage);
       } else {
          $i = $startMessage;