<{import file="index/header.html"}> 
<div class="nav">
	<a href="<{$__ADMIN__}>promote/seckill" class="ch">限时秒杀</a> 
	<a href="<{$__ADMIN__}>promote/seckill_time">时间设置</a>  
</div>
<div class="filter"> 
	<input type="button" name="del_checked" class="del_ck button" value="删除选项"/> 
	<a href="<{$__ADMIN__}>promote/seckill" class="option <{if $smarty.get.type == ''}>option_ch<{/if}>">全部</a>
	<a href="<{$__ADMIN__}>promote/seckill?type=1" class="option <{if $smarty.get.type == '1'}>option_ch<{/if}>">未开始</a> 
	<a href="<{$__ADMIN__}>promote/seckill?type=2" class="option <{if $smarty.get.type == '2'}>option_ch<{/if}>">进行中</a> 
	<a href="<{$__ADMIN__}>promote/seckill?type=3" class="option <{if $smarty.get.type == '3'}>option_ch<{/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="30"><input type="checkbox" class="checked_all"/></th> 
				<th width="50"></th>
				<th>活动名称</td> 
				<th width="120">开始时间</th>
				<th width="120">结束时间</th> 
				<th width="60">通过</th> 
				<th width="50">操作</th>
				<th width="120">时间</th> 
		  	</tr>
	  	</thead>
		<tbody>
			<{if $data.list}>
				<{foreach item=i from=$data.list}>
					<tr> 
						<td><input name="key_id[]" type="checkbox" value="<{$i.id}>" class="checked_list"/></td> 
						<td><a href="<{$__URI__}>goods/<{$i.gid}><{$__HTML__}>" target="_blank">
							<img src="<{$__IMG__}><{$i.images|img_size:50x50}>" width="38" height="38"/></a>
						</td> 
						<td valign="top"><a href="<{$__URI__}>goods/<{$i.gid}><{$__HTML__}>" target="_blank"><{$i.title}></a></td>
						<td><{$i.start_time}></td>
						<td><{$i.end_time}></td> 
						<td><input type="checkbox" name="status" class="type2 offline" data-id="<{$i.id}>" <{if $i.status == '1'}>checked="checked"<{/if}>/> </td> 
						<td><a href="javascript:;" data-id="<{$i.id}>" class="del">删除</a></td>
						<td><{$i.addtime}> </td> 
					</tr>
				<{/foreach}>
			<{else}>
					<tr><td colspan="9">还没有数据，赶快添加吧！</td></tr>
			<{/if}>
		</tbody>
	</table>
	<{if $data.page}>
		<div class="operate"><div class="tpage"><{$data.page}></div></div>
	<{/if}>
</div>
<{import file="index/footer.html"}> 
<script type="text/javascript">
_delete("<{$__ADMIN__}>promote/seckill_del", '.del_ck');
$(function(){
	$("input.offline").click(function(){
		id = $(this).attr('data-id'); 
		$.post('<{$__ADMIN__}>promote/seckill_status?id='+id, function(result){
			data = jQuery.parseJSON(result); 
			if(data.error == '0'){
				$.alert('操作成功'); 
			}else{
				alert(data.msg);
			}
		}); 
	});
});
</script>