- if ($seen == false) {
- echo " <TD><FONT FACE=\"Arial,Helvetica\"><nobr><B><input type=checkbox name=\"msg[$t]\" value=$i></B></nobr></FONT></TD>\n";
- echo " <TD><FONT FACE=\"Arial,Helvetica\"><B>$senderName</B></FONT></TD>\n";
- echo " <TD><CENTER><B><FONT FACE=\"Arial,Helvetica\">$dateString</FONT></B></CENTER></TD>\n";
- echo " <TD><FONT FACE=\"Arial,Helvetica\"><B><A HREF=\"read_body.php?mailbox=$urlMailbox&passed_id=$i&sort=$sort&startMessage=$startMessage\">$subject</A></B></FONT></TD>\n";
- } else {
- echo " <TD><FONT FACE=\"Arial,Helvetica\"><nobr><input type=checkbox name=\"msg[$t]\" value=$i></nobr></FONT></TD>\n";
- echo " <TD><FONT FACE=\"Arial,Helvetica\">$senderName</FONT></TD>\n";
- echo " <TD><FONT FACE=\"Arial,Helvetica\"><CENTER>$dateString</CENTER></FONT></TD>\n";
- echo " <TD><FONT FACE=\"Arial,Helvetica\"><A HREF=\"read_body.php?mailbox=$urlMailbox&passed_id=$i&sort=$sort&startMessage=$startMessage\">$subject</A></FONT></TD>\n";
+
+ if ($msg["FLAG_FLAGGED"] == true) { $flag = "<font color=$color[2]>"; $flag_end = "</font>"; }
+ if ($msg["FLAG_SEEN"] == false) { $bold = "<b>"; $bold_end = "</b>"; }
+ if ($mailbox == $sent_folder) { $italic = "<i>"; $italic_end = "</i>"; }
+
+ for ($i=0; $i < count($message_highlight_list); $i++) {
+ if (trim($message_highlight_list[$i]["value"]) != "") {
+ if ($message_highlight_list[$i]["match_type"] == "to_cc") {
+ if (strpos("^^".strtolower($msg["TO"]), strtolower($message_highlight_list[$i]["value"])) || strpos("^^".strtolower($msg["CC"]), strtolower($message_highlight_list[$i]["value"]))) {
+ $hlt_color = $message_highlight_list[$i]["color"];
+ continue;
+ }
+ } else if (strpos("^^".strtolower($msg[strtoupper($message_highlight_list[$i]["match_type"])]),strtolower($message_highlight_list[$i]["value"]))) {
+ $hlt_color = $message_highlight_list[$i]["color"];
+ continue;
+ }
+ }
+ }
+
+ if (!$hlt_color)
+ $hlt_color = $color[4];
+
+ if ($where && $what) {
+ $search_stuff = "&where=".urlencode($where)."&what=".urlencode($what);
+ }
+
+ for ($i=1; $i <= count($index_order); $i++) {
+ switch ($index_order[$i]) {
+ case 1: # checkbox
+ echo " <td width=1% bgcolor=$hlt_color align=center><input type=checkbox name=\"msg[$t]\" value=".$msg["ID"]."$checked></TD>\n";
+ break;
+ case 2: # from
+ echo " <td width=30% bgcolor=$hlt_color>$italic$bold$flag$senderName$flag_end$bold_end$italic_end</td>\n";
+ break;
+ case 3: # date
+ echo " <td nowrap width=1% bgcolor=$hlt_color><center>$bold$flag".$msg["DATE_STRING"]."$flag_end$bold_end</center></td>\n";
+ break;
+ case 4: # subject
+ echo " <td bgcolor=$hlt_color>$bold<a href=\"read_body.php?mailbox=$urlMailbox&passed_id=".$msg["ID"]."&startMessage=$startMessage&show_more=0$search_stuff\">$flag$subject$flag_end</a>$bold_end</td>\n";
+ break;
+ case 5: # flags
+ $stuff = false;
+ echo " <td bgcolor=$hlt_color width=1%><b><small>\n";
+ if ($msg["FLAG_ANSWERED"] == true) {
+ echo "A\n";
+ $stuff = true;
+ }
+ if ($msg["TYPE0"] == "multipart") {
+ echo "+\n";
+ $stuff = true;
+ }
+ if (ereg("(1|2)",substr($msg["PRIORITY"],0,1))) {
+ echo "<font color=$color[1]>!</font>\n";
+ $stuff = true;
+ }
+ if (!$stuff) echo " \n";
+ echo "</small></b></td>\n";
+ break;
+ case 6: # size
+ echo " <td bgcolor=$hlt_color width=1%>$bold".show_readable_size($msg['SIZE'])."$bold_end</td>\n";
+ break;
+ }