<form action="advertisement.manage.php?action=del" id="form_del" name="form_del" method="post" style="padding-bottom:20px;"><table class="from_table2_one top-1">
	 <thead>
	 	 <tr class="area_ajax_list_title">
		  <th class="pd-left" width="50"><tpl> $langOtherSelect </tpl></th>	
	      <th width="150"><tpl> $langOtherTransferCode </tpl></th>
   	      <th width="120"><tpl> $langOtherType </tpl></th>
		  <th width="120"><tpl> $langOtherEstate </tpl></th>
		  <th width="120"><tpl> $langCSort </tpl></th>
		  <th width="120"><tpl> $langCOperation </tpl></th>
      </tr>
	  </thead>
	  <tpl> if $adv_array[0].adv_id neq '' </tpl>
		  <tpl> section name=i loop=$adv_array </tpl>
		  <tr>
		    <td class="pd-left" width="50"><input name="adv_id[]" type="checkbox" value="<tpl> $adv_array[i].adv_id </tpl>"/></td>	
		    <td width="150"><tpl> $adv_array[i].adv_code </tpl></td>
			  <td width="120"><tpl> $adv_array[i].type_name </tpl></td>
			  <td width="120"><tpl> if $adv_array[i].adv_state eq '0' </tpl>
			  		<tpl> $langCOpen </tpl>
				<tpl> else if $adv_array[i].adv_state eq '1' </tpl>
					<tpl> $langCClose </tpl>
				<tpl> /if </tpl>
		    </td>
			  <td width="120"><tpl> $adv_array[i].adv_sort </tpl></td>
			  <td width="120">
			  	<a href="javascript:;" onclick="hideMessage();ajax_modi('<tpl> $adv_array[i].adv_id </tpl>');" title="<tpl> $langCedit </tpl>" class="edit_a_pic">
			  	</a> 
			</td>
		  </tr>
		  <tpl> /section </tpl>
		 
		  <tpl> else  </tpl>
		  <tr>
			<td colspan="6"><tpl> $langCNull </tpl>！</td>
		  </tr>
		<tpl> /if </tpl>
  </table>
  <div class="table-5-bottom">
  <div class="p-left">
				<span class="btn_left"><input name="selectall" type="button" id="selectall" value="<tpl> $langOtherAllSelect </tpl>" class="btn_submit"/></span>
				<span class="btn_left"><input name="negative" type="button" id="negative" value="<tpl> $langOtherReverseSelect </tpl>" class="btn_submit"/></span>
				<span class="btn_left"><input id="delbutton" name="delbutton" value="<tpl> $langOtherDelSelect </tpl>" class="btn_submit" type="button"/></span>
			  
				<div style="float:right; padding-right:20px">
				<tpl> $page_list </tpl>		
				</div>
  </div></div>
  </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> $langOtherConfirmDel </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() {	
	$('#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("advertisement.manage.php?action=ajax_list<tpl>if $adv_array|@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);
});	

//编辑
function ajax_modi(id){
	//载入页面
	ShowDiv = "result_content";
	getPageContent("advertisement.manage.php?action=modi&id="+id+"&curpage=<tpl>$curpage</tpl>");
}


//显示类型跳转
function ajax_select(str){
	//载入页面
	ShowDiv = "result_content";
	getPageContent("link.manage.php?action=ajax_list&select_type="+str);
}
</script>