<form action="order.manage.php?action=del" id="form1" name="form1" method="post" style="margin-bottom:20px;">
<table class="from_table2_one" style="margin-top:10px;">
      <thead>
	  <tr class="area_ajax_list_title">
		<th class="pd-left"><tpl> $langSysOrderDel </tpl></th>
		
		<th width="180"><tpl> $langSysOrderBabyName </tpl></th>
		<th width="80"><tpl> $langSysOrderLiaisonSale </tpl></th>
		<th width="80"><tpl> $langSysOrderLiaisonBuy </tpl></th>
		<th width="80"><tpl> $langSysOrderPrice </tpl></th>
		<th width="80"><tpl> $langSysOrderBuyEstate </tpl></th>
		<th width="80"><tpl> $langSysOrderBothAppraise </tpl></th>
		<th width="40"><tpl> $langCOperation </tpl></th>
    </tr>
	</thead>
	<tpl> if $product_order_array[0].sp_id neq'' </tpl>
	<tpl> section name=i loop=$product_order_array </tpl>
	<tr>
		<td class="pd-left-1"><input name="chboxSPid[]" type="checkbox" value="<tpl> $product_order_array[i].sp_id </tpl>"/></td>	

		<td width="180">
		<!-- 过渡使用，如果没有快照，则查看相当商品详情 -->
		<tpl> if $product_order_array[i].sp_html neq '' </tpl>
			<a href="<tpl> $site_url </tpl>/home/order.php?action=sp_html&sp_code=<tpl> $product_order_array[i].sp_code </tpl>" target="_blank">
		<tpl> else </tpl>
			<tpl> if $product_order_array[i].html_url neq '' </tpl>
				<a href="<tpl> $product_order_array[i].html_url </tpl>" target="_blank">
			<tpl> else </tpl>
				<a href="<tpl> $site_url </tpl>/home/product.php?action=view&amp;pid=<tpl> $product_order_array[i].p_code </tpl>" target="_blank">
			<tpl> /if </tpl>
		<tpl> /if </tpl>
		<tpl> $product_order_array[i].p_name </tpl>
		</a>
	  </td>
		<td width="80"><a href="<tpl> $site_url </tpl>/store/index.php?userid=<tpl> $product_order_array[i].seller_id </tpl>" target='_blank'>
	  <tpl> $product_order_array[i].seller_name </tpl></a></td>
		<td width="80"><a href="<tpl> $site_url </tpl>/store/index.php?userid=<tpl> $product_order_array[i].buyer_id </tpl>" target='_blank'>
	  <tpl> $product_order_array[i].buyer_name </tpl></a></td>
		<td width="80"><tpl> assign var='sell_type' value = $product_order_array[i].sell_type </tpl><tpl> $p_sell_type[$sell_type] </tpl><br/>
	  <tpl> $product_order_array[i].total_price </tpl></td>
	  <td width="80"><tpl> assign var='p_sp_state' value = $product_order_array[i].sp_state </tpl><tpl> $sp_state[$p_sp_state] </tpl></td>
	  <td width="80"><tpl> $product_order_array[i].comment </tpl></td>
		<td width="40"><a href="javascript:;" onclick="ajax_view('<tpl> $product_order_array[i].sp_id </tpl>');" title="<tpl> $langCview </tpl>" class="view_a_pic">
	  </a></td>
	</tr>
		<tpl> /section </tpl>

	<tpl> else  </tpl>	
		<tr>
			<td colspan="9" align="center"><tpl> $langCNull </tpl></td>
		</tr>
	<tpl> /if  </tpl>
</table>
<tpl> if $product_order_array[0].sp_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> $langSysOrderAllSelect </tpl>" />
	    </span>
			    <span class="btn_left">
			<input class="btn_submit" name="negative" type="button" id="negative" value="<tpl> $langSysOrderContrarySelect </tpl>" />
	    </span>

			  <span class="btn_left">
			<input class="btn_submit" type="button" id="delbutton" name="delbutton" value="<tpl> $langSysOrderDelect </tpl>" />
	    </span>
<span style="float:right">
			
		  <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> $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)"/>
</div> 
<script>
$(document).ready(function() {
var question;
	$('#negative').click(
		function(){
			$('#form1 input[@type=checkbox]').each(function(){
				$(this).attr('checked',!$(this).attr('checked'))
			})
		}
	);
	$('#selectall').click(
		function(){
			$('#form1 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("order.manage.php?action=ajax_list<tpl>if $product_order_array|@count neq 1</tpl>&curpage=<tpl>$curpage</tpl><tpl>/if</tpl>");
						}
					},
		type:      'post',
		dataType:  'json'
	};
	
	question = $('#question')[0];
	$("#delbutton").click(function(){
		
		$.blockUI(question, { width: '275px' });
	});
	
	$('#yes').click(function() {
			//$.blockUI("<h1>Remote call in progress...</h1>" );
			$.unblockUI();
			$('#form1').ajaxSubmit(options_del);			
			return false;
		});
	$('#no').click($.unblockUI);
	
});

//查看
function ajax_view(id){
	ShowDiv = 'result_content';
	getPageContent('order.manage.php?action=view&sp_id='+id+'&curpage=<tpl>$curpage</tpl>');	
}
</script>