<{include file="index/header.html"}>  
<div class="nav">
	<a href="?m=goods_act&a=group" class="ch">拼团团购</a> 
	<a href="?m=goods_act&a=group_order">拼团订单</a> 
</div>  
<div class="filter"> 
	<a href="?m=goods_act&a=group" class="<{if $smarty.get.status == ''}>option_ch<{else}>option<{/if}>">全部</a>
	<a href="?m=goods_act&a=group&status=1" class="<{if $smarty.get.status == '1'}>option_ch<{else}>option<{/if}>">已通过</a>
	<a href="?m=goods_act&a=group&status=0" class="<{if $smarty.get.status == '0'}>option_ch<{else}>option<{/if}>">已申请</a> 
	<form action="#" method="get">
		<input type="hidden" name="m" value="goods"/>	
		<input type="hidden" name="a" value="index"/>
		<div class="sch">
			<input type="text" name="key" class="text" value="" placeholder="请输入产品关键字"/>
			<input type="submit" class="submit" value="确定"/>
		</div>
	</form> 
</div>
<div class="main"> 
	<table class="ltable">
	  	<thead>
		  	<tr> 
				<th width="40">图片</th>
				<th width="380">标题</td> 
				<th width="120">开始时间</th>
				<th width="120">结束时间</th> 
				<th width="60" class="center">通过</th>
				<th width="70">操作</th>
				<th width="120">添加时间</th>
				<th></th>
		  	</tr>
	  	</thead>
		<tbody>
	<{if $data.list}>
		<{foreach item=i from=$data.list}>
			<tr> 
				<td><a href="index.php?m=goods&a=detail&id=<{$i.gid}>" target="_blank"><img src="<{$__IMG__}><{$i.images|img_size:50x50}>" width="35" height="35"/></a></td> 
				<td valign="top"><a href="index.php?m=goods&a=detail&id=<{$i.gid}>" target="_blank"><{$i.title}></a></td> 
				<td><{$i.start_time}></td>
				<td><{$i.end_time}></td>  
				<td class="center"><a href="javascript:status('<{$i.id}>','status')" id="status_<{$i.id}>"><img src="<{$__APP__}>public/images/status_<{$i.status}>.png"></a></td> 
				<td><a href="javascript:;" data-id="<{$i.id}>" class="del">删除</a></td>
				<td><{$i.addtime}> </td>
				<td></td>
			</tr>
		<{/foreach}>
	<{else}>
	  		<tr><td colspan="13">还没有数据，赶快添加吧！</td></tr>
	<{/if}>
		</tbody>
	</table>
	<{if $data.page}>
		<div class="operate">
			<div class="tpage"><{$data.page}></div>
		</div>
	<{/if}>
</div>
<{include file="index/footer.html"}> 
<script type="text/javascript">
_delete("?m=goods_act&a=seckill_del", '.del_ck');
function status(id,type){
	$.post("?m=goods_act&a=group_status",{id:id, type:type},function(data){
 		if(data == '0' || data == '1'){
			$("#"+type+"_"+id+" img").attr('src','<{$__APP__}>public/images/status_'+data+'.png');
		}else{ alert('更新失败'); } 
	});	
} 
</script>