{template "member","header"}
<div id="main">
{template "message","left"}
	<div id="right">
		<p id="position"><strong>当前位置：</strong><a href="{$M[url]}index.php">短消息</a>发件箱</p>
        <form name="myform" id="myform" method="post" action="{$M[url]}outbox.php">
    	 <table cellpadding="0" cellspacing="1" class="table_list">
         <caption>
      		{$anoucement}
      	  </caption>
        <tr>
        	<th width="5%">选中</th>
         	<th width="*">标题</th>
			<th width="10%">回复数</th>
           	<th width="10%">收件人</th>
			<th width="20%">发送时间</th>
        </tr>
        {loop $arr_message $msg}
        <tr>
        	<td><input type="checkbox" name="arr_msgid[]" class="input_1" id="checkbox" value="{$msg['messageid']}" /></td>
            <td  class="align_left"><a href="{$M[url]}read.php?userid={$_userid}&msgid={$msg['messageid']}&out=1">{if $msg['status'] == 2}<strong class="c_orange">{$msg['subject']}</strong>{else}{$msg['subject']}{/if}</a></td>
			<td>{$msg['num_reply']}</td>
            <td><a href="{space_url($msg['send_to_id'])}" target="_blank">{username($msg['send_to_id'])}</a></td>
			<td>{$msg['date']}</td>
        </tr>
        {/loop}
		<tr>
			<td colspan="5" style="text-align:left;">
				<input type="hidden" id="action" name="action" value="delete" />
				&nbsp;&nbsp; &nbsp;&nbsp;
				<input type="button" name="arr_msgid" onclick='checkall()' value="全选" />
				&nbsp;
				<input type="button" name="export" id="export" value="导出" />
				&nbsp;
				<input type="button" name="dosubmit" id="delete" value="删除" onClick="if(confirm('确认批量删除这些消息吗？')) $('form').submit();return false;" />
			</td>
		</tr>
		</table>
		<div id="pages">{$pages}</div>
		{if $url == 'inbox.php'}
		<table cellpadding="0" cellspacing="1" class="table_info">
			<caption>提示信息</caption>
			<tr>
				<td>可保存{$G['allowmessage']}条短消息</td>
			</tr>
		</table>
		{/if}
		</form>
	</div>
</div>
<div class="clear"></div>
<div id="toogle_panel"></div>
{template "member","footer"}
<script language="javascript">
	$("#export").click(function(){
		$('#action').val('export');
		$('form').submit();
	});
</script>