<form action="system_power.manage.php?action=del_group" 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="200">
		  <tpl> $langSystemPDelete </tpl>
		  </th>
		<th  align="left" width="200">
		  <tpl> $langSystemPGroupName </tpl>
		  </th>
		<th  align="left" width="200">
		  <tpl> $langSystemPAssign </tpl>
		  </th>
	</tr>
	</thead>
	<tpl> if $sys_group_list[0].sys_group_id neq '' </tpl>
		<tpl> section name=loop loop=$sys_group_list </tpl>
	<tr>
	  <td class="pd-left-1" width="200" align="left"><input type="checkbox" name="sys_group_id[]" value="<tpl> $sys_group_list[loop].sys_group_id </tpl>" /></td>
		<td width="200" align="left"><tpl> $sys_group_list[loop].sys_group_name </tpl></td>
		<td width="200" align="left"><a href="javascript:;" onclick="ShowDiv='result_content',getPageContent( 'system_power.manage.php?action=modi_group&sys_group_id=<tpl> $sys_group_list[loop].sys_group_id </tpl>&curpage=<tpl> $curpage </tpl>');" title="<tpl> $langSystemPSetup </tpl>" class="set_a_pic">
	  </a></td>
	</tr>
		<tpl> /section </tpl>
	
	<tpl> else  </tpl>
		<tr>
			<td colspan="3" align="center"><tpl> $langSystemPNotContent </tpl></td>
		</tr>
	<tpl> /if  </tpl>
</table>
<tpl> if $sys_group_list[0].sys_group_id neq '' </tpl>
<div class="table-5-bottom">
 <div style="float:left; padding-left:20px;">

<span class="btn_left" >
			  <input name="selectall" type="button" id="selectall" class="btn_submit" value="<tpl> $langSystemPAllSelect </tpl>" /></span>
			   	<span class="btn_left">
			  <input name="negative" type="button" id="negative" class="btn_submit" value="<tpl> $langSystemPContrarySelect </tpl>" /></span>
			   	<span class="btn_left">
			  <input type="button" value="<tpl> $langSystemPDelGroup </tpl>" id="delbutton" class="btn_submit" name="delbutton" /></span>
			  	<span class="btn_marginright"> 
			  <tpl> $page_list </tpl>
			  </span>
			  </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> $langSystemPConfirmDel </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" type="text/javascript">
$(document).ready(function() {
	$('#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.message);
						if(msg.type == '1'){
							ShowDiv = "result_content";
							getPageContent("system_power.manage.php?action=ajax_group<tpl> if $sys_group_list|@count neq 1 </tpl>&curpage=<tpl> $curpage </tpl><tpl> /if </tpl>");
						}
					},
		type:      'post',
		dataType:  'json'
	};
	
	var question = $('#question')[0];
	$("#delbutton").click(function(){
		$.blockUI(question, { width: '275px' });
	});
	
	$('#yes').click(function() {
		$.unblockUI();
		$('#form_del').ajaxSubmit(options_del);			
		return false;
	});
	$('#no').click($.unblockUI);
});
</script>