--------------------
<?php use_helper('Javascript') ?>
<?php $expandlink = '/message/showcontent?ms_id='.$ms_id.'&hide='.(1 - $hide) ?>
<?php echo link_to_remote($hide? ' >>': ' <<', array('update'=>'mail'.$ms_id, 'url'=>$expandlink)) ?><br>
<?php if ($hide == 0): ?>
  <div style="margin-left:10px">
    <?php $mail = TblusermessagePeer::retrieveByPK($ms_id) ?>
    <?php if (!$mail): ?>
      Tin nhắn không còn tồn tại
    <?php else: ?>
    <?php $userlink = '/user/show?id='.$mail->getMsFrom() ?>
    <?php echo link_to($mail->getMsSenderName(), $userlink).' @ '.$mail->getMsTime('H:i:s d-m-Y') ?><br>
    <?php include_component('message', 'showcontent', array('mail' => $mail)); ?>
    <?php endif ?>
  </div>
<?php endif ?>