  <form action="member.manage.php?action=del" id="form_del" name="form_del" method="post" style="padding:0px">
  <table class="from_table2_one" style="margin-top:10px;">	
	<thead>
		<tr class="area_ajax_list_title">
		  <th class="pd-left"><tpl> $langSysMemDel </tpl></th>
		  <th width="30"><tpl> $langSysNumber </tpl></th>
		  <th width="120"><tpl> $langSysMemberName </tpl></th>
		  <th width="180"><tpl> $langSysMemberMail </tpl></th>
		  <th width="50"><tpl> $langSysEstate </tpl></th>
		  <th width="180"><tpl> $langSysMemRegTime </tpl></th>
		  <th width="85"><tpl> $langCOperation </tpl></th>
		</tr>
    </thead>
		<tpl> if $member_array[0].member_id neq'' </tpl>
		  <tpl> section name=i loop=$member_array </tpl>
		<tr>
			<td class="pd-left-1"><input name="member_id[]" type="checkbox" value="<tpl> $member_array[i].member_id </tpl>"/></td>	
	      <td width="30"><tpl>$smarty.section.i.iteration </tpl></td>
	      <td width="120"><tpl> $member_array[i].login_name </tpl></td>
	      <td width="180"><tpl> $member_array[i].email </tpl></td>
		    <td width="50"><tpl> $member_array[i].state </tpl></td>
	      <td width="180"><tpl> $member_array[i].regist_time </tpl></td>
			<td width="80"><a href="javascript:;" onclick="ajax_modi('action=modify&member_id=<tpl> $member_array[i].member_id </tpl>&state=<tpl> $condition.state </tpl>&txtloginname=<tpl> $condition.txtloginname </tpl>&start_date=<tpl> $condition.start_date </tpl>&end_date=<tpl> $condition.end_date </tpl>&txtemail=<tpl> $condition.txtemail </tpl>&curpage=<tpl> $curpage </tpl>');" title="<tpl> $langCedit </tpl>" class="edit_a_pic">
			  </a>
			   <tpl> if $member_array[i].member_state eq 1 </tpl><a href="javascript:;" onclick="ajax_lock('action=lock&member_id=<tpl> $member_array[i].member_id </tpl>&state=<tpl> $condition.state </tpl>&txtloginname=<tpl> $condition.txtloginname </tpl>&start_date=<tpl> $condition.start_date </tpl>&end_date=<tpl> $condition.end_date </tpl>&txtemail=<tpl> $condition.txtemail </tpl>&curpage=<tpl> $curpage </tpl>');" title="<tpl> $langSysMemLocked </tpl>" class="lock_a_pic"></a>
			  <tpl> /if </tpl><tpl> if $member_array[i].member_state eq 0 </tpl><a href="javascript:;" onclick="ajax_lock('action=unlock&member_id=<tpl> $member_array[i].member_id </tpl>&state=<tpl> $condition.state </tpl>&txtloginname=<tpl> $condition.txtloginname </tpl>&start_date=<tpl> $condition.start_date </tpl>&end_date=<tpl> $condition.end_date </tpl>&txtemail=<tpl> $condition.txtemail </tpl>&curpage=<tpl> $curpage </tpl>');" title="<tpl> $langCOpen </tpl>" class="open_a_pic"></a><tpl> /if </tpl>
	      </td>
    </tr>
		  <tpl> /section </tpl>

		<tpl> else  </tpl>
		 <tr>
		   <td colspan="7" align="center"><tpl> $langCNull </tpl></td>
	  </tr>
		 <tpl> /if  </tpl>  
  </table>

<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> 
<tpl> if $member_array[0].member_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> $langSysAllSelect </tpl>" /></span>
			<span class="btn_left"><input class="btn_submit" name="negative" type="button" id="negative" value="<tpl> $langSysMemContrarySelect </tpl>" /></span>
			<!--  如果整合UC，则，不能删除该会员  -->
			<tpl> if $api_open_passport eq '1' && $api_passport_type eq '2' </tpl>
			
			<tpl> else </tpl>
			<span class="btn_left"><input class="btn_submit" type="button" id="delbutton" name="delbutton" value="<tpl> $langSysMDel </tpl>" /></span>
			<tpl> /if </tpl>
			<!--  如果整合UC，则，不能删除该会员end  -->
		
			<span class="btn_marginright">
			<tpl> $page_list </tpl>
			</span>
</div>
</div>
 <tpl> /if  </tpl>  
  </form>
<script>
$(document).ready(function() {
var question = $('#question')[0];
	
	$('#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("member.manage.php?action=ajax_list&state=<tpl> $condition.state </tpl>&txtloginname=<tpl> $condition.txtloginname </tpl>&start_date=<tpl> $condition.start_date </tpl>&end_date=<tpl> $condition.end_date </tpl>&txtemail=<tpl> $condition.txtemail </tpl><tpl> if $member_array|@count neq 1 </tpl>&curpage=<tpl> $curpage </tpl><tpl> /if </tpl>");
						}
					},
		type:      'post',
		dataType:  'json'
	};
	$("#delbutton").click(function(){
		$.blockUI(question, { width: '275px' });
	});
	
	$('#yes').click(function() {
			$.unblockUI();
			$('#form_del').ajaxSubmit(options_del);			
			return false;
		});
	$('#no').click($.unblockUI);
	
});

//锁定
function ajax_lock(str){
	$.ajax({
		url: "member.manage.php",
		data: str,
		type:'post',
		dataType:"json",
		beforeSubmit:  showLoading(showText),   // 提交之前执行的方法
		success: function(msg){
			hideLoading();
			showMessage(msg.message,msg.type);
			if(msg.type == 1){
				ShowDiv = 'result_content';
				getPageContent('member.manage.php?action=ajax_list&state=<tpl> $condition.state </tpl>&txtloginname=<tpl> $condition.txtloginname </tpl>&start_date=<tpl> $condition.start_date </tpl>&end_date=<tpl> $condition.end_date </tpl>&txtemail=<tpl> $condition.txtemail </tpl>&curpage=<tpl> $curpage </tpl>');
			}
		}
	});
	return false;
}
//编辑
function ajax_modi(str){
	$.ajax({
		url: "member.manage.php",
		data: str,
		type:'post',
		dataType:"html",
		beforeSubmit:  showLoading(showText),   // 提交之前执行的方法
		success: function(msg){
			hideLoading();
			$('#result_content').html(msg);
		}
	});
	return false;
}
</script>
