<form action="message.manage.php?action=del_message" id="form_del" name="form_del" method="post">
<table class="from_table2_one">	
	<thead>
	<tr class="area_ajax_list_title">
		<th class="pd-left" width="50"><tpl> $langMessageSelect </tpl></th>
		<th width="250"><tpl> $langMessageTitle </tpl></th>
		<th width="150"><tpl> $langMessageSendObjectType </tpl></th>
		<th width="150"><tpl> $langMessageSendTime </tpl></th>
		<th width="50"></th>
    </tr>
	</thead>
	<tpl> if $message_array[0].message_system_id neq '' </tpl>
		<tpl> section name=i loop=$message_array </tpl>
	<tr>
	  <td class="pd-left" width="50" align="center"><input type="checkbox" name="message_system_id[]"  value="<tpl> $message_array[i].message_system_id </tpl>" /></td>
	  <td width="250"><tpl> $message_array[i].title </tpl></td>
		<td width="150"><tpl> assign var=object value=$message_array[i].send_object </tpl><tpl> $system_message_object[$object] </tpl>
			<tpl> if $message_array[i].send_object eq 2</tpl>
				（<tpl> $message_array[i].system_receive_name </tpl>）
	  <tpl> /if </tpl>		</td>
	    <td width="150"><tpl> $message_array[i].send_time </tpl></td>
		<td width="50"><a href="javascript:;" onclick="ajax_view('<tpl> $message_array[i].message_system_id </tpl>');" title="<tpl> $langCview </tpl>" class="view_a_pic"></a>
	 </td>
	</tr>
		<tpl> /section </tpl>
	<tpl> else  </tpl>
	<tr>
		<td colspan="5" align="center"><tpl> $langCNull </tpl></td>
	</tr>
	<tpl> /if  </tpl>
</table>
<tpl> if $message_array[0].message_system_id neq '' </tpl>
<div class="table-5-bottom"><div class="p-left"><span class="btn_left"><input class="btn_submit" name="selectall" type="button" id="selectall" value="<tpl>$langMessageAllSelect </tpl>" /></span>
				<span class="btn_left"><input class="btn_submit" name="negative" type="button" id="negative" value="<tpl> $langMessageContrarySelect </tpl>" /></span>
			  <span class="btn_left"><input class="btn_submit"  type="button" id="delbutton" name="delbutton" value="<tpl> $langMessageDEL </tpl>" /></span><div class="btn_marginright"><tpl> $pagelist </tpl></div></div></div>
<tpl> /if  </tpl>
</form>

<div id="question" style="display:none; cursor: default; padding:10px"> 
        <b style=" font-size:14px; margin-top:10px; line-height:50px; height:50px;padding-top:10px; padding-bottom:10px"><tpl> $langCConfirmDelete </tpl></b> <br />
        <input type="button" id="yes" value="<tpl> $langCYes </tpl>"  style=" border:1px solid #CCCCCC;width:80px; margin:5px; background-image:url(../templates/system_new/images/anniu.gif)"/> 
        <input type="button" id="no" value="<tpl> $langCNo </tpl>"  style="border:1px solid #CCCCCC;width:80px; margin:5px; background-image:url(../templates/system_new/images/anniu.gif)"/>
		<input type="hidden" id="del_value" />
</div> 
<script>
$(document).ready(function() {
var question;
	$('#negative').click(
		function(){
			$('#form_del input[@type=checkbox]').each(function(){
				$(this).attr('checked',!$(this).attr('checked'))
			})
		}
	);
	$('#selectall').click(
		function(){
			$('#form_del input[@type=checkbox]').each(function(){
				$(this).attr('checked',true)
			})
		}
	);
		
	//删除操作
	var options_del = {
		beforeSubmit:  function(){showLoading(showText);},
		success:       function(msg){
						hideLoading();
						showMessage(msg.message,msg.type);
						if(msg.type == '1'){
							ShowDiv = "result_content";
							getPageContent("message.manage.php?action=ajax_list<tpl>if $message_array|@count neq 1</tpl>&curpage=<tpl>$curpage</tpl><tpl>/if</tpl>");
						}
					},
		type:      'post',
		dataType:  'json'
	};
	
	
	question = $('#question')[0];
	$("#delbutton").click(function(){
		
		$.blockUI(question, { width: '275px' });
	});
	
	$('#yes').click(function() {
			//$.blockUI("<h1>Remote call in progress...</h1>" );
			$.unblockUI();
			$('#form_del').ajaxSubmit(options_del);			
			return false;
		});
	$('#no').click($.unblockUI);
});
//查看
function ajax_view(id){
	ShowDiv = 'result_content';
	getPageContent('message.manage.php?action=view_message&message_system_id='+id+'&curpage=<tpl>$curpage</tpl>');
}
</script>