<?php
 if ($h->Unseen == 'U') { $bg = $default->new_item_bg; }
 elseif ($h->Deleted == 'D') { $bg = $default->del_item_bg; }
 else { $bg = $default->text_bg; }
?>

<tr bgcolor="<?php echo $bg ?>">
<td><font size="2"><input type=checkbox name="indices[]" value="<?php echo $msgnum ?>"></font></td>
<td>
<?php
  $status = '';
  if ($h->Deleted == 'D')  $status .= $default->deleted_flag;
  if ($h->Unseen  == 'U')  $status .= $default->unread_flag;
  if ($h->Answered == 'A') $status .= $default->answered_flag;
  if (isset($h->toaddress) && strstr(strtolower($h->toaddress), strtolower("$user@$server"))) $status .= '+';
  if ($status) echo $status;
  else echo '&nbsp;';
?>
</td>
<td><font size="2" face="<?php echo $default->font->face; ?>"><?php echo $dat ?></font></td>
<td><font size="2" face="<?php echo $default->font->face; ?>"><a href="javascript:open_compose_win('actionID=<?php echo MAILTO ?>&mailbox=<?php echo urlencode($mailbox) ?>&index=<?php echo $msgnum ?>&bodypart=1');"><?php echo $frm ?></a></font></td>
<td><font size="2" face="<?php echo $default->font->face; ?>"><a href="message.php3?mailbox=<?php echo urlencode($mailbox) ?>&index=<?php echo urlencode($msgnum)?>&array_index=<?php echo $i-1 ?>"><?php echo $sub ?></a></font></td>
<td align="right"><font size="2" face="<?php echo $default->font->face; ?>"><?php echo $msg_size ?></font></td>
<td align="right">

<?php
if ($default->fetch_mime_info && isset($flag) && $flag) {
   for ($fc=0; $fc < (count($flags) > 10 ? 10 : count($flag)); $fc++)
     echo $flag[$fc];
} else echo '&nbsp;';
?>

</td>
</tr>
