<{include file="index/header.html"}>
<div class="nav"><span>品牌列表</span></div>
<div class="explain">
	<div class="name"><span>操作提示</span></div>
	<div class="con">
		<p>产品品牌展示，品牌的划分可以具体到某一分类下，如真维斯对于的男装，在外套中，可以选择真维斯，归于男装品牌。也可以归为顶级的分类，归为男女装。</p> 
	</div> 
</div>
<div class="filter">
	<a href="<{$__ADMIN__}>goods_brand/edit" class="add">添加品牌</a>
	<input type="button" name="del_checked" class="del_ck button" value="删除选项"/> 
</div>
<div class="main">  
	<table class="ltable">
		<thead>
			<tr>
				<th width="30"><input type="checkbox" class="checked_all"/></th> 
				<th width="100">操作</th> 
				<th>品牌名称</th>
				<th width="100">所属分类</th>
				<th width="60">排序</th>
				<th width="60">状态</th> 
				<th width="130">时间</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="javascript:;" data-id="<{$i.id}>" class="del">删除</a>
							<a href="<{$__ADMIN__}>goods_brand/edit?id=<{$i.id}>" class="edit">编辑</a>
						</td> 
						<td><span style="float: left;"><{$i.name}></span>
							<div class="upload_tip vtip" data-img="<{if $i.images}><{$__IMG__}><{$i.images|img_size:120x0}><{/if}>"></div>
						</td>
						<td><{$i.category_cn}></td>
						<td><{$i.px}></td> 
						<td><input type="checkbox" name="status" class="type2 offline" data-id="<{$i.id}>" <{if $i.status == '1'}>checked="checked"<{/if}>/></td> 
						<td><{$i.addtime}></td>
					</tr> 
				<{/foreach}>
			<{else}>
				<tr><td colspan="7">还没有数据，赶快添加吧！</td></tr>
			<{/if}>
		</tbody> 
	</table> 
	<{if $data.page}><div class="page"><{$data.page}></div><{/if}>
</div>
<{include file="index/footer.html"}>
<script type="text/javascript">
_delete('<{$__ADMIN__}>goods_brand/del', '.del_ck');
$(function(){
	$("input.offline").click(function(){
		id = $(this).attr('data-id'); 
		$.post('<{$__ADMIN__}>goods_brand/status?id='+id, function(result){
			data = jQuery.parseJSON(result); 
			if(data.error == '0'){
				$.alert('操作成功'); 
			}else{
				alert(data.msg);
			}
		}); 
	});
});
</script>