<?php TPL::output('mobile/header.tpl.htm'); ?>

<div class="message">
	<div class="newm">
	  <div class="pic"></div> Message conversation
    </div>
    <div class=" talk">
   	  <div>
   	  	<form action="inbox/ajax/send/" method="post" id="pm_form" onsubmit="return false">
   	  	<input type="hidden" name="post_hash" value="<?php echo new_post_hash(); ?>" />
   	  	<input type="hidden" name="recipient" value="<?php echo $this->recipient_user['user_name']; ?>" />
   	  	<input type="hidden" name="return_url" value="/mobile/inbox/" />
   	  	<div style="margin-right:12px"><textarea class="txt" name="message"></textarea><br/></div>
        <div class="wrong" id="tip_error_message" style="display:none"></div>
        <div class="sub" onclick="mobile_ajax_post($('#pm_form'), _mobile_tips_form_processer);">Send</div>
   	  	</form>
   	  </div>   
        <ul>
        	<?php foreach($this->list AS $key => $val){ ?>
        	<?php if ($val['sender_uid'] != $this->user_id) { ?>
        	<li><img src="<?php echo get_avatar_url($val['sender_uid'], 'mid'); ?>" width="30" height="30" />
          		<div class="al"> &nbsp;</div>
                <div class="sb">
                	<?php echo nl2br($val['notice_content']); ?>
          			
                	<p class="time"><?php echo date('Y-m-d H:i:s', $val['add_time']); ?></p>
                </div>
			</li>
			<?php } else { ?>
        	<li>
        		<div class="ar"> &nbsp;</div>
        		<div class="i">
	        		<?php echo nl2br($val['notice_content']); ?>
          			
                	<p class="time"><?php echo date('Y-m-d H:i:s', $val['add_time']); ?></p>
        		</div>
            </li>
        	<?php } ?>
        	<?php } ?>
            <div style="clear:both"></div>
        </ul>
     </div>
</div>

<?php TPL::output('mobile/footer.tpl.htm'); ?>