<table border="0" cellpadding="0" cellspacing="0" class="from_table2_one">
	<thead>
		<tr class="area_ajax_list_title">
		  <th class="pd-left" width="34%" align="left">
		    <tpl> $lanagMailType </tpl>
		 </th>
		  <th width="34%" align="left">
		    <tpl> $lanagMailCaption </tpl>
		 </th>
		  <th width="13%" align="left">
		    <tpl> $lanagMailSendEstate </tpl>
		  </th>
		  <th width="13%" align="left">
		    <tpl> $lanagMailSendSet </tpl>
		  </th>
		  <th width="6%" align="left">
		    <tpl> $langCOperation </tpl>
		 </th>
		</tr>
	</thead>
	<tpl> section name=i loop=$mail_array </tpl>
		<tr>
			<td class="pd-left" width="34%" align="left"><tpl> $mail_array[i].genre </tpl>
				<tpl> if $mail_array[i].ifsystem eq '1' </tpl>
				[<tpl> $lanagMailNotSysTemplate </tpl>]<tpl> /if </tpl>
		  </td>
		  <td width="34%" align="left"><tpl> $mail_array[i].title </tpl></td>
			<td width="13%">
				<tpl> if $mail_array[i].ifopen eq '0' </tpl><tpl> $langCClose </tpl>
				<tpl> else if $mail_array[i].ifopen eq '1' </tpl><tpl> $langCOpen </tpl>
				<tpl> /if </tpl>
		  </td>
			<td width="13%">
				<tpl> if $mail_array[i].ifopen eq '0' </tpl><a href="javascript:;" onclick="ajax_state('1','<tpl> $mail_array[i].mail_id </tpl>');" title="<tpl> $langCOpen </tpl>" class="open_a_pic"></a>
				<tpl> else if $mail_array[i].ifopen eq '1' </tpl>
				<a href="javascript:;" onclick="ajax_state('0','<tpl> $mail_array[i].mail_id </tpl>');" title="<tpl> $langCClose </tpl>" class="lock_a_pic"></a>
				<tpl> /if </tpl>
		  </td>
			<td width="6%">
				<a href="javascript:;"  onclick="ShowDiv='result_content';getPageContent('mailcontent.manage.php?action=modi&genre=<tpl> $mail_array[i].genre </tpl>&curpage=<tpl> $curpage </tpl>')" title="<tpl> $langCmodi </tpl>" class="modify_a_pic">
			  </a>
				<tpl> if $mail_array[i].ifsystem eq '1' </tpl>
				<a href="javascript:;" onclick="ajax_del('<tpl> $mail_array[i].mail_id </tpl>');" title="<tpl> $langCdele </tpl>" class="del_a_pic"></a>
				<tpl> /if </tpl>
		  </td>
		</tr>
	<tpl> /section </tpl>
	
</table>
<div class="table-5-bottom"><div style="float:right"><tpl> $page_list </tpl></div></div>
<input type="hidden" name="del_id" id="del_id" />
<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> $lanagMailConfirmDelete </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)"/>
</div>

<script language="javascript">
var question = $('#question')[0];
$(document).ready(function() {
	$('#yes').click(function() {
		$.unblockUI();
		$.ajax({
			url: "mailcontent.manage.php?action=del",
			data: "id="+$("#del_id").val(),
			type:'post',
			dataType:"json",
			beforeSubmit:  showLoading(showSaveText),   // 提交之前执行的方法
			success: function(msg){
				hideLoading();
				showMessage(msg.message,msg.type);
				if(msg.type == 1){
					ShowDiv = "result_content";
						getPageContent("mailcontent.manage.php?action=ajaxlist<tpl> if $mail_array|@count neq 1 </tpl>&curpage=<tpl>$curpage</tpl><tpl> /if </tpl>");
				}
				$.unblockUI(); 
			}
		});
		return false; 
	});
	$('#no').click($.unblockUI);
});
function ajax_state(state,id){
	$.ajax({
		url: "mailcontent.manage.php?action=set_state",
		data: 'state='+state+"&id="+id,
		type:'post',
		dataType:"json",
		beforeSubmit:  showLoading(showSaveText),   // 提交之前执行的方法
		success: function(msg){
			hideLoading();
			showMessage(msg.message,msg.type);
			if(msg.type == 1){
				ShowDiv = "result_content";
				getPageContent("mailcontent.manage.php?action=ajaxlist&curpage=<tpl> $curpage </tpl>");
			}
			$.unblockUI(); 
		}
	});
	return false; 
}
function ajax_del(id){
	$("#del_id").val(id);
	$.blockUI(question, { width: '275px' });	
}
</script>