<table class="table-content" style="width:100%">
  <tr>
    <th style="width:400px">
      <?php if ($box_type == 'inbox'): ?>
      Người gửi: <?php echo link_to($mail->getMsSenderName(), '/user/show?id='.$mail->getMsFrom()) ?><br/>
      <?php else: ?>
      Người nhận: <?php echo link_to($mail->getMsReceiverName(), '/user/show?id='.$mail->getMsTo()) ?><br/>
      <?php endif ?>
      Tiêu đề: <?php echo $mail->getMsSubject() ?>
    </th>
    <th>
      Ngày: <?php echo $mail->getMsTime('d-m-Y') ?><br />
      Lúc: <?php echo $mail->getMsTime('H:i:s') ?>
    </th>
  </tr>
  <tr>
    <td colspan="2">
      <?php include_component('message', 'showcontent', array('mail' => $mail)); ?>
    </td>
  </tr>
  <tr>
    <th>
      <?php if ($box_type == 'inbox'): ?>
      <?php echo link_to("Trả lời ".$mail->getMsSenderName(), '/message/mailbox?type=compose&ms_id='.$mail->getMsId()); ?>
      <?php else: ?>
      <?php echo link_to("Gửi thư khác đến ".$mail->getMsReceiverName(), '/message/mailbox?type=compose&us_to='.$mail->getMsTo()); ?>
      <?php endif ?>
    </th>
    <th>
      <?php $delLink = '/message/delete?ms_id='.$mail->getMsId().'&type='.$box_type.'&retLink='.str_replace('.', '%2E', urlencode($sf_request->getReferer())) ?>
      <?php echo link_to('Xóa', $delLink, array('onclick'=>'return confirm("Bạn có chắc chắn muốn xóa thư này?")')) ?>
    </th>
  </tr>
  <tr><td></tr>
  <tr><th colspan="2"><?php echo link_to('Trở lại danh sách mail', $sf_request->getReferer()) ?></th></tr>
</table>
