<form action="payment.manage.php?action=del" id="form_del" name="form_del" method="post">
<table border="0" cellpadding="0" cellspacing="0" class="from_table2_one">
	<thead>
		<tr class="area_ajax_list_title">
		  <th class="pd-left" align="left" width="170">
		    <tpl> $langSysPaymentName </tpl>
		    </th>
		  <th align="left"  width="170">
		    <tpl> $langSysPaymentType </tpl>
		    </th>
		  <th align="left"  width="170">
		    <tpl> $langSysPaymentEstate </tpl>
		    </th>
		  <th align="left"  width="170">
		    <tpl> $langCOperation </tpl>
		    </th>
		</tr>
	</thead>
	<tpl> if $dir_array[0].dir_name neq '' </tpl>
		<tpl> section name=i loop=$dir_array </tpl>
			<tpl> if $dir_array[i].is_module neq '' </tpl>
			<tr>
				<td class="pd-left" align="left"  width="170">
					<tpl> if $dir_array[i].is_module neq '' </tpl>
						<tpl> $dir_array[i].module_array.name </tpl>
					<tpl> else </tpl>
						<tpl> $dir_array[i].dir_name </tpl>
					<tpl> /if </tpl>
			  </td>
				<td align="left"  width="170">
					<tpl> if $dir_array[i].module_array.type eq 'vouch' </tpl>
						<tpl> $langSysPaymentSurety </tpl>
					<tpl> elseif $dir_array[i].module_array.type eq 'instant' </tpl>
						<tpl> $langSysPaymentPrompt </tpl>
					<tpl> elseif $dir_array[i].module_array.type eq 'offline' </tpl>
						<tpl> $langSysPaymentDown </tpl>
					<tpl> else </tpl>
						<tpl> $langCNot </tpl>
					<tpl> /if </tpl>
			  </td>
				<td align="left"  width="170">
					<tpl> if $dir_array[i].is_module neq '' </tpl>
						<tpl> if $dir_array[i].is_setup neq '' </tpl>
							<tpl> if $dir_array[i].is_open neq '' </tpl>
								<tpl> $langCOpen </tpl>
							<tpl> else </tpl>
								<tpl> $langCClose </tpl>
							<tpl> /if </tpl>
						<tpl> else </tpl>
							<tpl> $langSysPaymentNoSetup </tpl>
						<tpl> /if </tpl>
					<tpl> else </tpl>
						<tpl> $langSysPaymentCannotIdentify </tpl>
					<tpl> /if </tpl>
			  </td>
				<td align="left"  width="170">
					<tpl> if $dir_array[i].is_module neq '' </tpl>
						<tpl> if $dir_array[i].is_setup neq '' </tpl>
							<a href="javascript:;" onclick="hideMessage();ajax_modi('<tpl> $dir_array[i].module_array.dir </tpl>');" title="<tpl> $langSysPaymentM </tpl>" class="management_a_pic"></a> 
							<a href="javascript:;" onclick="hideMessage();ajax_unsetup('<tpl> $dir_array[i].module_array.dir </tpl>');" title="<tpl> $langSysPaymentUninstall </tpl>" class="del_a_pic"></a>
						<tpl> else </tpl>
							<a href="javascript:;" onclick="hideMessage();ajax_setup('<tpl> $dir_array[i].module_array.dir </tpl>');" title="<tpl> $langSysPaymentSetup </tpl>" class="instal_a_pic"></a>
						<tpl> /if </tpl>
					<tpl> else </tpl>
						<tpl> $langSysPaymentCannotIdentify </tpl>
					<tpl> /if </tpl>
			  </td>
			</tr>
			<tpl> /if </tpl>
		<tpl> /section </tpl>
		<tr>
			<td colspan="6">
				<div style="float:right; padding-right:20px">
					<tpl> $page_list </tpl>		
				</div>
			</td>
		</tr>
	<tpl> else  </tpl>
		<tr>
			<td colspan="6"><tpl> $langSysPaymentNotData </tpl></td>
		</tr>
	<tpl> /if </tpl>
</table>
</form>
<script>
//删除
function ajax_del(id){
	$.ajax({
		url: "payment.manage.php",
		data: "action=del&id="+id,
		type:'post',
		dataType:"json",
		beforeSubmit:  showLoading(showText),// 提交之前执行的方法
		success: function(msg){
			hideLoading();
			showMessage(msg.message,msg.type);
			if(msg.type == 1){
				ShowDiv = "result_content";
				getPageContent("payment.manage.php?action=ajax_list");
			}
		}
	});
	return false;
}

//安装
function ajax_setup(dir_name){
	
	$.ajax({
		url: "payment.manage.php",
		data: "action=setup&dir_name="+dir_name,
		type:'post',
		dataType:"json",
		beforeSubmit:  showLoading(showText),// 提交之前执行的方法
		success: function(msg){
			hideLoading();
			showMessage(msg.message,msg.type);
			if(msg.type == 1){
				ShowDiv = "result_content";
				getPageContent("payment.manage.php?action=ajax_list");
			}
		}
	});
	return false;
}
//卸载
function ajax_unsetup(dir_name){
	$.ajax({
		url: "payment.manage.php",
		data: "action=unsetup&dir_name="+dir_name,
		type:'post',
		dataType:"json",
		beforeSubmit:  showLoading(showText),// 提交之前执行的方法
		success: function(msg){
			hideLoading();
			showMessage(msg.message,msg.type);
			if(msg.type == 1){
				ShowDiv = "result_content";
				getPageContent("payment.manage.php?action=ajax_list");
			}
		}
	});
	return false;
}
//管理
function ajax_modi(dir_name){
	ShowDiv = "result_content";
	getPageContent("payment.manage.php?action=modi&dir_name="+dir_name);
}
</script>